.bazelrc: pass ProgramData into action env, instead of hacking luajit build stuff

master
q3k 2021-05-06 22:25:21 +02:00
parent 81d578d4a0
commit 6c8875ae6a
2 changed files with 8 additions and 3 deletions

View File

@ -1,2 +1,9 @@
startup --windows_enable_symlinks
build --enable_runfiles
build --enable_runfiles
# This is needed by cc::windows_registry::find_tool et. al. It calls out into a
# MSVC COM DLL used to find MSVC installations, and that apparently relies on
# the env var being set. For some reason, just doing --action_env=ProgramData
# doesn't work, so we hardcode things to assume that it lives in C:\. We also
# pollute non-Windows build envs with this, but whatever.
build --action_env=ProgramData=C:\\ProgramData

View File

@ -147,8 +147,6 @@ impl Build {
msvcbuild.current_dir(build_dir.join("src"));
msvcbuild.arg("static");
// HACK: without this, the MSVC COM DLL used to find cl.exe/link.exe/... fails.
std::env::set_var("ProgramData", "C:\\ProgramData");
let cl = cc::windows_registry::find_tool(&target, "cl.exe").expect("failed to find cl");
for (k, v) in cl.env() {
msvcbuild.env(k, v);