Daniel Dunbar
4364558956
Driver/Darwin/x86: When linking, incorporate -L paths based on the path where
...
Clang is installed. This is designed to match gcc, and is important when
installed in a non-standard location.
- This is gross, but no worse than ever. It will die when we finally move to
the compiler-rt based toolchain, any day now.
llvm-svn: 100915
2010-04-10 01:24:22 +00:00
Douglas Gregor
cc9c92cfc2
XFAIL the -nostdinc++ test on Windows; it doesn't look like we even have the notion of separate C and C++ paths there
...
llvm-svn: 99422
2010-03-24 20:45:20 +00:00
Douglas Gregor
64b046fce4
Implement support for -nostdc++. Fixes PR6446.
...
llvm-svn: 99417
2010-03-24 20:13:48 +00:00
Daniel Dunbar
6a8efa8a79
Driver: Support CC_PRINT_OPTIONS, used for logging the compile commands (in -v style) to a file.
...
llvm-svn: 99054
2010-03-20 08:01:59 +00:00
Daniel Dunbar
ed45c3f2b9
Driver: Force joining of "-l" "foo", the linker doesn't eat that format.
...
<rdar://problem/7641151> clang must eat spaces after -l
llvm-svn: 99023
2010-03-20 01:12:03 +00:00
Rafael Espindola
08a692aba4
Don't produce debug info when given -g. Fixes PR6529.
...
llvm-svn: 97897
2010-03-07 04:46:18 +00:00
John McCall
731be6620c
Revert changes r97693, r97700, and r97718.
...
Our testing framework can't deal with disabled targets yet.
llvm-svn: 97719
2010-03-04 04:29:44 +00:00
John McCall
61076e1d87
XFAIL these tests on win32, since the win32 buildbot apparently disables all
...
targets except X86.
llvm-svn: 97718
2010-03-04 04:14:44 +00:00
Daniel Dunbar
0ac9445098
PR5803: clang++: Treat untyped 'C' inputs as C++.
...
- Patch by Andrzej K. Haczewski, with a tweak by me to emit a 'deprecated'
diagnostic when we do this. We'll see what zee users say.
llvm-svn: 96511
2010-02-17 20:32:58 +00:00
Daniel Dunbar
aeea8ac3d8
Driver: Add -rewrite-objc, which is an interface to clang -cc1 -rewrite-objc.
...
llvm-svn: 95849
2010-02-11 03:16:21 +00:00
Daniel Dunbar
98188414ef
Driver/Darwin: Darwin uses -fobjc-legacy-dispatch on ARM.
...
llvm-svn: 95006
2010-02-01 21:07:43 +00:00
Daniel Dunbar
a9fdb83ec4
Set -ccc-host-triple in these tests.
...
llvm-svn: 94661
2010-01-27 04:03:51 +00:00
Daniel Dunbar
f48d51d693
Driver/Darwin: Eliminate invalid uses of DarwinVersion -- this fixes a number of
...
defaults when targetting iPhoneOS (blocks, non-fragile ABI, stack protector).
llvm-svn: 94642
2010-01-27 00:57:11 +00:00
Daniel Dunbar
8360803a8a
Driver/Darwin: Fix a few link arguments when targetting different iPhoneOS
...
versions to match gcc (which is matching linker changes).
llvm-svn: 94640
2010-01-27 00:56:56 +00:00
Daniel Dunbar
d54669d30b
Driver/Darwin: Honor IPHONEOS_DEPLOYMENT_TARGET.
...
llvm-svn: 94488
2010-01-26 01:45:19 +00:00
Daniel Dunbar
6bc5be24fa
Remove ../libexec from clang program search path, clang-cc is dead.
...
llvm-svn: 93749
2010-01-18 19:16:53 +00:00
Dan Gohman
d1e76b957b
Use -fno-math-errno by default, and remove the IsMathErrnoDefault
...
targethook, which is no longer being used. This fixes PR5971.
llvm-svn: 92987
2010-01-08 02:20:44 +00:00
Chris Lattner
426b709a81
fix whitespace in test to match llvm asmprinter change.
...
llvm-svn: 92251
2009-12-29 07:42:23 +00:00
Daniel Dunbar
e0d2691b88
Driver: Fix '... -O4 -O0 ...', which was generating bitcode.
...
llvm-svn: 91962
2009-12-23 00:47:42 +00:00
Daniel Dunbar
a7d0231b66
clang -cc1: Rename -mcpu to -target-cpu to match other target options and not alias driver/backend option.
...
llvm-svn: 91671
2009-12-18 06:30:12 +00:00
Daniel Dunbar
24c7f5efc5
Add -dwarf-debug-flags, which provides a way to embed the cc1 level options used
...
to compile a translation unit into the debug info for that file.
- Used by parts of Darwin build process to check compiler flags, etc.
- <rdar://problem/7256886> clang does not emit AT_APPLE_flags
llvm-svn: 91661
2009-12-18 02:43:17 +00:00
Daniel Dunbar
5618e98f33
Update tests to use %clang instead of 'clang', and forcibly disable use of '
...
clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to
garbage).
llvm-svn: 91460
2009-12-15 22:01:24 +00:00
Daniel Dunbar
18a72959f5
Tests: Fix some bugs in clang_f_opts, options were out of order but it worked
...
because it had two inputs, except on Win32 where /dev/null doesn't exist.
llvm-svn: 91235
2009-12-13 02:00:23 +00:00
Ted Kremenek
e1996c27eb
Convert the remainder of this test case over to using FileCheck.
...
llvm-svn: 91194
2009-12-12 00:42:52 +00:00
Ted Kremenek
eadc7c3537
Make using '-fshort-enums' an error until it is actually implemented (changes the ABI, so it is dangerous to not error out if we don't support it). Fixes <rdar://problem/7461006>.
...
llvm-svn: 91191
2009-12-12 00:38:18 +00:00
Daniel Dunbar
6c536aa0fb
Driver: Switch to using "clang" "-cc1" instead of "clang-cc".
...
llvm-svn: 91174
2009-12-11 23:00:49 +00:00
Daniel Dunbar
8775727b39
Improve test portability.
...
llvm-svn: 90890
2009-12-08 22:22:20 +00:00
Daniel Dunbar
6cc525b44e
Unbreak clang-cc handling of -msoft-float / -mfloat-abi=, which I borked.
...
llvm-svn: 90873
2009-12-08 19:49:51 +00:00
Daniel Dunbar
acd6957b59
Driver: Switch -ccc-* options to using the standard options functionality.
...
- I still want to get rid of them, but manually handling them isn't adding value.
llvm-svn: 90602
2009-12-04 21:55:23 +00:00
Daniel Dunbar
e357d5689e
Fix Clang tool translation to forward -fvisibility as separate arguments, the
...
old syntax isn't supported.
llvm-svn: 90469
2009-12-03 18:42:11 +00:00
Daniel Dunbar
a1b02a2380
Move LLVM backend options to explicit clang-cc / clang -cc1 options, which we then manually pass to the command line library; eventually the latter grossness should be fixed by a real API when creating the target machine.
...
llvm-svn: 90063
2009-11-29 07:18:39 +00:00
Daniel Dunbar
8bed86c43e
Standardize Driver translation to call clang-cc using '-foo' form instead of '--foo'.
...
llvm-svn: 89497
2009-11-20 22:21:36 +00:00
Daniel Dunbar
484afa2d3b
Switch -f{builtin,math-errno,rtti} and -analyzer-purge-dead to -...no... variants instead of using llvm: 🆑 :init(true) arguments.
...
llvm-svn: 89315
2009-11-19 04:55:23 +00:00
Daniel Dunbar
4930e3357b
Add -fblocks, -stack-protector, and -fobjc-nonfragile-abi defaulting to driver,
...
instead of using getDefaultLangOptions.
- Remove unused -fobjc-tight-layout while at it.
llvm-svn: 89065
2009-11-17 08:07:36 +00:00
Daniel Dunbar
e13ada6a3b
Add clang -mcpu=native support, patch by Roman Divacky, varioustweaks by me.
...
- We still need support for detecting the target features, since the name
doesn't actually do a good job of decribing what the CPU supports (for LLVM).
llvm-svn: 88819
2009-11-14 22:04:54 +00:00
Daniel Dunbar
34546ce43d
Remove RUN: true lines.
...
llvm-svn: 86432
2009-11-08 01:47:25 +00:00
Daniel Dunbar
8b57697954
Eliminate &&s in tests.
...
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.
llvm-svn: 86430
2009-11-08 01:45:36 +00:00
John Thompson
ed4e2950bc
Adding -fshort-wchar option.
...
llvm-svn: 86167
2009-11-05 20:14:16 +00:00
Daniel Dunbar
83e3714902
XFAIL Driver/hello.c on Windows.
...
llvm-svn: 85885
2009-11-03 07:49:31 +00:00
Daniel Dunbar
624c21b029
Change the driver to do the Darwin triple mangling itself instead of forwarding
...
-mmacosx-version-min and -miphoneos-version-min to clang-cc.
llvm-svn: 85600
2009-10-30 18:12:20 +00:00
Sebastian Redl
c6a9254f01
Convert some driver checks to FileCheck.
...
llvm-svn: 85133
2009-10-26 18:07:30 +00:00
Daniel Dunbar
cb8eb225b1
Update test; the driver can find a different gcc tool chain directory when
...
simulating running on a different system.
llvm-svn: 84862
2009-10-22 16:05:11 +00:00
Daniel Dunbar
cbc34b769e
Driver: Default to using PTH for C++ precompiled header support, PCH for C++
...
isn't implemented yet.
- <rdar://problem/7297571> Clang should use pretokenized headers for C++ PCH
files
llvm-svn: 84197
2009-10-15 20:02:44 +00:00
John Thompson
271f1f07bc
Converted to use FileCheck.
...
llvm-svn: 84005
2009-10-13 18:51:26 +00:00
Mike Stump
e07e33a196
Tolerate .exe on executables. Patch by John Thompson. Changed * to .* by me.
...
llvm-svn: 83586
2009-10-08 22:30:02 +00:00
Mike Stump
8409f9102b
Tolerate .exe on executables. Patch by John Thompson.
...
llvm-svn: 83584
2009-10-08 22:25:29 +00:00
Daniel Dunbar
d71a03b164
Fix truck sized thinko where Darwin/ARM toolchain didn't look for programs in
...
libexec, *blush*.
llvm-svn: 83086
2009-09-29 18:52:10 +00:00
Daniel Dunbar
1d9b45304d
Work around FileCheck -NOT restriction.
...
llvm-svn: 82417
2009-09-20 23:35:52 +00:00
Daniel Dunbar
0c33f44cd9
Force triple.
...
llvm-svn: 81781
2009-09-14 20:21:18 +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
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
953b8d1f15
Fix ShouldUseClangCompiler to use llvm::Triple.
...
- -1 FIXME, and fixes 'clang -arch armv4t ...', for example.
llvm-svn: 81276
2009-09-08 23:36:55 +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
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
Daniel Dunbar
f5147c6c02
Add missing '&&'...
...
llvm-svn: 79950
2009-08-24 22:29:04 +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
Daniel Dunbar
516bb9dd76
Remove arch normalization from Driver, this should be unnecessary now that
...
things have moved to llvm::Triple.
llvm-svn: 79902
2009-08-24 09:16:49 +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
Daniel Dunbar
e65f4de30d
'unset' isn't needed in these tests anymore, we always run with a controlled
...
environment.
llvm-svn: 77776
2009-08-01 04:51:30 +00:00
Daniel Dunbar
97ea867690
MultiTestRunner: Validate '&&' at the end of RUN lines.
...
- This is just to normalize, these will go away soon hopefully.
Added all the missing '&&'s that have crept in. :)
llvm-svn: 77062
2009-07-25 11:27:37 +00:00
Daniel Dunbar
6bdd19a7e2
Change these tests to not depend as much on the name of the input.
...
llvm-svn: 77057
2009-07-25 09:01:12 +00:00
Daniel Dunbar
07b749230c
Switch the driver back to always using clang-cc by default (for C++, and
...
regardless of the architecture).
- This is a good default for development & testing; for example without this
any tests using 'clang' in the test suite will fail on PowerPC, since the
driver will avoid using clang.
- We don't want to actually ship something built this way, but that should be
handled via some sort of configuration file.
llvm-svn: 76886
2009-07-23 17:48:59 +00:00
Daniel Dunbar
54091b82b5
[llvm up] Add support for '#' component of QA_OVERRIDE_GCC3_OPTIONS.
...
- This silences the output about how command line arguments are being changed.
llvm-svn: 76107
2009-07-16 21:32:51 +00:00
Eli Friedman
7d369cd2a6
Misc fixes to fix tests on OpenBSD, per email to cfe-commits. Patches
...
by Jonathan Gray and Krister Walfridsson.
llvm-svn: 75268
2009-07-10 20:10:06 +00:00
Daniel Dunbar
10de9e6602
OpenBSD support.
...
- Patch by Jonathan Gray!
llvm-svn: 74453
2009-06-29 20:52:51 +00:00
Douglas Gregor
d04acaad93
Use env properly in test/Driver/analyze.c
...
llvm-svn: 73609
2009-06-17 15:41:17 +00:00
Douglas Gregor
ffbc629cd7
Make these driver tests do the right thing even when MACOSX_DEPLOYMENT_TARGET is set.
...
llvm-svn: 73583
2009-06-16 23:37:56 +00:00
Daniel Dunbar
2d5f363d6d
Fix typo in prev commit.
...
llvm-svn: 73556
2009-06-16 21:46:01 +00:00
Daniel Dunbar
79c459932b
Darwin/Driver: Also look at -arch command line options when finding the default
...
tool chain.
llvm-svn: 73555
2009-06-16 21:39:33 +00:00
Daniel Dunbar
db09702e2a
PR4016: Forward -fno-show-source-location to clang.
...
llvm-svn: 73082
2009-06-08 21:13:54 +00:00
Devang Patel
9e24386c65
Set function Attribute::NoImplicitFloat appropriately.
...
llvm-svn: 72961
2009-06-05 22:05:48 +00:00
Devang Patel
21dd8d4ae4
NoRedZone attribute test case.
...
llvm-svn: 72905
2009-06-04 23:45:55 +00:00
Daniel Dunbar
e90fa18d6c
Test for x86 target features, I forgot to commit this.
...
llvm-svn: 71492
2009-05-11 23:06:15 +00:00
Daniel Dunbar
e5ae096bf8
Tweak x86 -mcpu defaults.
...
- Default to yonah on Darwin (to get SSE3).
- Default to Pentium4 (32-bit) and x86-64 (64-bit) on
non-Darwin. Welcome to the 21st century.
llvm-svn: 71069
2009-05-06 04:58:14 +00:00
Daniel Dunbar
4dbaaa6f43
Improve handling of (X86) target features.
...
- This is a WIP...
- This adds -march= handling to the driver, and fixes the defaulting
of -mcpu on Darwin (which was using the wrong test).
Instead of handling -m{sse, ...} in the driver, pass them to clang-cc as
-target-feature [+-]name
In clang-cc, communicate with the (clang) target to discover the legal
features of a target, and the features which are enabled based on
-mcpu. This is currently hardcoded just enough to not be a feature
regression, we need to get this information from the backend's
TableGen information somehow.
This is used to construct the full list of features which are being
used, which is in turn used to initialize the predefines.
llvm-svn: 71061
2009-05-06 03:16:41 +00:00
Daniel Dunbar
4ddeb20743
Test a few more bits of the driver.
...
llvm-svn: 70816
2009-05-04 00:31:11 +00:00
Daniel Dunbar
5716d87ed1
Driver: When using the generic gcc tool, pass -m32 or -m64 if we
...
recognize the architecture.
- This is an attempt to force gcc to the write target.
- PR4094.
llvm-svn: 70647
2009-05-02 21:41:52 +00:00
Daniel Dunbar
e3e263fb71
Driver: Generate an error when trying to pass an LLVM bc input to a
...
non-Darwin linker (sorry Gold + LTO-plugin users).
llvm-svn: 70641
2009-05-02 20:14:53 +00:00
Daniel Dunbar
44e7122151
Make sure to pass the same options to the static analyzer as the
...
compiler.
- Code generation options may still affect the language...
llvm-svn: 70393
2009-04-29 18:32:25 +00:00
Douglas Gregor
c1547eb338
Force driver's PTH test to use PTH
...
llvm-svn: 70338
2009-04-28 22:43:20 +00:00
Daniel Dunbar
c1b1b4b2c9
Don't run dsymutil when making a fat executable direct source.
...
- Otherwise, we will end up with stray .dSYM files which don't get
lipo'ed or removed.
- Ideally we would run dsymutil on the result, but we don't have the
infrastructure for that yet. Note that gcc doesn't handle this case
either.
- <rdar://problem/6809621> [driver] clang leaves .dSYM files lying
around in tmp.
llvm-svn: 69951
2009-04-24 03:03:52 +00:00
Daniel Dunbar
838cbe19b7
Call ld, not collect2.
...
- <rdar://problem/6517382> [driver] call ld directly
llvm-svn: 69938
2009-04-23 23:17:23 +00:00
Daniel Dunbar
3f4a2c286e
Support QA_OVERRIDE_GCC3_OPTIONS
...
- Cover your eyes...
- This is a simple but effective way to allow developers to build a
project with clang while manipulating the command line, without
having to edit the project itself.
llvm-svn: 69342
2009-04-17 01:54:00 +00:00
Daniel Dunbar
5acb3a28e2
Force driver triple.
...
llvm-svn: 68836
2009-04-10 22:53:25 +00:00
Daniel Dunbar
b5023e90f4
Honor MACOSX_DEPLOYMENT_TARGET environment variable.
...
llvm-svn: 68822
2009-04-10 21:00:07 +00:00
Daniel Dunbar
d067f7fbef
Driver: Split out CPP specific options for clang so that we don't end
...
up adding them twice when running with -no-integrated-cpp or
-save-temps.
- <rdar://problem/6766636> -save-temps falls over with prefix headers
llvm-svn: 68660
2009-04-08 23:54:23 +00:00
Daniel Dunbar
d4510f2223
Driver: Fix forwarding of -fpascal-strings.
...
llvm-svn: 68570
2009-04-07 23:51:44 +00:00
Daniel Dunbar
c44b4ccca8
Driver: Fix forwarding of -{std,ansi,trigraphs} when there are
...
multiple instances of an option.
Also, removed direct -ansi support from clang-cc.
llvm-svn: 68558
2009-04-07 22:13:21 +00:00
Daniel Dunbar
b2a7c062aa
Driver: Fix a parsing bug where some options were matched
...
incorrectly. I'm blanking on the smartest way to write this search,
but we should just do the right thing when we move to TableGen.
- <rdar://problem/6761194> [driver] -Wextra-tokens isn't parsed
correctly
llvm-svn: 68525
2009-04-07 18:21:47 +00:00
Daniel Dunbar
f89733cfb8
Driver: Handle properly calling dsymutil when source input is
...
preceeded by a linker input flag.
- <rdar://problem/6757236> clang should make a dSYM when going
straight from source to binary
- This still matches gcc, but the right way to solve this would be to
detect the situation we care about (we are compiling from source
and linking in one step), instead of looking at the suffix of the
input file. The Tool doesn't quite have enough information to do
this yet, however.
- Also, find the suffix correctly.
llvm-svn: 68417
2009-04-04 00:55:30 +00:00
Daniel Dunbar
386ef885bb
Pull clang-cc code for generating PTH files based on the input type.
...
- <rdar://problem/6741594> [pth] don't abuse -x to drive pth
generation
- Simpler, and fixes PR3915.
Cleanup test cases for PTH:
- Update to use -emit-pth
- Removed PTH test of carbon.c and cocoa.mm; these didn't actually
verify anything, and since PTH is token based the extra coverage
(over cocoa.m) isn't particularly helpful.
- Split PTH tests in cocoa.m to cocoa-pth.m, solely to increase
available parallelism when running tests.
Ted, could you update the PTH test cases (include-pth.c and
cocoa-pth.m) to have some sort of positive check that the PTH is
getting used? "# of PTH cache hits" or "tokens read from PTH cache"
statistics would work great. :)
llvm-svn: 68189
2009-04-01 05:09:09 +00:00
Daniel Dunbar
ae8bca038d
Tweak/cleanup darwin::Link a bit, add several FIXMES, and improve test
...
case.
llvm-svn: 68182
2009-04-01 03:17:40 +00:00
Daniel Dunbar
d640be24fd
(LLVM up) Update to use llvm::sys::getHostTriple().
...
- Always pass -triple to clang-cc (-arch will be removed).
- clang-cc doesn't play guess work with the target triple anymore.
llvm-svn: 68119
2009-03-31 17:35:15 +00:00
Daniel Dunbar
13357aef14
Driver: Unbreak ArgList::hasFlag.
...
- <rdar://problem/6726511> [driver] clang does not have -msoft-float
hooked up.
llvm-svn: 68044
2009-03-30 18:13:26 +00:00
Daniel Dunbar
a88692df30
Missed test case update (part of previous commit)
...
llvm-svn: 68029
2009-03-30 06:49:40 +00:00
Daniel Dunbar
f64f5307dc
Driver: Add test case for darwin::Preprocess and darwin::Compile
...
tools, and enable them.
llvm-svn: 68019
2009-03-29 22:27:40 +00:00
Daniel Dunbar
42b91a86f3
Driver: Test case for darwin::Link
...
llvm-svn: 67761
2009-03-26 16:29:05 +00:00
Daniel Dunbar
c196421fbc
Driver: Add darwin::Link tool.
...
- <rdar://problem/6717381> [driver] implement ld argument translation
in new driver
llvm-svn: 67760
2009-03-26 16:23:12 +00:00
Daniel Dunbar
aabb0b11a3
Driver: Handle -Xarch_, including warning for nasty -Xarch_ use cases
...
we aren't going to support. For example:
clang -Xarch_i386 -S -Xarch_i386 -o -Xarch_i386 myi386asm.s ...
llvm-svn: 67680
2009-03-25 06:12:34 +00:00
Daniel Dunbar
1386495406
Driver: Handle -flto, -O4, and tweak -emit-llvm to match llvm-gcc.
...
- -emit-llvm no longer changes what compilation steps are done.
- -emit-llvm and -emit-llvm -S write output files with .o and .s
suffixes, respectively.
- <rdar://problem/6714125> clang-driver should support -O4 and -flto,
like llvm-gcc
llvm-svn: 67645
2009-03-24 20:17:30 +00:00