Commit Graph

33 Commits

Author SHA1 Message Date
Chris Lattner 720d515ee9 Add support for assembler-with-cpp (preprocessed .S files), patch by
Roman Divacky!

llvm-svn: 57988
2008-10-22 17:29:21 +00:00
Daniel Dunbar 969e35610d ccc: Pass '-g' through to clang. Handle -weak_framework.
llvm-svn: 57779
2008-10-19 02:41:16 +00:00
Daniel Dunbar 5f68d4571b ccc: support -Xlinker
llvm-svn: 57613
2008-10-16 00:10:28 +00:00
Daniel Dunbar 76eae72a0c ccc: support -fsyntax-only, add some more darwin options, support
logging of actions.

llvm-svn: 57603
2008-10-15 21:52:00 +00:00
Daniel Dunbar 438b0c0c03 Bug fix, ccc was passing -std twice.
llvm-svn: 56991
2008-10-03 01:54:54 +00:00
Daniel Dunbar 92c4c4af58 Fix ccc handling of -mmacosx-version-min.
llvm-svn: 56956
2008-10-02 17:26:37 +00:00
Daniel Dunbar e8813812eb 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.

llvm-svn: 56904
2008-10-01 01:10:22 +00:00
Daniel Dunbar 969b48cba1 ccc: Add support for another batch of OS X linker options, including
-mmacosx-version-min.

One might anticipate that at some point I will just break down and go
through the man page. That seems a little too obvious.

llvm-svn: 56890
2008-09-30 22:54:22 +00:00
Daniel Dunbar 123e7d1c2a ccc: Infer action type upfront.
- More straightforward, e.g. -E should always imply action =
   'preprocess' (I think).
 - Pass another option through for OS X.

llvm-svn: 56884
2008-09-30 21:20:51 +00:00
Daniel Dunbar 64fd24812a Change ccc to not pass -x unknown down.
Pass through some more Mac OS X linker options.

llvm-svn: 56853
2008-09-30 16:18:31 +00:00
Daniel Dunbar 2880158a20 Add ccc support for -e and -sectorder.
- llvmc2, save me!

llvm-svn: 56169
2008-09-12 19:42:28 +00:00
Nuno Lopes d63db4063a recognise .s/.S file extensions. add default value for CCC_LANGUAGES
llvm-svn: 55630
2008-09-02 10:27:37 +00:00
Daniel Dunbar 2e5225818a Improve ccc:
- Support environment variable CCC_LANGUAGES to control which
   languages clang is invoked on. If unset clang is invoked for all
   languages, otherwise CCC_LANGUAGES should be a comma separated list
   of the languages (as accepted by -x) for which clang should be
   invoked. Useful for only building C and Objective-C parts of a
   project with clang, for example.

 - Add environment variable CCC_FALLBACK. If set and non-empty then
   ccc will try and compile using the regular compiler if compilation
   with clang fails.

 - A few other tweaks to add options, flush stdout, recognize .mm as
   objective-c++, and infer languages for compile+link style
   invocations.

llvm-svn: 55547
2008-08-29 21:03:27 +00:00
Daniel Dunbar eacf1d2c0f Update ccc driver
- Use CCC_ECHO to control echoing behavior (default is on, set to ''
   or unset to disable)
 - Get 'clang','llc','as','cc','ld' executables from environment. 'cc'
   and 'ld' are fetched through CCC_CC and CCC_LD respectively -- to
   support make CC=ccc -- the others are through their upcased
   versions.
 - Add CCC_NATIVE mode.
   o This uses llc and as to generate native object files; allowing
     more drop-in replacement of gcc.
   o Disabled by default, but should eventually be default.
   o Allow --emit-llvm in CCC_NATIVE mode to override. Essentially
     this makes ccc more like a drop in replacement for llvm-gcc.
 - Prevent explicit -x <language> options from annoying clang.

llvm-svn: 55260
2008-08-23 22:15:15 +00:00
Nuno Lopes d83be33cc0 fix linking with .so files specified in cmd line (this fixes some libtool usages)
llvm-svn: 54623
2008-08-10 22:17:57 +00:00
Nuno Lopes c14bcffda6 pass -R arg to linker
llvm-svn: 54622
2008-08-10 21:58:01 +00:00
Ted Kremenek 1c0c06bb9c "This patch adds paths for Fedora 9 in clang.cpp and support for two preprocessor options in ccc."
Patch by Zhongxing Xu!

llvm-svn: 53976
2008-07-24 03:49:15 +00:00
Nuno Lopes a7c7c6b011 llvm-ld doesnt support -O1, -O2, etc options, so dont pass them
llvm-svn: 53144
2008-07-05 17:31:10 +00:00
Chris Lattner 552b52f49d "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
2008-06-21 17:46:11 +00:00
Nuno Lopes a02e2f991b handle -arch and -isysroot correctly (like ccc-analyszer do).
Patch by Filipe Cabecinhas

llvm-svn: 52417
2008-06-17 17:23:14 +00:00
Ted Kremenek 74a58d780a Pass "-arch" down to clang.
llvm-svn: 50056
2008-04-21 20:28:01 +00:00
Ted Kremenek 31d2176d1e Pass "-isysroot" option down to clang.
llvm-svn: 49956
2008-04-19 18:42:26 +00:00
Seo Sanghyeon b7bf0f3e1e - ccc: print generated command line to stdout instead of stderr
- ccc: quote shell metacharacters in command line to ease copy-and-paste

llvm-svn: 49213
2008-04-04 11:02:21 +00:00
Lauro Ramos Venancio e1938405fa Disable internalize. Unfortunately, the configure scripts are not ready for some link time optimizations.
llvm-svn: 47682
2008-02-27 18:46:32 +00:00
Lauro Ramos Venancio ace55dac39 Add c++ to "inferlanguage"
llvm-svn: 47185
2008-02-15 22:35:25 +00:00
Anders Carlsson 377ad02de5 Use the subprocess module instead of os.system. Patch by Sam Bishop.
llvm-svn: 46819
2008-02-06 19:03:27 +00:00
Bill Wendling e5b8b7db4a - ccc creates output objects in same directory as the source file, and
not in the current directory. This doesn't work with VPATH builds in
  autotooled builds.
- ccc now creates object files without an extension.
- Return exit code 1 if code > 255.

Patch by Torok!

llvm-svn: 46689
2008-02-03 21:27:46 +00:00
Seo Sanghyeon 66de08bfb4 Make ccc work with older Python versions. Patch by Sam Bishop.
llvm-svn: 46675
2008-02-03 03:40:41 +00:00
Anders Carlsson 3d149daf50 Don't try to compile .a files.
llvm-svn: 46626
2008-01-31 23:48:19 +00:00
Anders Carlsson d7d5e4ce00 Improvements to ccc. Patch by Shantonu Sen.
llvm-svn: 46501
2008-01-29 07:21:34 +00:00
Seo Sanghyeon d145ac0b34 Implement -print-prog-name. Patch by Nuno Lopes.
llvm-svn: 46353
2008-01-25 14:57:54 +00:00
Seo Sanghyeon 15051b4caf Ignore --param
llvm-svn: 46107
2008-01-17 01:08:43 +00:00
Seo Sanghyeon 77133e6d30 Compiler driver
llvm-svn: 45809
2008-01-10 01:43:47 +00:00