Bob Wilson
d9249414b3
Add clang support for cortex-m0 cpus. Patch by James Orr.
...
llvm-svn: 128018
2011-03-21 20:40:05 +00:00
Joerg Sonnenberger
fcc3ec90a5
Introduce FindTargetProgramPath to check for a target-specific helper
...
program and fallback to plain version otherwise. Use this for the NetBSD
target to make it try e.g. i486--netbsdelf-as and -ld for target
i486--netbsdelf.
llvm-svn: 127996
2011-03-21 14:01:40 +00:00
Joerg Sonnenberger
6165ab1132
Remember sysroot in Driver. Pass it down to ld for NetBSD, FreeBSD
...
and DragonFly. Use the --sysroot= form for Linux. Fix handling of =
prefix for -B.
llvm-svn: 127994
2011-03-21 13:51:29 +00:00
Daniel Dunbar
8c3d735118
Driver: Forward -traditional and -traditional-cpp in preprocessing modes.
...
- We don't really support the majority of the horrible -traditional-cpp
behavior, but it is unlikely that we ever will either. This allows us to
start trying to use clang as a /usr/bin/cpp replacement and see what pieces
of -traditional-cpp mode people actually care about.
llvm-svn: 127911
2011-03-18 21:23:40 +00:00
John McCall
7ef5cb3038
The Darwin kernel does not provide useful guard variable support.
...
Issue this as an IR-gen error; it's not really worthwhile doing this
"right", i.e. in Sema, because IR gen knows a lot of tricks beyond
what the constant evaluator knows.
llvm-svn: 127854
2011-03-18 02:56:14 +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
1d733e2d7e
Driver/Darwin: Suppress spurious warning about -force_cpusubtype_ALL.
...
llvm-svn: 127819
2011-03-17 17:37:29 +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
Ted Kremenek
a4a57c10da
Re-enable the IdempotentOperations checker for --analyze, and put it and the DeadStores checker into the "deadcode" group.
...
llvm-svn: 127531
2011-03-12 06:14:28 +00:00
Joerg Sonnenberger
b86f5f4106
If called as *cpp or *cpp-[^-]*, run only the preprocessor. If no
...
input is specified, use stdin implicitly. Based on a patch from
Roman Divacky.
llvm-svn: 127137
2011-03-06 23:31:01 +00:00
Douglas Gregor
d9bb152821
Fix driver for thumb-capable ARM hosts, from Mikko Lehtonen!
...
llvm-svn: 127128
2011-03-06 19:11:49 +00:00
Daniel Dunbar
908b48565d
build: Allow disabling movt/movw from build, for testing purposes.
...
llvm-svn: 126810
2011-03-02 00:55:57 +00:00
Daniel Dunbar
733b0f87df
Driver/Darwin: Be bug compatible with GCC and ignore -pg on ARM.
...
llvm-svn: 126767
2011-03-01 18:49:30 +00:00
Roman Divacky
432f10df68
The default CPU on FreeBSD for i386 should be i486, not pentium4.
...
Patch by Dimitry Andric!
llvm-svn: 126763
2011-03-01 18:11:37 +00:00
Roman Divacky
ee8188a23b
For linking on FreeBSD, don't add a hardcoded "-L/usr/lib", but
...
retrieve the library paths from the ToolChain object instead.
Copy the relevant code from linuxtools::Link::ConstructJob(), and
replace the std::string stuff with llvm::StringRef, while we're here.
Patch by Dimitry Andric!
llvm-svn: 126757
2011-03-01 17:53:14 +00:00
Roman Divacky
65b88cdb3b
Implement -mrtd which sets the StdCall calling convention to be the default
...
one.
llvm-svn: 126756
2011-03-01 17:40:53 +00:00
Rafael Espindola
d95a81293b
Disable more warnings so that it is safe to use
...
CC="clang -use-gold-plugin -emit-llvm"
CXX="clang++ -use-gold-plugin -emit-llvm"
llvm-svn: 126740
2011-03-01 05:25:27 +00:00
Rafael Espindola
22f60303f2
Don't warn about "clang -use-gold-plugin -c ...". With this users can say
...
CC="clang -use-gold-plugin" CFLAGS=-emit-llvm ../configure...
and not be hit with a warning for each .c file.
llvm-svn: 126713
2011-02-28 23:29:45 +00:00
Argyrios Kyrtzidis
9eb02dfa89
[analyzer] Remove '-analyzer-check-objc-mem' flag, the nominee for best misnomer award.
...
llvm-svn: 126676
2011-02-28 19:49:42 +00:00
David Chisnall
da20991a1b
Make -fobjc-nonfragile-abi and -fgnu-runtime imply -fblocks (unless -fno-blocks is specified), because this combination of flags defines an Objective-C runtime that includes a blocks runtime.
...
llvm-svn: 126654
2011-02-28 17:11:43 +00:00
Chandler Carruth
74f8711802
Fix a tiny goof in the Driver's logic which caused the explicit presence
...
of -fexceptions to disably C++ exceptions. The correct code was in the
ObjC branch, this just mirrors that logic on the C++ side of things.
Thanks to John Wiegley for pointing this out.
llvm-svn: 126640
2011-02-28 07:25:18 +00:00
Anders Carlsson
e96ab55b28
Add a -fcxx-exceptions flag to the frontend, which can be used to enable
...
C++ exceptions, even when exceptions have been turned off using -fno-exceptions.
Make the -fobjc-exceptions flag do the same thing, but for Objective-C exceptions.
C++ and Objective-C exceptions can also be disabled using -fno-cxx-excptions and
-fno-objc-exceptions.
llvm-svn: 126630
2011-02-28 02:27:16 +00:00
Argyrios Kyrtzidis
3e7ab19863
[analyzer] Move the DeadStores checker out of the 'core' package.
...
-Now it gets enabled with '-analyzer-checker=DeadStores'.
-The driver passes the above flag by default.
llvm-svn: 126612
2011-02-28 01:27:12 +00:00
Anders Carlsson
246ff3f19f
Factor code out into a helper function, shouldUseExceptionTablesForObjCExceptions.
...
llvm-svn: 126601
2011-02-28 00:44:51 +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
Chris Lattner
d0257f79bc
Pass the right linker flag in openbsd::Link::ConstructJob,
...
patch by Matthew Dempsky!
llvm-svn: 126133
2011-02-21 18:36:51 +00:00
Anders Carlsson
ce8dd3a5d4
Add a new ObjCExceptions member variable to LangOptions. This controls whether Objective-C exceptions are enabled or not (they are by default).
...
llvm-svn: 126061
2011-02-19 23:53:54 +00:00
Argyrios Kyrtzidis
3b1b3fe039
[analyzer] '-analyzer-check-objc-mem' can go through the llvm/clang codebase without crashing; enable it for C++.
...
llvm-svn: 126026
2011-02-19 08:03:21 +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
Argyrios Kyrtzidis
af45aca670
[analyzer] Use the new registration mechanism on the non-path-sensitive-checkers:
...
DeadStoresChecker
ObjCMethSigsChecker
ObjCUnusedIvarsChecker
SizeofPointerChecker
ObjCDeallocChecker
SecuritySyntaxChecker
llvm-svn: 125779
2011-02-17 21:39:33 +00:00
NAKAMURA Takumi
31ea2f14bc
Triple::MinGW64 is deprecated and removed. We can use Triple::MinGW32 instead.
...
No one uses *-mingw64. mingw-w64 is represented as {i686|x86_64}-w64-mingw32.
llvm-svn: 125742
2011-02-17 08:51:38 +00:00
NAKAMURA Takumi
029d74b264
Fix whitespace.
...
llvm-svn: 125741
2011-02-17 08:50:50 +00:00
Argyrios Kyrtzidis
b2400924d9
[analyzer] Use the new registration mechanism on the IdempotentOperationChecker.
...
llvm-svn: 125611
2011-02-15 22:55:14 +00:00
Argyrios Kyrtzidis
a6d04d541d
[analyzer] Use the new registration mechanism on some of the internal checks. These are:
...
StackAddrLeakChecker
ObjCAtSyncChecker
UnixAPIChecker
MacOSXAPIChecker
The rest have/create implicit dependencies between checkers and need to be handled differently.
llvm-svn: 125559
2011-02-15 07:42:33 +00:00
Argyrios Kyrtzidis
556c45e9c5
[analyzer] Overhauling of the checker registration mechanism.
...
-Checkers will be defined in the tablegen file 'Checkers.td'.
-Apart from checkers, we can define checker "packages" that will contain a collection of checkers.
-Checkers can be enabled with -analyzer-checker=<name> and disabled with -analyzer-disable-checker=<name> e.g:
Enable checkers from 'cocoa' and 'corefoundation' packages except the self-initialization checker:
-analyzer-checker=cocoa -analyzer-checker=corefoundation -analyzer-disable-checker=cocoa.SelfInit
-Introduces CheckerManager and CheckerProvider. CheckerProviders get the set of checker names to enable/disable and
register them with the CheckerManager which will be the entry point for all checker-related functionality.
Currently only the self-initialization checker takes advantage of the new mechanism.
llvm-svn: 125503
2011-02-14 18:13:31 +00:00
Matt Beaumont-Gay
1fe49151c9
Add braces to quiet a gcc warning.
...
llvm-svn: 125309
2011-02-10 20:35:01 +00:00
Roman Divacky
66f2276aee
Adjust the object files to be linked in when mcount profiling
...
is specified in the FreeBSD linker driver.
llvm-svn: 125285
2011-02-10 16:59:40 +00:00
Roman Divacky
178e0160b7
Implement mcount profiling, enabled via -pg.
...
llvm-svn: 125282
2011-02-10 16:52:03 +00:00
Daniel Dunbar
0bb0331d95
Driver/Frontend: Wire up -mregparm=.
...
llvm-svn: 125201
2011-02-09 17:54:19 +00:00
Bob Wilson
d1447c45fa
Add better support for ARM EABI triples.
...
Patch by Renato Golin!
llvm-svn: 124878
2011-02-04 17:59:28 +00:00
Daniel Dunbar
80f787c1c1
Driver: Fix spurious warning (from -cc1) about unused -fapple-kext on C inputs.
...
llvm-svn: 124875
2011-02-04 17:24:47 +00:00
Daniel Dunbar
7aa71f9423
build: Add support for DISABLE_DEFAULT_STRICT_ALIASING, which does what one
...
might expect.
llvm-svn: 124848
2011-02-04 02:20:39 +00:00
Daniel Dunbar
ac540b3859
clang: Add support for a CC_PRINT_HEADERS environment variable, which mirrors
...
CC_PRINT_OPTIONS and can be used to get some out-of-band information on header
usage from a build.
llvm-svn: 124751
2011-02-02 21:11:35 +00:00
Benjamin Kramer
24f1d3e60a
Add NetBSD target support. Patch by Joerg Sonnenberger.
...
llvm-svn: 124736
2011-02-02 18:59:27 +00:00
Nick Lewycky
75033770f4
Turn on -momit-leaf-frame-pointer by default on all non-Darwin platforms.
...
Fixes PR9121!
llvm-svn: 124718
2011-02-02 06:43:03 +00:00
Douglas Gregor
dbe3927026
Basic support for -mms-bitfields, from Carl Norum!
...
llvm-svn: 124661
2011-02-01 15:15:22 +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
Argyrios Kyrtzidis
c7ffd35cb7
[analyzer] Enable the self-init checker under command-line option '-analyzer-check-objc-self-init' which by default
...
is enabled by the driver for '--analyze'.
llvm-svn: 124266
2011-01-26 01:26:50 +00:00
Chris Lattner
906bb9047a
improve compatibility with GCC: when generating the ".d" filename to use
...
and the filename has multiple .'s in it, use the last. For example, "foo.bar.cpp"
should produce "foo.bar.d" not "foo.d". Patch by Johan Boule in PR8391
llvm-svn: 123576
2011-01-16 08:14:11 +00:00
Ted Kremenek
f6ab5ff7d7
Driver: tweak handling of '--analyze' to invoke
...
analyzer -cc1 options that are tailored to the
input type. If the input type is "C++", we should
only run the dead stores checker (for now). Similarly,
checks specific to Objective-C should only run
on Objective-C Code.
llvm-svn: 123481
2011-01-14 22:31:31 +00:00
Michael J. Spencer
f6efe58d45
Replace all uses of PathV1::exists with PathV2::fs::exists.
...
llvm-svn: 123150
2011-01-10 02:34:13 +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
Fariborz Jahanian
3aa19e9a70
Fold -fobjc-nonfragile-abi2 into -fobjc-nonfragile-abi.
...
// rdar://8818375
llvm-svn: 122831
2011-01-04 20:05:20 +00:00
Ted Kremenek
1d56c9eed7
Add -fobjc-default-synthesized-properties flag
...
to allow us to explicitly control whether or
not Objective-C properties are default synthesized.
Currently this feature only works when using
the -fobjc-non-fragile-abi2 flag (so there is
no functionality change), but we can now turn
off this feature without turning off all the features
coupled with -fobjc-non-fragile-abi2.
llvm-svn: 122519
2010-12-23 21:35:43 +00:00
Rafael Espindola
7f73489c3f
Fix PR8639 by making the "argument unused during compilation" less agressive. Now we
...
don't warn if an argument is not used because it is shadowed by a subsequent argument.
llvm-svn: 122281
2010-12-20 22:45:09 +00:00
Michael J. Spencer
e169675474
Replace all uses of PathV1::getLast with PathV2::filename.
...
llvm-svn: 122117
2010-12-18 00:19:12 +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
Rafael Espindola
81937ec1b6
Handle -nostartfiles.
...
llvm-svn: 120528
2010-12-01 01:52:43 +00:00
Michael J. Spencer
8aaf49959c
Merge System into Support.
...
llvm-svn: 120297
2010-11-29 18:12:39 +00:00
Anders Carlsson
d470fef01d
Forward the -fno-elide-constructor argument to clang -cc1. Fixes PR8652.
...
llvm-svn: 119915
2010-11-21 00:09:52 +00:00
Daniel Dunbar
6d776eb1e8
Driver/Darwin: Don't pass -demangle to an iOS linker, which may not understand
...
it.
llvm-svn: 119809
2010-11-19 17:51:40 +00:00
Daniel Dunbar
7c87433513
Driver: Ignore -force_cpusubtype_ALL.
...
llvm-svn: 119803
2010-11-19 16:23:35 +00:00
Argyrios Kyrtzidis
ef6c8da50f
-Rename -Wargument-larger-than -> -Wlarge-by-value-copy
...
-Improve the diagnostic message
-Add some comments
Suggestions by Chris.
llvm-svn: 119594
2010-11-18 00:20:36 +00:00
Argyrios Kyrtzidis
af84ec0a96
Introduce option -Wargument-larger-than[=N] which warns about function definitions if they take by-value
...
or return by-value any POD that is larger than some threshold (default is 64 bytes).
Implements rdar://8548050.
llvm-svn: 119583
2010-11-17 23:11:54 +00:00
Rafael Espindola
d47ac23154
Implement -pie.
...
llvm-svn: 119577
2010-11-17 22:26:15 +00:00
Rafael Espindola
cfaaddaee0
Don't warn about
...
clang -w -c foo.s
Helps with the gdb testsuite.
llvm-svn: 119574
2010-11-17 22:13:25 +00:00
Rafael Espindola
f92614c578
Don't warn about -w not being used in a link. Necessary to get sane
...
results in the gdb testsuite.
llvm-svn: 119552
2010-11-17 20:37:10 +00:00
Rafael Espindola
9b6fae5d6d
Silence warning for "clang -O2 -O0 -c foo.c -o foo.o.
...
Fixes PR8607.
llvm-svn: 119498
2010-11-17 15:16:14 +00:00
Rafael Espindola
d1002f6fce
Fixes PR8611.
...
Silence warning about -g not being used during linking. I couldn't find any
change in behavior in gcc liking when given -g. Please open another bug if
I missed something.
llvm-svn: 119166
2010-11-15 18:28:16 +00:00
Daniel Dunbar
fc8aefb0ba
Driver: Support -Oz as an alias for -Os.
...
llvm-svn: 119003
2010-11-13 18:17:11 +00:00
Rafael Espindola
9aa60e964e
Add support for -nostdlib in the linux toolchain.
...
llvm-svn: 118878
2010-11-12 03:00:39 +00:00
Rafael Espindola
34d77dc49a
Add support for -s, -pthread and -pthreads. Thanks to Hans Wennborg and
...
Cosmin Truta for reporting it.
llvm-svn: 118826
2010-11-11 19:34:42 +00:00
Daniel Dunbar
aeed5fe6a2
Driver: Allow build system override of default non-fragile ABI version.
...
llvm-svn: 118786
2010-11-11 16:08:59 +00:00
Rafael Espindola
7ba97afc4d
Add -rdynamic to freebsd and openbsd. Patch by Ruben.
...
llvm-svn: 118771
2010-11-11 02:17:51 +00:00
Bruno Cardoso Lopes
e7f211c89f
Add support for soft/hard float options to the Sparc target
...
llvm-svn: 118514
2010-11-09 17:21:19 +00:00
Rafael Espindola
1c76c59bbc
Add support for -rdynamic.
...
llvm-svn: 118384
2010-11-07 22:57:16 +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
Argyrios Kyrtzidis
71731d6b05
Implement -working-directory.
...
When -working-directory is passed in command line, file paths are resolved relative to the specified directory.
This helps both when using libclang (where we can't require the user to actually change the working directory)
and to help reproduce test cases when the reproduction work comes along.
--FileSystemOptions is introduced which controls how file system operations are performed (currently it just contains
the working directory value if set).
--FileSystemOptions are passed around to various interfaces that perform file operations.
--Opening & reading the content of files should be done only through FileManager. This is useful in general since
file operations will be abstracted in the future for the reproduction mechanism.
FileSystemOptions is independent of FileManager so that we can have multiple translation units sharing the same
FileManager but with different FileSystemOptions.
Addresses rdar://8583824.
llvm-svn: 118203
2010-11-03 22:45:23 +00:00
Rafael Espindola
b2cbd85be8
Revert while I debug test failures :-(
...
llvm-svn: 118150
2010-11-03 04:43:56 +00:00
Rafael Espindola
c5dfb607f5
Switch clang to run ld directly on linux. I tested this on all the linux
...
distros listed by running
gcc main.o -o main
g++ main.o -o main
gcc main.o -o main -static
g++ main.o -o main -static
gcc f.o -o f.so -shared
g++ f.o -o f.so -shared
and comparing the ld line with the one created by clang. I also added
-m32/m64 in distros that support it.
While I tested many distros, there will always be more. If you are hit by this
it should be somewhat easy to add your distro. If you are in a hurry, do
revert this, but please inform how to detect you distro and the ld command
lines produced by the above gcc invocations. Most distros have some patches
on gcc :-(
llvm-svn: 118149
2010-11-03 04:37:51 +00:00
Daniel Dunbar
3ada2b7996
Driver: Silently ignore -fasm-blocks for now instead of error'ing, this cause
...
some unexpected fallout.
llvm-svn: 118037
2010-11-02 19:42:04 +00:00
Daniel Dunbar
a78e589b08
Driver/IA: Ignore -L for now, which users shouldn't be using for semantic effect.
...
llvm-svn: 117600
2010-10-28 20:36:23 +00:00
Michael J. Spencer
4992ca4b17
Reorganize predefined macros for all Windows targets.
...
This adds an option to set the _MSC_VER macro without
recompiling. This is very useful when testing compatibility
with the Windows SDK and c++stdlib headers.
-fmsc-version=<version> (defaults to VS2003 (1300))
llvm-svn: 116999
2010-10-21 05:21:48 +00:00
Michael J. Spencer
4c0ffa823f
Fix Whitespace.
...
llvm-svn: 116990
2010-10-21 03:16:25 +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
Daniel Dunbar
473f8a6f88
Driver: Reject -fasm-blocks except on X86 (where we just ignore it, since
...
passing it is very prevalent in some circles).
llvm-svn: 116761
2010-10-18 22:49:46 +00:00
Daniel Dunbar
2b4de14b1d
Driver/IA: Accept and ignore -force_cpusubtype_ALL, as in 'clang -c
...
-Wa,-force_cpusubtype_ALL t.c'.
- Tweaks -Wa, and -Xassembler handling to only accept an explicit short list of
arguments and give an obvious unsupported error on others.
llvm-svn: 116759
2010-10-18 22:36:15 +00:00
Daniel Dunbar
767bbabb24
Driver/Darwin: Forward -ObjC when linking, which may be needed when using static
...
libraries with Objective-C code.
llvm-svn: 116758
2010-10-18 22:08:36 +00:00
Daniel Dunbar
6358d6866d
Driver: Error on -fno-for-scope, which we have no intention of supporting.
...
llvm-svn: 116627
2010-10-15 22:30:42 +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
Dan Gohman
10169b94cf
Wire up the -fstrict-aliasing and -fno-strict-aliasing options
...
to CodeGenOption flags.
llvm-svn: 116530
2010-10-14 22:36:56 +00:00
Douglas Gregor
4e0f15a4a2
Eliminate -fdiagnostics-binary and all of the infrastructure for
...
emitting diagnostics in a binary form to be consumed by libclang,
since libclang no longer does any of its work out-of-process, making
this code dead. Besides, this stuff never worked at 100% anyway.
llvm-svn: 116250
2010-10-11 22:02:06 +00:00
NAKAMURA Takumi
6bdc8a2d8a
lib/Driver/Tools.cpp: Disable cxa_atexit by default also on Cygwin.
...
llvm-svn: 116161
2010-10-10 01:53:03 +00:00
Argyrios Kyrtzidis
74825bcfb9
Implement -fshort-enums (rdar://8490496).
...
llvm-svn: 116020
2010-10-08 00:25:19 +00:00
John McCall
2a981c2056
Teach the driver to pass -fexceptions in Objective-C inputs on ARM.
...
I don't know when this stopped happening, but this seems to be the
right place to do it.
llvm-svn: 115730
2010-10-06 01:40:51 +00:00
Devang Patel
91bbb5547d
Introduce -flimit-debug-info.
...
In this experimental mode try avoiding debug info emission for classes as much as possible. The goal is to reduce size of produced debuginfo without reducing quality of debug info in general. This is a work in progress.
llvm-svn: 115188
2010-09-30 19:05:55 +00:00
Argyrios Kyrtzidis
2f23b414e9
Driver: Ignore the found PCH file if its '-include' is not the first one.
...
llvm-svn: 115158
2010-09-30 16:53:47 +00:00
Daniel Dunbar
f247675c55
Driver/Linux: Translate rewritten lib options back to standard -l form when
...
using generic GCC tools.
llvm-svn: 114793
2010-09-25 18:10:05 +00:00
Daniel Dunbar
4ed214a191
Driver: Add -fallow-unsupported which disables some of the eager error'ing we do
...
to prevent users from trying unsupported stuff. Useful for testing.
llvm-svn: 114749
2010-09-24 19:39:37 +00:00
Nick Lewycky
e47c245b90
Fix header comment so we don't break emacs.
...
llvm-svn: 114711
2010-09-23 23:48:20 +00:00
Argyrios Kyrtzidis
4f92016ed3
If -fcolor-diagnostics is explicitly passed to the driver respect that even if the driver is of the opinion that
...
stderr can't handle them. (see http://llvm.org/PR8150 )
Patch by Frits van Bommel!
llvm-svn: 114638
2010-09-23 12:56:06 +00:00
Daniel Dunbar
c1dd0e97f3
Driver/Objective-C: Retool Objective-C ABI flags to be more usable, and actually
...
document behavior. Will wonders never cease.
llvm-svn: 114334
2010-09-20 18:19:55 +00:00
Shantonu Sen
afeb03b41d
Driver: implement driver automagic support for -lcc_kext
...
Rewrite linker arguments to use libclang_rt.cc_kext.a
instead of gcc-specific libcc_kext.a
Resolves Radar 7808495
llvm-svn: 114193
2010-09-17 18:39:08 +00:00
David Chisnall
dd84ef1e62
Add a -ftrapv-handler= option which allows a handler to invoke instead of simply aborting when a signed operation overflows. This mirrors the (GCC-incompatible) behaviour from clang 1.0 and 1.1 when -ftrapv was specified, but allows the handler to be defined for each compilation unit.
...
llvm-svn: 114192
2010-09-17 18:29:54 +00:00
Daniel Dunbar
3f7796fc22
Driver: Fix spelling of AddCXXStdlibLibArgs, which I copy-n-pasto'd.
...
llvm-svn: 114147
2010-09-17 01:20:05 +00:00
Daniel Dunbar
2cc3f17a26
Driver: Add magic handling for "reserved library names", starting with
...
-lstdc++. This is the best gross solution for a gross problem.
This issue is that historically, GCC has add -L options to its internally
library directories. This has allowed users and platforms to end up depending on
the layout of GCC's internal library directories.
We want to correct this mistake by eliminating that -L, but this means that
existing libraries which are in the GCC lib dir won't be found. We are going to
handle this by treating those -l names as "reserved", and requiring toolchains
to know how to add the right full path to the reserved library.
The immediately side effect of this is that users trying to use -L to find their
own -lstdc++ will need to start using -nostdlib (which is a good idea
anyway). Another side effect is that -stdlib=libc++ -lstdc++ will now do the
"right" thing, for curious definitions of right.
llvm-svn: 114144
2010-09-17 00:45:02 +00:00
Daniel Dunbar
54423b2a86
Driver: Factor out AddLinkerInputs() function.
...
llvm-svn: 114138
2010-09-17 00:24:54 +00:00
Fariborz Jahanian
f51a38777b
Make the new -fobjc-nonfragile-abi2 the default
...
abi for clang's objective-c compilations.
(radar 8353555).
llvm-svn: 113974
2010-09-15 16:00:51 +00:00
Daniel Dunbar
bf11f79053
Driver: Factor out some code for handling the C++ standard library.
...
llvm-svn: 113890
2010-09-14 23:12:35 +00:00
Daniel Dunbar
30a12b8d88
Simplify.
...
llvm-svn: 113889
2010-09-14 23:12:31 +00:00
Anton Korobeynikov
82b3333b72
Disable cxa_atexit by default on MingW.
...
Patch by Dimitry Andric!
llvm-svn: 113683
2010-09-11 11:17:06 +00:00
Daniel Dunbar
ccbc45262b
Driver/Darwin: Make the compilation object available in AddLinkArgs.
...
llvm-svn: 113549
2010-09-09 21:51:05 +00:00
Daniel Dunbar
859dba6637
Driver: Mark function as nounwind when -mkernel or -fapple-kext is present.
...
llvm-svn: 113541
2010-09-09 21:17:44 +00:00
Daniel Dunbar
3d7e0e2c6b
Driver/Darwin: Catch another case where ld ends up using ld_classic.
...
llvm-svn: 113226
2010-09-07 17:50:41 +00:00
Daniel Dunbar
1eaf5c6abb
Driver/Darwin: Don't pass -demangle to the linker when we know it is going to
...
use ld_classic. This is a temporary workaround, the linkr itself should handle
this.
llvm-svn: 113212
2010-09-07 17:07:49 +00:00
Rafael Espindola
b2d0d40c3d
Make "-ccc-cxx" option work on Linux.
...
Patch by nobled.
I also took the opportunity to make the field private since now it is only ready from the
outside.
llvm-svn: 113138
2010-09-06 02:36:23 +00:00
Dawn Perchik
68bb1b441f
Add support for Borland extensions via option -fborland-extensions
...
(original patch r112791 was reverted due to a bug).
llvm-svn: 112915
2010-09-02 23:59:25 +00:00
Dawn Perchik
f0882f90f3
Reverting rev 112791 - apparently -fborland-extensions is on all the time?!
...
llvm-svn: 112797
2010-09-02 02:18:55 +00:00
Dawn Perchik
1fcc18c7bc
Add support for Borland extensions via option -fborland-extensions
...
llvm-svn: 112791
2010-09-02 01:12:01 +00:00
Daniel Dunbar
d435275c59
Frontend: Add basic -H support.
...
- I didn't implement the GCC "multiple include guard" detection parts, because
it doesn't seem useful or obvious.
llvm-svn: 111983
2010-08-24 22:44:13 +00:00
Daniel Dunbar
fe6c97b443
Driver/Clang: Forward -Wa, and -Xassembler to clang -cc1 when using the
...
integrated assembler. For now this mostly just means that we will error out if
someone tries to use this mechanism to send an argument to the assembler.
llvm-svn: 111921
2010-08-24 16:47:49 +00:00
Daniel Dunbar
82eb4ce476
Driver: Move Clang "triple" computation routines to method on the
...
ToolChain. This fixes a potenial bad cast when running Clang on PPC code, since
the tool chain in effect is not a subclass of the Darwin one, but we were
treating it like it was.
- This introduces some gross code duplication, but the right fix for it is to
just move the Driver to start depending on the targets in libBasic, so I am
not planning on fixing it immediately.
llvm-svn: 111856
2010-08-23 22:35:37 +00:00
Michael J. Spencer
b186bc3c4b
Visual Studio tools used on win32 hosts when targeting win32.
...
llvm-svn: 111748
2010-08-21 21:55:07 +00:00
Douglas Gregor
eec975ce5a
Add machine-parseable Fix-It output as part of diagnostics, under the
...
flag -fdiagnostics-parseable-fixits, from Eelis van der Weegen!
llvm-svn: 111557
2010-08-19 20:24:43 +00:00
David Chisnall
589a494352
Pass some things to the linker that gcc passes. -r is the only one of these that I'm sure about, but the others seem to be listed on FreeBSD by gcc -dumpspecs, so I hope they're right. Apparently -r is also not passed on GNU/Linux (and should be), but I can't see where the toolchain definition for this platform live.
...
llvm-svn: 111114
2010-08-15 22:58:12 +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
976a2f54fa
Driver: Add -mlinker-version=, which forwards to -target-linker-version.
...
llvm-svn: 110872
2010-08-11 23:07:47 +00:00
Ted Kremenek
0476899b20
Turn on idempotent operations checker when using --analyze.
...
llvm-svn: 110695
2010-08-10 18:03:13 +00:00
Rafael Espindola
92b0093112
Run the assembler instead of gcc on Linux.
...
llvm-svn: 110635
2010-08-10 00:25:48 +00:00
Eric Christopher
f387dbde81
Make -funroll-loops turn on loop unrolling in the optimizer instead
...
of just ignoring it.
llvm-svn: 110525
2010-08-07 23:08:14 +00:00
Daniel Dunbar
939c1211cc
Driver: Don't forward any -g options to GCC, when using it to drive the
...
assembler.
- Fixes PR6218, hopefully.
llvm-svn: 110111
2010-08-03 16:14:14 +00:00
Daniel Dunbar
7fbaf53470
Driver: Add Compilation::addCommand and switch tools to using it, now that we
...
don't have to deal with nested jobs.
llvm-svn: 110015
2010-08-02 02:38:28 +00:00
Daniel Dunbar
b440f56e53
Driver: Eliminate special InputInfo kind for pipes, it is now unused.
...
llvm-svn: 110013
2010-08-02 02:38:21 +00:00
Daniel Dunbar
ea3813fbc9
Driver/OpenBSD: Update toolchain for compiler changes / C++; patch by Jonathan
...
Gray.
llvm-svn: 109994
2010-08-01 23:13:54 +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
Rafael Espindola
38360b3ff7
Add -lstdc++ to DragonFly tools.
...
Patch by Sascha Wildner.
llvm-svn: 108830
2010-07-20 12:59:03 +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
b31b76f1eb
Driver: Fix a possible use after free.
...
llvm-svn: 108659
2010-07-18 21:16:15 +00:00
Daniel Dunbar
9765b9817d
Driver: When re'execing clang, use path to the main executable instead of
...
looking up Clang in the normal search paths (which may end up finding the wrong
clang).
llvm-svn: 108346
2010-07-14 18:46:27 +00:00
Daniel Dunbar
9c3ed5f4d0
Driver: Remove some unused arguments.
...
llvm-svn: 108345
2010-07-14 18:46:23 +00:00
Daniel Dunbar
af68a88e68
Driver/Darwin: Pass -pie/-no_pie to the linker when -fpie/-fno-pie and friends
...
are explicitly given.
llvm-svn: 108297
2010-07-13 23:31:40 +00:00
Douglas Gregor
8ed0c0b99d
Introduce -f{no-}spell-checking options to enable/disable
...
spell-checking. By default, spell-checking is enabled for Clang
(obviously) but disabled in CIndex for performance reasons.
llvm-svn: 107992
2010-07-09 17:35:33 +00:00
Chris Lattner
3e2ee147d0
add driver support for minix, patch by Kees van Reeuwijk
...
from PR7583
llvm-svn: 107788
2010-07-07 16:01:42 +00:00
Daniel Dunbar
bb7ac52e02
Driver/IRgen: Add support for -momit-leaf-frame-pointer.
...
llvm-svn: 107367
2010-07-01 01:31:45 +00:00
Rafael Espindola
0e1fb4f341
Set the default arch based on the triple.
...
llvm-svn: 107021
2010-06-28 17:18:09 +00:00
Rafael Espindola
b1ef8ffb15
Use softfp for linux gnueabi, keep the warning for everything else.
...
llvm-svn: 106984
2010-06-27 18:29:21 +00:00