summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
* Use llvm::sys::fs::can_write.Rafael Espindola2013-06-181-1/+2
| | | | llvm-svn: 184234
* Add support for -fpcc-struct-return. Patch by Arthur O'Dwyer!John McCall2013-06-181-0/+12
| | | | llvm-svn: 184166
* Accept and ignore -fdebug-types-section for now. This will be usedEric Christopher2013-06-181-0/+3
| | | | | | later with dwarf4 type hashing. llvm-svn: 184152
* Include PathV1.h only where it is used.Rafael Espindola2013-06-175-0/+5
| | | | llvm-svn: 184090
* [Driver] Remove the using namespace directives from headersReid Kleckner2013-06-174-142/+188
| | | | | | | | | | | This adds a bunch of llvm::opt name specifiers to all the uses of types from that namespace. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D983 llvm-svn: 184079
* [Driver] Refactor clang driver to use LLVM's Option libraryReid Kleckner2013-06-1418-1173/+46
| | | | | | | | | | | | | | | | | | The big changes are: - Deleting Driver/(Arg|Opt)* - Rewriting includes to llvm/Option/ and re-sorting - 'using namespace llvm::opt' in clang::driver - Fixing the autoconf build by adding option everywhere As discussed in the review, this change includes using directives in header files. I'll make follow up changes to remove those in favor of name specifiers. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D975 llvm-svn: 183989
* Remove implicit fallthrough from AArch64 to Mips in lib selectionTim Northover2013-06-131-0/+1
| | | | | | | | | Nothing useful to AArch64 will (should!) be found in any Mips-specific directories. Patch by Luke Zarko. llvm-svn: 183956
* Use the sys::ExecuteAndWait that takes StringRefs.Rafael Espindola2013-06-131-4/+5
| | | | | | Also don't depend on Program.h including PathV1.h. llvm-svn: 183935
* Teach clang about the armv4/armv4t distinctionTim Northover2013-06-132-4/+10
| | | | | | | | | When choosing a default CPU, clang used to pick ARM7TDMI (which has Thumb) even when the more restrictive armv4 triple was specified. This should fix that. Patch by Jeroen Hofstee. llvm-svn: 183905
* Add Ubuntu Saucy to the list of known Ubuntu releasesSylvestre Ledru2013-06-131-1/+3
| | | | | | | Thanks to Dmitry Shachnev for the patch See bug #16317 llvm-svn: 183899
* Use the global functions instead of the Program methods.Rafael Espindola2013-06-122-8/+5
| | | | llvm-svn: 183861
* Try to fix the windows build.Rafael Espindola2013-06-111-0/+2
| | | | llvm-svn: 183783
* When we're compiling with -pg make sure to link with gcrt1.o on linux. BeEric Christopher2013-06-071-1/+3
| | | | | | | | | | sure to do this always, this matches the behavior for the gcc driver. Fixes PR16251. Based on a patch by Qiao Yang. llvm-svn: 183591
* If we're splitting the dwarf for fission and don't want to use theEric Christopher2013-06-051-0/+8
| | | | | | | | | | integrated assembler then go ahead and still split the dwarf anyhow. Add two tests, one to exercise existing behavior of not splitting when we're just emitting assembly files and the other to test that we split when we're not in integrated as mode. llvm-svn: 183355
* Default to PIE and using stack protection on OpenBSD.Rafael Espindola2013-06-052-0/+8
| | | | | | Patch by Matthew Dempsky. llvm-svn: 183295
* Driver: implement --dyld-prefix option.Peter Collingbourne2013-05-272-30/+36
| | | | | | | | | This option is used to select a dynamic loader prefix to be used at runtime. Currently this is implemented for the Linux toolchain. Differential Revision: http://llvm-reviews.chandlerc.com/D851 llvm-svn: 182744
* Add -fsanitize=leak to driver options.Sergey Matveev2013-05-272-7/+32
| | | | | | | | If -fsanitize=leak is specified, link the program with the LeakSanitizer runtime. Ignore this option when -fsanitize=address is specified, because AddressSanitizer has this functionality built in. llvm-svn: 182729
* Add -lrt to sanitizer link arguments.Evgeniy Stepanov2013-05-241-0/+1
| | | | | | | | Sanitizer runtime intercepts functions from librt. Not doing this will fail if the librt dependency is not present at program startup (ex. comes from a dlopen()ed library). llvm-svn: 182645
* Constify the 'dump' method so that it can be called by a const object.Bill Wendling2013-05-231-3/+2
| | | | llvm-svn: 182620
* Extend default blacklist logic to MSan and TSan.Evgeniy Stepanov2013-05-201-3/+9
| | | | llvm-svn: 182269
* Fix a logic bug in the handling of -fmath-errno in the driver. We wouldChandler Carruth2013-05-181-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | imply -fno-math-errno if the user passed -fno-fast-math OR -ffast-math, regardless of in which order and regardless of the tool chain default. I've fixed this to follow the logic: 1) If the last dominating flag is -fno-math-errno, -ffast-math, or -Ofast, then do not use math-errno. 2) If the last dominating flag is an explicit -fmath-errno, do use math-errno. 3) Otherwise, use the toolchain default. This, for example, allows the flag sequence '-ffast-math ... -fno-fast-math' with no mention of '-fmath-errno' or '-fno-math-errno' to preserve the toolchain default. Most notably, this should prevent users trying to disable fast-math optimizations on Darwin and BSD platforms from simultaneously enabling (pointless) -fmath-errno. I've enhanced the tests (after more reorganization) to cover this and other weird permutations of flags and targets. llvm-svn: 182203
* [Mips] Add -mldc1-sdc1 / -mno-ldc1-sdc1 command line options.Simon Atanasyan2013-05-111-0/+8
| | | | llvm-svn: 181660
* C++1y: Add a step limit to constexpr evaluation, to catch runaway loops.Richard Smith2013-05-081-0/+5
| | | | llvm-svn: 181388
* Add SystemZ supportUlrich Weigand2013-05-062-2/+27
| | | | | | | | | | | | | | This patch then adds all the usual platform-specific pieces for SystemZ: driver support, basic target info, register names and constraints, ABI info and vararg support. It also adds new tests to verify pre-defined macros and inline asm, and updates a test for the minimum alignment change. This version of the patch incorporates feedback from reviews by Eric Christopher and John McCall. Thanks to all reviewers! Patch by Richard Sandiford. llvm-svn: 181211
* R600: Update GPU variants in -mcpu optionTom Stellard2013-05-061-3/+3
| | | | | | | | We've added the RS880 variant in the LLVM backend to represent an R600 GPU with no vertex cache, so we need to update the GPU mappings for -mcpu. llvm-svn: 181202
* [driver] Allow multiple -arch options with -save-temps by adding the arch nameChad Rosier2013-04-301-21/+35
| | | | | | | to the temporary files. rdar://13218604 llvm-svn: 180813
* Always use / when computing mips specific paths.Rafael Espindola2013-04-301-20/+18
| | | | | | | We were getting paths with both / and \ in them. This should fix mips-cs-ld.c on the windows bots. llvm-svn: 180783
* [Mips] Pass -mips16, -mmicromips, -mdsp and -mdspr2 flags to theSimon Atanasyan2013-04-302-0/+14
| | | | | | assembler. llvm-svn: 180775
* Add support for -stdlib=libc++ in the NetBSD toolchain.Joerg Sonnenberger2013-04-302-0/+41
| | | | llvm-svn: 180766
* Exit early when $PWD isn't set. Remove unused unistd.h include.Benjamin Kramer2013-04-271-4/+5
| | | | llvm-svn: 180670
* Use LLVM's preferred current_path API instead of calling getcwd(3) directly.Benjamin Kramer2013-04-271-5/+3
| | | | | | | The existing code also failed to allocate a buffer for it so getcwd corrupted the stack. sys::fs::current_path takes care of the memory management. llvm-svn: 180669
* [driver] Revert r180652 and 180658 and temporarily #define MAXPATHLEN toChad Rosier2013-04-271-2/+5
| | | | | | | | | | | make the gdb tests and the Windows bots happy. The Path::GetCurrentDirectory API is not equivalent to ::getcwd(), so r180652 causes a gdb tests to fail. On the other hand, <sys/param.h> isn't defined on Windows systems, so that causes Windows builds to fail. rdar://12237559 llvm-svn: 180661
* Fix the dangling pointer.Chad Rosier2013-04-271-2/+2
| | | | llvm-svn: 180658
* [driver] Use the llvm equivalent of getcwd(). Hopefully, this makes the WindowsChad Rosier2013-04-271-3/+2
| | | | | | | bots recover. rdar://12237559 llvm-svn: 180652
* [driver] Implement the -fdebug-compilation-dir in a way that is compatible withChad Rosier2013-04-261-8/+21
| | | | | | | gcc. No test case included as I'm having problems finding a test case where the inode/dev don't match. llvm-svn: 180628
* [driver] Put -fvectorize under the -Ofast umbrella flag.Chad Rosier2013-04-241-1/+6
| | | | | | Part of rdar://13622687 llvm-svn: 180206
* [driver] Improve the implementation of the -Ofast option.Chad Rosier2013-04-241-13/+33
| | | | | | | | | | | | Specifically, allow the flags that fall under this umbrella (i.e., -O3, -ffast-math, and -fstrict-aliasing) to be overridden/disabled with the individual -O[0|1|2|s|z]/-fno- flags. This also fixes the handling of various floating point optimization flags that are modified by -ffast-math (and thus -Ofast as well). Part of rdar://13622687 llvm-svn: 180204
* [driver] Add a hasFlag API that accepts a positive alias.Chad Rosier2013-04-241-0/+7
| | | | | | Part of rdar://13622687 llvm-svn: 180203
* [Mips] Convert a GNU style Mips ABI name to the name accepted by LLVMSimon Atanasyan2013-04-211-1/+8
| | | | | | Mips backend. llvm-svn: 179981
* [Mips] Do not add unnecessary Mips toolchain path to the listSimon Atanasyan2013-04-211-5/+0
| | | | | | of system include directories with extern "C" semantics. llvm-svn: 179979
* Supports Sourcery CodeBench Mips toolchain directories tree.Simon Atanasyan2013-04-203-29/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sourcery CodeBench and modern FSF Mips toolchains require a bit more complicated algorithm to calculate headers, libraries and sysroot paths than implemented by Clang driver now. The main problem is that all these paths depend on a set of command line arguments additionally to a target triple value. For example, let $TC is a toolchain installation directory. If we compile big-endian 32-bit mips code, crtbegin.o is in the $TC/lib/gcc/mips-linux-gnu/4.7.2 folder and the toolchain's linker requires --sysroot=$TC/mips-linux-gnu/libc argument. If we compile little-endian 32-bit soft-float mips code, crtbegin.o is in the $TC/lib/gcc/mips-linux-gnu/4.7.2/soft-float/el folder and the toolchain's linker requires --sysroot=$TC/mips-linux-gnu/libc/soft-float/el argument. 1. Calculate MultiarchSuffix using all necessary command line options and use this MultiarchSuffix to detect crtbegin.o location in the GCCInstallationDetector::ScanLibDirForGCCTriple() routine. 2. If a user does not provide --sysroot argument to the driver explicitly, calculate new sysroot value based on command line options. Then use this calculated sysroot path: a. To populate a file search paths list in the Linux::Linux() constructor. b. To find Mips toolchain specific include headers directories in the Linux::AddClangSystemIncludeArgs() routine. c. To provide -–sysroot argument for a linker. Note: - The FSF's tree slightly differs (folder names) and is not supported yet. - New addExternCSystemIncludeIfExits() routine is a temporary solution. I plan to move path existence check to the addExternCSystemInclude() routine by a separate commit. The patch reviewed by Rafael Espindola. http://llvm-reviews.chandlerc.com/D644 llvm-svn: 179934
* Add support for gcc's spelling of -fcolor-diagnostics.Nico Weber2013-04-171-3/+36
| | | | | | See http://gcc.gnu.org/onlinedocs/gcc/Language-Independent-Options.html llvm-svn: 179728
* [Modules] Convert module specific -fno-modules-autolink into -fno-autolink.Daniel Dunbar2013-04-161-10/+15
| | | | | | | | | - There is no reason to have a modules specific flag for disabling autolinking. Instead, convert the existing flag into -fno-autolink (which should cover other autolinking code generation paths like #pragmas if and when we support them). llvm-svn: 179612
* Add a new flag -vectorize-slp-aggressive to enable Hals BB vectorizer.Nadav Rotem2013-04-151-0/+7
| | | | llvm-svn: 179507
* Rename the slp-vectorizer clang/llvm flags. No functionality change.Nadav Rotem2013-04-151-1/+1
| | | | llvm-svn: 179506
* [Mips] Support -mmicromips / -mno-micromips command line options.Simon Atanasyan2013-04-141-0/+3
| | | | llvm-svn: 179489
* [Mips] Fix indentation.Simon Atanasyan2013-04-141-1/+1
| | | | llvm-svn: 179488
* [Mips] Follow-up to r179481. Reduce code duplication. UseSimon Atanasyan2013-04-141-10/+3
| | | | | | | AddTargetFeature() routine to handle -msingle-float / -mdouble-float options. llvm-svn: 179487
* Add driver support for fedora 18 on ARM.Rafael Espindola2013-04-141-0/+1
| | | | llvm-svn: 179484
* [Mips] Remove "single" from the list of valid MIPS float ABI names. AddSimon Atanasyan2013-04-141-7/+11
| | | | | | | | | two new options –msingle-float and –mdouble-float. These options can be used simultaneously with float ABI selection options (-mfloat-abi, -mhard-float, -msoft-float). They mark whether a floating-point coprocessor supports double-precision operations. llvm-svn: 179481
OpenPOWER on IntegriCloud