Commit Graph

139 Commits

Author SHA1 Message Date
Daniel Dunbar 26d482a1a9 Lift AddLinkRuntimeLibArgs into Darwin tool chain.
llvm-svn: 82212
2009-09-18 08:15:03 +00:00
Daniel Dunbar d5bd81e869 Move isMacosxVersionLT helpers to Darwin tool chain.
llvm-svn: 82211
2009-09-18 08:14:55 +00:00
Daniel Dunbar 510d8a8dd8 Lift getMacosxVersionMin out into Darwin ToolChain.
llvm-svn: 82210
2009-09-18 08:14:46 +00:00
Daniel Dunbar 4c30b89def Lift AddLinkerSearchPaths() into Darwin tool chain.
llvm-svn: 82209
2009-09-18 08:14:36 +00:00
Daniel Dunbar 48622c13f7 Rename a variable to match its semantics.
llvm-svn: 82208
2009-09-18 08:14:24 +00:00
Daniel Dunbar 58f7833cfb Driver: Change -O to mean -O2, -O1 is meaningless.
llvm-svn: 82131
2009-09-17 06:53:36 +00:00
Daniel Dunbar d112f103e7 We don't need a -compile-ast clang-cc action, we can just use -S.
llvm-svn: 82105
2009-09-17 00:47:53 +00:00
Daniel Dunbar 306945d3d0 Incremental improvement to logic determining whether we emit unwind tables or
not.
 - PR4932.

llvm-svn: 82021
2009-09-16 06:17:29 +00:00
Daniel Dunbar 4ed7898294 Support -mabi= for clang/ARM.
llvm-svn: 81734
2009-09-14 00:34:46 +00:00
Daniel Dunbar 33a004e9eb Swizzle the target triple based on -mthumb, and update clang-cc to recognize
thumb-foo-bar as an ARM target.

llvm-svn: 81497
2009-09-11 01:14:50 +00:00
Daniel Dunbar 7848592ec6 Initial handling of -m{soft-float,hard-float,float-abi=} for ARM.
llvm-svn: 81471
2009-09-10 23:00:09 +00:00
Daniel Dunbar e2cf8f7b53 Move X86 handling of -m[no-]soft-float and -m[no-]red-zone into AddX86TargetArgs.
llvm-svn: 81470
2009-09-10 22:59:57 +00:00
Daniel Dunbar f492c92761 Change getLLVMArchNameForARM to just get the suffix.
llvm-svn: 81469
2009-09-10 22:59:51 +00:00
Daniel Dunbar fb58b0aaa9 Add code to mangle the triple for LLVM on ARM.
- I think we should get rid of this distinction though, but I need to discuss with the interested parties.

llvm-svn: 81435
2009-09-10 06:49:20 +00:00
Daniel Dunbar 4fa0811e4c Don't pass -fno-builtin-str{cat,cpy} to clang-cc, I forget we don't support that yet. PR4941.
llvm-svn: 81430
2009-09-10 04:57:27 +00:00
Daniel Dunbar 0f5c542a86 ARM: Pass -mcpu to clang-cc based on -march= and -mcpu=.
llvm-svn: 81429
2009-09-10 04:57:17 +00:00
Daniel Dunbar 2ffe029a61 Implement Darwin/ARM behavior for defaulting to -fno-builtin-str{cat,cpy}.
llvm-svn: 81425
2009-09-10 03:37:02 +00:00
Daniel Dunbar 4eadb60652 Add a check that -static is not used with -dynamic or -mdynamic-no-pic.
llvm-svn: 81421
2009-09-10 01:21:12 +00:00
Daniel Dunbar 64198ef50f Factor out CheckPreprocessing options to share between Clang/CC1 tools.
Also, fix forwarding of -C/-CC to cc1.

llvm-svn: 81420
2009-09-10 01:21:05 +00:00
Daniel Dunbar 3b3191f23c Move Clang X86 cpu/feature argument translation into AddX86TargetArgs.
llvm-svn: 81390
2009-09-09 22:33:08 +00:00
Daniel Dunbar 1ce81538f1 Change Get{File,Program}Path to return an std::string (instead of a sys::Path).
llvm-svn: 81389
2009-09-09 22:33:00 +00:00
Daniel Dunbar 1c28f1e17c Remove gratuitous use of c_str().
llvm-svn: 81388
2009-09-09 22:32:48 +00:00
Daniel Dunbar b617a9f3c7 Use Twine concatenation instead of llvm::format.
llvm-svn: 81387
2009-09-09 22:32:41 +00:00
Daniel Dunbar b4a3e43741 Simplify.
llvm-svn: 81386
2009-09-09 22:32:34 +00:00
Daniel Dunbar 3571dd90cf Use AddDarwinArch for passing arch name to assembler.
llvm-svn: 81368
2009-09-09 18:36:27 +00:00
Daniel Dunbar e9ded43d1d Add DarwinTool base class for all Darwin tools, and move AddDarwin[Sub]Arch there.
llvm-svn: 81367
2009-09-09 18:36:20 +00:00
Mike Stump 11289f4280 Remove tabs, and whitespace cleanups.
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Daniel Dunbar c09988dda5 Remove FIXMEs for pedantically-gcc-bug-compatible behavior.
- We aren't going to fix these since they haven't caused problems in practice.

 - Similarly, don't forward -object to Darwin ld.

