summaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
Commit message (Collapse)AuthorAge
...
* Android uses -fpic for arm64 as well.Logan Chien2014-04-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207642 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop non-cfi assembly support from clang.Rafael Espindola2014-04-30
| | | | | | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207602 91177308-0d34-0410-b5e6-96231b3b80d8
* Android uses -fpic for aarch64.Logan Chien2014-04-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207567 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comments regarding isPIEDefault usage for r207520Alexey Volkov2014-04-29
| | | | | | | Differential Revision: http://reviews.llvm.org/D2668 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207521 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass -pie to linker when generating executable on AndroidAlexey Volkov2014-04-29
| | | | | | | | | This fixes problem with LTO on Android. Differential Revision: http://reviews.llvm.org/D2668 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207520 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver] Disable the slp vectorizer at -O0, -O1, and -Oz. This mirrors theChad Rosier2014-04-28
| | | | | | | | behavior of the loop vectorizer, which is enabled at -O2, -O3, -O4, -Ofast and -Os. PR19568 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207433 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: /fallback only applies to C or C++ filesHans Wennborg2014-04-25
| | | | | | We would previously hit an assert if using /fallback with an .ll file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207234 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: pass -debug flag to the linker when compiling with debug infoHans Wennborg2014-04-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207233 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM64] Plumb in big-endian - add arm64_be to the many switches where it was ↵James Molloy2014-04-17
| | | | | | missing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206462 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM64] Default to the 'generic' CPU, unless -arch is present for backwards ↵James Molloy2014-04-17
| | | | | | compatibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206461 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for optimization reports.Diego Novillo2014-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds a new flag -Rpass=. The flag indicates the name of the optimization pass that should emit remarks stating when it made a transformation to the code. This implements the design I proposed in: https://docs.google.com/document/d/1FYUatSjZZO-zmFBxjOiuOzAy9mhHA8hqdvklZv68WuQ/edit?usp=sharing Other changes: - Add DiagnosticIDs::isRemark(). Use it in printDiagnosticOptions to print "-R" instead of "-W" in the diagnostic message. - In BackendConsumer::OptimizationRemarkHandler, get a SourceLocation object out of the file name, line and column number. Use that location in the call to Diags.Report(). - When -Rpass is used without debug info a note is emitted alerting the user that they need to use -gline-tables-only -gcolumn-info to get this information. CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3226 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206401 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM64] Plumb in the -mfpu= flag.James Molloy2014-04-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206395 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver][ARM64] Make sure the default CPU is passed to the assembler.Quentin Colombet2014-04-15
| | | | | | | <rdar://problem/16573920> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206227 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -fmodules-strict-decluse to check that all headers are in modulesDaniel Jasper2014-04-11
| | | | | | Review: http://reviews.llvm.org/D3335 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206027 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: Disable TBAA by default for MSVC compatibilityReid Kleckner2014-04-09
| | | | | | | MSVC doesn't have an option to enable TBAA, so make -fstrict-aliasing and -fno-strict-aliasing available in clang-cl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205924 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo introduced in r205716David Majnemer2014-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205717 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: make /Gw map to -fdata-sectionsDavid Majnemer2014-04-07
| | | | | | Note that /Gy no longer implies -fdata-sections. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205716 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: add target definition for Windows on ARMSaleem Abdulrasool2014-04-04
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205650 91177308-0d34-0410-b5e6-96231b3b80d8
* Code cleanup (re-indent)Logan Chien2014-04-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205536 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for dynamic ASan runtime (on Linux) to Clang driver.Alexey Samsonov2014-04-01
| | | | | | | Based on http://llvm-reviews.chandlerc.com/D3043 by Yuri Gribov! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205310 91177308-0d34-0410-b5e6-96231b3b80d8
* Warn when requesting compress-debug-sections and zlib is not availableDavid Blaikie2014-03-31
| | | | | | | Another shot in the dark, since I do have zlib installed. Will be watching the bots for fallout. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205265 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM64: initial clang support commit.Tim Northover2014-03-29
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205100 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: implement addClangWarningOptionsTim Northover2014-03-29
| | | | | | | This function allows certain platforms to enable or disable diagnostics by default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205095 91177308-0d34-0410-b5e6-96231b3b80d8
* InstrProf: Emit runtime hook directly in IRGenDuncan P. N. Exon Smith2014-03-28
| | | | | | | | | | | | | | | | | | -u behaviour is apparently not portable between linkers (see cfe-commits discussions for r204379 and r205012). I've moved the logic to IRGen, where it should have been in the first place. I don't have a Linux system to test this on, so it's possible this logic *still* doesn't pull in the instrumented profiling runtime on Linux. I'm in the process of getting tests going on the compiler-rt side (llvm-commits "[PATCH] InstrProf: Add initial compiler-rt test"). Once we have tests for the full flow there, the runtime logic should get a whole lot less brittle. <rdar://problem/16458307> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205023 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Link in profile library on Linux using --whole-archive"Duncan P. N. Exon Smith2014-03-28
| | | | | | This reverts commit r205012. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205022 91177308-0d34-0410-b5e6-96231b3b80d8
* Link in profile library on Linux using --whole-archiveAlexey Samsonov2014-03-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205012 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ARM big endian Target (armeb, thumbeb)Christian Pirker2014-03-28
| | | | | | | | Reviewed at http://llvm-reviews.chandlerc.com/D3096 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205008 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new Windows environment for target detectionSaleem Abdulrasool2014-03-27
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204978 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for -Wa,-compress-debug-sections.David Blaikie2014-03-27
| | | | | | Also, while I'm here, support -nocompress-debug-sections too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204959 91177308-0d34-0410-b5e6-96231b3b80d8
* InstrProf: Pull in runtime on non-DarwinDuncan P. N. Exon Smith2014-03-27
| | | | | | | r204379 changed the way the profile runtime gets pulled in, but missed updating non-Darwin targets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204939 91177308-0d34-0410-b5e6-96231b3b80d8
* Use an option alias to implement -gmltDavid Blaikie2014-03-25
| | | | | | Review feedback from Reid Kleckner on r203603. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204755 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an logic error in the clang driver preventing crtfastmath.o from linking ↵Benjamin Kramer2014-03-25
| | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204742 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: make /Gy imply -fdata-sections in addition to -ffunction-sectionsHans Wennborg2014-03-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204736 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: Forward /Gy or /Gy- when falling back to cl.exeHans Wennborg2014-03-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204723 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the parameters passed to the assembler and linker forWill Schmidt2014-03-24
| | | | | | | | | | | | the PPC64LE target. Specifically: (assembler) adds/uses -mppc64 -mlittle-endian (linker) adds/uses elf64lppc Testcase included. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204626 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill -faddress-sanitizer, -fthread-sanitizer and -fcatch-undefined-behavior ↵Alexey Samsonov2014-03-20
| | | | | | | | | | flags. These flags are deprecated since at least Clang 3.3. Users should instead use -fsanitize= with appropriate values. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204330 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for sanitizers arguments on FreeBSDViktor Kutuzov2014-03-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204129 91177308-0d34-0410-b5e6-96231b3b80d8
* AArch64_be specific clang target settingsChristian Pirker2014-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203918 91177308-0d34-0410-b5e6-96231b3b80d8
* [Modules] Emit the module file paths as dependencies of the PCH when we are ↵Argyrios Kyrtzidis2014-03-14
| | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203885 91177308-0d34-0410-b5e6-96231b3b80d8
* Always use --eh-frame-hdr on NetBSD, even for -static.Joerg Sonnenberger2014-03-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203742 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an option -fmodules-validate-system-headersBen Langmuir2014-03-12
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203630 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Support -gmlt as an alias for -gline-tables-onlyDavid Blaikie2014-03-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203603 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Fixed linked libraries for libiomp5 on LinuxAlexey Bataev2014-03-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203212 91177308-0d34-0410-b5e6-96231b3b80d8
* Update for LLVM API changeSaleem Abdulrasool2014-03-06
| | | | | | | Use the new getObjectFormat/setObjectFormat instead of Environment now that the file format is a separate field. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203161 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Added option -fopenmp=libiomp5|libgompAlexey Bataev2014-03-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203081 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass llvm::Triple objects by const reference.Benjamin Kramer2014-03-04
| | | | | | Copying isn't cheap as it contains a std::string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202880 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce '-fmodules-user-build-path' which accepts the "canonical" path to ↵Argyrios Kyrtzidis2014-03-03
| | | | | | | | | | a user workspace build. This is used to avoid conflicts with user modules with the same name from different workspaces. rdar://16042513 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202683 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for OpenBSD SPARC assembler.Rafael Espindola2014-02-28
| | | | | | Patch by Brad Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202462 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass the sparc architecture variant to the assembler.Roman Divacky2014-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202179 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-cl: use -fno-rtti by defaultHans Wennborg2014-02-25
| | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202178 91177308-0d34-0410-b5e6-96231b3b80d8