Closed as not planned
Description
Problem
RUSTC_AR is missing from the available build environment variables in build.rs.
This makes the below code not work.
cc::Build::new()
.compiler(PathBuf::from(env::var("RUSTC_LINKER").unwrap()))
.archiver(PathBuf::from(env::var("RUSTC_AR").unwrap()))
.file(lib_path.to_str().unwrap())
.compile("browser");
Proposed Solution
I started work on lexi-the-cute@287fb2a and am currently compiling Cargo in order to make sure the variable works. 4 tests fail, so I temporarily disabled them. The 4 tests are listed below.
cargo test -j 8 build_script::custom_build_ar_bad_host
cargo test -j 8 build_script::custom_build_ar_bad_host_with_arch
cargo test -j 8 build_script::custom_build_ar_host_target_with_bad_host_config
cargo test -j 8 build_script::custom_build_env_var_rustc_ar_bad_host_target
Notes
I based my commit on #5394 and am waiting for approval to make a pull request to add this feature