Commit Graph

1285 Commits

Author SHA1 Message Date
Rafael Espindola d6f11a70ab Test fixes and improvements.
Remove redundant -fno-stack-protector run with openbsd.
Add -target to the -fstack-protector tests so they pass on openbsd.

Patch by Brad Smith.

llvm-svn: 209991
2014-06-01 13:45:09 +00:00
Bob Wilson bdd2b3c7c5 Make the -mno-global-merge option work for arm64/aarch64. rdar://17024719
llvm-svn: 209836
2014-05-29 19:43:02 +00:00
Evgeniy Stepanov 152b023b97 -pthread does not translate to -lpthread on Android.
There is no libpthread.so, and pthread interface is implemented in libc.so.
This mirrors gcc behavior.

llvm-svn: 209731
2014-05-28 12:53:34 +00:00
Tim Northover 573cbee543 AArch64/ARM64: rename ARM64 components to AArch64
This keeps Clang consistent with backend naming conventions.

llvm-svn: 209579
2014-05-24 12:52:07 +00:00
Rafael Espindola ce5c6091e0 Don't reduce the stack protector level given -fstack-protector.
Before -fstack-protector would always force a level of 1, even if the default
was 2.

Patch by Brad Smith.

llvm-svn: 209479
2014-05-22 22:57:39 +00:00
Alexey Samsonov 99ee10d2b8 Unify the name of compiler-rt builtins library on Linux.
Call it "libclang_rt.builtins-<arch>.a" to be consistent
with sanitizers/profile libraries naming. Modify Makefile
and CMake build systems and Clang driver accordingly.

Fixes PR19822.

llvm-svn: 209474
2014-05-22 21:13:30 +00:00
Tim Northover e5c6f4c304 MachO: perform ARM ABI detection even for non-Darwin triples.
When "-arch armv7m" is specified, we want "aapcs", for example.

rdar://problem/16581138

llvm-svn: 209434
2014-05-22 12:54:30 +00:00
Rafael Espindola 2d401f5bb5 Use stack protector strong by default on OpenBSD.
Use stack protector strong by default to match the base OS and ports/packages
compiler policy.

Patch by Brad Smith.

llvm-svn: 209432
2014-05-22 12:52:35 +00:00
Oliver Stannard 9b2a7d4f2d Pass -gdwarf-N options to integrated assembler
llvm-svn: 209124
2014-05-19 13:39:13 +00:00
Saleem Abdulrasool 6deb816c1c Driver: force restricted IT blocks for Windows on ARM
Windows on ARM expects ARMv8 (restricted IT) conditional instructions only.
Force enable the restricted IT mode via the backend option when targeting WoA.

llvm-svn: 209086
2014-05-18 06:42:02 +00:00
Duncan P. N. Exon Smith 540c3cd817 InstrProf: Look for the PIC-version of the profile runtime
If `-shared` is specified, pull in a PIC-version of the profile runtime,
which was added to compiler-rt in r208947.  I'm hoping this will get the
bots on my side.

llvm-svn: 208948
2014-05-16 04:09:41 +00:00
Reid Kleckner 47c2f84c9d clang-cl: Fall back immediately if /GR and /fallback were both passed
None of our tests use /fallback, so this lets us gradually add RTTI
support without breaking projects using /fallback.

llvm-svn: 208787
2014-05-14 16:03:05 +00:00
Eric Christopher 83fcaa8c66 Make this test target independent.
llvm-svn: 208725
2014-05-13 20:16:43 +00:00
Eric Christopher 4d7f2108e4 Add a requires for the arm-registered-target needed by this test as
well.

llvm-svn: 208722
2014-05-13 19:52:18 +00:00
Nico Weber 688dfa55b6 try to make test/Driver/masm.c work with the hexagon bot
llvm-svn: 208688
2014-05-13 11:30:01 +00:00
Nico Weber ad8e36c41a Support -masm= flag for x86 targets.
`clang -S -o - file.c -masm=att` will write assembly to stdout in at&t syntax
(the default), `-masm=intel` will instead output intel style asm.

