Commit Graph

744 Commits

Author SHA1 Message Date
Matt Beaumont-Gay b2cadd093f Fix typo in test
llvm-svn: 178510
2013-04-01 22:58:48 +00:00
Tom Stellard 6674c703b6 R600: Handle -mcpu option v3
v2:
  - Add a test case

v3:
  - Use the -### clang option in the tests

llvm-svn: 178499
2013-04-01 20:56:53 +00:00
Hal Finkel 7d4585973a Add support for gcc-compatible -mfprnd -mno-fprnd PPC options
gcc provides -mfprnd and -mno-fprnd for controlling the fprnd target
feature; support these options as well.

llvm-svn: 178414
2013-03-30 13:47:44 +00:00
Hal Finkel 1fe8b3dd4b Add support for gcc-compatible -mpopcntd -mno-popcntd PPC options
gcc provides -mpopcntd and -mno-popcntd for controlling the popcntd target
feature; support these options as well.

llvm-svn: 178235
2013-03-28 13:51:36 +00:00
Simon Atanasyan 66ceaa439a [Mips] Handle pseudo-target flags '-EL' and '-EB' and properly adjust
toolchain flags for MIPS targets.

llvm-svn: 178232
2013-03-28 11:36:22 +00:00
Hal Finkel 279ca4d608 Add support for gcc-compatible -mmfcrf -mno-mfcrf PPC options
gcc provides -mmfcrf and -mno-mfcrf for controlling what we call
the mfocrf target feature. Also, PPC is now making use of the
static function AddTargetFeature used by the Mips Driver code.

llvm-svn: 178227
2013-03-28 08:38:53 +00:00
Rafael Espindola 7976446c2c Reject -no-integrated-as on windows.
llvm-svn: 177840
2013-03-24 15:06:53 +00:00
Benjamin Kramer 2c923accd6 Don't actually invoke codegen in driver test.
llvm-svn: 177838
2013-03-24 11:30:15 +00:00
Bob Wilson a20a1dad7f Revert svn r176894 and r177658.
Changing -ccc-install-dir to affect cc1's resource-dir setting broke our
internal LNT tests. After discussing the situation with Jim, we've decided to
pursue an alternate approach. We really want the resource-dir to be located
relative to clang, even when using -ccc-install-dir, but we're going to
add a fallback setting for the libc++ headers if they don't exist alongside
the compiler.

llvm-svn: 177815
2013-03-23 05:17:59 +00:00
Richard Smith f3e624ca73 If a .syms file is available alongside a sanitizer runtime, pass it to the
linker via --dynamic-list instead of using --export-dynamic. This reduces the
size of the dynamic symbol table, and thus of the binary (in some cases by up
to ~30%).

llvm-svn: 177783
2013-03-23 00:30:08 +00:00
Aaron Ballman 63352de02e This ugly regex is required because on Windows, the paths come out as \\ delimited instead of / delimited. Fixes a test breakage since r176894.
llvm-svn: 177658
2013-03-21 20:12:19 +00:00
Richard Smith cff3cde28b Split ubsan runtime into three pieces (clang part):
* libclang_rt-san-* is sanitizer_common, and is linked in only if no other
   sanitizer runtime is present.
 * libclang_rt-ubsan-* is the piece of the runtime which doesn't depend on
   a C++ ABI library, and is always linked in.
 * libclang_rt-ubsan_cxx-* is the piece of the runtime which depends on a
   C++ ABI library, and is only linked in when linking a C++ binary.

This change also switches us to using -whole-archive for the ubsan runtime
(which is made possible by the above split), and switches us to only linking
the sanitizer runtime into the main binary and not into DSOs (which is made
possible by using -whole-archive).

The motivation for this is to only link a single copy of sanitizer_common
into any binary. This is becoming important now because we want to share
more state between multiple sanitizers in the same process (for instance,
we want a single shared output mutex).

The Darwin ubsan runtime is unchanged; because we use a DSO there, we don't
need this complexity.

llvm-svn: 177605
2013-03-20 23:49:07 +00:00
Hans Wennborg c5f4c36029 Fix redundant comparison in gcc::Common::ConstructJob.
We were checking "Arch == llvm::Triple::x86_64 || Arch
== llvm::Triple::x86_64", but the rhs should actually check for
powerpc64.

Found while experimenting with a potential new Clang warning.

llvm-svn: 177496
2013-03-20 07:34:27 +00:00
Rafael Espindola a5981ba8ef Go back to using the integrated assembler on windows ever when passed
-no-integrated-as. It is the only assembler we have there.

