You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
SCons: Fix handling of platform-specific tools, notably mingw
Add optional `detect.py` `get_tools` method to let platforms register SCons tools they need. This helps move this logic out of SConstruct, keeping platforms more self contained, and helping thirdparty platforms define their own custom tools. This logic was also unreliable (the `use_mingw` one would only work if passed manually on the command line, not in e.g. `get_flags`). Co-authored-by: Thaddeus Crews <repiteo@outlook.com>
This commit is contained in:
@@ -28,6 +28,11 @@ def can_build():
|
||||
return WhereIs("emcc") is not None
|
||||
|
||||
|
||||
def get_tools(env: "SConsEnvironment"):
|
||||
# Use generic POSIX build toolchain for Emscripten.
|
||||
return ["cc", "c++", "ar", "link", "textfile", "zip"]
|
||||
|
||||
|
||||
def get_opts():
|
||||
from SCons.Variables import BoolVariable
|
||||
|
||||
|
||||
Reference in New Issue
Block a user