llvm-svn: 208683
2014-05-13 11:11:24 +00:00
Alexey Samsonov 6424e02fb2 [ASan] Fixup for r208610: link in asan_cxx library on Windows
llvm-svn: 208625
2014-05-12 20:20:20 +00:00
Alexey Samsonov b01f936ffe [ASan] Split static ASan runtime in two parts: asan and asan_cxx.
asan_cxx containts replacements for new/delete operators, and should
only be linked in C++ mode. We plan to start building this part
with exception support to make new more standard-compliant.

See https://code.google.com/p/address-sanitizer/issues/detail?id=295
for more details.

llvm-svn: 208610
2014-05-12 18:39:51 +00:00
Simon Atanasyan 60280b4e65 [Driver] Do not lose already detected set of toolchain's multilibs while
iterating over different library path suffixes and different library versions.

To find the most appropriate library for the given command line flags we
iterate over a set of disk paths. Before probe each path the already
detected set of multilibs are cleared. If the set of paths contains
existing paths which do not satisfy command line flags or do not contain
necessary libraries and object files at all we might lose found multilibs.

The patch updates variables which hold detected multilibs if we really find
a new multilib matches command line flags.

The patch reviewed by Jon Roelofs.

llvm-svn: 208523
2014-05-12 07:37:51 +00:00
Saleem Abdulrasool 62849c677c Driver: parse -mcmodel earlier
This addresses an existing FIXME item in the driver.  The code model flag was
parsed in the actual tool rather than in the driver.  This was problematic since
the value may be invalid.  In that case, we would silently treat it as a default
value in non-assert builds, and abort in assert builds.  Add a check in the
driver to validate that the value being passed is valid, and if not provide a
proper error message.

llvm-svn: 208275
2014-05-08 02:28:32 +00:00
Matheus Almeida 602bff3184 [mips] Pass nan2008 info to the back-end.
Summary: The initial support for NaN2008 was added to the back-end in r206396.

Reviewers: atanasyan

Reviewed By: atanasyan

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

llvm-svn: 208220
2014-05-07 16:16:07 +00:00
Joerg Sonnenberger 1ea6647838 Drop libgcc and default to libc++ for NetBSD/ARM on 6.99.40+.
Don't bother with keeping the old support for x86_64 in 6.99.23+, just
use a single range. Update test cases for the always-on --eh-frame-hdr.

llvm-svn: 208170
2014-05-07 08:45:26 +00:00
Tilmann Scheller e914bc8d46 Add driver support for AArch64 Fedora.
Reviewed by Eric Christopher.

llvm-svn: 208105
2014-05-06 16:58:14 +00:00
Kevin Qin e5cee260ce [PATCH] [ARM64] Enable alignment control option in front-end for ARM64.
This patch is to get "-mno-unaligned-access" and "-munaligned-access"
work in front-end for ARM64 target.

llvm-svn: 208075
2014-05-06 09:51:32 +00:00
Christian Pirker 918d1097a1 Simplify getARMCPUForMArch() and make it more consistent
llvm-svn: 207956
2014-05-05 08:48:18 +00:00
Chad Rosier 3ba81bdb45 [driver] Enable the slp vectorizer at -Oz.
PR19568

llvm-svn: 207858
2014-05-02 18:41:57 +00:00
Robert Lytton 894d25c1e0 XCore target: fix handling of -g0 flag
llvm-svn: 207833
2014-05-02 09:33:25 +00:00
Richard Smith 51af519db3 Bitrig's standard C++ standard library changed from libstdc++ to libc++.
Also, it uses libc++abi and needs pthread.  While there, fix the libc++
include path. Patch by Patrick Wildt!

llvm-svn: 207813
2014-05-01 23:24:24 +00:00
Logan Chien 28f87f80e2 Android uses -fpic for arm64 as well.
llvm-svn: 207642
2014-04-30 12:18:12 +00:00
Bradley Smith 4da7dd837d [ARM64] Port remaining relevant AArch64 clang tests over to ARM64
llvm-svn: 207632
2014-04-30 10:52:05 +00:00
Rafael Espindola b5b622a03c Drop non-cfi assembly support from clang.
After this patch clang will ignore -fdwarf2-cfi-asm and -ffno-dwarf2-cfi-asm and
always print assembly that uses cfi directives.

In llvm, MC itself supports cfi since the end of 2010 (support started
in r119972, is reported in the 2.9 release notes).

In binutils the support has been around for much longer. It looks like
support started to be added in May 2003. It is available in 2.15
(31-Aug-2011, 2.14 is from 12-Jun-2003).

