[cfe-commits] r52579 - /cfe/trunk/utils/ccc
Chris Lattner
sabre at nondot.org
Sat Jun 21 10:46:11 PDT 2008
Author: lattner
Date: Sat Jun 21 12:46:11 2008
New Revision: 52579
URL: http://llvm.org/viewvc/llvm-project?rev=52579&view=rev
Log:
"This maps the -pthread option to -lpthread - this isn't 100% correct,
since handling this correctly is quite complex, and on some platforms
requires additional -D options and on some implies linking against a
different libc, but this works better than just ignoring the option.
The other change passes the -x option across to clang, which allows
compiling .c files as Objective-C and so on. For some reason a lot of
configure scripts seem to be under the misguided impression that this
is a sensible thing to do."
Patch by David Chisnall!
Modified:
cfe/trunk/utils/ccc
Modified: cfe/trunk/utils/ccc
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ccc?rev=52579&r1=52578&r2=52579&view=diff
==============================================================================
--- cfe/trunk/utils/ccc (original)
+++ cfe/trunk/utils/ccc Sat Jun 21 12:46:11 2008
@@ -139,6 +139,10 @@
if arg == '-Os': arg = '-O2'
link_opts.append(arg)
+ # Enable threads
+ if arg == '-pthread':
+ link_opts.append('-lpthread')
+
# Input files
if arg == '-filelist':
f = open(args[i+1])
@@ -148,6 +152,8 @@
i += 1
if arg == '-x':
language = args[i+1]
+ compile_opts.append(arg)
+ compile_opts.append(args[i+1])
i += 1
if arg[0] != '-':
files.append(arg)
More information about the cfe-commits
mailing list