summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor duplicate functionsBernard Ogden2013-12-121-122/+136
| | | | | | | | | | getARMCPU and getLLVMArchSuffixForARM existed as very similar functions in both ToolChain.cpp and Tools.cpp. Create a single implementation of each in Tools.cpp, eliminate the duplicate and share via Tools.h. Creates an 'arm' namespace in Tools.h to be used by any ARM-targetting tools. llvm-svn: 197153
* Fix -mthumb resetting of target cpuBernard Ogden2013-12-121-0/+14
| | | | | | | | Passing -mthumb with no explicit CPU on the command line resulted in target CPU changing from the architecture default to arm7tdmi. Now it does not. llvm-svn: 197151
* Darwin-embedded: find correct libclang_rt for embedded targets.Tim Northover2013-12-121-16/+18
| | | | | | | | | | | | This refactors some of the Darwin toolchain classification to give a more solid distinction between the three primary Darwin platforms (OS X, IOS and IOS simulator) so that a 4th choice can be added temporarily: embedded MachO targets. Longer term, this support will be factored out into a separate class and no longer classified as "darwin-eabi", but the refactoring should still be useful. llvm-svn: 197148
* [objcmt] Transfer '-objcmt-migrate-designated-init' from the driver to cc1 ↵Argyrios Kyrtzidis2013-12-111-0/+1
| | | | | | invocation. llvm-svn: 196993
* style fixDavid Fang2013-12-101-2/+2
| | | | llvm-svn: 196982
* darwin asm driver: suppress -Q for -no-integrated-as on darwin<11David Fang2013-12-101-2/+8
| | | | llvm-svn: 196981
* [Driver] Rename '-objcmt-white-list-dir-path' option to ↵Argyrios Kyrtzidis2013-12-101-1/+1
| | | | | | '-objcmt-whitelist-dir-path' and add an alias for now. llvm-svn: 196944
* Extend assembler handling for NetBSD/MIPS to pass down the correct ABI,Joerg Sonnenberger2013-12-081-5/+32
| | | | | | architecture and PIC flag. llvm-svn: 196720
* Pass correct flags to assembler and linker for OpenBSD on AMD64, PowerPCJoerg Sonnenberger2013-12-071-0/+39
| | | | | | and MIPS64. From Brad Smith. llvm-svn: 196630
* Added support for mcpu kraitAna Pazos2013-12-061-2/+11
| | | | | | | | | | | | - krait processor currently modeled with the same features as A9. - Krait processor additionally has VFP4 (fused multiply add/sub) and hardware division features enabled. - krait has currently the same Schedule model as A9 - krait cpu flag is not recognized by the GNU assembler yet, it is replaced with march=armv7-a to avoid a lower march from being used. llvm-svn: 196618
* For NetBSD, use arm1176jzf-s as default CPU for ARMv6.Joerg Sonnenberger2013-12-051-0/+5
| | | | llvm-svn: 196538
* Pass down the target CPU to the system assembler for NetBSD/ARM.Joerg Sonnenberger2013-12-051-0/+7
| | | | llvm-svn: 196532
* Fix assertion failure left over from changes to move away from "darwin" triples.Bob Wilson2013-12-051-1/+1
| | | | | | | | I happened to notice this while trying to write a test for an iOS simulator target. I suspect we just missed this when we added separate "macosx" and "ios" triples instead of the generic "darwin" OS. llvm-svn: 196527
* Fix a tranche of comment, test and doc typosAlp Toker2013-12-051-2/+2
| | | | llvm-svn: 196510
* Driver: Factor gold support out into a functionAlp Toker2013-12-021-39/+22
| | | | | | | | | AddGoldPlugin() is the same on gnutools and freebsd so avoid the copy-and-paste duplicate code. No change in functionality. llvm-svn: 196096
* [Mips] Pass -mmsa option to the assembler.Simon Atanasyan2013-11-261-0/+7
| | | | llvm-svn: 195756
* [Mips] Replace explicit argument handling by the single ↵Simon Atanasyan2013-11-261-7/+1
| | | | | | ArgList::AddLastArg() call. llvm-svn: 195755
* remove gcc::PrecompileRafael Espindola2013-11-241-5/+0
| | | | | | | | | | | | | | | 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). llvm-svn: 195586
* Don't use the gcc driver for assembling.Rafael Espindola2013-11-231-5/+0
| | | | | | | | | 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). llvm-svn: 195554
* Don't pass +soft-float, +soft-float-abi to the arm assembler.Rafael Espindola2013-11-231-14/+27
| | | | llvm-svn: 195551
* [ARM] add basic support for Cortex-A7 and VFPv4 to ClangArtyom Skrobov2013-11-211-3/+10
| | | | llvm-svn: 195359
* Set default Dwarf Version for -gline-tables-only on Darwin to 2.Manman Ren2013-11-201-4/+9
| | | | | | | | | We are still using Dwarf Version 2 for Darwin systems, make it consistent with -gline-tables-only. This should fix an internal buildbot. llvm-svn: 195267
* [Mips] Take in account the -mfp64 command line option when build pathsSimon Atanasyan2013-11-201-0/+7
| | | | | | to the crt*.o files, libraries and headers for the MIPS FSFS toolchain. llvm-svn: 195249
* [Mips] Do not adjust float-abi flags in case of MIPS16 mode. This codeSimon Atanasyan2013-11-191-10/+2
| | | | | | | | | | 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. llvm-svn: 195124
* Change the clang driver with the use of -no-integrated-as for darwin to useKevin Enderby2013-11-181-0/+5
| | | | | | | | | | | | | | | 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 llvm-svn: 195054
* Remove method that always returns true.Rafael Espindola2013-11-171-2/+1
| | | | llvm-svn: 194984
* Add -freroll-loops to enable loop rerollingHal Finkel2013-11-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 194967
* X86: Make specifying avx2 simpler on Darwin with '-arch'Jim Grosbach2013-11-161-5/+26
| | | | | | | | 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. llvm-svn: 194907
* Revert "Using an invalid -O falls back on -O3 instead of an error"Alp Toker2013-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 194845
* Using an invalid -O falls back on -O3 instead of an errorSylvestre Ledru2013-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 194817
* Fix typoDavid Peixotto2013-11-141-1/+1
| | | | llvm-svn: 194744
* Pass -Wa,-I and -Xassembler -I args to integrated assemblerDavid Peixotto2013-11-141-0/+18
| | | | | | | This patch adds -I to the arguments that are passed to the integrated assembler from -Wa, and -Xassembler args. llvm-svn: 194743
* [objcmt] Introduce "objcmt-white-list-dir-path=" option.Argyrios Kyrtzidis2013-11-141-0/+1
| | | | | | | 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. llvm-svn: 194710
* [objcmt] Transfer the objcmt flags from the driver to cc1 invocation andArgyrios Kyrtzidis2013-11-131-0/+14
| | | | | | instantiate ObjCMigrateASTConsumer with the specific options that were enabled. llvm-svn: 194628
* Adds ARM backend options: -mrestrict-it and -mno-restrict-itWeiming Zhao2013-11-131-0/+11
| | | | | | | To support the generation of IT block in Thumbv7 way or Thumbv8 way llvm-svn: 194593
* Add -fprofile-sample-use to Clang's driver.Diego Novillo2013-11-131-0/+7
| | | | | | | | 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. llvm-svn: 194567
* ObjectiveC. availability of Array/Dictionary subscriptingFariborz Jahanian2013-11-121-1/+4
| | | | | | | is further restricted in legacy runtime to deployment target of 10.7 and later. // rdar://15363492 llvm-svn: 194507
* ObjectiveC driver change. re-apply patch reverted inFariborz Jahanian2013-11-121-0/+7
| | | | | | r194450 with a modified test. // rdar://15363492 llvm-svn: 194489
* XCore target has -fno-use-cxa-atexit as default.Robert Lytton2013-11-121-1/+2
| | | | llvm-svn: 194460
* This reverts commit r194435 and r194434.Rafael Espindola2013-11-121-8/+1
| | | | | | Trying to get the bots green. llvm-svn: 194450
* ObjectiveC. By default allow array/dictionary subscripting inFariborz Jahanian2013-11-111-1/+8
| | | | | | ObjectiveC legacy runtime too. // rdar://15363492 llvm-svn: 194434
* Revert "Using an invalid -O falls back on -O3 instead of an error"Sylvestre Ledru2013-11-111-1/+1
| | | | | | | | This reverts commit r194403. Was breaking too many tests... llvm-svn: 194420
* Using an invalid -O falls back on -O3 instead of an errorSylvestre Ledru2013-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 194403
* Add gold plugin support to the FreeBSD link driver.Roman Divacky2013-11-101-0/+20
| | | | llvm-svn: 194350
* This reverts commit r194330, r194329 and r194328.Rafael Espindola2013-11-091-8/+8
| | | | | | The test was still failing on OS X and mingw. llvm-svn: 194334
* Add support for -fuse-ld=.David Chisnall2013-11-091-8/+8
| | | | llvm-svn: 194328
* Add a limit to the length of a sequence of 'operator->' functions we willRichard Smith2013-11-061-0/+5
| | | | | | | follow when building a class member access expression. Based on a patch by Rahul Jain! llvm-svn: 194161
* With this patch -Wwrite-strings is still implemented with the terribleRafael Espindola2013-11-051-7/+4
| | | | | | | | | | | 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. llvm-svn: 194097
* clang-format this if.Rafael Espindola2013-11-041-5/+5
| | | | llvm-svn: 193997
* SanitizerArgs: add ability to filter/diagnose unsupported sanitizers.Peter Collingbourne2013-11-011-5/+5
| | | | | | | | | | | | 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 llvm-svn: 193875
OpenPOWER on IntegriCloud