llvm-svn: 177398
2013-03-19 14:23:00 +00:00
Alexey Samsonov b2b0e3f00a [ASan] Make -fsanitize=address always imply -fsanitize=init-order
llvm-svn: 177391
2013-03-19 10:48:37 +00:00
Anton Korobeynikov 2bed8472d1 Make sure to use same EABI version for external assembler as for integrated as.
Patch by Andrew Turner!

llvm-svn: 177252
2013-03-18 07:59:20 +00:00
Alexey Samsonov 881d150cc7 [ASan] Make -fsanitize=address imply -fsanitize=init-order (if the latter is not explicitly disabled).
llvm-svn: 177061
2013-03-14 12:13:27 +00:00
Ted Kremenek 464b07086e Make modules.m test portable, now that autolinking is dependent on whether or not the target uses the integrated assembler.
llvm-svn: 176902
2013-03-12 21:49:29 +00:00
Ted Kremenek acd31db0ce [driver] Only enable -fmodules-autolink if we are using the integrated assembler.
Fixes <rdar://problem/13289240>

llvm-svn: 176897
2013-03-12 21:08:08 +00:00
Jim Grosbach 061dabf7df Driver: -ccc-install-dir should affect cc1 -resource-dir
-ccc-install-dir is supposed to cause the compiler to behave as-if it
were installed in the indicated location. It almost does, but misses
anything that's relying on the resource directory (libc++ header search,
in particular). The resource dir is resolved too early, before command
line args are handled.

The fix is simply to move handling of the resource dir until after we
know if a -ccc-install-dir is present.

rdar://13402696

llvm-svn: 176894
2013-03-12 20:17:58 +00:00
Bob Wilson 897ce8c8bb Revert "Revert r166370 and r166540 now that Xcode 4.6 has been available for a while."
This reverts commit 176887.  Nico asked for more time to move to Xcode 4.6.

llvm-svn: 176892
2013-03-12 20:00:34 +00:00
Bob Wilson 8859471c51 Revert r166370 and r166540 now that Xcode 4.6 has been available for a while.
Those changes were added as a temporary workaround for Xcode 4.5 passing the
-Wno-arc-abi option.  Xcode 4.6 does not pass that option so this should no
longer be necessary.

llvm-svn: 176887
2013-03-12 19:39:19 +00:00
Ted Kremenek 6209366e81 Revert "Disallow using -fmodules with -no-integrated-as."
Per comment from Benjamin Kramer, this isn't portable (yet).  I'll come up
with a better fix.

llvm-svn: 176876
2013-03-12 17:02:12 +00:00
Matthew Curtis 7808cf1a39 Remove driver support for Hexagon V2 and V3
Driver will now error when trying to compile for V2 or V3.

Removal of V2 and V3 support will allow us to simplify the hexagon
back-end.

llvm-svn: 176859
2013-03-12 11:52:09 +00:00
Ted Kremenek 4b3ecba537 Disallow using -fmodules with -no-integrated-as.
Modules enables features such as auto-linking, and we simply do not want to
support a matrix of subtly enabled/disabled features depending on whether or
not a user is using the integrated assembler.

It isn't clear if this is the best place to do this check.  For one thing,
these kind of errors are not caught by the serialized diagnostics.

Fixes <rdar://problem/13289240>

llvm-svn: 176826
2013-03-11 20:51:52 +00:00
Chad Rosier 09d607ecf1 [driver] If we're just linking, don't report --param X as unused option.
PR15327
rdar://13372628

llvm-svn: 176670
2013-03-08 00:05:21 +00:00
Dmitri Gribenko 15225aee17 Driver: add support for new style multiarch in Ubuntu 13.04
Patch by Sanne Wouda.

llvm-svn: 176557
2013-03-06 17:14:05 +00:00
Weiming Zhao ff2a3ad81b revert r176531 due to clan-native-arm fails
llvm-svn: 176544
2013-03-06 02:08:54 +00:00
Weiming Zhao a35cc6fb6b PR 11326: Lack diagnosic message when ABI conflicts on ARM
When both Triple and -mabi are used, it may result into conflicting ABI value.

llvm-svn: 176531
2013-03-05 23:27:21 +00:00
David Chisnall 87aeeecc65 Add a test that we are passing the -fobjc-default-synthesize flag for Apple and
non-Apple platforms.

llvm-svn: 176477
2013-03-05 11:20:04 +00:00
Bob Wilson 743bf67caf Add ARM v6m, v7m, and v7em architectures for Cortex-M series processors.
<rdar://problem/11314476>

llvm-svn: 176458
2013-03-04 22:37:49 +00:00
Chandler Carruth 58d6eb6d03 Check for warnings in a bunch of the linker invocations, and add one
with both -static-libgcc and -static on the commandline.

Fix a warning in the latter case due to a backwards short circuiting ||
operator in the driver. No real functionality changed here, just allows
the driver to properly consume -static-libgcc when -static is also
specified.

