Commit Graph

2091 Commits

Author SHA1 Message Date
Tim Northover 4c9ac7d7df ARMv7k: simplify logic for deciding sjlj-exceptions.
Slight change of behaviour in the odd armv7+watchos case, which should match
the other runtime components.

llvm-svn: 258994
2016-01-27 22:14:02 +00:00
Tim Northover d88ecb30a1 ARMv7k: select ABI based on v7k Arch rather than watchos OS.
Various bits we'd like to use the new ABI actually compile with "-arch armv7k
-miphoneos-version-min=9.0". Not ideal, but also not ridiculous given how
slices work.

llvm-svn: 258976
2016-01-27 19:32:40 +00:00
Chad Rosier f662fb3dc8 Revert "[Driver] Make sure -fno-math-builtin option is being passed by the driver."
This reverts commit r258814.

llvm-svn: 258815
2016-01-26 16:16:53 +00:00
Chad Rosier 17d2e8789c [Driver] Make sure -fno-math-builtin option is being passed by the driver.
Support for the -fno-math-builtin option was added in r186899.  The codegen side
is being tested in test/CodeGen/nomathbuiltin.c.  The missing part was just
passing the option through the driver.

PR26317

llvm-svn: 258814
2016-01-26 15:52:05 +00:00
Ehsan Akhgari fefe300a62 Recommit the test for r258720 using -###
llvm-svn: 258776
2016-01-26 02:23:05 +00:00
Ehsan Akhgari 09a8a8a59d Revert the test for r258720 temporarily
This test is failing on a bot for reasons that are unclear to me.
Reverting for now...

llvm-svn: 258772
2016-01-26 01:51:47 +00:00
Justin Lebar bbdf697a51 [CUDA] Add -target to cuda-constructor-alias.cu test so it doesn't fail on Mac.
The test was checking that we passed -mconstructor-alias to host
compilation, but that explicitly shouldn't happen on Mac.

llvm-svn: 258737
2016-01-25 22:52:31 +00:00
Justin Lebar 710a35f1c7 [CUDA] Disable ctor/dtor aliases in device code.
Summary: NVPTX doesn't support aliases, so don't generate them.

Reviewers: tra

Subscribers: cfe-commits, jhen, echristo

Differential Revision: http://reviews.llvm.org/D16499

llvm-svn: 258733
2016-01-25 22:36:35 +00:00
Ehsan Akhgari d851833c9a [MSVC Compat] Only warn for unknown clang-cl arguments
Summary:
MSVC's driver accepts all unknown arguments but warns about them.  clang
by default rejects all unknown arguments.  This causes issues
specifically with build systems such as autoconf which liberally pass
things such as $LDFLAGS to the compiler and expect everything to work.
This patch teaches clang-cl to ignore unknown driver arguments.

Reviewers: rnk

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D16511

llvm-svn: 258720
2016-01-25 21:14:52 +00:00
Paul Robinson 4391d09d60 LTO via the gold plugin needs to be told about debugger tuning.
Differential Revision: http://reviews.llvm.org/D16094

llvm-svn: 258712
2016-01-25 19:46:40 +00:00
Rafael Espindola b17bc536d3 Pass --wrap=pthread_create to linker for -fsplit-stack.
From

https://gcc.gnu.org/ml/gcc-patches/2010-09/msg01807.html

-fsplit-stack should pass --wrap=pthread_create to linker for -fsplit-stack
It is needed to initialize the stack guard.  This fixes PR 20148.

Patch by H.J Lu!

llvm-svn: 258698
2016-01-25 18:29:16 +00:00
David Majnemer 259d71a464 [MSVC Compat] Don't omit frame pointers if /Oy- is specified before /O2
Microsoft's documentation states that specifying
/Oy- after the /O[12x] options disables frame-pointer omission.
What it does *not* state is that it also disables frame-pointer omission
if /Oy- is specified before /O[12x].

