Joerg Sonnenberger
ef317a27ff
Move logic for passing down -mrelax-all / -relax-all into a common
...
function. Extend the logic to check if the input was compiled.
Use -relax-all as default only if -O0 is used for compilation.
Fixes bug 9290.
llvm-svn: 130983
2011-05-06 14:35:16 +00:00
Joerg Sonnenberger
5fe4a7dc96
Rename ContainsCompileAction to ContainsCompileOrAssembleAction to
...
properly reflect its behavior.
llvm-svn: 130981
2011-05-06 14:05:11 +00:00
Nick Lewycky
85c011ddc4
Preserve the full name of the file, so that '-c -o foo.pic.o' produces
...
foo.pic.gcno instead of foo.gcno.
llvm-svn: 130899
2011-05-05 00:08:20 +00:00
Nick Lewycky
480cb9918d
Record where the GCOV data files should be placed.
...
llvm-svn: 130866
2011-05-04 20:46:58 +00:00
Nick Lewycky
36d8f05211
No, fix this use after free properly.
...
llvm-svn: 130833
2011-05-04 03:44:01 +00:00
Nick Lewycky
776586e20d
Fix use after free through StringRef.
...
llvm-svn: 130828
2011-05-04 02:06:19 +00:00
Eric Christopher
d5c45f6738
Add the -mstackrealign option which just communicates the need to
...
force align the stack to the backend.
Fixes rdar://9289631
llvm-svn: 130725
2011-05-02 21:18:22 +00:00
Daniel Dunbar
8438464b41
Driver/Darwin: Honor --sysroot= when invoking the linker, on Darwin.
...
llvm-svn: 130723
2011-05-02 21:03:47 +00:00
Rafael Espindola
4cfa7971e9
Disable CFI if not using the integrated assembler. We should probably do this only for
...
OS X, but it is probably not all that important.
llvm-svn: 130697
2011-05-02 17:43:32 +00:00
Rafael Espindola
e264187cf2
Implement -fno-dwarf2-cfi-asm.
...
llvm-svn: 130616
2011-04-30 18:35:43 +00:00
Daniel Dunbar
2f31fb99ef
Driver/Darwin: Don't link -lgcc_s.1 when compiling as iOS for the simulator,
...
that library has never been in the SDK. Fortunately, it shouldn't be necessary,
since that library was also removed in 10.6.
llvm-svn: 130595
2011-04-30 04:25:16 +00:00
Daniel Dunbar
72ceb92aa3
Driver/Darwin: When using -mios-simulator-version-min, explicitly pass this on
...
to the linker.
- Only do this explicitly with the argument for now, the linker will need to
explicitly add support for this.
llvm-svn: 130594
2011-04-30 04:22:58 +00:00
Daniel Dunbar
a9cbb6b9d5
Driver/Darwin: Reject invalid arch combinations with
...
-mios-simulator-version-min.
llvm-svn: 130593
2011-04-30 04:20:40 +00:00
Daniel Dunbar
b1189434dd
Driver/Darwin: Change Darwin toolchain to explicitly track is-ios-sim bit, and
...
update -mios-simulator-version-min to set it.
llvm-svn: 130592
2011-04-30 04:18:16 +00:00
Daniel Dunbar
9aaeb6400b
Driver/Darwin: Sketch initial support for a -mios-simulator-version-min= flag
...
and associated deployment target environment variable.
llvm-svn: 130591
2011-04-30 04:15:58 +00:00
Bob Wilson
9a5f84facb
Add -Oz option and use it to set the inline threshold to 25.
...
Radar 9333566. Patch by Chad Rosier!
llvm-svn: 130554
2011-04-29 22:49:50 +00:00
Daniel Dunbar
252e8f9ac1
Driver/cc1as: Forward -mllvm arguments when compiling assembly files.
...
llvm-svn: 130516
2011-04-29 17:53:18 +00:00
Daniel Dunbar
c44d313cff
Driver/Darwin/ld: Set the deployment target following the version information in
...
the tool chain, instead of based on the translated arguments.
llvm-svn: 130440
2011-04-28 21:23:41 +00:00
Ted Kremenek
414a2c0951
Make the top-level driver ignore -fobjc-default-synthesize-properties while this feature undergoes more review and development. This is still available as a -cc1 option for testing.
...
llvm-svn: 130424
2011-04-28 19:26:03 +00:00
Daniel Dunbar
462e7ed497
Driver: When compilation fails, don't try to remove output files we don't have
...
write access to.
llvm-svn: 130150
2011-04-25 20:43:05 +00:00
Nico Weber
adf8ba98e7
Let clang detect gcc triple on Ubuntu Natty. Patch by Thomas Jablin.
...
llvm-svn: 130119
2011-04-25 03:17:35 +00:00
Chandler Carruth
30483fb188
Move all of the logic for __DEPRECATED to the driver based on comments
...
from dgregor.
llvm-svn: 130066
2011-04-23 19:48:40 +00:00
Chandler Carruth
61fbf62838
Fix Clang's __DEPRECATED define to be controled by -Wdeprecated. This
...
matches GCC behavior which libstdc++ uses to limit #warning-based
messages about deprecation.
The machinery involves threading this through a new '-fdeprecated-macro'
flag for CC1. The flag defaults to "on", similarly to -Wdeprecated. We
turn the flag off in the driver when the warning is turned off (modulo
matching some GCC bugs). We record this as a language option, and key
the preprocessor on the option when introducing the define.
A separate flag rather than a '-D' flag allows us to properly represent
the difference between C and C++ builds (only C++ receives the define),
and it allows the specific behavior of following -Wdeprecated without
potentially impacting the set of user-provided macro flags.
llvm-svn: 130055
2011-04-23 09:27:53 +00:00
Chandler Carruth
b009b14971
There were some frustrating problems with the implementation of
...
-Wwrite-strings. First and foremost, once the positive form of the flag
was passed, it could never be disabled by passing -Wno-write-strings.
Also, the diagnostic engine couldn't in turn use -Wwrite-strings to
control diagnostics (as GCC does) because it was essentially hijacked to
drive the language semantics.
Fix this by giving CC1 a clean '-fconst-strings' flag to enable
const-qualified strings in C and ObjC compilations. Corresponding
'-fno-const-strings' is also added. Then the driver is taught to
introduce '-fconst-strings' in the CC1 command when '-Wwrite-strings'
dominates.
This entire flag is basically GCC-bug-compatibility driven, so we also
match GCC's bug where '-w' doesn't actually disable -Wwrite-strings. I'm
open to changing this though as it seems insane.
llvm-svn: 130051
2011-04-23 06:30:43 +00:00
Francois Pichet
1c229c0472
Add -fdelayed-template-parsing option. Using this option all templated function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup.
...
Using this flag is necessary for compatibility with Microsoft template code.
This also provides some parsing speed improvement.
llvm-svn: 130022
2011-04-22 22:18:13 +00:00
Nick Lewycky
207bce31e1
Wire up the -ftest-coverage and -fprofile-arcs flags to .gcno file emission (at
...
compile time) and .gcda emission (at runtime). --coverage enables both.
This does not yet add the profile_rt library to the link step if -fprofile-arcs
is enabled when linking.
llvm-svn: 129956
2011-04-21 23:44:07 +00:00
Nick Lewycky
ab18d3088a
Fix indentation. No functional change.
...
llvm-svn: 129954
2011-04-21 23:37:32 +00:00
Daniel Dunbar
bbd482226e
Driver/Darwin: Allow OS X deployment targets like 10.4.11, even though they
...
can't be represented in the environment define.
llvm-svn: 129939
2011-04-21 21:27:33 +00:00
Daniel Dunbar
5a784c8ed1
Driver: Tweak -Xarch diags a bit more, we can't actually differentiate between
...
unknown and "required more arguments", but only the latter should be feasible in
practice.
llvm-svn: 129919
2011-04-21 17:41:34 +00:00
Daniel Dunbar
6914a98ccd
Driver: Improve -Xarch argument diagnostics a bit.
...
llvm-svn: 129918
2011-04-21 17:32:21 +00:00
Daniel Dunbar
2db3e73c38
Driver: Suppress some additional warnings with -Qunused-arguments.
...
llvm-svn: 129853
2011-04-20 15:44:48 +00:00
Daniel Dunbar
308cfd045f
Driver/Darwin: Switch to using -macosx for OS name in triples.
...
llvm-svn: 129834
2011-04-19 23:34:17 +00:00
Daniel Dunbar
5c56828d91
Driver/Darwin: Switch to using new style triples.
...
llvm-svn: 129824
2011-04-19 21:45:47 +00:00
Daniel Dunbar
d107638328
Driver/Darwin: Change to use generic iOS runtime library, which we now always need.
...
llvm-svn: 129734
2011-04-18 23:48:36 +00:00
Daniel Dunbar
ed904c82b1
Driver/Darwin: Disable movw/movt with -mkernel or -fapple-kext.
...
llvm-svn: 129721
2011-04-18 21:26:42 +00:00
Daniel Dunbar
10d0868efb
Driver: Support -fno-lto.
...
llvm-svn: 129712
2011-04-18 19:44:09 +00:00
Ted Kremenek
00abe8ee31
Add ToolChain path support for linker on Slackware.
...
llvm-svn: 129704
2011-04-18 17:50:19 +00:00
Douglas Gregor
46ce91a964
Initial work to improve documentation for Clang's diagnostics, from Matthieu Monrocq
...
llvm-svn: 129614
2011-04-15 22:04:17 +00:00
Chris Lattner
57540c5be0
fix a bunch of comment typos found by codespell. Patch by
...
Luis Felipe Strano Moraes!
llvm-svn: 129559
2011-04-15 05:22:18 +00:00
Daniel Dunbar
dc8355e81a
Driver/no-integrated-as: Fix forwarding of -g flag to assembler, when .s input
...
undergoes preprocessing.
llvm-svn: 129414
2011-04-12 23:59:20 +00:00
Chris Lattner
20b90d061a
fix the path to ld.so for darwin/ppc, resolving PR9677. Patch
...
by Jeremy Huddleston!
llvm-svn: 129299
2011-04-11 21:15:37 +00:00
Dylan Noblesmith
70e73a3d60
refactor -ccc-gcc-name code
...
Put the logic for deciding the default name for gcc/g++
in the only place that actually cares about it.
This also pushes an ifdef out of the generic driver code
to a little further down, when the target is actually known.
Hopefully it can be changed into just a runtime check
in the future.
llvm-svn: 129212
2011-04-09 13:31:59 +00:00
Evan Cheng
04c9429f34
Rename -mtrap_function= to -ftrap_function= since it's now a target neutral options.
...
llvm-svn: 129153
2011-04-08 21:37:45 +00:00
Evan Cheng
77cdce9458
Add -mtrap_function=<> option. rdar://9257465
...
llvm-svn: 129145
2011-04-08 18:47:41 +00:00
Chris Lattner
9242b33de7
fix a typo, patch by PaX team.
...
llvm-svn: 129141
2011-04-08 18:06:54 +00:00
Daniel Dunbar
f28c2ffb84
Driver: Don't attempt to forward some Clang-only options to cc1.
...
llvm-svn: 129108
2011-04-07 20:41:03 +00:00
Daniel Dunbar
529c03bc1e
Driver: Sketch driver support for a CC_LOG_DIAGNOSTICS options, similar to the
...
existing CC_PRINT_OPTIONS and CC_PRINT_HEADERS, which can be used to
transparently capture the compiler diagnostics from a build.
llvm-svn: 129082
2011-04-07 18:01:20 +00:00
Eric Christopher
534b6a01e8
Add support for Fedora16, gcc 4.6.0 and Fedora Rawhide.
...
Patch by Bobby Powers
llvm-svn: 129014
2011-04-06 18:22:53 +00:00
Ted Kremenek
43d47cc397
Add ToolChain support to get Clang to recognize Ubuntu/ppc and Gentoo/ppc64.
...
llvm-svn: 128944
2011-04-05 22:04:27 +00:00
Argyrios Kyrtzidis
5cf423ec8a
Move Driver::createInvocationFromArgs function to Frontend library to avoid dependency cycle
...
between libFrontend and libDriver.
llvm-svn: 128852
2011-04-04 23:11:45 +00:00