Commit Graph

1235 Commits

Author SHA1 Message Date
Joerg Sonnenberger 8280abe47f Handle -m32 for NetBSD/sparc64 correctly. Extend test case to also check
ARM, MIPS and i386 ABIs.

llvm-svn: 206416
2014-04-16 20:44:17 +00:00
James Molloy afc352ce64 [ARM64] Plumb in the -mfpu= flag.
llvm-svn: 206395
2014-04-16 15:33:56 +00:00
Christian Pirker ba289f0c64 ARM: Add command line option to select big or little endian
llvm-svn: 205967
2014-04-10 13:59:32 +00:00
Christian Pirker 02c2e25d74 AArch64: Add command line option to select big or little endian
llvm-svn: 205966
2014-04-10 13:55:51 +00:00
Reid Kleckner 2a24e3ad86 clang-cl: Disable TBAA by default for MSVC compatibility
MSVC doesn't have an option to enable TBAA, so make -fstrict-aliasing
and -fno-strict-aliasing available in clang-cl.

llvm-svn: 205924
2014-04-09 20:07:39 +00:00
David Majnemer dc7a47ce2c clang-cl: make /Gw map to -fdata-sections
Note that /Gy no longer implies -fdata-sections.

llvm-svn: 205716
2014-04-07 16:14:38 +00:00
Saleem Abdulrasool f4c9e49f94 Driver: add target definition for Windows on ARM
This introduces the definitions needed for the Windows on ARM target.  Add
target definitions for both the MSVC environment and the MSVC + Itanium C++ ABI
environment.  The Visual Studio definitions correspond to the definitions
provided by Visual Studio 2012.

llvm-svn: 205650
2014-04-04 20:31:19 +00:00
Reid Kleckner 9307fba85d Add clang-cl alias to allow users to disable c4005
If we ever want three or more aliases, at that point we should put MSVC
warning ids in DiagnosticGroups.td.  We can use that to support #pragma
warning.

llvm-svn: 205598
2014-04-04 01:36:55 +00:00
Alexey Samsonov bdfa6c2517 Add support for dynamic ASan runtime (on Linux) to Clang driver.
Based on http://llvm-reviews.chandlerc.com/D3043 by Yuri Gribov!

llvm-svn: 205310
2014-04-01 13:31:10 +00:00
David Blaikie 65cbbd4ac5 Fix up compression related test cases
Fallout from r205261, ensure it doesn't matter how we disable compressed
debug info, even if zlib is missing and that we warn when we don't have
zlib and don't warn when we do, all while silently suppressing these
tests on the systems they weren't intended for...

llvm-svn: 205271
2014-04-01 00:27:28 +00:00
David Blaikie 24bbfed221 Warn when requesting compress-debug-sections and zlib is not available
Another shot in the dark, since I do have zlib installed. Will be
watching the bots for fallout.

llvm-svn: 205265
2014-03-31 23:29:38 +00:00
Benjamin Kramer 9e135ddd1d Remove unused diagnostic + dead test for it.
llvm-svn: 205220
2014-03-31 16:55:01 +00:00
Tim Northover a2ee433c8d ARM64: initial clang support commit.
This adds Clang support for the ARM64 backend. There are definitely
still some rough edges, so please bring up any issues you see with
this patch.

As with the LLVM commit though, we think it'll be more useful for
merging with AArch64 from within the tree.

llvm-svn: 205100
2014-03-29 15:09:45 +00:00
Hans Wennborg 5e91ef6326 Try to fix the cl-options.c test on ARM bots
The test was failing because clang-cl changes the default triple
to target MSVC-style Win32. This is kind of wonky, but hasn't been
a problem until we started warning:

  warning: unknown platform, assuming -mfloat-abi=soft

Some of the tests in cl-options.c were running with -Werror, causing them
to fail.

Fixing this by FileCheck-ifying those tests instead of using -Werror.

llvm-svn: 205049
2014-03-28 20:45:05 +00:00
Duncan P. N. Exon Smith 2d8f93e869 Revert "Link in profile library on Linux using --whole-archive"
This reverts commit r205012.

llvm-svn: 205022
2014-03-28 17:53:17 +00:00
Alexey Samsonov 4a37d60aca Link in profile library on Linux using --whole-archive
llvm-svn: 205012
2014-03-28 15:39:08 +00:00
Christian Pirker f01cd6f57b Add ARM big endian Target (armeb, thumbeb)
Reviewed at http://llvm-reviews.chandlerc.com/D3096

