summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* Typically linker options are protected with -Xlinker or -Wl,Arthur Marble2014-07-161-2/+7
| | | | | | | | however certain sloppy Makefiles pass -z options directly to the compiler. This patch enables clang to recognize these options (because -z is not used by clang itself). llvm-svn: 213198
* [Driver][Mips] If CPU name is not provided to the driver explicitly useSimon Atanasyan2014-07-161-19/+7
| | | | | | multilibs from the FSFS toolchain corresponding to the mips32r2/mips64r2 CPUs. llvm-svn: 213175
* [Driver][Mips] Reduce code duplication - use existing functionSimon Atanasyan2014-07-163-25/+24
| | | | | | | | getMipsCPUAndABI() to get MIPS ABI name during multi-library selection. No functional changes. llvm-svn: 213143
* [Driver][Mips] Remove flags which is not used in multi-library selection.Simon Atanasyan2014-07-161-2/+0
| | | | | | No functional changes. llvm-svn: 213142
* [Driver][Mips] Reduce code duplication. Remove static isMipsNan2008() function.Simon Atanasyan2014-07-161-6/+2
| | | | | | Use the tools::mips::isNaN2008() routine instead. llvm-svn: 213141
* [mips] Correct the invocation of GAS in several cases.Daniel Sanders2014-07-162-8/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As a result of this patch, assembling an empty file with GCC and Clang (using GAS as the assembler) now produces identical objects. -mfp32/-mfpxx/-mfp64 now form a trinity of options. -mfpxx is the default when the triple vendor is 'img' or 'mti', the ABI is O32, and the CPU is between mips2 and mips32r2/mips64r2 (inclusive). -mno-shared is always given to the assembler to match the effect of -mabicalls (currently unimplemented but Clang acts as if it is given). Similarly, -call_nonpic is always given to match the effect of -mplt (also unimplemented and acts as if given) except when the ABI is 64 in which case -mplt has no effect so -KPIC is given instead. -mhard-float/-msoft-float are now passed on. -modd-spreg/-mno-odd-spreg are now passed on. -mno-mips16 is correctly passed on. The assembler option is -no-mips16 not -mno-mips16 Differential Revision: http://reviews.llvm.org/D4515 llvm-svn: 213138
* [mips] Add support for -mfpxx and -mno-fpxx.Daniel Sanders2014-07-161-0/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D4464 llvm-svn: 213132
* Don't add -Bsymbolic by default on Android.Evgeniy Stepanov2014-07-161-3/+0
| | | | | | | -Bsymbolic is not a platform requirement and should not be added unconditionally. llvm-svn: 213126
* Driver: bifurcate extended and basic MSC versioningSaleem Abdulrasool2014-07-161-7/+41
| | | | | | | | | | | | | | | | | | | | | | | This restores the original behaviour of -fmsc-version. The older option remains as a mechanism for specifying the basic version information. A secondary option, -fms-compatibility-version permits the user to specify an extended version to the driver. The new version takes the value as a dot-separated value rather than the major * 100 + minor format that -fmsc-version format. This makes it easier to specify the value as well as a more flexible manner for specifying the value. Specifying both values is considered an error. The older parameter is left solely as a driver option, which is normalised into the newer parameter. This allows us to retain a single code path in the compiler itself whilst preserving the semantics of the old parameter as well as avoid having to determine which of two formats are being used by the invocation. The test changes are due to the fact that the compiler no longer supports the old option, and is a direct conversion to the new option. llvm-svn: 213119
* Use the integrated assembler by default on OpenBSD/sparc.Brad Smith2014-07-151-1/+3
| | | | llvm-svn: 213105
* clang-cl: Implement the -arch flagEhsan Akhgari2014-07-151-2/+28
| | | | | | | | | | | | | | | Summary: This implements the -arch flag for both x86 and x86-64 by letting them affect the default target features we pass to cc1. -m machine flags will override the features set by -arch. Reviewers: hansw Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4519 llvm-svn: 213083
* [Driver] clang::driver::getARMCPUForMArch() moved to ↵Argyrios Kyrtzidis2014-07-111-83/+2
| | | | | | | | | llvm::Triple::getARMCPUForArch(). Depends on llvm r212846. Suggested by Eric Christopher. llvm-svn: 212858
* Handle SPARC float command line parameters for SPARCv9.Brad Smith2014-07-111-1/+2
| | | | llvm-svn: 212838
* [PATCH] [x32] Introduce -mx32 flag enforcing x32 mode for other triplets. By ↵Zinovy Nis2014-07-111-4/+8
| | | | | | | | | | | | Pavel Chupin (@pavel.v.chupin). -mx32 flag setup target environment to GNUX32 and can be used for other 32/64-bit triplets (i386-unknown-linux, x86_64-unknown-linux) to turn on x32 mode. Compatible with GCC -mx32 flag. Differential Revision: http://reviews.llvm.org/D4470 llvm-svn: 212817
* GCC compatibility: Create a Group to ignore unsupported optimization.Sylvestre Ledru2014-07-111-0/+7
| | | | | | | | | | | | Returns a warning when using an unknown optimization flag. This patch includes -finline-limit as one of those ignored flags. More options will be moved in this group Patch by Arthur Marble <arthur@info9.net> in the context of Debian Google Summer of code 2014. Reviewers: rnk, Sylvestre llvm-svn: 212805
* Enable -gcolumn-info by default.Diego Novillo2014-07-101-1/+2
| | | | | | | | | | | | | | | This patch flips the default value for -gcolumn-info to be on by default. I discussed the rationale and provided compile/size data in: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/074290.html This also updates the documentation and some tests that relied on the lack of column information. Some tests had column information in the expected output, but it was wrong (the tsan tests). Others were using the driver to execute. llvm-svn: 212781
* Remove use of uniform initialization ({}) introduced in r212725 since this ↵David Blaikie2014-07-101-1/+1
| | | | | | isn't supported in MSVC. llvm-svn: 212754
* [Codestyle][x32] Cosmetic codestyle fix.Zinovy Nis2014-07-101-6/+6
| | | | llvm-svn: 212728
* [x32] Adding X32 target support to driver, including ↵Zinovy Nis2014-07-102-23/+65
| | | | | | | | | | TargetInfo,DescriptionString, flags, paths lookup, etc. Cover changes with new tests. The author of the patch is Pavel Chupin (@pavel.v.chupin). The changes enable "hello world" on x32 target (x86_64-*-linux-gnux32). s/isX32/IsX32/ also fixed. Differential Revision: http://reviews.llvm.org/D4180 llvm-svn: 212725
* [mips][mips64r6] Add support for mips-img-linux-gnu GCC toolchainsDaniel Sanders2014-07-103-13/+62
| | | | | | | | | | | | | | Summary: * Support the multilib layout used by the mips-img-linux-gnu * Recognize mips{,64}{,el}-img-linux-gnu as being aliases of mips-img-linux-gnu * Use the correct dynamic linker for mips-img-linux-gnu * Make mips32r6/mips64r6 the default CPU for mips-img-linux-gnu Subscribers: mpf Differential Revision: http://reviews.llvm.org/D4436 llvm-svn: 212719
* [mips] Add support for -modd-spreg/-mno-odd-spregDaniel Sanders2014-07-101-0/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D4432 llvm-svn: 212700
* [Driver] Expose getARMCPUForMArch() function in the Driver API; NFC.Argyrios Kyrtzidis2014-07-101-3/+8
| | | | llvm-svn: 212666
* Decouple llvm::SpecialCaseList text representation and its LLVM IR semantics.Alexey Samsonov2014-07-092-2/+1
| | | | | | | | | | | | | | | | Turn llvm::SpecialCaseList into a simple class that parses text files in a specified format and knows nothing about LLVM IR. Move this class into LLVMSupport library. Implement two users of this class: * DFSanABIList in DFSan instrumentation pass. * SanitizerBlacklist in Clang CodeGen library. The latter will be modified to use actual source-level information from frontend (source file names) instead of unstable LLVM IR things (LLVM Module identifier). Remove dependency edge from ClangCodeGen/ClangDriver to LLVMTransformUtils. No functionality change. llvm-svn: 212643
* cc1as: consolidate option flags with cc1 and eliminate duplicationAlp Toker2014-07-092-46/+0
| | | | | | | | | | The clang -cc1as options are nearly a strict subset of -cc1. Instead of duplicating the definitions and documentation, let's go ahead and share the definitions in a similar way the current handling of combined driver and frontend flags, eliminating some of the vestigial legacy surrounding the assembler subcommand. llvm-svn: 212620
* Driver: Fix think-o in adding -ivfsoverlay flag to crashdumpsJustin Bogner2014-07-071-3/+5
| | | | | | | If there isn't a VFS to overlay we shouldn't be adding a -ivfsoverlay flag. llvm-svn: 212468
* Remove unused sys/stat.h includesAlp Toker2014-07-072-3/+0
| | | | | | The facility was abstracted to LLVM in r187364. llvm-svn: 212441
* Update for llvm api change.Rafael Espindola2014-07-061-4/+7
| | | | llvm-svn: 212408
* [Driver][Mips] Support one more MIPS CPU name - octeon.Simon Atanasyan2014-07-041-1/+2
| | | | llvm-svn: 212339
* [Driver][Mips] If ABI name is not provided deduce it from the target tripleSimon Atanasyan2014-07-021-10/+10
| | | | | | not from the CPU name. This approach is closer to the method used by gcc driver. llvm-svn: 212176
* Driver: Handle /GR- in a compatible way with MSVCDavid Majnemer2014-07-011-15/+8
| | | | | | | | | | | | | | | | | There are slight differences between /GR- and -fno-rtti which made mapping one to the other inappropriate. -fno-rtti disables dynamic_cast, typeid, and does not emit RTTI related information for the v-table. /GR- does not generate complete object locators and thus will not reference them in vftables. However, constructs like dynamic_cast and typeid are permitted. This should bring our implementation of RTTI up to semantic parity with MSVC modulo bugs. llvm-svn: 212138
* Win64: Disable uwtable until we fix .pdata emission in LLVMReid Kleckner2014-07-011-1/+5
| | | | | | | | | LLVM r211399 started emitting .pdata for win64 by default. Unfortunately, it produces invalid object files. I plan to fix that Soon. For now, don't request unwind tables. This fixes the clang-cl self-host on win64. llvm-svn: 212137
* GCC compatibility: Ignore -finput_charset=UTF-8 argument. It is the default ↵Sylvestre Ledru2014-07-011-0/+8
| | | | | | | | | | | | | | | | in Clang. Currently, we fail with an error. Reviewers: rafael Reviewed By: rafael Subscribers: rnk, cfe-commits Differential Revision: http://reviews.llvm.org/D4347 llvm-svn: 212110
* [Driver][Mips] MIPS ABI names "32" and "64" used as arguments of the "-mabi"Simon Atanasyan2014-07-011-2/+2
| | | | | | | | | command line option only. Internally we convert them to the "o32" and "n64" respectively. So we do not need to refer them anywhere after that conversion. No functional changes. llvm-svn: 212096
* [UBSan] Don't link UBSan runtime into shared libraries.Alexey Samsonov2014-06-301-7/+5
| | | | | | | | It used to be a feature of UBSan (it could sanitize a standalone shared object instead of the whole program), but now it causes more problems, like PR20165. llvm-svn: 212064
* Use the newly added FindInEnvPath helper in clangEhsan Akhgari2014-06-302-37/+3
| | | | llvm-svn: 212058
* Fix a stray semi-colon. (Found by a pedantic warning)Chandler Carruth2014-06-291-1/+1
| | | | llvm-svn: 212003
* Revert r211866, r211895 and r211995, "Driver: use GNU::Link for the ↵NAKAMURA Takumi2014-06-295-230/+17
| | | | | | | | | | | Generic_GCC toolchain". It broke users of Generic_GCC, cygwin and mingw32. It reverts commits as follows: r211866: "Driver: use GNU::Link for the Generic_GCC toolchain" r211895: "Replace GetProgramPath("ld") with GetLinkerPath()." r211995: "Driver: add a cygwin linker tool" llvm-svn: 211998
* Driver: add a cygwin linker toolSaleem Abdulrasool2014-06-295-0/+206
| | | | | | | | | This adds a linker tool for the Windows cygwin environment. This linker invocation is significantly different from the generic ld invocation. It requires additional parameters as well as does not accept some normal parameters. This should fix self-hosting on Cygwin. llvm-svn: 211995
* clang-cl: Map /EHs- to -fno-exceptionsReid Kleckner2014-06-271-4/+52
| | | | | | | | | | | | | | | This isn't 100% compatible with MSVC, but it's close enough. MSVC's /EH flag doesn't really control exceptions so much as how to clean up after an exception is thrown. The upshot is that cl.exe /EHs- will compile try, throw, and catch statements with a warning, but clang-cl will reject such constructs with a hard error. We can't compile such EH constructs anyway, but this may matter to consumers of the AST. Reviewers: hans Differential Revision: http://reviews.llvm.org/D4317 llvm-svn: 211909
* Replace GetProgramPath("ld") with GetLinkerPath().Logan Chien2014-06-271-1/+1
| | | | llvm-svn: 211895
* Driver: Pass -ivfsoverlay to module crashdumpsJustin Bogner2014-06-271-1/+8
| | | | | | | | When we create a crashdump involving modules, we build a VFS to reproduce the problem with. This updates the reproduction script to use that VFS. llvm-svn: 211876
* Driver: use GNU::Link for the Generic_GCC toolchainSaleem Abdulrasool2014-06-272-17/+24
| | | | | | | | | | | | | | | | | This changes the behaviour of the driver for linking to match that of the Generic_GCC::Assemble. The default link should use "ld" rather than "gcc" for the linker as gcc does. This avoids the unnecessary round-tripping through gcc. It also is much more reasonable behaviour from the user's perspective. This should have been updated with SVN r195554 which changed the behaviour of Generic_GCC::Assemble. The gcc_forward test needs to be updated to mark the fact that -march is a flag for GCC not ld. This was updated as a typo fix, but added a check for a flag that is not a link flag. The bindings test covers the change for testing, and thus no new test was added. llvm-svn: 211866
* Driver: Fix a misleading comment and test for what it actually didJustin Bogner2014-06-261-1/+1
| | | | llvm-svn: 211806
* Driver: Remove trailing whitespaceJustin Bogner2014-06-261-2/+2
| | | | llvm-svn: 211805
* clang-cl: Don't store the cl compiler Tool on the stack (PR20131)Hans Wennborg2014-06-262-4/+18
| | | | | | | | | | | | | | The Command will refer back to the Tool as its source, so it has to outlive the Command. Having the Tool on the stack would cause us to crash when using "clang-cl -GR -fallback", because if the Command fails, Driver::ExecuteCompilation tries to peek at the Command's source. Differential Revision: http://reviews.llvm.org/D4314 llvm-svn: 211802
* Implement the -fuse-ld= option.Logan Chien2014-06-263-10/+35
| | | | | | | | | | | | | | This commit implements the -fuse-ld= option, so that the user can specify -fuse-ld=bfd to use ld.bfd. This commit re-applies r194328 with some test case changes. It seems that r194328 was breaking macosx or mingw build because clang can't find ld.bfd or ld.gold in the given sysroot. We should use -B to specify the executable search path instead. Patch originally by David Chisnall. llvm-svn: 211785
* Add ppc64/power8 as a targetWill Schmidt2014-06-261-0/+2
| | | | llvm-svn: 211778
* Forward -u to the linker on gnutools toolchainsReid Kleckner2014-06-261-0/+1
| | | | | | | | | | | | | | | | Summary: The BSDs and Darwin all forward the whole 'u' group, but gcc only forwards -u so far as I can tell. I only forward -u, since that's a minimal change, and many people object to magically recognizing and forwarding linker arguments. Reviewers: chandlerc, joerg Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4304 llvm-svn: 211756
* Align with new GCC options for x86 AndroidAlexey Volkov2014-06-251-2/+6
| | | | | | | | | 32-bit: +ssse3 64-bit: +sse4.2 +popcnt Differential Revision: http://reviews.llvm.org/D4287 llvm-svn: 211688
* [Driver] Follow-up to r211598, r211663. Do not build a dynamic linkerSimon Atanasyan2014-06-251-6/+6
| | | | | | path using sub-strings concatenation. Return the whole string explicitly. llvm-svn: 211665
OpenPOWER on IntegriCloud