summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2021-03-09 09:21:37 +0100
committerRémi Verschelde <rverschelde@gmail.com>2021-03-09 09:21:40 +0100
commit20b171cc5ae2482896ca6612d1db21e45b21576c (patch)
treef2cb483154e24d53eae332cbbfcd33709a86d560 /SConstruct
parentb6e97c10adeccbad99e0acdd93d93de3057c0ea6 (diff)
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.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct11
1 files changed, 3 insertions, 8 deletions
diff --git a/SConstruct b/SConstruct
index 28257e1fde..1fec033881 100644
--- a/SConstruct
+++ b/SConstruct
@@ -61,14 +61,9 @@ elif platform_arg == "javascript":
# Use generic POSIX build toolchain for Emscripten.
custom_tools = ["cc", "c++", "ar", "link", "textfile", "zip"]
-env_base = Environment(
- ENV={
- "PATH": os.getenv("PATH"),
- "PKG_CONFIG_PATH": os.getenv("PKG_CONFIG_PATH"),
- "TERM": os.getenv("TERM"),
- },
- tools=custom_tools,
-)
+# Construct the environment using the user's host env variables.
+env_base = Environment(ENV=os.environ, tools=custom_tools)
+
env_base.disabled_modules = []
env_base.module_version_string = ""
env_base.msvc = False