summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
* Apply clang-tidy's misc-move-constructor-init throughout Clang.Benjamin Kramer2016-05-271-3/+4
| | | | | | No functionality change intended, maybe a tiny performance improvement. llvm-svn: 270996
* Turn copies into references as suggested by clang-tidy's ↵Benjamin Kramer2016-05-271-1/+1
| | | | | | performance-unnecessary-copy-initialization. llvm-svn: 270994
* [OPENMP] Fixed processing of '-fopenmp-version=' option and test.Alexey Bataev2016-05-271-1/+1
| | | | llvm-svn: 270962
* [AMDGPU] Remove individual debugger options + update featuresKonstantin Zhuravlyov2016-05-261-1/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D20336 llvm-svn: 270895
* [OPENMP] Add option '-fopenmp-version=[31|40|45]' allowing choosingAlexey Bataev2016-05-261-1/+3
| | | | | | | | | | OpenMP version. If '-fopenmp' option is provided '-fopenmp-version=' allows to control, which version of OpenMP must be supported. Currently it affects only the value of _OPENMP define. llvm-svn: 270838
* Revert "[AArch64] Using new TargetParser in Clang"Renato Golin2016-05-251-15/+39
| | | | | | | | This reverts commit r270688 and r270689. The issue is not a random order, but a different order for some targets and others (prob. Linux vs Darwin). Reverting until we have a better fix. llvm-svn: 270691
* [AArch64] Using new TargetParser in ClangRenato Golin2016-05-251-39/+15
| | | | | | | | | | Using AArch64TargetParser in clang to avoid repetitive string parsing. Use TargetParser to do ARCH/CPU/ArchExt parsing instead of local implementation. Patch by Jojo Ma. llvm-svn: 270688
* clang-cl: Fix unused argument warning when combining /O2 and /Ob2Hans Wennborg2016-05-251-1/+6
| | | | llvm-svn: 270642
* clang-cl: Bake /Ob0 and /Ob2 into the general /O option handlingHans Wennborg2016-05-241-1/+13
| | | | | | | This is a follow-up to r270609, wherein I forgot that /O options can be combined, and e.g. /Odb2 is a valid combination. llvm-svn: 270614
* [Driver] Add support for -finline-functions and /Ob2 flagsHans Wennborg2016-05-241-2/+3
| | | | | | | | | | | | | | | | | | -finline-functions and /Ob2 are currently ignored by Clang. The only way to enable inlining is to use the global O flags, which also enable other options, or to emit LLVM bitcode using Clang, then running opt by hand with the inline pass. This patch allows to simply use the -finline-functions flag (same as GCC) or /Ob2 in clang-cl mode to enable inlining without other optimizations. This is the first patch of a serie to improve support for the /Ob flags. Patch by Rudy Pons <rudy.pons@ilod.org>! Differential Revision: http://reviews.llvm.org/D20576 llvm-svn: 270609
* [Sparc] Add software float option -msoft-floatJacob Baungard Hansen2016-05-242-15/+69
| | | | | | | | | | | | | | | Summary: Following patch D19265 which enable software floating point support in the Sparc backend, this patch enables the option to be enabled in the front-end using the -msoft-float option. The user should ensure a library (such as the builtins from Compiler-RT) that includes the software floating point routines is provided. Reviewers: jyknight, lero_chris Subscribers: jyknight, cfe-commits Differential Revision: http://reviews.llvm.org/D20419 llvm-svn: 270538
* [CUDA] Add -fcuda-approx-transcendentals flag.Justin Lebar2016-05-231-0/+4
| | | | | | | | | | | | | | Summary: This lets us emit e.g. sin.approx.f32. See http://docs.nvidia.com/cuda/parallel-thread-execution/#floating-point-instructions-sin Reviewers: rnk Subscribers: tra, cfe-commits Differential Revision: http://reviews.llvm.org/D20493 llvm-svn: 270484
* Test commitJacob Baungard Hansen2016-05-231-0/+1
| | | | llvm-svn: 270435
* Driver: support exherbo's multiarch supportSaleem Abdulrasool2016-05-231-26/+59
| | | | | | | | Exherbo has an alternative file system layout to accommodate multiarch. The loader is located at /usr/${triple}/lib/${loader}. Adjust the Linux toolchain to support that on exherbo. llvm-svn: 270392
* [driver][mips] clang-format the code. NFCSimon Atanasyan2016-05-221-27/+27
| | | | llvm-svn: 270374
* [driver][mips] Support new versions of MIPS CodeScape toolchainsSimon Atanasyan2016-05-221-6/+173
| | | | llvm-svn: 270373
* [driver][mips] Use target triple mips-mti-linux-gnu for toolchain detectionSimon Atanasyan2016-05-221-13/+15
| | | | llvm-svn: 270368
* [driver][mips] Rename some variables to better reflect their purpose. NFCSimon Atanasyan2016-05-221-8/+9
| | | | llvm-svn: 270367
* [driver][mips] Drop support for outdated version of CodeSourcery MIPS toolchainSimon Atanasyan2016-05-221-56/+1
| | | | llvm-svn: 270366
* Driver: sink getLinuxDynamicLoader into the ToolchainSaleem Abdulrasool2016-05-223-70/+72
| | | | | | | | The parameter already requires the toolchain, sink the method into the class. This also enables the use of the distro detection logic which will be needed to support Exherbo's multiarch approach. llvm-svn: 270352
* Driver: simplify getDynameLinkerSaleem Abdulrasool2016-05-221-47/+49
| | | | | | | | Convert the cascading if/else to a switch. This makes it easier to follow the logic. Minor difference is that we no longer default to x86_64 but rather to the architecture specified by the architecture. llvm-svn: 270351
* Eliminate unnecessary file access checks in Clang driver on WindowsAdrian McCarthy2016-05-201-1/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D20454 llvm-svn: 270226
* [CUDA] Allow sm_50,52,53 GPUsArtem Belevich2016-05-191-0/+4
| | | | | | | | LLVM accepts them since r233575. Differential Revision: http://reviews.llvm.org/D20405 llvm-svn: 270084
* [driver] Do not pass install dir to the MultilibSet include dirs callbackSimon Atanasyan2016-05-191-41/+25
| | | | | | | | All additional include directories are relative to the toolchain install folder. So let's do not pass this folder to each callback to simplify and slightly reduce the code. llvm-svn: 270069
* [driver] Do not pass target triple to the MultilibSet include dirs callbackSimon Atanasyan2016-05-191-10/+8
| | | | | | | No one callback uses target triple so we can escape passing the unused argument. llvm-svn: 270068
* [driver][mips] Hardcode triple name in case of CodeSourcery toolchain. NFCSimon Atanasyan2016-05-191-1/+1
| | | | | | | | CodeSourcery toolchain is a standalone toolchain which always uses the same triple name in its paths. It is independent from target triple used by the driver. llvm-svn: 270067
* Update for llvm change.Rafael Espindola2016-05-181-2/+0
| | | | llvm-svn: 269989
* [Driver] Fix the case when use -fembed-bitcode and -flto= togetherSteven Wu2016-05-181-3/+3
| | | | | | | | | | | | | | | | | Summary: -fembed-bitcode was only checking for old style LTO flag (-flto) but not considering the new -flto= style option. That makes clang output bitcode embedded in bitcode object when using -flto= and -fembed-bitcode= together. Now clang should output normal bitcode file when using LTO and ignores -fembed-bitcode option. Reviewers: joker.eph Subscribers: joker.eph, cfe-commits Differential Revision: http://reviews.llvm.org/D20374 llvm-svn: 269961
* [Mips] Finetuning MIPS32 Android default variantsPetar Jovanovic2016-05-182-3/+19
| | | | | | | | | MIPS32 Android defaults to FPXX ("-fpxx"). MIPS32R6 Android defaults to FP64A ("-mfp64 -mno-odd-spreg"). Differential Revision: http://reviews.llvm.org/D20345 llvm-svn: 269914
* Support for MSVS default calling convention options (/Gd, /Gz, /Gv,Alexey Bataev2016-05-181-1/+10
| | | | | | | | | /Gr), by Alexander Makarov Patch for bug #27711 Differential Revision: http://reviews.llvm.org/D20171 llvm-svn: 269891
* Teach clang to look for libcxx in /usr/local/include/c++ on LinuxYaron Keren2016-05-171-5/+5
| | | | | | | | | | | | As The default CMAKE install prefix is /usr/local ( https://cmake.org/cmake/help/v3.0/variable/CMAKE_INSTALL_PREFIX.html ), sudo ninja install ends up installing clang, LLVM and libcxx under /usr/local. In development scenario, when clang is run from the build location it will not find libcxx at neither (build location)/../include/c++ nor /usr/include/c++. This patch lets development clang find system installed libcxx without adding -isystem /usr/local/include/c++. Also addresses the FIXME by explaining the use-case for these include paths. llvm-svn: 269801
* [Mips] Set mips32 as default CPU for MIPS32 AndroidPetar Jovanovic2016-05-171-1/+3
| | | | | | | | Change default CPU for MIPS32 Android. Now it is mips32 (rev1). Differential Revision: http://reviews.llvm.org/D20313 llvm-svn: 269754
* [PS4] Change the names of some "environmental" things to what ourPaul Robinson2016-05-162-6/+6
| | | | | | | | licensees actually see in the toolchain we deliver to them. This will reduce the set of local patches we have to maintain. The triple is not changing. (The term ORBIS is an internal code name for PS4.) llvm-svn: 269671
* [mips] Enable IAS by default for 32-bit MIPS targets (O32).Daniel Sanders2016-05-141-0/+2
| | | | | | | | | | | | | | | | | | | Summary: The MIPS IAS can now pass 'ninja check-all', recurse, build a bootable linux kernel, and pass a variety of LNT testing. Unfortunately we can't enable it by default for 64-bit targets yet since the N32 ABI is still very buggy and this also means we can't enable it for N64 either because we can't distinguish between N32 and N64 in the relevant code. Reviewers: vkalintiris Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18759 Differential Revision: http://reviews.llvm.org/D18761 llvm-svn: 269560
* MSVCToolChain.cpp: Make version.dll generic for win32.NAKAMURA Takumi2016-05-142-2/+6
| | | | | | | We may consider msvc features may be capable on mingw host, if it can. Consider --host=mingw --target=msvc. llvm-svn: 269557
* MSVCToolChain.cpp: Use explicit constructor for SmallString from ↵NAKAMURA Takumi2016-05-141-1/+1
| | | | | | std::string, to appease mingw-g++. llvm-svn: 269556
* Get default -fms-compatibility-version from cl.exe's versionAdrian McCarthy2016-05-134-6/+56
| | | | | | | | | | | | | | -fms-compatibility-version was defaulting to 18 (VS 2013), which is a pain if your environment is pointing to version 19 (VS 2015) libraries. If cl.exe can be found, this patch uses its version number as the default instead. It re-uses the existing code to find the Visual Studio binaries folder and WinAPI methods to check its version. You can still explicitly specify a compatibility version on the command line. If you don't have cl.exe, this should be a no-op and you'll get the old default of 18. This affected the tests, which assumed that if you didn't specific a version, that it would default to 18, but this won't be true for all machines. So a couple test cases had to be eliminated and a couple others had to be tweaked to allow for various outputs. Addresses: https://llvm.org/bugs/show_bug.cgi?id=27215 Differential Revision: http://reviews.llvm.org/D20136 llvm-svn: 269515
* Simplify getLinuxDynamicLinker() by using a common variable for the triple. NFC.Vasileios Kalintiris2016-05-131-13/+12
| | | | llvm-svn: 269412
* [mips] Consult triple's vendor field before using musl's interpreter.Vasileios Kalintiris2016-05-131-1/+3
| | | | | | This should affect only the mips-mti-linux toolchain. llvm-svn: 269411
* [ubsan] Add -fsanitize-undefined-strip-path-components=NFilipe Cabecinhas2016-05-121-0/+4
| | | | | | | | | | | | | | | | | | | Summary: This option allows the user to control how much of the file name is emitted by UBSan. Tuning this option allows one to save space in the resulting binary, which is helpful for restricted execution environments. With a positive N, UBSan skips the first N path components. With a negative N, UBSan only keeps the last N path components. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19666 llvm-svn: 269309
* [Driver] Squash misleading indentation warning.Marcin Koscielnicki2016-05-121-6/+6
| | | | llvm-svn: 269279
* Embed bitcode in object file (clang cc1 part)Steven Wu2016-05-112-9/+24
| | | | | | | | | | | | | | | | | | | Summary: Teach clang to embed bitcode inside bitcode. When -fembed-bitcode cc1 option is used, clang will embed both the input bitcode and cc1 commandline into the bitcode in special sections before compiling to the object file. Using -fembed-bitcode-marker will only introduce a marker in both sections. Depends on D17390 Reviewers: rsmith Subscribers: yaron.keren, vsk, cfe-commits Differential Revision: http://reviews.llvm.org/D17392 llvm-svn: 269202
* Update clang support on recent HaikuReid Kleckner2016-05-113-0/+47
| | | | | | | | | | | | | | | | | | [ Copied from https://llvm.org/bugs/show_bug.cgi?id=26404 ] clang support on Haiku is lagging a bit, and missing on x86_64. This patch updates support for x86 and add support for x86_64. It should apply directly to trunk and it's harmless in the sense that it only affects Haiku. Reviewers: rnk, rsmith Patch by Jérôme Duval Differential Revision: http://reviews.llvm.org/D16797 llvm-svn: 269201
* [Myriad] Use Generic_ELF::addClangTargetOptions()Douglas Katzman2016-05-092-2/+2
| | | | llvm-svn: 268956
* [Power9] Enable -mcpu=pwr9 (-mcpu=power9) in the front endNemanja Ivanovic2016-05-091-0/+2
| | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D19684 It simply adds the handling for the option and the corresponding macros. llvm-svn: 268951
* Proper detection and handling of RHEL and variants.Rafael Espindola2016-05-091-8/+7
| | | | | | | | | | | - Don't consider "/etc/lsb-release" to be Ubuntu only. - Detect SL, too. - Only add "--no-add-needed" for RHEL7 (or Fedora), not for RHEL6 (that's what the compilers shipped with RHEL do). - removed RHEL4 which is now four years past EOL and certainly incapable of building or running any recent version of llvm/clang. llvm-svn: 268914
* RHEL: Look in more places to find g++ headers and runtime.Rafael Espindola2016-05-091-2/+10
| | | | | | | | | | | | | | | Some distros with ten years of support ship an old gcc but later offer more recent versions for installation in parallel. These versions are typically not only needed for the compilation of llvm/clang, but also to properly use the clang binary that comes out. Clang already searches /usr at runtime for the most recent installation of gcc. This patch appends paths for add-on installations of gcc in RHEL. Patch by Michael Lampe. llvm-svn: 268912
* Teach header search about GCC 4.9 header search paths in Gentoo, theyChandler Carruth2016-05-081-0/+1
| | | | | | now use the full GCC version in their weird suffix. llvm-svn: 268874
* AMDGPU: Use lld as the linker againTom Stellard2016-05-052-1/+3
| | | | | | | | | | | | | | Summary: Now that LLVM is emitting version 2 of the AMD code object, we can start using lld again for linking instead of our custom tool. Reviewers: arsenm, kzhuravl Subscribers: rafael, cfe-commits Differential Revision: http://reviews.llvm.org/D19952 llvm-svn: 268648
* Do not add uwtable attribute by default for MachO targets.Akira Hatanaka2016-05-051-0/+5
| | | | | | | | | | r217178 changed clang to add function attribute uwtable by default on Win64, which caused the __eh_frame section to be emitted by default. This commit restores the previous behavior for MachO targets. rdar://problem/25282627 llvm-svn: 268589
OpenPOWER on IntegriCloud