summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-06-21 17:46:11 +0000
committerChris Lattner <sabre@nondot.org>2008-06-21 17:46:11 +0000
commit552b52f49dceb71a73676ce65b3add81141f583f (patch)
tree7976c7094f9d37d3a6b32ef6cf3d90db0976ab70 /clang
parent68d23680641fb87b86507e58b1f32f65e85ff95e (diff)
downloadbcm5719-llvm-552b52f49dceb71a73676ce65b3add81141f583f.tar.gz
bcm5719-llvm-552b52f49dceb71a73676ce65b3add81141f583f.zip
"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! llvm-svn: 52579
Diffstat (limited to 'clang')
-rwxr-xr-xclang/utils/ccc6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/utils/ccc b/clang/utils/ccc
index b58bf616c24..794c166b879 100755
--- a/clang/utils/ccc
+++ b/clang/utils/ccc
@@ -139,6 +139,10 @@ def main(args):
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 @@ def main(args):
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)
OpenPOWER on IntegriCloud