llvm-svn: 81224
2009-09-08 16:39:16 +00:00
Daniel Dunbar 037f389f4d Merge libgcc spec changes for darwin::Link::ConstructJob.
llvm-svn: 81022
2009-09-04 18:35:47 +00:00
Daniel Dunbar 2b5f6817e0 Tweak darwin::Link::AddLinkArgs.
llvm-svn: 81021
2009-09-04 18:35:41 +00:00
Daniel Dunbar 91dbfd6666 Implement darwin::Link::AddDarwinArch for ARM.
llvm-svn: 81020
2009-09-04 18:35:31 +00:00
Daniel Dunbar 84e727fb72 Darwin: Pass -iphoneos-version-min to ld when building for ARM.
llvm-svn: 81019
2009-09-04 18:35:21 +00:00
Daniel Dunbar f0a5b9b126 Rename Darwin_X86 toolchain to just Darwin, this can support all platforms.
llvm-svn: 81016
2009-09-04 18:34:51 +00:00
Daniel Dunbar a77eaeb1e6 Add basic support for -pthread.
- Patch by David Chisnall, with PCH and Darwin support mixed in.

llvm-svn: 80883
2009-09-03 04:54:28 +00:00
Daniel Dunbar 6cdf83c192 Add driver support for -emit-ast and AST compilation steps.
- <rdar://problem/7185031> Add 'clang' option '-emit-ast'

llvm-svn: 80678
2009-09-01 16:57:46 +00:00
David Chisnall 5778fce141 Updated GNU runtime non-fragile ABI.
Added -fconstant-string-class= option.
Added __has_feature() test for non-fragile ABI.

llvm-svn: 80591
2009-08-31 16:41:57 +00:00
Daniel Dunbar a6b4a3d646 PR4766: Don't pass -static to 'as' on x86_64 on Darwin.
Also, do pass -static even with -dynamic on i386.

llvm-svn: 79948
2009-08-24 22:26:16 +00:00
Edward O'Callaghan 856e4ff78d Second half of, clang, AuroraUX toolchain support.
llvm-svn: 79713
2009-08-22 01:06:46 +00:00
Benjamin Kramer 70231c99c4 Fix -fno-omit-frame-pointer bug Eli noticed.
llvm-svn: 78233
2009-08-05 19:47:38 +00:00
Benjamin Kramer cf4371a689 Translate -mcmodel=X to -code-model X and pass it to clang-cc. Patch by Pawel Worach!
llvm-svn: 78190
2009-08-05 14:30:52 +00:00
Benjamin Kramer 72e211a47a Add support for the -fno-omit-frame-pointer option. Patch by Roman Divacky!
llvm-svn: 78188
2009-08-05 12:11:11 +00:00
Daniel Dunbar a8888ac1cb Driver/OpenBSD: Improve ld options.
- Patch by Jonathan Gray!

llvm-svn: 77935
2009-08-03 01:28:59 +00:00
Mike Stump 183c3d2f59 Add beginnigs of rtti generation, wire up more of -fno-exceptions.
llvm-svn: 77751
2009-07-31 23:15:31 +00:00
Ted Kremenek 9c3952c03e Have 'clang --analyze' run syntactic static analysis security checks.
llvm-svn: 76996
2009-07-24 20:03:11 +00:00
Eli Friedman bb0d9a5129 Remove -ftraditional option, which gcc doesn't actually support. Make
using -traditional and -traditional-cpp with clang an error because 
it's unsupported in clang and causes a significant change in the 
semantics of the language.

llvm-svn: 75690
2009-07-14 21:58:17 +00:00
Douglas Gregor 0086a5a3bb Introduce the notion of "Relocatable" precompiled headers, which are built
with a particular system root directory and can be used with a different
system root directory when the headers it depends on have been installed.
Relocatable precompiled headers rewrite the file names of the headers used
when generating the PCH file into the corresponding file names of the 
headers available when using the PCH file.

Addresses <rdar://problem/7001604>.

llvm-svn: 74885
2009-07-07 00:12:59 +00:00
Daniel Dunbar 126b3a103e Driver: Add Source argument for Commands to hold the Action which caused a
Command to be generated, to support more advanced diagnostics.
 - No functionality change.

llvm-svn: 74627
2009-07-01 19:02:28 +00:00
Daniel Dunbar 10de9e6602 OpenBSD support.
- Patch by Jonathan Gray!

llvm-svn: 74453
2009-06-29 20:52:51 +00:00
Bill Wendling d63bbadbef Add stack protector support to clang. This generates the 'ssp' and 'sspreq'
function attributes. There are predefined macros that are defined when stack
protectors are used: __SSP__=1 with -fstack-protector and __SSP_ALL__=2 with
-fstack-protector-all.

llvm-svn: 74405
2009-06-28 07:36:13 +00:00
Daniel Dunbar 367dbb9760 Forward -C and -CC to clang.
- <rdar://problem/6945384> Driver should pass down -C and -CC

llvm-svn: 73087
2009-06-08 21:48:20 +00:00