Skip to content

Commit

Permalink
Build script handling of OPT_LEVEL='s' (#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth authored Feb 18, 2025
1 parent cb469dc commit e0ece50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion aws-lc-fips-sys/builder/cmake_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ impl CmakeBuilder {
if opt_level.eq("1") || opt_level.eq("2") {
cmake_cfg.define("CMAKE_BUILD_TYPE", "relwithdebinfo");
} else {
cmake_cfg.define("CMAKE_BUILD_TYPE", "release");
if opt_level.eq("s") || opt_level.eq("z") {
cmake_cfg.define("CMAKE_BUILD_TYPE", "minsizerel");
} else {
cmake_cfg.define("CMAKE_BUILD_TYPE", "release");
}
// TODO: Due to the nature of the FIPS build (e.g., its dynamic generation of
// assembly files and its custom compilation commands within CMake), not all
// source paths are stripped from the resulting binary.
Expand Down
2 changes: 2 additions & 0 deletions aws-lc-sys/builder/cmake_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ impl CmakeBuilder {
if opt_level.ne("0") {
if opt_level.eq("1") || opt_level.eq("2") {
cmake_cfg.define("CMAKE_BUILD_TYPE", "relwithdebinfo");
} else if opt_level.eq("s") || opt_level.eq("z") {
cmake_cfg.define("CMAKE_BUILD_TYPE", "minsizerel");
} else {
cmake_cfg.define("CMAKE_BUILD_TYPE", "release");
}
Expand Down

0 comments on commit e0ece50

Please sign in to comment.