SCons: Fix checks for clang in env['CXX']
They would match the whole path instead of only the filename.
This commit is contained in:
@ -56,7 +56,7 @@ def configure(env):
|
||||
## Compiler configuration
|
||||
|
||||
if env['use_llvm']:
|
||||
if ('clang++' not in env['CXX']):
|
||||
if ('clang++' not in os.path.basename(env['CXX'])):
|
||||
env["CC"] = "clang"
|
||||
env["CXX"] = "clang++"
|
||||
env["LINK"] = "clang++"
|
||||
|
||||
@ -86,7 +86,7 @@ def configure(env):
|
||||
env.Prepend(CCFLAGS=['-O3', '-ffast-math'])
|
||||
else: #optimize for size
|
||||
env.Prepend(CCFLAGS=['-Os'])
|
||||
|
||||
|
||||
if (env["debug_symbols"] == "yes"):
|
||||
env.Prepend(CCFLAGS=['-g1'])
|
||||
if (env["debug_symbols"] == "full"):
|
||||
@ -115,12 +115,12 @@ def configure(env):
|
||||
|
||||
## 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(++)
|
||||
env['use_llvm'] = True
|
||||
|
||||
if env['use_llvm']:
|
||||
if ('clang++' not in env['CXX']):
|
||||
if ('clang++' not in os.path.basename(env['CXX'])):
|
||||
env["CC"] = "clang"
|
||||
env["CXX"] = "clang++"
|
||||
env["LINK"] = "clang++"
|
||||
|
||||
Reference in New Issue
Block a user