SCons: Propagate the user's OS environment in env["ENV"]
This fixes a regression from #46774 where `env["ENV"]` would miss some important env variables on Windows, such as `SystemRoot`, `PATHEXT`, etc. To have those, we can either use the default `ENV` created by SCons, or propagate the whole external environment. Fixes #46790.
This commit is contained in:
parent
b6e97c10ad
commit
20b171cc5a
11
SConstruct
11
SConstruct
|
@ -61,14 +61,9 @@ elif platform_arg == "javascript":
|
||||||
# Use generic POSIX build toolchain for Emscripten.
|
# Use generic POSIX build toolchain for Emscripten.
|
||||||
custom_tools = ["cc", "c++", "ar", "link", "textfile", "zip"]
|
custom_tools = ["cc", "c++", "ar", "link", "textfile", "zip"]
|
||||||
|
|
||||||
env_base = Environment(
|
# Construct the environment using the user's host env variables.
|
||||||
ENV={
|
env_base = Environment(ENV=os.environ, tools=custom_tools)
|
||||||
"PATH": os.getenv("PATH"),
|
|
||||||
"PKG_CONFIG_PATH": os.getenv("PKG_CONFIG_PATH"),
|
|
||||||
"TERM": os.getenv("TERM"),
|
|
||||||
},
|
|
||||||
tools=custom_tools,
|
|
||||||
)
|
|
||||||
env_base.disabled_modules = []
|
env_base.disabled_modules = []
|
||||||
env_base.module_version_string = ""
|
env_base.module_version_string = ""
|
||||||
env_base.msvc = False
|
env_base.msvc = False
|
||||||
|
|
Loading…
Reference in New Issue