mirror of
https://github.com/godotengine/godot.git
synced 2024-11-25 13:43:15 +00:00
SCons: Fix parsing PATH when constructing base environment
We constructed the SCons environment without taking any (shell) environment
variables into account, and then appended a few, but too late. This would
cause variables like `env[CXX]` not to be properly expanded to respect a
non-standard `PATH`.
With this fix, setting:
```
PATH=$GODOT_SDK/bin:$PATH
```
will now properly use `$GODOT_SDK/bin/gcc` if available over `/usr/bin/gcc`.
(cherry picked from commit 5d217a9441
)
This commit is contained in:
parent
8be3995efa
commit
6b48fce2b5
13
SConstruct
13
SConstruct
@ -61,11 +61,14 @@ elif platform_arg == "javascript":
|
||||
# Use generic POSIX build toolchain for Emscripten.
|
||||
custom_tools = ["cc", "c++", "ar", "link", "textfile", "zip"]
|
||||
|
||||
env_base = Environment(tools=custom_tools)
|
||||
if "TERM" in os.environ:
|
||||
env_base["ENV"]["TERM"] = os.environ["TERM"]
|
||||
env_base.AppendENVPath("PATH", os.getenv("PATH"))
|
||||
env_base.AppendENVPath("PKG_CONFIG_PATH", os.getenv("PKG_CONFIG_PATH"))
|
||||
env_base = Environment(
|
||||
ENV={
|
||||
"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.use_ptrcall = False
|
||||
env_base.module_version_string = ""
|
||||
|
Loading…
Reference in New Issue
Block a user