llvm-svn: 207602
2014-04-30 02:22:09 +00:00
Logan Chien 4ecf0158a4 Android uses -fpic for aarch64.
llvm-svn: 207567
2014-04-29 18:18:58 +00:00
Alexey Volkov 0692103653 Pass -pie to linker when generating executable on Android
This fixes problem with LTO on Android.

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

llvm-svn: 207520
2014-04-29 10:25:20 +00:00
Paul Robinson f44157d6ab When Driver::generateCompilationDiagnostics is filtering the list of
inputs to the preprocessor, check for invalid types first because not
all linker inputs have an option value to retrieve.

llvm-svn: 207454
2014-04-28 22:24:44 +00:00
Chad Rosier 136d67dc64 [driver] Disable the slp vectorizer at -O0, -O1, and -Oz. This mirrors the
behavior of the loop vectorizer, which is enabled at -O2, -O3, -O4, -Ofast
and -Os.
PR19568

llvm-svn: 207433
2014-04-28 19:30:57 +00:00
Hans Wennborg 26a4430ee5 clang-cl: /fallback only applies to C or C++ files
We would previously hit an assert if using /fallback with an .ll file.

llvm-svn: 207234
2014-04-25 16:44:17 +00:00
Hans Wennborg bbb5f07626 clang-cl: pass -debug flag to the linker when compiling with debug info
llvm-svn: 207233
2014-04-25 16:24:19 +00:00
Rafael Espindola f828526268 Revert "Reland r206934 with a hopefully fixed test"
This reverts commit r207155.
The test was still failing.

llvm-svn: 207225
2014-04-25 13:29:03 +00:00
Reid Kleckner 02fefcfc3b Reland r206934 with a hopefully fixed test
llvm-svn: 207155
2014-04-24 23:06:17 +00:00
Logan Chien bf9e3843c4 Add missing test input for r206979.
llvm-svn: 206992
2014-04-23 15:00:03 +00:00
Logan Chien 6a00cc8306 Add aarch64-linux-android triple for Android.
llvm-svn: 206979
2014-04-23 13:36:23 +00:00
Rafael Espindola e3e047e768 This reverts commit r206934 and r206935.
The original messages were:
  "Driver: Honor %INCLUDE% when built with MinGW"
  "Add missing test triples"

The test was still failing on OS X.

llvm-svn: 206973
2014-04-23 12:38:13 +00:00
Reid Kleckner c85b9a5f54 Add missing test triples
llvm-svn: 206935
2014-04-23 00:57:34 +00:00
Reid Kleckner 9aff2ca27c Driver: Honor %INCLUDE% when built with MinGW
Users are expected to pass system includes through the INCLUDE
environment variable on Windows.  There's no reason to change behavior
based on the toolchain used to build Clang.

I didn't change the registry searching code because I'm not sure it
builds with mingw and I'm not set up to test it.

llvm-svn: 206934
2014-04-23 00:15:12 +00:00
Justin Bogner f893a6551b Driver: Skip the -fmodules-cache-path argument in driver crash diags
The modules cache path shouldn't be included in crash reports, as it's
a system (or run) specific directory.

llvm-svn: 206922
2014-04-22 21:30:17 +00:00
Quentin Colombet 6a9cf2629a [Driver][ARM64] Add a testcase for r206227.
llvm-svn: 206914
2014-04-22 18:29:43 +00:00
James Molloy 96061a6db1 [ARM64] Add ARM64 RUN lines to a bunch of tests that had AARCH64 RUN lines.
This covers all tests in tests/Driver and tests/Preprocessor, but there are some
failing tests in test/Sema that need looking into.

llvm-svn: 206464
2014-04-17 12:51:36 +00:00
James Molloy ec78aa46f2 [ARM64] Teach Targets.cpp about Cortex-A53 and Cortex-A57, and enable more tests.
llvm-svn: 206463
2014-04-17 12:51:28 +00:00
James Molloy 2b24fc41fc [ARM64] Plumb in big-endian - add arm64_be to the many switches where it was missing.
llvm-svn: 206462
2014-04-17 12:51:23 +00:00
James Molloy 9b1586b6cc [ARM64] Default to the 'generic' CPU, unless -arch is present for backwards compatibility.
llvm-svn: 206461
2014-04-17 12:51:17 +00:00