File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -6029,17 +6029,19 @@ pub fn addCCArgs(
6029
6029
// function was called.
6030
6030
try argv .append ("-fno-sanitize=function" );
6031
6031
6032
- // It's recommended to use the minimal runtime in production environments
6033
- // due to the security implications of the full runtime. The minimal runtime
6034
- // doesn't provide much benefit over simply trapping.
6035
6032
if (mod .optimize_mode == .ReleaseSafe ) {
6033
+ // It's recommended to use the minimal runtime in production
6034
+ // environments due to the security implications of the full runtime.
6035
+ // The minimal runtime doesn't provide much benefit over simply
6036
+ // trapping, however, so we do that instead.
6036
6037
try argv .append ("-fsanitize-trap=undefined" );
6037
- }
6038
-
6039
- // This is necessary because, by default, Clang instructs LLVM to embed a COFF link
6040
- // dependency on `libclang_rt.ubsan_standalone.a` when the UBSan runtime is used.
6041
- if (target .os .tag == .windows ) {
6042
- try argv .append ("-fno-rtlib-defaultlib" );
6038
+ } else {
6039
+ // This is necessary because, by default, Clang instructs LLVM to embed
6040
+ // a COFF link dependency on `libclang_rt.ubsan_standalone.a` when the
6041
+ // UBSan runtime is used.
6042
+ if (target .os .tag == .windows ) {
6043
+ try argv .append ("-fno-rtlib-defaultlib" );
6044
+ }
6043
6045
}
6044
6046
}
6045
6047
}
You can’t perform that action at this time.
0 commit comments