summaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
Commit message (Collapse)AuthorAge
...
* [Mips] Replace explicit argument handling by the single ↵Simon Atanasyan2013-11-26
| | | | | | ArgList::AddLastArg() call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195755 91177308-0d34-0410-b5e6-96231b3b80d8
* remove gcc::PrecompileRafael Espindola2013-11-24
| | | | | | | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195586 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use the gcc driver for assembling.Rafael Espindola2013-11-23
| | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195554 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't pass +soft-float, +soft-float-abi to the arm assembler.Rafael Espindola2013-11-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195551 91177308-0d34-0410-b5e6-96231b3b80d8
* [ARM] add basic support for Cortex-A7 and VFPv4 to ClangArtyom Skrobov2013-11-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195359 91177308-0d34-0410-b5e6-96231b3b80d8
* Set default Dwarf Version for -gline-tables-only on Darwin to 2.Manman Ren2013-11-20
| | | | | | | | | | We are still using Dwarf Version 2 for Darwin systems, make it consistent with -gline-tables-only. This should fix an internal buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195267 91177308-0d34-0410-b5e6-96231b3b80d8
* [Mips] Take in account the -mfp64 command line option when build pathsSimon Atanasyan2013-11-20
| | | | | | to the crt*.o files, libraries and headers for the MIPS FSFS toolchain. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195249 91177308-0d34-0410-b5e6-96231b3b80d8
* [Mips] Do not adjust float-abi flags in case of MIPS16 mode. This codeSimon Atanasyan2013-11-19
| | | | | | | | | | should be isolated in the backend (r195123). From the frontend point of view in case of "-mhard-float -mips16" combination of flags the float ABI mode should remain unchanged. The patch reviewed by Reed Kotler. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195124 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the clang driver with the use of -no-integrated-as for darwin to useKevin Enderby2013-11-18
| | | | | | | | | | | | | | | | the -Q flag to the as(1) assembler driver. We will soon be switching the darwin as(1) assembler driver to call clang(1) and use the intergated assembler by default. To do this and still support clang(1)'s -no-integrated-as flag, when clang(1) runs the as(1) assembler driver and -no-integrated-as is used it needs to pass the -Q flag to as(1) so it uses its GNU based assembler, and not turn around and call clag(1)'s integrated assembler. rdar://15495921 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195054 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove method that always returns true.Rafael Espindola2013-11-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194984 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -freroll-loops to enable loop rerollingHal Finkel2013-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds -freroll-loops (and -fno-reroll-loops in the usual way) to enable loop rerolling as part of the optimization pass manager. This transformation can enable vectorization, reduce code size (or both). Briefly, loop rerolling can transform a loop like this: for (int i = 0; i < 3200; i += 5) { a[i] += alpha * b[i]; a[i + 1] += alpha * b[i + 1]; a[i + 2] += alpha * b[i + 2]; a[i + 3] += alpha * b[i + 3]; a[i + 4] += alpha * b[i + 4]; } into this: for (int i = 0; i < 3200; ++i) { a[i] += alpha * b[i]; } Loop rerolling is currently disabled by default at all optimization levels. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194967 91177308-0d34-0410-b5e6-96231b3b80d8
* X86: Make specifying avx2 simpler on Darwin with '-arch'Jim Grosbach2013-11-16
| | | | | | | | Teach the '-arch' command line option to enable the compiler-friendly features of core-avx2 CPUs on Darwin. Pass the information along in the target triple like Darwin+ARM does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194907 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Using an invalid -O falls back on -O3 instead of an error"Alp Toker2013-11-15
| | | | | | | | | | | | | | | | | | | | | | | | Trying to fix test failures since earlier today. One of the tests added in this commit is outputting test/Driver/clang_f_opts.s which the builders that build in-tree (eg. clang-native-arm-cortex-a9) are trying to run as a test case, causing failures. clang_f_opts.c: If -### doesn't emit the warning then this test probably shouldn't be in here in the first place. Frontend maybe? invalid-o-level.c: Running %clang_cc1 in the Driver tests doesn't make sense because -cc1 bypasses the driver. (I'm not reverting the commit that introduced this but please fix instead of keeping it this way.) Reverting to fix the build failures and also so that the tests can be thought out more thoroughly. This reverts commit r194817. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194845 91177308-0d34-0410-b5e6-96231b3b80d8
* Using an invalid -O falls back on -O3 instead of an errorSylvestre Ledru2013-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently with clang: $ clang -O20 foo.c error: invalid value '20' in '-O20' With the patch: $ clang -O20 foo.c warning: optimization level '-O20' is unsupported; using '-O3' instead. 1 warning generated. This matches the gcc behavior (with a warning added) Pass all tests: Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. Testing Time: 94.14s Expected Passes : 6721 Expected Failures : 20 Unsupported Tests : 17 (which was not the case of http://llvm-reviews.chandlerc.com/D2125) Reviewers: chandlerc, rafael, rengolin, hfinkel Reviewed By: rengolin CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2152 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194817 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typoDavid Peixotto2013-11-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194744 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass -Wa,-I and -Xassembler -I args to integrated assemblerDavid Peixotto2013-11-14
| | | | | | | | This patch adds -I to the arguments that are passed to the integrated assembler from -Wa, and -Xassembler args. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194743 91177308-0d34-0410-b5e6-96231b3b80d8
* [objcmt] Introduce "objcmt-white-list-dir-path=" option.Argyrios Kyrtzidis2013-11-14
| | | | | | | This options accepts a path to a directory, collects the filenames of the files it contains, and the migrator will only modify files with the same filename. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194710 91177308-0d34-0410-b5e6-96231b3b80d8
* [objcmt] Transfer the objcmt flags from the driver to cc1 invocation andArgyrios Kyrtzidis2013-11-13
| | | | | | instantiate ObjCMigrateASTConsumer with the specific options that were enabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194628 91177308-0d34-0410-b5e6-96231b3b80d8
* Adds ARM backend options: -mrestrict-it and -mno-restrict-itWeiming Zhao2013-11-13
| | | | | | | | To support the generation of IT block in Thumbv7 way or Thumbv8 way git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194593 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -fprofile-sample-use to Clang's driver.Diego Novillo2013-11-13
| | | | | | | | This adds a new option -fprofile-sample-use=filename to Clang. It tells the driver to schedule the SampleProfileLoader pass and passes on the name of the profile file to use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194567 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjectiveC. availability of Array/Dictionary subscriptingFariborz Jahanian2013-11-12
| | | | | | | | is further restricted in legacy runtime to deployment target of 10.7 and later. // rdar://15363492 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194507 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjectiveC driver change. re-apply patch reverted inFariborz Jahanian2013-11-12
| | | | | | | r194450 with a modified test. // rdar://15363492 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194489 91177308-0d34-0410-b5e6-96231b3b80d8
* XCore target has -fno-use-cxa-atexit as default.Robert Lytton2013-11-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194460 91177308-0d34-0410-b5e6-96231b3b80d8
* This reverts commit r194435 and r194434.Rafael Espindola2013-11-12
| | | | | | Trying to get the bots green. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194450 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjectiveC. By default allow array/dictionary subscripting inFariborz Jahanian2013-11-11
| | | | | | | ObjectiveC legacy runtime too. // rdar://15363492 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194434 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Using an invalid -O falls back on -O3 instead of an error"Sylvestre Ledru2013-11-11
| | | | | | | | | | This reverts commit r194403. Was breaking too many tests... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194420 91177308-0d34-0410-b5e6-96231b3b80d8
* Using an invalid -O falls back on -O3 instead of an errorSylvestre Ledru2013-11-11
| | | | | | | | | | | | | | | | | | | | | Summary: Currently with clang: $ clang -O20 foo.c error: invalid value '20' in '-O20' With the patch: $ clang -O20 foo.c warning: invalid value '20' in '-O20'. Fall back on value '3' Reviewers: rengolin, hfinkel Reviewed By: rengolin CC: cfe-commits, hfinkel, rengolin Differential Revision: http://llvm-reviews.chandlerc.com/D2125 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194403 91177308-0d34-0410-b5e6-96231b3b80d8
* Add gold plugin support to the FreeBSD link driver.Roman Divacky2013-11-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194350 91177308-0d34-0410-b5e6-96231b3b80d8
* This reverts commit r194330, r194329 and r194328.Rafael Espindola2013-11-09
| | | | | | The test was still failing on OS X and mingw. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194334 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for -fuse-ld=.David Chisnall2013-11-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194328 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a limit to the length of a sequence of 'operator->' functions we willRichard Smith2013-11-06
| | | | | | | | follow when building a class member access expression. Based on a patch by Rahul Jain! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194161 91177308-0d34-0410-b5e6-96231b3b80d8
* With this patch -Wwrite-strings is still implemented with the terribleRafael Espindola2013-11-05
| | | | | | | | | | | hack of passing -fconst-strings to -cc1, but at least the driver uses the regular warning checking code path. Since we don't support a warning that is DefaultIgnore in one language but not in another, this patch creates a dummy C only warning in the same group as the existing one to get the desired effect. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194097 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format this if.Rafael Espindola2013-11-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193997 91177308-0d34-0410-b5e6-96231b3b80d8
* SanitizerArgs: add ability to filter/diagnose unsupported sanitizers.Peter Collingbourne2013-11-01
| | | | | | | | | | | | The thread, memory, dataflow and function sanitizers are now diagnosed if enabled explicitly on an unsupported platform. Unsupported sanitizers which are enabled implicitly (as part of a larger group) are silently disabled. As a side effect, this makes SanitizerArgs parsing toolchain-dependent (and thus essentially reverts r188058), and moves SanitizerArgs ownership to ToolChain. Differential Revision: http://llvm-reviews.chandlerc.com/D1990 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193875 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Add some CPU targets for "generic", A-53 and A-57.Amara Emerson2013-10-31
| | | | | | | | | | | Enables the clang driver to begin targeting specific CPUs. Introduced a "generic" CPU which will ensure that the optional FP feature is enabled by default when it gets to LLVM, without needing any extra arguments. Cortex-A53 and A-57 are also introduced with tests, although backend handling of them does not yet exist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193740 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -lm to sanitizer link arguments.Evgeniy Stepanov2013-10-29
| | | | | | | We'll need to intercept a few function in libm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193644 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: Add -m[no-]crc to dis/enable CRC subtargetfeature from clangBernard Ogden2013-10-29
| | | | | | | | Allow users to disable or enable CRC subtarget feature. Differential Revision: http://llvm-reviews.chandlerc.com/D2037 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193600 91177308-0d34-0410-b5e6-96231b3b80d8
* Add driver support for FP, SIMD and crypto defaults.Bernard Ogden2013-10-24
| | | | | | | | | | Although we wire up a bit for v8fp for macro setting purposes, we don't set a macro yet. Need to ask list about that. Change-Id: Ic9819593ce00882fbec72757ffccc6f0b18160a0 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193367 91177308-0d34-0410-b5e6-96231b3b80d8
* Set appropriate FPU default for Linux on v8Bernard Ogden2013-10-24
| | | | | | Change-Id: If9b649c92e7196e3e791948545dc80901a0761eb git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193365 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach clang driver about Cortex-A53 and Cortex-A57.Bernard Ogden2013-10-24
| | | | | | | | | | | | Adds some Cortex-A53 strings where they were missing before. Cortex-A57 is entirely new to clang. Doesn't touch code only used by Darwin, in consequence of which one of the A53 lines has been removed. Change-Id: I5edb58f6eae93947334787e26a8772c736de6483 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193364 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Various string-related cleanups.Benjamin Kramer2013-10-21
| | | | | | Also fixes some funky formatting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193079 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the __ARM_ARCH_EXT_IDIV__ predefine. It is set to 1 if we have hardware ↵Silviu Baranga2013-10-21
| | | | | | divide in the mode that we are compiling in (depending on the target features), not defined if we don't. Should be compatible with the GCC conterpart. Also adding a -hwdiv option to overide the default behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193074 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose -fmodule-name and -fmodule-map-file as driver options.Daniel Jasper2013-10-21
| | | | | | Review: http://llvm-reviews.chandlerc.com/D1974 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193069 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r193022 and r193048. They broke the ubsan test suite.Peter Collingbourne2013-10-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193057 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: libubsan_cxx depends on libubsan. Preserve the topological ordering, ↵Benjamin Kramer2013-10-20
| | | | | | some linkers depend on it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193048 91177308-0d34-0410-b5e6-96231b3b80d8
* When building ubsan, link in ubsan parts first and sanitizer-common second, toNick Lewycky2013-10-19
| | | | | | | | pick up the common bits ubsan actually needs. Also remove whole-archive when we aren't trying to re-export the symbols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193022 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Added -mfp64 and -mfp32 options.Daniel Sanders2013-10-17
| | | | | | | | | | | | | | | | | | These options specify 64-bit FP registers and 32-bit FP registers respectively. When using -mfp32, the FPU has 16x double-precision registers overlapping with the 32x single-precision registers (each double-precision register overlaps two single-precision registers). When using -mfp64, the FPU has 32x double-precision registers overlapping with the 32x single-precision registers (each double-precision register overlaps with one single-precision register and has an additional 32-bits). MSA requires -mfp64. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192899 91177308-0d34-0410-b5e6-96231b3b80d8
* Rework ppc options handling into a features group.Eric Christopher2013-10-16
| | | | | | This should have no functional behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192838 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Factor duplicated code.Benjamin Kramer2013-10-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192817 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Enable frame-pointer elimination for -O1 and above.Akira Hatanaka2013-10-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192815 91177308-0d34-0410-b5e6-96231b3b80d8