@@ -49,20 +49,6 @@ fn main() -> io::Result<()> {
4949 )
5050 }
5151
52- // HACK(eddyb) work around https://github.com/rust-lang/cargo/issues/3676,
53- // by removing the env vars that Cargo appears to hardcode.
54- const CARGO_HARDCODED_ENV_VARS : & [ ( & str , & str ) ] = & [
55- ( "SSL_CERT_DIR" , "/etc/pki/tls/certs" ) ,
56- ( "SSL_CERT_FILE" , "/etc/pki/tls/certs/ca-bundle.crt" ) ,
57- ] ;
58- for & ( var_name, cargo_hardcoded_value) in CARGO_HARDCODED_ENV_VARS {
59- if let Ok ( value) = env:: var ( var_name) {
60- if value == cargo_hardcoded_value {
61- env:: remove_var ( var_name) ;
62- }
63- }
64- }
65-
6652 let llvm_dir = llvm_root. join ( "llvm" ) ;
6753 let bc_out = out_dir. join ( "cxx_apf_fuzz.bc" ) ;
6854 let bc_opt_out = out_dir. join ( "cxx_apf_fuzz.opt.bc" ) ;
@@ -72,6 +58,9 @@ fn main() -> io::Result<()> {
7258 // Flags could probably be split between the frontend and backend.
7359 let clang_codegen_flags = [ "-g" , "-fPIC" , "-fno-exceptions" , "-O3" , "-march=native" ] ;
7460
61+ // Note that all commands clear the environment to work around
62+ // https://github.com/rust-lang/cargo/issues/3676.
63+
7564 // HACK(eddyb) first compile all the source files into one `.bc` file:
7665 // - "unity build" (w/ `--include`) lets `-o` specify path (no `--out-dir` sadly)
7766 // - LLVM `.bc` intermediate allows the steps below to reduce dependencies
0 commit comments