зеркало из https://github.com/microsoft/clang.git
ccc: Use CCC_NATIVE=1 by default.
- So far this works fairly well for me for building applications using clang as a gcc substitute. If you are using ccc for a different purpose and this is a problem, speak up! Note you can also use CCC_NATIVE=0 to disable. - Also, turn CCC_ECHO off as default. - Also, pass through -Wl, to linker. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56904 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
ad2dc71a6f
Коммит
1bf3f73598
18
utils/ccc
18
utils/ccc
|
@ -23,9 +23,18 @@ def checkenv(name, alternate=None):
|
||||||
return v.strip()
|
return v.strip()
|
||||||
return alternate
|
return alternate
|
||||||
|
|
||||||
CCC_ECHO = checkenv('CCC_ECHO','1')
|
def checkbool(name, default=False):
|
||||||
CCC_NATIVE = checkenv('CCC_NATIVE')
|
v = os.getenv(name)
|
||||||
CCC_FALLBACK = checkenv('CCC_FALLBACK')
|
if v:
|
||||||
|
try:
|
||||||
|
return bool(int(v))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
return default
|
||||||
|
|
||||||
|
CCC_ECHO = checkbool('CCC_ECHO')
|
||||||
|
CCC_NATIVE = checkbool('CCC_NATIVE','1')
|
||||||
|
CCC_FALLBACK = checkbool('CCC_FALLBACK')
|
||||||
CCC_LANGUAGES = checkenv('CCC_LANGUAGES','c,c++,c-cpp-output,objective-c,objective-c++,objective-c-cpp-output')
|
CCC_LANGUAGES = checkenv('CCC_LANGUAGES','c,c++,c-cpp-output,objective-c,objective-c++,objective-c-cpp-output')
|
||||||
if CCC_LANGUAGES:
|
if CCC_LANGUAGES:
|
||||||
CCC_LANGUAGES = set([s.strip() for s in CCC_LANGUAGES.split(',')])
|
CCC_LANGUAGES = set([s.strip() for s in CCC_LANGUAGES.split(',')])
|
||||||
|
@ -238,7 +247,8 @@ def main(args):
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
# Options with no arguments that should pass through
|
# Options with no arguments that should pass through
|
||||||
if arg in ('-dynamiclib', '-bundle', '-headerpad_max_install_names'):
|
if (arg in ('-dynamiclib', '-bundle', '-headerpad_max_install_names') or
|
||||||
|
arg.startswith('-Wl,')):
|
||||||
link_opts.append(arg)
|
link_opts.append(arg)
|
||||||
|
|
||||||
# Options with one argument that should pass through
|
# Options with one argument that should pass through
|
||||||
|
|
Загрузка…
Ссылка в новой задаче