You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-21 14:57:09 +00:00
SCons: Fix checks for clang in env['CXX']
They would match the whole path instead of only the filename.
This commit is contained in:
@@ -349,7 +349,7 @@ if webm_multithread:
|
|||||||
env_libvpx.add_source_files(env.modules_sources, libvpx_sources_mt)
|
env_libvpx.add_source_files(env.modules_sources, libvpx_sources_mt)
|
||||||
|
|
||||||
if webm_cpu_x86:
|
if webm_cpu_x86:
|
||||||
is_clang_or_gcc = ('gcc' in env["CC"]) or ('clang' in env["CC"]) or ("OSXCROSS_ROOT" in os.environ)
|
is_clang_or_gcc = ('gcc' in os.path.basename(env["CC"])) or ('clang' in os.path.basename(env["CC"])) or ("OSXCROSS_ROOT" in os.environ)
|
||||||
|
|
||||||
env_libvpx_mmx = env_libvpx.Clone()
|
env_libvpx_mmx = env_libvpx.Clone()
|
||||||
if cpu_bits == '32' and is_clang_or_gcc:
|
if cpu_bits == '32' and is_clang_or_gcc:
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ def configure(env):
|
|||||||
## Compiler configuration
|
## Compiler configuration
|
||||||
|
|
||||||
if env['use_llvm']:
|
if env['use_llvm']:
|
||||||
if ('clang++' not in env['CXX']):
|
if ('clang++' not in os.path.basename(env['CXX'])):
|
||||||
env["CC"] = "clang"
|
env["CC"] = "clang"
|
||||||
env["CXX"] = "clang++"
|
env["CXX"] = "clang++"
|
||||||
env["LINK"] = "clang++"
|
env["LINK"] = "clang++"
|
||||||
|
|||||||
@@ -115,12 +115,12 @@ def configure(env):
|
|||||||
|
|
||||||
## Compiler configuration
|
## Compiler configuration
|
||||||
|
|
||||||
if 'CXX' in env and 'clang' in env['CXX']:
|
if 'CXX' in env and 'clang' in os.path.basename(env['CXX']):
|
||||||
# Convenience check to enforce the use_llvm overrides when CXX is clang(++)
|
# Convenience check to enforce the use_llvm overrides when CXX is clang(++)
|
||||||
env['use_llvm'] = True
|
env['use_llvm'] = True
|
||||||
|
|
||||||
if env['use_llvm']:
|
if env['use_llvm']:
|
||||||
if ('clang++' not in env['CXX']):
|
if ('clang++' not in os.path.basename(env['CXX'])):
|
||||||
env["CC"] = "clang"
|
env["CC"] = "clang"
|
||||||
env["CXX"] = "clang++"
|
env["CXX"] = "clang++"
|
||||||
env["LINK"] = "clang++"
|
env["LINK"] = "clang++"
|
||||||
|
|||||||
Reference in New Issue
Block a user