llvm-svn: 176429
2013-03-04 02:07:55 +00:00
Chandler Carruth 4588e349b0 Beef up the testing of our 'ld' invocation on linux to cover static
linking. About to fix a bug here and there was no good test case.

llvm-svn: 176427
2013-03-04 01:27:49 +00:00
Bill Wendling 706469b453 Add more of the command line options as attribute flags.
These can be easily queried by the back-end.

llvm-svn: 176304
2013-02-28 22:49:57 +00:00
Chad Rosier 6a1de5c634 [driver] The failure of any phase (e.g., preprocess, compile, assemble) for a
single translation unit should prevent later phases from executing.  Otherwise,
this generates lots of noise in build systems.  This a fallout from r173825.
Patch by Matthew Curtis <mcurtis@codeaurora.org>.
rdar://13298009

llvm-svn: 176198
2013-02-27 18:46:04 +00:00
Simon Atanasyan 0da400cf92 [Mips] Add two new aliases for MIPS ABI names 32 (means o32 abi) and 64
(means n64 abi) to improve compatibility with GNU tools.
Patch by Jia Liu <proljc@gmail.com>.

llvm-svn: 176187
2013-02-27 14:55:49 +00:00
Alexey Samsonov bfb0cd355f [Sanitizer] Change driver behavior when linking with -fsanitize=thread and -fsanitize=memory. TSan/MSan also provide their versions of new/delete and should use the same strategy as ASan. Share the code that sets linker flags for all sanitizers.
llvm-svn: 176178
2013-02-27 11:14:55 +00:00
Bill Wendling 2386bb130c Reapply r176133 with testcase fixes.
llvm-svn: 176145
2013-02-27 00:06:04 +00:00
Evgeniy Stepanov 216bf50f2f Allow dash before "ld" in android driver test.
Sometimes android linker is "arm-linux-androideabi-ld", and not just "ld".

llvm-svn: 176088
2013-02-26 13:20:29 +00:00
Anna Zaks 0f424b029b Revert "Add more attributes from the command line to functions."
This reverts commit 176009.

The commit is a likely cause of several buildbot failures.

llvm-svn: 176044
2013-02-25 19:51:03 +00:00
Bill Wendling 87869db5f5 Add more attributes from the command line to functions.
This is an ongoing process. Any command line option which a back-end cares about
should be added here.

llvm-svn: 176009
2013-02-25 07:15:16 +00:00
Richard Smith 539e4a77bb ubsan: Emit bounds checks for array indexing, vector indexing, and (in really simple cases) pointer arithmetic. This augments the existing bounds checking with language-level array bounds information.
llvm-svn: 175949
2013-02-23 02:53:19 +00:00
Benjamin Kramer b164d67d07 Driver: Pass down the -march setting down to -cc1as on x86 too.
The assembler historically didn't make use of any target features, but this has
changed when support for old CPUs that don't support long nops was added.

llvm-svn: 175919
2013-02-22 20:55:17 +00:00
Eric Christopher d380400b17 Split out the command handling for split debug info, we're going
to want to propagate some information through the module into
the back end and so need to pass it through to codegen.

Also make the methods file static so we can use them in other places.

llvm-svn: 175916
2013-02-22 20:12:52 +00:00
Dmitri Gribenko acf2e786d2 Comment parsing: add CommentOptions to allow specifying custom comment block commands
Add an ability to specify custom documentation block comment commands via a new
class CommentOptions.  The intention is that this class will hold future
customizations for comment parsing, including defining documentation comments
with specific numbers of parameters, etc.

CommentOptions instance is a member of LangOptions.

CommentOptions is controlled by a new command-line parameter
-fcomment-block-commands=Foo,Bar,Baz.

llvm-svn: 175892
2013-02-22 14:21:27 +00:00
Eric Christopher 77569ffd06 Make sure we only use the output file as a base for debug splitting
if we're compiling.

llvm-svn: 175851
2013-02-22 01:33:46 +00:00
NAKAMURA Takumi 4abddaaf15 clang/test/Driver/qa_override.c: Appease gcc-driver.
llvm-svn: 175824
2013-02-21 23:17:45 +00:00
Eric Christopher d42fb73fc7 Don't pass -split-dwarf= to the backend unless we're on linux for
now.

llvm-svn: 175814
2013-02-21 22:35:05 +00:00
Eric Christopher 248357f624 Remove the SplitDebug action and replace with a set of commands
in the compilation setup. Note that this doesn't currently
work for -no-integrated-as.

llvm-svn: 175813
2013-02-21 22:35:01 +00:00
Benjamin Kramer cc141c89b8 Try to fix the test for cmake builds, where clang is called clang-3.3.
llvm-svn: 175791
2013-02-21 20:30:05 +00:00