summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [driver] Associate a JobAction with each result file. This enables the driverChad Rosier2013-01-241-3/+4
| | | | | | | to delete result files for only those commands that fail. Part of rdar://12984531 llvm-svn: 173361
* [ms-inline asm] Remove the -fenable-experimental-ms-inline-asm flag. MS-styleChad Rosier2013-01-221-4/+0
| | | | | | inline assembly can be enable with -fasm-blocks or -fms-extensions alone. llvm-svn: 173186
* Port r172856: 'Include ubsan runtime even when building a shared library. We ↵Alexey Samsonov2013-01-211-3/+3
| | | | | | don't require executable to be linked with UBSan.' to Mac llvm-svn: 173014
* Add top-level Clang flag -f(no-)sanitize-address-zero-base-shadow that makes ↵Alexey Samsonov2013-01-201-2/+17
| | | | | | AddressSanitizer use bottom of the address space for the shadow memory. On Linux it can be used with -fPIE/-pie to improve performance. llvm-svn: 172974
* Include ubsan runtime even when building a shared library. We don't require ↵Richard Smith2013-01-181-11/+9
| | | | | | the executable to be linked with UBSan. llvm-svn: 172856
* We want the dwarf AT_producer for assembly source files to match clang'sKevin Enderby2013-01-171-0/+6
| | | | | | | | | | | | | | | | AT_producer. Which includes clang's version information so we can tell which version of the compiler was used. This is second of the two steps to allow us to do this. The first was a change to llvm-mc with revision 172630 to provide a method to set the AT_producer string. This second step has the clang driver passing the value of getClangFullVersion() via the new flag -dwarf-debug-producer when invoking the integrated assembler on assembly source files. Then using the new setDwarfDebugProducer() method to set the AT_producer string. rdar://12888242 llvm-svn: 172758
* Do not pass -pie flag to linker if -shared specified. This matchesPeter Collingbourne2013-01-171-1/+1
| | | | | | | the gcc driver and makes it possible to add -pie to $CC or similar and have it apply in the right places. llvm-svn: 172753
* Add initial rough support for synthesizing linker options when passedChandler Carruth2013-01-171-1/+10
| | | | | | | | | | | -fopenmp in the link step on Linux. There is probably more tweaking that will need to take place to get good support for linking the relevant libraries on all Linux distributions and/or on other platforms, but this get's the ball moving and allows Clang to build programs which contain OpenMP pragmas that can be safely ignored by a compiler that doesn't implement them, and yet makes direct calls into the OpenMP runtime. llvm-svn: 172715
* Fix uninitialized bool flag access in SanitizerArgs parserAlexey Samsonov2013-01-161-2/+2
| | | | llvm-svn: 172605
* Add -fmodules-autolink/-fno-modules-autolink (defaults to on) so thatDouglas Gregor2013-01-161-1/+13
| | | | | | users can explicitly enable/disable modules autolinking. llvm-svn: 172592
* Refactor the x86 CPU name logic in the driver and pass -march and -mcpuChandler Carruth2013-01-131-61/+71
| | | | | | | | | | flag information down from the Clang driver into the Gold linker plugin for LTO. This allows specifying -march on the linker commandline and should hopefully have it pass all the way through to the LTO optimizer. Fixes PR14697. llvm-svn: 172354
* [Mips] Pass a combination of +soft-float and -mips16-hard-float flags toSimon Atanasyan2013-01-101-1/+8
| | | | | | the backend if hard float ABI is selected under -mips16 mode. llvm-svn: 172062
* Silence some warnings and allow passing down some feature flags to the linker.Rafael Espindola2012-12-311-0/+12
| | | | | | Patch by Brad Smith. llvm-svn: 171329
* [ubsan] Recover by default, use -fno-sanitize-recover to disable.Will Dietz2012-12-301-0/+5
| | | | llvm-svn: 171264
* Support -fsanitize-memory-track-origins.Evgeniy Stepanov2012-12-241-0/+7
| | | | llvm-svn: 171020
* Add ARM cortex-r5 subtarget as available mcpuQuentin Colombet2012-12-211-0/+1
| | | | llvm-svn: 170909
* Enable the loop vectorizer in clang via -fvectorizeNadav Rotem2012-12-181-2/+2
| | | | llvm-svn: 170472
* Add support for passing the main file name down to the assemblerEric Christopher2012-12-181-9/+14
| | | | | | | | for location information. Part of PR14624 llvm-svn: 170391
* Fix PR14625 by teaching the driver to detect PWD for assembly files.Chandler Carruth2012-12-171-10/+21
| | | | | | | | | | | | | | This also requires adding support to -cc1as for passing the detecting PWD down through LLVM's debug info (which in turn required the LLVM change in r170371). The test case is weak (we only test the driver behavior) because there is currently to infrastructure for running cc1as in the test suite. So those four lines are untested (much like all other lines in that file), but we have a test for the same pattern using llvm-mc in the LLVM repository. llvm-svn: 170373
* Initial support for FreeBSD on ARM.Rafael Espindola2012-12-131-0/+16
| | | | | | Patch by Andrew Turner. llvm-svn: 170096
* [driver] Don't warn about an unused -flto option.Chad Rosier2012-12-121-0/+4
| | | | | | rdar://12851905 llvm-svn: 170010
* Add -fslp-vectorize to enable bb-vectorizeHal Finkel2012-12-111-0/+7
| | | | | | | | | | | Add -fslp-vectorize (with -ftree-slp-vectorize as an alias for gcc compatibility) to provide a way to enable the basic-block vectorization pass. This uses the same acronym as gcc, superword-level parallelism (SLP), also common in the literature, to refer to basic-block vectorization. Nadav suggested this as a follow-up to the adding of -fvectorize. llvm-svn: 169909
* [driver] Add the -fvectorize flag to enable the loop vectorization passes.Chad Rosier2012-12-111-0/+7
| | | | | | rdar://12839978 llvm-svn: 169885
* Add support to Darwin for the -export_dynamic' flag to the linker.Bill Wendling2012-12-101-0/+3
| | | | llvm-svn: 169775
* Hexagon TC: forward appropriate args to assemblerMatthew Curtis2012-12-071-0/+4
| | | | llvm-svn: 169611
* Hexagon TC: add cc1 defaults for hexagon-gccMatthew Curtis2012-12-071-3/+2
| | | | | | compatibility llvm-svn: 169599
* Hexagon TC: Add/improve support for small dataMatthew Curtis2012-12-061-6/+40
| | | | | | threshold, pic, pie llvm-svn: 169517
* Hexagon TC: Reimplement Link::ConstructJob to callMatthew Curtis2012-12-061-46/+136
| | | | | | | | linker directly Rather than calling gcc. llvm-svn: 169512
* Hexagon TC: Move getHexagonTargetCPU from Tools.cpp toMatthew Curtis2012-12-061-52/+6
| | | | | | | | | | | | ToolChains.cpp This is in anticipation of forthcoming library path changes. Also ... - Fixes some inconsistencies in how the arch is passed to tools. - Add test cases for various forms of arch flags llvm-svn: 169505
* Hexagon TC: Update toolchain to add appropriate includeMatthew Curtis2012-12-061-1/+0
| | | | | | | | | | paths - Inherit from Linux rather than ToolChain - Override AddClangSystemIncludeArgs and AddClangCXXStdlibIncludeArgs to properly set include paths. llvm-svn: 169495
* [driver, ms-inline asm] MS-Style inline assembly is controlled by theChad Rosier2012-12-051-3/+4
| | | | | | | -fasm-blocks flag, not the -fms-extensions flag. rdar://12808010 llvm-svn: 169422
* Reuse an existing diagnostic for tsan/msan needing -pie error.Evgeniy Stepanov2012-12-051-4/+13
| | | | | | | Add a diagnosting for -fsanitize=memory conflicting with other sanitizers. Extend tests. llvm-svn: 169380
* Add -whole-archive around the ASan runtime archive in the link command.Chandler Carruth2012-12-041-2/+8
| | | | | | | | | | | This ensures that even though it comes first, we pick up its .o files. Note that if we can use this (or something similar / equivalent) on other platforms, we could potentially remove ReplaceOperatorsNewAndDelete from the ASan runtimes. We should probably do something similar for TSan and MSan as well. llvm-svn: 169328
* Currently, with -fsanitize=address, the driver appends libclang_rt.asan.a toMatt Beaumont-Gay2012-12-041-2/+6
| | | | | | | | | | | | | | | | the link command. This all works fine when the driver is also responsible for adding -lstdc++ to the link command. But, if -lstdc++ (or libstdc++.a, etc) is passed explicitly to the driver, the ASan runtime will appear in the link command after the standard library, leading to multiple-definition errors for the global 'operator new' and 'operator delete'. Fix this in a painfully simple way, by inserting libclang_rt.asan.a at the start of the link command instead of the end. If we need to do something more clever, we can walk the link command looking for something that resembles libstdc++ and insert libclang_rt.asan.a as late as possible, but the simple solution works for now. llvm-svn: 169310
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-10/+7
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Add Clang flags -fsanitize-blacklist and -fno-sanitize-blacklist. Make this ↵Alexey Samsonov2012-12-031-0/+13
| | | | | | flag usable for ASan. Blacklisting can be used to disable sanitizer checks for particular file/function/object. llvm-svn: 169144
* Add -fsanitize=memory.Evgeniy Stepanov2012-12-031-0/+26
| | | | llvm-svn: 169124
* [MIPS] Add -mxgot/-mno-xgot command line optionsSimon Atanasyan2012-12-011-0/+7
| | | | | | to enable/disable support of GOT larger than 64k. llvm-svn: 169098
* Remove restriction on combining ubsan with asan or tsan. This has worked for ↵Richard Smith2012-12-011-5/+4
| | | | | | a while. llvm-svn: 169066
* Add ARM cortex-a5 subtargetQuentin Colombet2012-11-291-2/+2
| | | | llvm-svn: 168958
* Revert commit revision r168953, to change the commit message, which was emptyQuentin Colombet2012-11-291-2/+2
| | | | llvm-svn: 168956
* (no commit message)Quentin Colombet2012-11-291-2/+2
| | | | llvm-svn: 168953
* This patch exposes to Clang users three more sanitizers are experimental ↵Alexey Samsonov2012-11-291-0/+7
| | | | | | | | | | | | | | features of ASan: 1) init-order sanitizer: initialization-order checker. Status: usable, but may produce false positives w/o proper blacklisting. 2) use-after-return sanitizer Status: implemented, but heavily understed. Should be optional, as it significanlty slows program down. 3) use-after-scope sanitizer Status: in progress. llvm-svn: 168950
* Make sure that we put the rest of the sanitizer libraries on the link lineEric Christopher2012-11-291-7/+5
| | | | | | before libstdc++ like we do with ubsan. llvm-svn: 168918
* [driver] -mkernel implies -mstrict-align; don't add the redundant option.Chad Rosier2012-11-291-1/+2
| | | | | | rdar://12771737 llvm-svn: 168841
* Refactor -fsanitize, -f*-sanitizer arguments parsing. Provide a more careful ↵Alexey Samsonov2012-11-281-44/+4
| | | | | | diagnostic for invalid sets of sanitizers llvm-svn: 168794
* PR14306: Move -fbounds-checking to -fsanitize=bounds.Joey Gouly2012-11-231-8/+4
| | | | llvm-svn: 168510
* Reapply a subset of r167567 to clean up Darwin-specific code for invoking gcc.Bob Wilson2012-11-231-612/+10
| | | | | | | | | | | Unlike my previous attempt at this, this patch leaves intact the check for whether clang can handle the input file type, and for non-Darwin toolchains it will invoke gcc for things it cannot handle. For Darwin toolchains, the behavior reported in pr14338 still occurs with this patch, but that is a definite improvement from what happens currently, where it just crashes with an assertion failure. llvm-svn: 168505
* Fix the '-fuse-init-array' option to actually be an option.Chandler Carruth2012-11-211-1/+1
| | | | | | | | | | | | | | | | | | Previously, this flag to CC1 was never exposed at the clang driver layer, and if you happened to enable it (by being on Android or GCC 4.7 platform), you couldn't *disable* it, because there was no 'no' variant. The whole thing was confusingly implemented. Now, the target-specific flag processing gets the driver arg list, and we use standard hasFlag with a default based on the GCC version and/or Android platform. The user can still pass the 'no-' variant to forcibly disable the flag, or pass the positive variant to clang itself to enable the flag. The test has also been substantially cleaned up and extended to cover these use cases. llvm-svn: 168473
* Add -ldl for non-static libgcc in Android.Logan Chien2012-11-191-3/+11
| | | | | | | | | | | According to Android ABI, we have to link with libdl.so, if we are linking with non-static libgcc. Besides, this also fixes MIPS link error of undefined references to `_Unwind_Find_FDE' and `dl_iterate_phdr'. llvm-svn: 168310
OpenPOWER on IntegriCloud