File tree 2 files changed +11
-3
lines changed 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,8 @@ jobs:
116
116
cargo-xwin :
117
117
if : github.repository_owner == 'aws'
118
118
runs-on : ubuntu-latest
119
+ env :
120
+ RUSTFLAGS : ' -Clink-arg= /WX'
119
121
steps :
120
122
- name : Install build dependencies
121
123
run : |
@@ -142,6 +144,8 @@ jobs:
142
144
if : github.repository_owner == 'aws'
143
145
name : ${{ matrix.target }}
144
146
runs-on : windows-latest
147
+ env :
148
+ RUSTFLAGS : ' -Clink-arg= /WX'
145
149
strategy :
146
150
fail-fast : false
147
151
matrix :
@@ -180,6 +184,8 @@ jobs:
180
184
if : github.repository_owner == 'aws'
181
185
name : aarch64-pc-windows-msvc
182
186
runs-on : windows-latest
187
+ env :
188
+ RUSTFLAGS : ' -Clink-arg= /WX'
183
189
steps :
184
190
- uses : actions/checkout@v3
185
191
with :
Original file line number Diff line number Diff line change @@ -68,15 +68,16 @@ impl CmakeBuilder {
68
68
69
69
fn get_cmake_config ( & self ) -> cmake:: Config {
70
70
let mut cmake_cfg = cmake:: Config :: new ( & self . manifest_dir ) ;
71
- // See issue: https://github.com/aws/aws-lc-rs/issues/453
72
- cmake_cfg. static_crt ( true ) ;
71
+ if cargo_env ( "CARGO_ENCODED_RUSTFLAGS" ) . contains ( "-Ctarget-feature=+crt-static" ) {
72
+ // See issue: https://github.com/aws/aws-lc-rs/issues/453
73
+ cmake_cfg. static_crt ( true ) ;
74
+ }
73
75
cmake_cfg
74
76
}
75
77
76
78
#[ allow( clippy:: too_many_lines) ]
77
79
fn prepare_cmake_build ( & self ) -> cmake:: Config {
78
80
let mut cmake_cfg = self . get_cmake_config ( ) ;
79
-
80
81
if OutputLibType :: default ( ) == OutputLibType :: Dynamic {
81
82
cmake_cfg. define ( "BUILD_SHARED_LIBS" , "1" ) ;
82
83
} else {
@@ -91,6 +92,7 @@ impl CmakeBuilder {
91
92
cmake_cfg. define ( "CMAKE_BUILD_TYPE" , "release" ) ;
92
93
}
93
94
} else if target_os ( ) == "windows" {
95
+ // See issue: https://github.com/aws/aws-lc-rs/issues/453
94
96
cmake_cfg. define ( "CMAKE_BUILD_TYPE" , "relwithdebinfo" ) ;
95
97
} else {
96
98
cmake_cfg. define ( "CMAKE_BUILD_TYPE" , "debug" ) ;
You can’t perform that action at this time.
0 commit comments