llvm-svn: 258447
2016-01-21 23:01:11 +00:00
Justin Lebar 2836dcdb75 [CUDA] Handle -O options (more) correctly.
Summary:
Previously we'd crash the driver if you passed -O0.  Now we try to
handle all of clang's various optimization flags in a sane way.

Reviewers: tra

Subscribers: cfe-commits, echristo, jhen

Differential Revision: http://reviews.llvm.org/D16307

llvm-svn: 258174
2016-01-19 19:52:21 +00:00
NAKAMURA Takumi 1dd0d5599d clang/test/Driver/darwin-multiarch-arm.c: Appease the case that "ld.exe" exists on %PATH% on win32.
llvm-svn: 257989
2016-01-16 08:35:53 +00:00
Justin Lebar 954c95c08b Fix buildbot bustage in Driver/darwin-multiarch-arm.c caused by r257983.
The test was too loose; "ld" was matching directories named "build" in
the path.

llvm-svn: 257986
2016-01-16 04:50:13 +00:00
NAKAMURA Takumi 33ff1dda6a [Cygwin] Use -femulated-tls by default since r257718 introduced the new pass.
FIXME: Add more targets to use emutls into clang/test/Driver/emulated-tls.cpp.
FIXME: Add cygwin tests into llvm/test/CodeGen/X86. Working in progress.
llvm-svn: 257984
2016-01-16 03:44:52 +00:00
Justin Lebar 55c83325ae Respect bound archs, even when they don't alter the toolchain.
Summary:
It's possible to BindArch without changing the toolchain at all.  For
example, armv7 and armv7s have exactly the same toolchain triple.

Therefore the code in the Driver that checks that we're not creating a
job for the same Action twice needs to consider (Action, Toolchain,
BoundArch) tuples.

Reviewers: tra

Subscribers: aemerson, echristo, beanz, cfe-commits

Differential Revision: http://reviews.llvm.org/D16250

llvm-svn: 257983
2016-01-16 03:30:08 +00:00
Peter Collingbourne dc13453128 Introduce -fsanitize-stats flag.
This is part of a new statistics gathering feature for the sanitizers.
See clang/docs/SanitizerStats.rst for further info and docs.

Differential Revision: http://reviews.llvm.org/D16175

llvm-svn: 257971
2016-01-16 00:31:22 +00:00
Justin Lebar e8c3609d3a [CUDA] Add test for compiling CUDA code with -S.
Reviewers: tra

Subscribers: cfe-commits, jhen

Differential Revision: http://reviews.llvm.org/D16081

llvm-svn: 257810
2016-01-14 21:41:31 +00:00
Justin Lebar 21e5d4fcfa [CUDA] Invoke ptxas and fatbinary during compilation.
Summary:
Previously we compiled CUDA device code to PTX assembly and embedded
that asm as text in our host binary.  Now we compile to PTX assembly and
then invoke ptxas to assemble the PTX into a cubin file.  We gather the
ptx and cubin files for each of our --cuda-gpu-archs and combine them
using fatbinary, and then embed that into the host binary.

Adds two new command-line flags, -Xcuda_ptxas and -Xcuda_fatbinary,
which pass args down to the external tools.

Reviewers: tra, echristo

Subscribers: cfe-commits, jhen

Differential Revision: http://reviews.llvm.org/D16082

llvm-svn: 257809
2016-01-14 21:41:27 +00:00
Scott Egerton b67d4690a8 [mips] Added support for -Wa,-mips32 and similar.
Reviewers: vkalintiris, dsanders

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D15070

llvm-svn: 257762
2016-01-14 13:01:48 +00:00
Scott Egerton 2df06baf02 Revert r257602 because it breaks integrated-as.s on mips hosts.
llvm-svn: 257610
2016-01-13 16:19:33 +00:00
Scott Egerton f60087a22b [mips] Added support for -Wa,-mips32 and similar.
Reviewers: vkalintiris, dsanders

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D15070

