Commit Graph

2324 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen 73cb84c271 Use the right dynamic linker for SPARC Linux executables.
llvm-svn: 198923
2014-01-10 08:18:34 +00:00
Jakob Stoklund Olesen b3f938ee87 Locate GCC installations on SPARC systems.
llvm-svn: 198918
2014-01-10 06:53:02 +00:00
Jakob Stoklund Olesen 91a8e03af0 Give the linker the right ELF type for SPARC targets.
llvm-svn: 198912
2014-01-10 03:51:33 +00:00
Jakob Stoklund Olesen 2490e553c0 Pass -32/-64 to the assembler when building for sparc/sparc64.
llvm-svn: 198911
2014-01-10 03:51:29 +00:00
Quentin Colombet 528ea63804 [Driver] Fix a typo in the setting of the arch name when -arch x86_64h is used.
<rdar://problem/15711488>

llvm-svn: 198722
2014-01-08 01:02:06 +00:00
Chandler Carruth 5553d0d4ca Sort all the #include lines with LLVM's utils/sort_includes.py which
encodes the canonical rules for LLVM's style. I noticed this had drifted
quite a bit when cleaning up LLVM, so wanted to clean up Clang as well.

llvm-svn: 198686
2014-01-07 11:51:46 +00:00
Adrian Prantl a763447124 Implement a new -fstandalone-debug option. rdar://problem/15685848
It controls everything that -flimit-debug-info used to, plus the
vtable type optimization. The old -fno-limit-debug-info option is now an
alias to -fstandalone-debug and vice versa.

