Commit Graph

187 Commits

Author SHA1 Message Date
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
Daniel Dunbar 00c57967da Revert r108672, "Implement support for reading arguments specified in a file
with @file.", it doesn't correctly handle cases where arguments starting with
'@' are passed to other command line arguments.

llvm-svn: 108686
2010-07-19 07:21:12 +00:00
Rafael Espindola 129e43d29b Implement support for reading arguments specified in a file with @file.
llvm-svn: 108672
2010-07-19 03:08:01 +00:00
Daniel Dunbar b2447154e0 Driver/Darwin: Resolve deployment target defaulting to be more predictable;
assume we are targetting OS X unless an explicit option is given.

llvm-svn: 108426
2010-07-15 16:18:06 +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
Daniel Dunbar 223749db6c Driver: .dSYM suffix should be appended, not replace the existing suffix.
llvm-svn: 107369
2010-07-01 01:36:31 +00:00
Daniel Dunbar 8452ef0798 tests: Use %clangxx when using driver for C++, in case C++ support is disabled.
llvm-svn: 107153
2010-06-29 16:52:24 +00:00
Daniel Dunbar 00d3d8e902 Driver/Darwin: Only run dsymutil when we are also compiling/assembling as part
of the compilation.
 - <rdar://problem/8141387> clang is always invoking dsymutil

llvm-svn: 107149
2010-06-29 16:38:33 +00:00
Rafael Espindola 0e1fb4f341 Set the default arch based on the triple.
llvm-svn: 107021
2010-06-28 17:18:09 +00:00
Benjamin Kramer ad36eb2911 Fix typo.
llvm-svn: 105993
2010-06-15 08:21:35 +00:00
Daniel Dunbar 5a9d1835be Driver: Fix PR4062 by dissecting one particular -Wp, form.
llvm-svn: 105966
2010-06-14 21:37:09 +00:00
Daniel Dunbar fb3d747fc6 Driver: Dissect -Wl, and -Xlinker arguments to remove --no-demangle, which was a
collect2 option that is passed by some projects (notably WebKit).

llvm-svn: 105964
2010-06-14 21:23:12 +00:00
Daniel Dunbar 1d3c2fa9be Driver: Also mark -F as RenderJoined, the linker doesn't like "-F FOO" either.
llvm-svn: 105789
2010-06-10 15:53:17 +00:00
Daniel Dunbar ed8f06e860 tests: Update test for previous change.
llvm-svn: 105766
2010-06-09 23:24:59 +00:00
Daniel Dunbar bfe71f2416 Driver: Change Option parsing to always create arguments referring to unaliased
options.
 - This matches the intent of the .td files, and will simplify alias handling.
 - PR7321.

llvm-svn: 105763
2010-06-09 22:44:34 +00:00
Daniel Dunbar c656d3e111 Revert "Driver: Change Option parsing to always create arguments referring to
unaliased", this isn't quite right yet.

llvm-svn: 105747
2010-06-09 19:27:07 +00:00
Daniel Dunbar aea0620b89 Driver: Change Option parsing to always create arguments referring to unaliased
options.
 - This matches the intent of the .td files, and will simplify alias handling.
 - PR7321.

llvm-svn: 105744
2010-06-09 19:19:01 +00:00
Daniel Dunbar 24e52992c0 Driver: Support invoking Clang on .ll or .bc inputs.
- We actually pretend that we have two separate types for LLVM assembly/bitcode because we need to use the standard suffixes with LTO ('clang -O4 -c t.c' should generate 't.o').

It is now possible to do something like:
  $ clang -emit-llvm -S t.c -o t.ll ... assorted other compile flags ...
  $ clang -c t.ll -o t.o ... assorted other compile flags ...
and expect that the output will be almost* identical to:
  $ clang -c t.c -o t.o ... assorted other compile flags ...
because all the target settings (default CPU, target features, etc.) will all be initialized properly by the driver/frontend.

*: This isn't perfect yet, because in practice we will end up running the optimization passes twice. It's possible to get something equivalent out with a well placed -mllvm -disable-llvm-optzns, but I'm still thinking about the cleanest way to solve this problem more generally.

llvm-svn: 105584
2010-06-07 23:28:45 +00:00
Daniel Dunbar 7f3d95054b Driver: Change -dwarf-debug-flags option to pass the original command line
arguments after translation, instead of the -cc1 level arguments.

llvm-svn: 105476
2010-06-04 18:47:06 +00:00
Daniel Dunbar 6beaf5110f Driver/Darwin: Model dsymutil properly, as a separate action/tool kind which is
added as the last output step, instead of just hacking it into the link step.
 - Among other things, this fixes dSYM generation when using multiple -arch options.

llvm-svn: 105475
2010-06-04 18:28:41 +00:00
Chandler Carruth e039148801 Daniel re-educated me about what Alias does and does not do. Turn that off for
'-fasm' and explicitly map from that flag to -fgnu-keywords in the driver. Turn
off the driver in the lexer test for this madness and add a test to the driver
that the translation actually works.

llvm-svn: 104428
2010-05-22 02:21:53 +00:00
Daniel Dunbar 8363697282 Force -no-integrated-as in this test.
llvm-svn: 103758
2010-05-14 02:02:13 +00:00
Daniel Dunbar 12c82080a2 Driver: Add support for -fobjc-abi-version=.
- <rdar://problem/7919678>

llvm-svn: 102559
2010-04-28 23:25:24 +00:00
Daniel Dunbar df3d1c2d1f Driver/Darwin: Fix Objective-C non-fragile ABI and dispatch method defaults, which were wrong in numerous places.
- <rdar://problem/7903449>

llvm-svn: 102257
2010-04-24 18:37:41 +00:00
Daniel Dunbar 2131f9ba8c Simplify test, in the hopes of making linux happy.
llvm-svn: 100955
2010-04-11 01:10:44 +00:00
Daniel Dunbar 06ef31c8b1 Driver: Only add extra -L paths on darwin if they exist. Unfortunately, this
means it isn't really possible to write the test case for this code, but this is
the kind of thing that really requires testing against the installed compiler
anyway.

llvm-svn: 100935
2010-04-10 18:18:57 +00:00