|
4 | 4 | use crate::OutputLib::{Crypto, RustWrapper, Ssl}; |
5 | 5 | use crate::{ |
6 | 6 | cargo_env, effective_target, emit_rustc_cfg, emit_warning, execute_command, |
7 | | - is_cpu_jitter_entropy, is_no_asm, option_env, target_arch, target_env, target_family, |
8 | | - target_os, target_underscored, target_vendor, OutputLibType, TestCommandResult, |
| 7 | + is_cpu_jitter_entropy, is_crt_static, is_no_asm, option_env, target_arch, target_env, |
| 8 | + target_family, target_os, target_underscored, target_vendor, OutputLibType, TestCommandResult, |
9 | 9 | }; |
10 | 10 | use std::collections::HashMap; |
11 | 11 | use std::env; |
@@ -163,6 +163,11 @@ impl CmakeBuilder { |
163 | 163 | cmake_cfg.define("CMAKE_BUILD_TYPE", "debug"); |
164 | 164 | } |
165 | 165 |
|
| 166 | + if is_crt_static() { |
| 167 | + // Need to set this flag to enable static runtime for FIPS binaries due to limitations in cmake-rs and ninja generator. |
| 168 | + cmake_cfg.define("AWS_LC_FIPS_SYS_STATIC_RUNTIME", "ON"); |
| 169 | + } |
| 170 | + |
166 | 171 | Self::verify_compiler_support(&cc_build.get_compiler()); |
167 | 172 |
|
168 | 173 | if let Some(prefix) = &self.build_prefix { |
|
0 commit comments