llvm-svn: 205008
2014-03-28 14:40:46 +00:00
Saleem Abdulrasool 377066a5f5 Use the new Windows environment for target detection
This follows the LLVM change to canonicalise the Windows target triple
spellings.  Rather than treating each Windows environment as a single entity,
the environments are now modelled properly as an environment.  This is a
mechanical change to convert the triple use to reflect that change.

llvm-svn: 204978
2014-03-27 22:50:18 +00:00
David Blaikie 7e2fd943ae Support for -Wa,-compress-debug-sections.
Also, while I'm here, support -nocompress-debug-sections too.

llvm-svn: 204959
2014-03-27 20:47:30 +00:00
Tim Northover 1a5b334e1c ARM: be more flexible about how --mhwdiv is accepted.
Patch by Gabor Ballabas.

llvm-svn: 204807
2014-03-26 14:09:48 +00:00
Benjamin Kramer ab88f62614 Fix an logic error in the clang driver preventing crtfastmath.o from linking when -Ofast is used without -ffast-math
In gcc using -Ofast forces linking of crtfastmath.o.
In the current clang crtfastmath.o is only linked when -ffast-math/-funsafe-math-optimizations passed. It can lead to performance issues, when using only -Ofast without explicit -ffast-math (I faced with it).
My patch fixes inconsistency with gcc behaviour and also introduces few tests on it.

Patch by Zinovy Nis!

Differential Revision: http://llvm-reviews.chandlerc.com/D3114

llvm-svn: 204742
2014-03-25 18:02:07 +00:00
Hans Wennborg d8d49ba20e clang-cl: make /Gy imply -fdata-sections in addition to -ffunction-sections
llvm-svn: 204736
2014-03-25 17:50:25 +00:00
Hans Wennborg 5149a3b837 clang-cl: Forward /Gy or /Gy- when falling back to cl.exe
llvm-svn: 204723
2014-03-25 14:48:54 +00:00
Will Schmidt c1fc190913 Update the parameters passed to the assembler and linker for
the PPC64LE target.  Specifically:
(assembler) adds/uses  -mppc64 -mlittle-endian
(linker) adds/uses  elf64lppc

Testcase included.

llvm-svn: 204626
2014-03-24 17:10:37 +00:00
David Majnemer da39ab299a Driver: Map /Gy to -ffunction-sections
/Gy is equivalent to -ffunction-sections.
/Gy- is equivalent to -fno-function-sections.

Currently, LLVM doesn't do anything interesting with -ffunction-sections
under WinCOFF.

llvm-svn: 204564
2014-03-23 17:47:22 +00:00
David Majnemer ca11641a41 Driver: cleanup /vd2 test
/vd2 is not ignored anymore, remove it from the ignored list.

Add a test to ensure that it does the right thing.

llvm-svn: 204563
2014-03-23 17:47:18 +00:00
Alexey Samsonov e1237993c7 Kill deprecated -fbounds-checking flag
llvm-svn: 204436
2014-03-21 07:15:47 +00:00
Evgeniy Stepanov 2bfcaabdec [msan] -fsanitize-memory-track-origins=[level] flag and docs.
This change turns -fsanitize-memory-track-origins into
-fsanitize-memory-track-origins=[level] flag (keeping the old one for
compatibility). Possible levels are 0 (off), 1 (default) and 2 (incredibly
detailed). See docs (part of this patch) for more info.

llvm-svn: 204346
2014-03-20 14:58:36 +00:00
Alexey Samsonov cb3f812b6b Kill -faddress-sanitizer, -fthread-sanitizer and -fcatch-undefined-behavior flags.
These flags are deprecated since at least Clang 3.3. Users should instead
use -fsanitize= with appropriate values.

llvm-svn: 204330
2014-03-20 10:48:29 +00:00
NAKAMURA Takumi a65db1e9ee clang/test/Driver/sanitizer-ld.c: Tweak to accept dos path.
llvm-svn: 204138
2014-03-18 10:47:10 +00:00
Viktor Kutuzov aa5b5f7b0d Add support for sanitizers arguments on FreeBSD
llvm-svn: 204129
2014-03-18 09:36:50 +00:00
Christian Pirker a74c7914ad AArch64_be specific clang target settings
llvm-svn: 203918
2014-03-14 12:15:45 +00:00
Argyrios Kyrtzidis 6d0753d42a [Modules] Emit the module file paths as dependencies of the PCH when we are building one.
This is because the PCH is tied to the module files, if one of the module files changes or gets removed
the build system should re-build the PCH file.

rdar://16321245

