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
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
fcd2389b7a
TWEAK
...
llvm-svn: 129835
2011-04-19 23:34:21 +00:00
Daniel Dunbar
5c56828d91
Driver/Darwin: Switch to using new style triples.
...
llvm-svn: 129824
2011-04-19 21:45:47 +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
Chandler Carruth
a7773f719e
Add -no-canonical-prefixes to tests which assert on the name of the
...
built clang binary that is used by the test. Build systems that use
symlinks for build outputs will fail these assertions otherwise.
llvm-svn: 129482
2011-04-13 22:28:36 +00:00
Daniel Dunbar
2f8d10e8d7
Fronted/CC_LOG_DIAGNOSTICS: Add test case.
...
llvm-svn: 129097
2011-04-07 19:05:06 +00:00
Chandler Carruth
82701204a4
Add my test case for r128353. I think this is the last test case to fail
...
to be added... Sorry for the noise.
llvm-svn: 128395
2011-03-27 21:03:41 +00:00
Daniel Dunbar
67fea71c2d
Driver/Darwin: Dsymutil actions should put the dSYM adjacent to the output file.
...
llvm-svn: 128292
2011-03-25 18:16:51 +00:00
Daniel Dunbar
12100e2c7f
Frontend: Add a more explicit -backend-option flag for passing backend command
...
line options, instead of leveraging the blanket -mllvm option.
- This allows using the frontend itself without requiring the backend have
those options available (i.e., if the target wasn't built).
llvm-svn: 128087
2011-03-22 16:48:17 +00:00
Daniel Dunbar
151a372113
Driver/Darwin: Transparently fallback when compiling i386 -fapple-kext code, we
...
don't support the ABI yet.
llvm-svn: 127903
2011-03-18 20:14:03 +00:00
NAKAMURA Takumi
f5606922f8
test/Driver/sysroot-flags.c: Tweak for Mingw MSYS bash.
...
MSYS substitutes path (that begins with "/") to de-mounted Windows path, even if it were nonexistent.
"/foo/bar" might be substituted to "C:/msysgit/foo/bar".
llvm-svn: 127861
2011-03-18 03:21:33 +00:00
NAKAMURA Takumi
1bd6491f7f
test/Driver/darwin-cc.c: FileCheck-ize and tweak for Mingw MSYS bash.
...
MSYS substitutes path (that begins with "/") to de-mounted Windows path.
"/tmp" might be substituted as "C:/DOCUME~1/chapuni/LOCALS~1/Temp".
llvm-svn: 127860
2011-03-18 03:21:26 +00:00
Daniel Dunbar
c44f8cf7b8
Driver/Obj-C: Be compatible with GCC behavior in that -fno-exceptions *does not*
...
disable Obj-C exceptions.
llvm-svn: 127836
2011-03-17 23:28:31 +00:00
Daniel Dunbar
033a4bc49e
Driver/Darwin: These are command line options, not target features.
...
llvm-svn: 127820
2011-03-17 18:29:04 +00:00
Daniel Dunbar
c9388c11f1
Driver/Darwin/ARM: Kernel/kext code has more strict alignment requirements.
...
llvm-svn: 127815
2011-03-17 17:10:06 +00:00
Daniel Dunbar
b1db4b69cc
Driver/ARM: Match GCC behavior in that -msoft-float disables NEON, despite this
...
not being consistent at all with other parts of the GCC implementation.
llvm-svn: 127777
2011-03-17 00:07:34 +00:00
NAKAMURA Takumi
c9998aa1f4
test/Driver/hello.c: Tweak for cygming.
...
- Driver's name may be "clang(-\d.\d).exe".
- Emitted executable file is named as "%t.exe". It must be harmless on other OS.
llvm-svn: 127729
2011-03-16 13:51:46 +00:00
Chandler Carruth
306f98c241
Add a test case that would have caught the bug fixed in r126640.
...
I've only covered C++'s flags here, we should probably do something
similar for ObjC flags.
llvm-svn: 126641
2011-02-28 07:38:09 +00:00
Frits van Bommel
ba6ce03e46
Fix this test case for CMake builds after r126502, which sneakily changed the actual executable name to clang-<version>.
...
llvm-svn: 126560
2011-02-27 01:17:12 +00:00
Anders Carlsson
3320e1575f
Make clang -cc1 disable Objective-C exceptions by default, and add a -fobjc-exceptions flag to turn them on.
...
Update all tests accordingly.
llvm-svn: 126177
2011-02-22 01:52:06 +00:00
Daniel Dunbar
bd466d404a
tests: Fix test on Win32.
...
llvm-svn: 126087
2011-02-20 17:41:24 +00:00
Daniel Dunbar
1094bb101b
Driver/Darwin: Support -Wl, with -Xarch_. This doesn't work naturally because of
...
the special way we model "linker input" arguments.
llvm-svn: 126023
2011-02-19 05:33:51 +00:00
Roman Divacky
115f0fa397
Add hardcoded -L/usr/lib after all -L options to the FreeBSD linker
...
invocation.
This mimics what gcc does and fixes libtool check for libraries.
llvm-svn: 124558
2011-01-30 08:12:24 +00:00
Benjamin Kramer
ed3d85a7f0
Make the FreeBSD driver test more robust so it doesn't fail when there's a single lib32 path.
...
llvm-svn: 124494
2011-01-28 18:28:30 +00:00
Fariborz Jahanian
a4cfff87b9
Add all options needed to support -fapple-kext. wip.
...
llvm-svn: 122987
2011-01-07 01:05:02 +00:00
Daniel Dunbar
86aed7d5fc
Driver: M and MM should be grouped together, <rdar://problem/8744831>.
...
llvm-svn: 121284
2010-12-08 21:33:40 +00:00
Chandler Carruth
174305b94e
Make this test resilient to whether or not the Linux toolchain renders the
...
sysroot flag to the link command as a joined flag or a separate flag.
llvm-svn: 121270
2010-12-08 19:11:45 +00:00
Rafael Espindola
c8f008f649
Use ld directly on linux. Changes from the previous try:
...
*) Try to detect as much as possible from the system itself, not the distro.
This should make it easier to port to a new distro and more likely to
work on a unknown one.
*) The distro enum now doesn't include the arch. Just use the existing
host detection support in LLVM.
*) Correctly handle --sysroot.
A small regression is that now clang will pass bitcode file to the linker.
This is necessary for the gold plugin support to work.
It might be better to detect this at configure/cmake time, but doing it in
c++ first is a lot easier.
llvm-svn: 118382
2010-11-07 20:14:31 +00:00
Rafael Espindola
5275559c2e
Update tests to not search of as.
...
llvm-svn: 117711
2010-10-29 21:18:11 +00:00
Chandler Carruth
c7b34694ff
Try again to pacify the build bots. =/ I'm getting a Darwin machine to test on.
...
llvm-svn: 116918
2010-10-20 08:24:03 +00:00
Chandler Carruth
4baa6ef5ec
Remove a modern bash-ism and use simpler shell redirects. Hopefully will fix
...
build bots.
llvm-svn: 116914
2010-10-20 07:16:18 +00:00
Chandler Carruth
24e17e175d
Add support for the '--sysroot' flag, and an accompanying test of its
...
interactions with -isysroot and other driver commands.
llvm-svn: 116912
2010-10-20 07:00:47 +00:00
Argyrios Kyrtzidis
dfe47dba37
Revert r116605, a lot more were committed by mistake.
...
llvm-svn: 116606
2010-10-15 18:51:34 +00:00
Argyrios Kyrtzidis
ffbba26285
Add '-include-pch' option to the driver, so it can get passed to the cc1 driver.
...
llvm-svn: 116605
2010-10-15 18:49:01 +00:00
Argyrios Kyrtzidis
74825bcfb9
Implement -fshort-enums (rdar://8490496).
...
llvm-svn: 116020
2010-10-08 00:25:19 +00:00
Francois Pichet
8f170b8239
Fix last test still failing on Win32. 100% pass rate now!
...
llvm-svn: 113702
2010-09-11 20:43:12 +00:00
Daniel Dunbar
e31e323c02
Driver/Darwin: Switch to using simplified tool chain by default -- what better
...
way to see what will break! :)
llvm-svn: 111840
2010-08-23 20:58:55 +00:00
Daniel Dunbar
568b7500fe
Driver/OptParser: Add a NoForward flag to prevent forwarding certain options to
...
GCC.
- Mark -Xclang and -mlinker-version= with it for now, although I am sure there
are more.
llvm-svn: 111005
2010-08-13 04:44:20 +00:00
Argyrios Kyrtzidis
90bdfbbdf7
Switch on PCH for C++. C++ fans all over the world rejoice.
...
llvm-svn: 110879
2010-08-11 23:27:58 +00:00
Daniel Dunbar
cacb0e2d45
Driver/Darwin: Pass -demangle when linking, if the linker supports it.
...
llvm-svn: 110873
2010-08-11 23:07:50 +00:00
Daniel Dunbar
ce25f33e2a
Driver/FreeBSD: Infer the right arch name in the presence of -m32,-m64, for the
...
cases we care about.
- This is eventually going to be unified outside the host specific code.
llvm-svn: 110693
2010-08-10 17:39:05 +00:00
Daniel Dunbar
926f81fce5
Driver: Start ripping out support for -pipe, which is worthless and complicates
...
too many other things.
llvm-svn: 110007
2010-08-02 02:38:03 +00:00
Daniel Dunbar
6d48476446
Driver/Darwin: Set -force_cpusubtype_ALL only by default on x86.
...
llvm-svn: 109074
2010-07-22 01:47:22 +00:00
Daniel Dunbar
08d047666a
Fix test for Win32.
...
llvm-svn: 108806
2010-07-20 04:06:54 +00:00
Daniel Dunbar
99b5524324
Driver: Make -fnext-runtime the default when rewriting Objective-C.
...
llvm-svn: 108741
2010-07-19 19:44:22 +00:00
Daniel Dunbar
354e96df95
Driver/Darwin: Add deployment target after doing argument translation, so that
...
-mmacosx-version-min works inside a -Xarch_ flag.
llvm-svn: 108712
2010-07-19 17:11:36 +00:00
Rafael Espindola
77a067a653
Implement support for reading arguments specified in a file with @file . If
...
there is no file named "file", keep the @file option unchanged.
llvm-svn: 108697
2010-07-19 15:20:12 +00:00