Michael J. Spencer
e2f493604a
[VS Toolchain] Correctly forward -l linker inputs to link.exe.
...
Patch by Nikola Smiljanic!
llvm-svn: 158664
2012-06-18 16:56:04 +00:00
David Blaikie
690f21e25c
Support -f[no-]rewrite-includes from the driver.
...
Review by Chandler Carruth.
llvm-svn: 158463
2012-06-14 18:55:27 +00:00
John McCall
7dd1783c5e
Provide a -no-pedantic to cancel out -pedantic.
...
llvm-svn: 158416
2012-06-13 19:48:01 +00:00
Hal Finkel
8eb5928514
Add PPC support for translating gcc-style -mcpu options into LLVM -target-cpu options.
...
This functionality is based on what is done on ARM, and enables selecting PPC CPUs
in a way compatible with gcc's driver. Also, mirroring gcc (and what is done on x86),
-mcpu=native support was added. This uses the host cpu detection from LLVM
(which will also soon be updated by refactoring code currently in backend).
In order for this to work, the target needs a list of valid CPUs -- we now accept all CPUs accepted by LLVM.
A few preprocessor defines for common CPU types have been added.
llvm-svn: 158334
2012-06-11 22:35:19 +00:00
Francois Pichet
b27ea02784
Zap the /Za compiler switch from MSVC projects, the option is considered harmful even by Microsoft people and clang won't build using the MSVC 2012 RC if not removed.
...
Only 1 minor code change was necessary: can't use cdecl as variable name anymore.
llvm-svn: 158063
2012-06-06 12:00:10 +00:00
Jordan Rose
88bf06584b
Remove AST and Parse from Driver's dependencies.
...
llvm-svn: 157933
2012-06-04 16:57:53 +00:00
Evgeniy Stepanov
ea155f0153
Require -pie when linking with ASan on Android.
...
llvm-svn: 157923
2012-06-04 11:15:05 +00:00
Simon Atanasyan
590ad8f515
MIPS: Factor out code selects the float ABI as determined by -msoft-float,
...
-mhard-float, and -mfloat-abi= to the new function getMipsFloatABI. That
simplifies reuse of this code.
llvm-svn: 157888
2012-06-02 15:06:29 +00:00
Simon Atanasyan
217dc2d8dd
MIPS: Pass -KPIC argument to MIPS assembler if necessary.
...
llvm-svn: 157635
2012-05-29 19:07:33 +00:00
Simon Atanasyan
a16b7fd029
Factor out the code retrieves the last PIC related argument from
...
the Clang::ConstructJob() to the new ArgList::getLastArg() routine
with eight argument. That simplifies reusing of this code.
llvm-svn: 157633
2012-05-29 18:50:33 +00:00
Alexey Samsonov
dda3a7f914
Make Clang driver pass the last option from -g group to the compiler.
...
Leave a better fixme for different debug info flags
llvm-svn: 157602
2012-05-29 08:10:34 +00:00
Chad Rosier
37a12af0af
[driver] Have the crash diagnostics print the clang version information.
...
rdar://11518308
llvm-svn: 157346
2012-05-23 21:38:47 +00:00
Argyrios Kyrtzidis
3169e80603
[driver] When creating the compiler invocation out of command-line
...
arguments, force use of clang frontend for the driver.
Fixes rdar://11356765.
llvm-svn: 157205
2012-05-21 20:11:54 +00:00
Peter Collingbourne
041ac6c2b1
Tell the driver that CUDA is a C++-like language, so that we get C++
...
header searches with CUDA.
llvm-svn: 157172
2012-05-20 23:28:36 +00:00
Chad Rosier
06fd3c61be
[driver] Remove obsolete support for -A link option. The standard -A option is
...
used by the preprocessor. Apple's GCC also supported a -A option for linking.
The ld man page has the following:
-A basefile - Obsolete incremental load format. This option is obsolete.
Nick Kledzik confirms this option is no longer needed/supported.
rdar://11455614
llvm-svn: 156965
2012-05-16 23:45:12 +00:00
Chad Rosier
c14ded7182
Rename the driver option to -mno-implicit-float, per Eli's suggestion.
...
llvm-svn: 156950
2012-05-16 21:19:55 +00:00
Manuel Klimek
3ef9c44747
Pulls diagnostics for temp file handling into the common diagnostic kinds.
...
llvm-svn: 156947
2012-05-16 20:55:58 +00:00
Chad Rosier
f1985d2a44
[driver] Allow the driver to directly accept the -no-implicit-float option, so that the
...
generation of implicit floating point instructions can be disable for ARM.
rdar://11409142
llvm-svn: 156942
2012-05-16 20:40:09 +00:00
Kostya Serebryany
66e8fab1c8
[tsan] add ThreadSanitizer linker flags on Linux and also copy the tsan-rt into the appropriate place at build time
...
llvm-svn: 156906
2012-05-16 06:36:00 +00:00
Douglas Gregor
9295df0569
Add the Objective-C runtime linking arguments after user-specified
...
linker arguments. Fixes <rdar://problem/11417441>.
llvm-svn: 156853
2012-05-15 21:00:27 +00:00
Bob Wilson
16d939584b
Do not link with Objective-C libraries with -nostdlib or -nodefaultlibs.
...
<rdar://problem/11433499>
llvm-svn: 156841
2012-05-15 18:57:39 +00:00
Gabor Greif
9304763dfc
add embedded linux variants that occur in the field
...
llvm-svn: 156813
2012-05-15 11:21:03 +00:00
Chandler Carruth
94a3201179
Teach the driver on Linux to respect -nodefaultlibs.
...
Patch from Andrew C. Morrow.
llvm-svn: 156771
2012-05-14 18:31:18 +00:00
Sirish Pande
11ebc4ed1b
Hexagon V5 FP support.
...
llvm-svn: 156567
2012-05-10 20:19:54 +00:00
Chad Rosier
7b1fee1fe5
Roll logic into a single if statement, per David's suggestion.
...
llvm-svn: 156502
2012-05-09 18:55:57 +00:00
Chad Rosier
bf8628e62f
Use the triple directly, rather then getTriple().
...
llvm-svn: 156501
2012-05-09 18:51:13 +00:00
Chad Rosier
266c620623
Now the proper fix for r156497. Sorry for the churn.
...
llvm-svn: 156498
2012-05-09 18:46:30 +00:00
Chad Rosier
6037c6bae0
Move the iOSVersionMin string to a header so as to avoid a dangling pointer.
...
llvm-svn: 156497
2012-05-09 18:37:26 +00:00
Chad Rosier
f761fe9d23
[driver] Use the iOS target triple to infer the deployment target.
...
rdar://11409204
llvm-svn: 156489
2012-05-09 18:09:58 +00:00
Bob Wilson
e78227b1ff
Ignore a "generic" return value from getHostCPUName. <rdar://problem/11314502>
...
llvm-svn: 156487
2012-05-09 17:53:10 +00:00
Nuno Lopes
3d6311d5f7
add -fbounds-checking option.
...
When enabled, clang generates bounds checks for array and pointers dereferences. Work to follow in LLVM's backend.
OK'ed by Chad; thanks for the review.
llvm-svn: 156431
2012-05-08 22:10:46 +00:00
Chad Rosier
aaec1338b1
StringRefize code because we're good even when we crash.
...
Patch by Jordy Rose.
llvm-svn: 156172
2012-05-04 15:32:05 +00:00
Jean-Daniel Dupas
73d801cd8a
Fix -Wlarge-by-value-copy option handling in the driver.
...
CC1 supports only the joined format.
llvm-svn: 156161
2012-05-04 08:08:37 +00:00
Alexey Samsonov
74a3868dbb
This patch adds a new Clang compiler flag "-gline-tables-only".
...
It reduces the amount of emitted debug information:
1) DIEs in .debug_info have types DW_TAG_compile_unit, DW_TAG_subprogram,
DW_TAG_inlined_subroutine (for opt builds) and DW_TAG_lexical_block only.
2) .debug_str contains only function names.
3) No debug data for types/namespaces/variables is emitted.
4) The data in .debug_line is enough to produce valid stack traces with
function names and line numbers.
Reviewed by Eric Christopher.
llvm-svn: 156160
2012-05-04 07:39:27 +00:00
Bob Wilson
e64bd84ec7
Remove obsolete code for finding a fallback iOS SDK. <rdar://problem/11378535>
...
llvm-svn: 156149
2012-05-04 03:09:46 +00:00
Chad Rosier
dcef562557
[driver - crash diagnostics] Convert the flags back to an array of strings and use
...
array_lengthof. Also, append the new filename with correct preprocessed suffix.
Last part of rdar://11285725
llvm-svn: 156117
2012-05-03 22:38:00 +00:00
Chad Rosier
45cf50f7b6
Use array_lengthof instead of sizeof trickery.
...
llvm-svn: 156104
2012-05-03 21:25:34 +00:00
Chad Rosier
1c5add6c5b
[driver - crash diagnostics] Only write the failing command in the script.
...
Part of rdar://11285725
llvm-svn: 156096
2012-05-03 20:17:15 +00:00
Chad Rosier
cb600e2422
Canonicalize loop.
...
llvm-svn: 156093
2012-05-03 19:50:25 +00:00
Chad Rosier
f91fb400b3
[driver crash diagnostics] Remove more flags that reference absolute paths that
...
aren't necessary to reproduce the clang crash.
Part of rdar://11285725
llvm-svn: 156079
2012-05-03 17:07:55 +00:00
Bob Wilson
f9fbc6a84a
Rip out old code for finding libraries in GCC's directories.
...
llvm-svn: 156058
2012-05-03 05:23:52 +00:00
Benjamin Kramer
c242ef245c
Driver: Turn the default value for -fmath-errno into a proper target hook and disable it by default on more platforms.
...
For now -fno-math-errno is the default on BSD-derived platforms (Darwin,
DragonFlyBSD, FreeBSD, NetBSD, OpenBSD). If the default is not right for
your platform, please yell. I only verified the result with the default
compilers on Darwin and FreeBSD.
llvm-svn: 155990
2012-05-02 14:55:48 +00:00
James Molloy
cebf75e8ca
Fix forwarding of -fpack-struct from driver to CC1, and add a test.
...
-fpack-struct's handling has changed in CC1 (one of only two flags that needed changing) because the driver treats "-fpack-struct" as a boolean flag, and CC1 (did) treat it as an option with a separated value.
This change causes -fpack-struct=X to be forwarded correctly to -fpack-struct=X instead of erroneously to "-fpack-struct X"
llvm-svn: 155981
2012-05-02 07:56:14 +00:00
Andrew Trick
4d77ceaa22
Speculatively fix windows cmake builders.
...
Really just a wild stab in the dark.
llvm-svn: 155974
2012-05-02 01:23:51 +00:00
James Molloy
a3c85b8629
Unify Options.td and CC1Options.td, in a first step towards unifying the serialization logic in Frontend and Driver.
...
Reviewed by Eric, Doug and Chandler, and here: http://llvm.org/reviews/r/7/
llvm-svn: 155916
2012-05-01 14:57:16 +00:00
Douglas Gregor
f7b8841b71
Add support for openSUSE 12.2, from Ismail Donmez!
...
llvm-svn: 155860
2012-04-30 23:42:57 +00:00
Chad Rosier
98ab91c226
[driver] Don't try to set the deployment target when there is no bound
...
architecture; this was happening for tools such as lipo and dsymutil.
Also, if no -arch option has been specified, set the architecture based
on the TC default.
rdar://11329656
llvm-svn: 155730
2012-04-27 19:51:11 +00:00
Chad Rosier
a78a6eb408
Fix logic such that we only call getToolChain once. No functional change
...
intended.
llvm-svn: 155719
2012-04-27 16:50:38 +00:00
Chad Rosier
631fa107eb
Remove redundant calls to BAA->getArchName(). No functional change
...
intended.
llvm-svn: 155718
2012-04-27 16:48:16 +00:00
Chad Rosier
7c5d908d81
Revert 155679; Not a typo.
...
llvm-svn: 155708
2012-04-27 14:58:16 +00:00