Standalone is the default on Darwin until dtrace is updated to work with
non-standalone debug info (rdar://problem/15758808).

Note: I kept the LimitedDebugInfo name in CodeGenOptions::DebugInfoKind
because NoStandaloneDebugInfo sounded even more confusing.

llvm-svn: 198655
2014-01-07 01:19:08 +00:00
Justin Bogner 6a9d2cfadd Driver: Accept -fprofile-instr-use and -fprofile-instr-generate
These flags will be used for instrumentation based PGO.

llvm-svn: 198639
2014-01-06 22:27:36 +00:00
Roman Divacky feb5e63e5c Remove a tab that snuck in.
llvm-svn: 198312
2014-01-02 15:34:59 +00:00
Roman Divacky 47f4ff8778 In the FreeBSD assembler driver, inform the sparc assembler that we're producing
PIC code.

llvm-svn: 198311
2014-01-02 15:13:18 +00:00
Bob Wilson 9914a02114 Propagate "-arch x86_64h" setting to the linker. <rdar://problem/15711488>
This is a follow-up to r194907, which added a new -arch setting to make it
easier to specify AVX2 targets. The "-arch x86_64h" option needs to be passed
on to the linker, but it was getting canonicalized to x86_64 by the code
in getArchTypeForDarwinArchName.

llvm-svn: 198096
2013-12-28 05:26:14 +00:00
Hans Wennborg e0053474b9 clang-cl: Support /P and /E (preprocess to file or stdout)
llvm-svn: 197827
2013-12-20 18:40:46 +00:00
Roman Divacky 78589ecd50 Use the integrated assembler by default on FreeBSD/ppc and ppc64.
llvm-svn: 197521
2013-12-17 20:34:25 +00:00
Alp Toker b164a349f9 Fix indentation from r197490 plus some typos
llvm-svn: 197507
2013-12-17 17:25:19 +00:00
Richard Barton 5828d7b936 LIBRARY_PATH environment variable should only be supported on a native compiler.
llvm-svn: 197490
2013-12-17 11:11:25 +00:00
Joerg Sonnenberger d75a1f8761 Support EABIHF environment on ARM.
llvm-svn: 197406
2013-12-16 19:16:04 +00:00
Rafael Espindola 80d333ba22 Avoid temporary std::string.
llvm-svn: 197160
2013-12-12 15:48:19 +00:00
Rafael Espindola 9c5ef12d66 Don't return a pointer to a temporary std::string's c_str.
llvm-svn: 197157
2013-12-12 15:39:05 +00:00
Bernard Ogden f6ba17d340 Simple refactoring to eliminate single-use local variable
llvm-svn: 197154
2013-12-12 13:27:15 +00:00
Bernard Ogden 3156176c8c Refactor duplicate functions
getARMCPU and getLLVMArchSuffixForARM existed as very similar functions
in both ToolChain.cpp and Tools.cpp. Create a single implementation of
each in Tools.cpp, eliminate the duplicate and share via Tools.h.

Creates an 'arm' namespace in Tools.h to be used by any ARM-targetting tools.

llvm-svn: 197153
2013-12-12 13:27:11 +00:00
Bernard Ogden 8af41b5a21 Make thumb the default instruction set for v7m and v7em
llvm-svn: 197152
2013-12-12 13:27:04 +00:00
Bernard Ogden 178d0dc95b Fix -mthumb resetting of target cpu
Passing -mthumb with no explicit CPU on the command line
resulted in target CPU changing from the architecture
default to arm7tdmi. Now it does not.

llvm-svn: 197151
2013-12-12 13:26:59 +00:00
Tim Northover 9c7e035656 Darwin-embedded: find correct libclang_rt for embedded targets.
This refactors some of the Darwin toolchain classification to give a more solid
distinction between the three primary Darwin platforms (OS X, IOS and IOS
simulator) so that a 4th choice can be added temporarily: embedded MachO
targets.

Longer term, this support will be factored out into a separate class and no
longer classified as "darwin-eabi", but the refactoring should still be useful.

llvm-svn: 197148
2013-12-12 11:55:52 +00:00
Renato Golin 1588cdaa4b Turning IAS on by default on ARM/Thumb
This is an experimental feature, where -integrated-as will be
on by default on ARM/Thumb. We aim to detect the missing features
so that the next release is stable.

Updating the ReleaseNotes, too.

Also moving the AArch64 into the same place.

llvm-svn: 197024
2013-12-11 09:35:10 +00:00
Argyrios Kyrtzidis 74aa0256c9 [objcmt] Transfer '-objcmt-migrate-designated-init' from the driver to cc1 invocation.
llvm-svn: 196993
2013-12-11 01:29:48 +00:00
David Fang adcdde013a style fix
llvm-svn: 196982
2013-12-10 23:13:11 +00:00
David Fang 073a7c9139 darwin asm driver: suppress -Q for -no-integrated-as on darwin<11
llvm-svn: 196981
2013-12-10 22:51:25 +00:00
Argyrios Kyrtzidis d5ba86be0d [Driver] Rename '-objcmt-white-list-dir-path' option to '-objcmt-whitelist-dir-path' and add an alias for now.
llvm-svn: 196944
2013-12-10 18:36:53 +00:00
NAKAMURA Takumi 02adf13ceb [CMake] clangDriver: Move LLVM stuff in target_link_library to LLVM_LINK_COMPONENTS.
llvm-svn: 196798
2013-12-09 19:04:19 +00:00
Joerg Sonnenberger 21baded28c Extend assembler handling for NetBSD/MIPS to pass down the correct ABI,
architecture and PIC flag.

llvm-svn: 196720
2013-12-08 13:54:58 +00:00
Joerg Sonnenberger ee3b2da880 Pass correct flags to assembler and linker for OpenBSD on AMD64, PowerPC
and MIPS64. From Brad Smith.

llvm-svn: 196630
2013-12-07 00:57:46 +00:00
Ana Pazos dd6068d400 Added support for mcpu krait
- krait processor currently modeled with the same features as A9.
- Krait processor additionally has VFP4 (fused multiply add/sub)
and hardware division features enabled.
- krait has currently the same Schedule model as A9
- krait cpu flag is not recognized by the GNU assembler yet,
it is replaced with march=armv7-a to avoid a lower march
from being used.

llvm-svn: 196618
2013-12-06 22:43:17 +00:00
David Peixotto 3e325d7490 Add option to use temporary file for assembling with clang
This commit adds the flag '-via-file-asm' to the clang driver. The
purpose of this flag is to have a way to test that clang can consume
the assembly code that it outputs. When passed this flag, clang will
generate a temporary file that contains the assembly output from the
compile step. This assembly file will then be consumed by either the
integrated assembler or the external assembler. To test that the
integrated assembler can consume its own output compile with:

  $ clang -integrated-assembler -via-file-asm

Without the '-via-file-asm' flag, clang would directly create the
object file when using the integrated assembler. With the flag it
will first create the temporary assembly file and then read that
file and assemble it with the integrated assembler.

The flow is similar to -save-temps, except that it only effects
the assembly input and the temporary file is not saved.

llvm-svn: 196606
2013-12-06 20:27:33 +00:00
Roman Divacky 326d998cfa Move the body of GCCInstallationDetector ctor into an init() function
and call it from its only user. The linux toolchain. This saves quite
a lot of directory searching on other platforms.

llvm-svn: 196590
2013-12-06 18:32:18 +00:00
Joerg Sonnenberger 706c28163b For NetBSD, use arm1176jzf-s as default CPU for ARMv6.
llvm-svn: 196538
2013-12-05 21:27:58 +00:00
Joerg Sonnenberger 1f94da5a9b Pass down the target CPU to the system assembler for NetBSD/ARM.
llvm-svn: 196532
2013-12-05 21:07:29 +00:00
Bob Wilson 83e723a9c9 Fix assertion failure left over from changes to move away from "darwin" triples.
I happened to notice this while trying to write a test for an iOS simulator
target. I suspect we just missed this when we added separate "macosx" and "ios"
triples instead of the generic "darwin" OS.

llvm-svn: 196527
2013-12-05 19:38:42 +00:00
Alp Toker f6a24ce40f Fix a tranche of comment, test and doc typos
llvm-svn: 196510
2013-12-05 16:25:25 +00:00
Alp Toker 8c8a875079 Fix method/variable name typos
llvm-svn: 196214
2013-12-03 06:53:35 +00:00
Alp Toker ce365ca0f4 Driver: Factor gold support out into a function
AddGoldPlugin() is the same on gnutools and freebsd so avoid the
copy-and-paste duplicate code.

No change in functionality.

llvm-svn: 196096
2013-12-02 12:43:03 +00:00
Alp Toker 965f882588 Remove a whole lot of unused variables
There are about 30 removed in this patch, generated by a new FixIt I haven't
got round to submitting yet.

llvm-svn: 195814
2013-11-27 05:22:15 +00:00
Simon Atanasyan bd98663c7a [Mips] Pass -mmsa option to the assembler.
llvm-svn: 195756
2013-11-26 11:58:04 +00:00
Simon Atanasyan 8cc7c123a1 [Mips] Replace explicit argument handling by the single ArgList::AddLastArg() call.
llvm-svn: 195755
2013-11-26 11:57:58 +00:00
Simon Atanasyan 3e0f388725 [Mips] Add support for nan2008 libraries and headers look up for Code
Sourcery MIPS toolchain.

llvm-svn: 195753
2013-11-26 11:57:48 +00:00
Simon Atanasyan 13e965a5c0 [Mips] Do not detect a used MIPS toolchain. Build a path suffix for FSF
toolchain first and check the path existence. If the path does not
exist build and check a path suffix for Code Sourcery toolchain.

llvm-svn: 195751
2013-11-26 11:57:14 +00:00
Simon Atanasyan 54f3f93988 [Mips] Call findMIPSABIDirSuffix() for MIPS targets only.
llvm-svn: 195750
2013-11-26 11:57:09 +00:00
Rafael Espindola a8b3b680c3 Make the integrated assembler the default for cygwin/mingw too.
The integrated assembler was already the default for win32. It is now able
to handle a clang bootstrap on mingw, so make it the default.

llvm-svn: 195676
2013-11-25 18:50:53 +00:00
Rafael Espindola 8de3f11e94 remove gcc::Precompile
Clang still has support for running gcc for performing various stages
of a build. Right now it looks like this is used for

* Supporting Fortran in the clang driver
* Running an assembler or linker in systems we don't yet know how to
run them directly.

It looks like the gcc::Precompile is a vestige from the days when we
supported using clang for C and running gcc for c++. This patch removes it
(yes, we have no tests for it).

llvm-svn: 195586
2013-11-24 23:40:06 +00:00
Rafael Espindola 1462796cdd Remove the Darwin_Generic_GCC toolchain.
This is currently unused by any test. The code path would still be hit
by clang on ppc, but

* PPC has not been supported on current versions of OS X
* A port of current clang to older OS X on ppc should be using
toolchains::DarwinClang.

llvm-svn: 195585
2013-11-24 23:28:23 +00:00
Rafael Espindola edaa444bda Don't use the gcc driver for assembling.
Clang knows how to use the gnu assembler directly from doing so on linux and
hurd. The existing support worked out of the box on cygwin and mingw and I was
able to bootstrap clang with it in both systems (with pending patches for the
new mingw abi, but that is independent of the assembler).

llvm-svn: 195554
2013-11-23 16:40:57 +00:00