[cfe-commits] r56904 - /cfe/trunk/utils/ccc
Daniel Dunbar
daniel at zuster.org
Tue Sep 30 18:10:22 PDT 2008
Author: ddunbar
Date: Tue Sep 30 20:10:22 2008
New Revision: 56904
URL: http://llvm.org/viewvc/llvm-project?rev=56904&view=rev
Log:
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.
Modified:
cfe/trunk/utils/ccc
Modified: cfe/trunk/utils/ccc
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ccc?rev=56904&r1=56903&r2=56904&view=diff
==============================================================================
--- cfe/trunk/utils/ccc (original)
+++ cfe/trunk/utils/ccc Tue Sep 30 20:10:22 2008
@@ -23,9 +23,18 @@
return v.strip()
return alternate
-CCC_ECHO = checkenv('CCC_ECHO','1')
-CCC_NATIVE = checkenv('CCC_NATIVE')
-CCC_FALLBACK = checkenv('CCC_FALLBACK')
+def checkbool(name, default=False):
+ v = os.getenv(name)
+ 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')
if CCC_LANGUAGES:
CCC_LANGUAGES = set([s.strip() for s in CCC_LANGUAGES.split(',')])
@@ -238,7 +247,8 @@
i += 1
# 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)
# Options with one argument that should pass through
More information about the cfe-commits
mailing list