llvm-svn: 257602
2016-01-13 14:27:59 +00:00
Justin Lebar 388579fab7 [CUDA] Rename check-prefixes in cuda-options.cu and cuda-unused-arg-warning.cu.
Summary:
Rename the args to be more human-readable.  Among other things, this
lets us get rid of a bunch of comments (e.g. "ensure we don't run the
linker"), greatly shortening these tests.

Also apply consistent formatting and fix some English nits while we're
at it.

Reviewers: tra

Differential Revision: http://reviews.llvm.org/D15975

llvm-svn: 257557
2016-01-13 01:24:35 +00:00
Bob Wilson 0a15e6cc36 Generalize r256026 to apply to all MachO targets, not just Darwin targets.
The PIC default is set for the MachO toolchain, not just the Darwin toolchain,
so this treats those the same. The behavior with -static should be the same
for all MachO targets. rdar://24152327

llvm-svn: 257556
2016-01-13 01:19:02 +00:00
Frederic Riss 3ad83bd384 [Darwin] Fix deployment target detection
There was a thinko in the deployment target detection code that
made the -isysroot parsing have precedence over the environment
variable for tvOS. This patch makes this logic symetric for all
platforms (the env variable must have precedence).

llvm-svn: 257543
2016-01-12 23:47:59 +00:00
Hans Wennborg 94d6a71363 Follow-up to r257537: add test that majnemer asked about
llvm-svn: 257541
2016-01-12 23:31:58 +00:00
Hans Wennborg 21d73d2e0a clang-cl: Support /Dfoo#bar (PR25984)
Such flags will now be translated to -Dfoo=bar.

llvm-svn: 257537
2016-01-12 23:17:03 +00:00
Justin Lebar 29bfa893cc [CUDA] Add explicit mapping from sm_XX to compute_YY.
Summary: This is used by D16082 when it invokes fatbinary.

Reviewers: tra

Subscribers: cfe-commits, jhen, echristo

Differential Revision: http://reviews.llvm.org/D16097

llvm-svn: 257530
2016-01-12 22:23:04 +00:00
Dimitry Andric e18d46205c Add a clang test for r257376 (Ensure -mcpu=xscale works for arm targets).
llvm-svn: 257509
2016-01-12 19:40:55 +00:00
Justin Lebar 7bf779859a [CUDA] Reject values for --cuda-gpu-arch that are not of the form /sm_\d+/.
Reviewers: tra

Subscribers: cfe-commits, jhen, echristo

Differential Revision: http://reviews.llvm.org/D16079

llvm-svn: 257413
2016-01-11 23:27:13 +00:00
Dan Gohman e8a69abf40 [WebAssembly] Fix a typo in a comment.
llvm-svn: 257327
2016-01-11 11:49:44 +00:00
Tom Stellard 0e04f6c30f Driver: Use the new ELF lld linker for AMDGPU
Summary: 'gnu-old' has been deprecated in favor or 'gnu'.

Reviewers: arsenm, ruiu, rafael

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D15953

llvm-svn: 257175
2016-01-08 15:14:31 +00:00
Justin Lebar 652b97bcf7 [CUDA] Split out tests for unused-arg warnings from cuda-options.cu.
Summary: Trying to make this test a bit more manageable.

Reviewers: tra

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D15974

llvm-svn: 257142
2016-01-08 03:33:04 +00:00
Dimitry Andric 7213200231 Turn off lldb debug tuning by default for FreeBSD
Summary:
This is the clang part of D15966.  In rL256104, debugger tuning was
added to the clang driver, and again the default for FreeBSD was set to
lldb.  The default needs to be gdb instead.

Reviewers: emaste, probinson

Subscribers: cfe-commits, emaste

Differential Revision: http://reviews.llvm.org/D15967

llvm-svn: 257104
2016-01-07 22:09:47 +00:00
Daniel Jasper d337111f02 Add missing -no-canonical-prefixes.
llvm-svn: 257057
2016-01-07 12:53:59 +00:00
Eric Christopher 3f07d85826 Make sure we claim arguments that are going to be passed to a gcc tool,
even if they're not going to be used to avoid unused option warnings.

llvm-svn: 257040
2016-01-07 09:03:42 +00:00
Eric Christopher 63e310872c Use an actual real architecture and massage a couple of comments.
llvm-svn: 257010
2016-01-07 01:23:19 +00:00
Eric Christopher 3db3a3b0d5 Test that we're not forwarding on -g options to the non integrated assembler.
This is adding a test for an old fixed PR to make sure we don't regress.

llvm-svn: 257009
2016-01-07 01:23:12 +00:00
Dan Gohman fbe544e947 [WebAssembly] Add a test to ensure that -fvisibility=default works.
It should override the default of -fvisibility=hidden.

llvm-svn: 257007
2016-01-07 01:15:05 +00:00
Dan Gohman e3d71e14d7 [WebAssembly] Enable -fvisibility=hidden by default.
This, along with many things in the WebAssembly target, is experimental.
Feedback is welcome.

llvm-svn: 257006
2016-01-07 01:00:21 +00:00
Dan Gohman a5b804be61 [WebAssembly] Enable -ffunction-sections and -fdata-sections by default.
These remain user-overridable with -fno-function-sections and
-fno-data-sections.

llvm-svn: 257005
2016-01-07 00:50:27 +00:00
Dan Gohman 4e480206b2 [WebAssembly] Only enable --gc-sections when optimizations are enabled.
Also, revamp the wasm-toolchain.c test and add a test to ensure that
a user-supplied --no-gc-sections comes after --gc-sections.

llvm-svn: 257004
2016-01-07 00:32:04 +00:00
Dan Gohman 1aa5828b79 [WebAssembly] Add --gc-sections to the link line.
This will eventually be accompanied with a change to enable -ffunction-sections
and -fdata-sections by default, which is currently delayed by some development
process issues.

llvm-svn: 256967
2016-01-06 19:43:32 +00:00
Sean Eveson b38c32be18 [Analyzer] Change the default SA checkers for PS4
Summary: This patch removes security.*, unix.API and unix.Vfork from the default checkers for PS4.

Reviewers: dcoughlin, zaks.anna

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D15888

llvm-svn: 256926
2016-01-06 10:03:58 +00:00
Dimitry Andric 0810739d4c Add -fno-movt frontend option, to disable movt/movw on ARM
Summary:
In rL256641, @davide turned off movt generation by default for FreeBSD.
This was because our ld is very old, and did not support the relocations
for it.  However, Ian Lepore added the support very recently, so we
would like to revert rL256641, and replace it with a new `-fno-movt`
frontend option.  This way, it can be turned off when needed.

Reviewers: dexonsmith, echristo, emaste, davide

Subscribers: andrew, aemerson, rengolin, davide, cfe-commits, ahatanak, emaste

Differential Revision: http://reviews.llvm.org/D15899

llvm-svn: 256920
2016-01-06 07:42:18 +00:00
Eric Christopher 29a50bccb9 Change the set of actions built for external gcc tools.
A gcc tool has an "integrated" assembler (usually gas) that it
will call to produce an object. Let it use that assembler so
that we don't have to deal with assembly syntax incompatibilities.

llvm-svn: 256919
2016-01-06 07:24:45 +00:00
Douglas Katzman a2ef81fde5 Avoid assert failure on some invalid cc1 options.
Addressing review comment in D13221.

Differential Revision: http://reviews.llvm.org/D15882

llvm-svn: 256897
2016-01-06 01:37:57 +00:00
Nathan Slingerland e8ddf9e9db [PGO] Enable clang to pass compiler-rt profile support library to linker on Windows
Summary: This change enables clang to automatically link binaries built with the -fprofile-instr-generate against the clang_rt.profile-i386.lib library.

Reviewers: davidxl, dnovillo

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15833

llvm-svn: 256855
2016-01-05 18:27:06 +00:00
MinSeong Kim 50d9c156dd [AArch64] Teaches clang about Samsung Exynos-M1
Adds core tuning support for new Samsung Exynos-M1 core (ARMv8-A).

Differential Revision: http://reviews.llvm.org/D15664

llvm-svn: 256829
2016-01-05 12:53:24 +00:00