llvm-svn: 203885
2014-03-14 03:07:38 +00:00
Joerg Sonnenberger 52be0b4cf4 Always use --eh-frame-hdr on NetBSD, even for -static.
llvm-svn: 203742
2014-03-13 00:42:01 +00:00
Ben Langmuir dcf73861a5 Add an option -fmodules-validate-system-headers
When enabled, always validate the system headers when loading a module.
The end result of this is that when these headers change, we will notice
and rebuild the module.

llvm-svn: 203630
2014-03-12 00:06:17 +00:00
David Blaikie 29559b1efa Driver: Support -gmlt as an alias for -gline-tables-only
llvm-svn: 203603
2014-03-11 21:05:26 +00:00
Simon Atanasyan 738f85a20e [Mips] Check all MIPS toolchains to find the one that best meets command
line arguments and directories tree. The old toolchain selection heuristics
worked incorrectly when user has a reduced MIPS toolchain supports
the O32 ABI only.

Patch reviewed by Jonathan Roelofs, David Majnemer.

llvm-svn: 202873
2014-03-04 18:37:28 +00:00
Tom Stellard 81eeab3455 Update tests for addition of patch level to LLVM version
llvm-svn: 202721
2014-03-03 15:22:14 +00:00
Rafael Espindola cc126271f8 Add support for OpenBSD SPARC assembler.
Patch by Brad Smith.

llvm-svn: 202462
2014-02-28 01:55:21 +00:00
Hal Finkel 00a950f488 Add -mcrbits/-mno-crbits to control the PowerPC CR-bit-tracking feature
The backend currently enables CR-bit tracking by default at -O2 and higher.
These flags allow the user to override that default.

llvm-svn: 202453
2014-02-28 00:27:57 +00:00
Roman Divacky 9f77940fdc Pass the sparc architecture variant to the assembler.
llvm-svn: 202179
2014-02-25 18:45:49 +00:00
Hans Wennborg 7b0dcef072 clang-cl: use -fno-rtti by default
Generating RTTI in the MS ABI is currently not supported, and the failures
are confusing to users, so let's disable it by default for now.

llvm-svn: 202178
2014-02-25 18:36:22 +00:00
Roman Divacky b1ae3d4937 Give sparcv9 the ability to set the target cpu. Change it from accepting
-march which doesnt exist on sparc gcc to -mcpu. While here adjust a
few tests to not write an unused temporary file.

llvm-svn: 202177
2014-02-25 18:35:30 +00:00
Ben Langmuir 801272a98c Add a driver option -ivfsoverlay
Reads the description of a virtual filesystem from a file and overlays
it over the real file system.

llvm-svn: 202176
2014-02-25 18:23:47 +00:00
Alexey Samsonov e65ceb9f16 Respect ToolChain::isPIEDefault() in constructing link job on Linux and FreeBSD.
Partially based on http://llvm-reviews.chandlerc.com/D2644 by Viktor Kutuzov.

llvm-svn: 202150
2014-02-25 13:26:03 +00:00
NAKAMURA Takumi 051b40c1cb Suppress clang/test/Driver/clang_f_opts.c for targeting cygming since r202058 is incompatible to gcc driver.
llvm-svn: 202093
2014-02-25 00:30:04 +00:00
Richard Barton c9b5f35ec1 Implement -fno-short-wchar
llvm-svn: 202058
2014-02-24 18:43:28 +00:00
Alp Toker 8587f0ca99 Add driver test for multiple preprocessor inputs
Fix an unintentional stdin read in the darwin-asan-nofortify.c test and replace
it with an explicit test for multiple -E inputs passed to the driver.

Noticed while working on the in-process driver patch.

llvm-svn: 202007
2014-02-24 08:17:02 +00:00
Saleem Abdulrasool cfeb90d7a8 clang: add -f{no-,}integrate-as as consistent parameters
The integrated assembler is a feature.  This makes the new flags the default
option, and the previous versions aliases.  Ideally, at some point the aliases
would be entirely removed.

llvm-svn: 201963
2014-02-23 00:40:30 +00:00
Bob Wilson 39265b96b5 Remove support for the QA_OVERRIDE_GCC3_OPTIONS environment variable.
In r199283 I switched the name of this variable to CCC_OVERRIDE_OPTIONS, but
I kept some code to continue recognizing the old name temporarily. As far as
I know, the only use of this was for some internal testing at Apple, and we've
now switched to use the new name. If anyone else is still using this and needs
more time to switch names, I guess we'll find out! <rdar://problem/15821425>

llvm-svn: 201962
2014-02-23 00:11:56 +00:00