summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
* Port r172856: 'Include ubsan runtime even when building a shared library. We ↵Alexey Samsonov2013-01-212-7/+4
| | | | | | 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-202-3/+24
| | | | | | 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
* [driver/Darwin] Adjust SDKROOT handling code to not generate "-isysroot /".Daniel Dunbar2013-01-151-3/+4
| | | | llvm-svn: 172548
* 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
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-122-3/+3
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* ToolChains: Minor touchup to use correct type, avoid truncation.Will Dietz2013-01-101-1/+1
| | | | | | | | | Truncation happens regularly when find_first_not_of returns npos, strings long enough to trigger bug here are implausible. No functionality change intended (ignoring absurd string lengths). llvm-svn: 172127
* [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
* Prepare for the upcoming version of Debian (jessie)Sylvestre Ledru2013-01-061-2/+5
| | | | llvm-svn: 171655
* 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
* Fix a typo that caused a few standard library implementations of sort toChandler Carruth2012-12-291-1/+1
| | | | | | get the wrong answer. Wasn't caught by my implementation sadly... llvm-svn: 171222
* Try to re-structure the GCCVersion comparison routine to make it easierChandler Carruth2012-12-291-14/+27
| | | | | | | | | | | | to read and tell that it is a SWO -- we now descend through the components and return a result at the first inequal component. Also comment it a bit better and make it a total ordering by sorting on the text of the suffix if necessary. None of this should really be a visible change. llvm-svn: 171219
* Support -fsanitize-memory-track-origins.Evgeniy Stepanov2012-12-242-1/+12
| | | | llvm-svn: 171020
* Add ARM cortex-r5 subtarget as available mcpuQuentin Colombet2012-12-212-1/+2
| | | | llvm-svn: 170909
* Update comments.Rafael Espindola2012-12-211-3/+2
| | | | llvm-svn: 170890
* Fix Generic_GCC::GCCVersion::operator<Rafael Espindola2012-12-201-1/+2
| | | | | | | | | Without this patch comparing two equal versions without patch numbers (4.7 for example) will result in A < B and B < A. Patch by Simon Atanasyan. llvm-svn: 170705
* Fix code that attempted to produce a diagnostic with one DiagnosticEngine, thenRichard Smith2012-12-201-3/+6
| | | | | | | | produce a note for that diagnostic either with a different DiagnosticEngine or after calling DiagnosticEngine::Reset(). That didn't make any sense, and did the wrong thing if the original diagnostic was suppressed. llvm-svn: 170636
* [driver] Have -isysroot warn on nonexistent paths.Chad Rosier2012-12-191-1/+6
| | | | | | rdar://12282267 llvm-svn: 170611
* 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-182-14/+21
| | | | | | | | 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
* Add support for current Ubuntu Quantal and the upcoming Raring.Rafael Espindola2012-12-131-1/+5
| | | | | | Patch by Martin Nowack. llvm-svn: 170147
* Initial support for FreeBSD on ARM.Rafael Espindola2012-12-133-0/+30
| | | | | | 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
* clang/lib/Driver/Driver.cpp: Split COMPILER_PATH according to ↵NAKAMURA Takumi2012-12-121-1/+2
| | | | | | | | llvm::sys::PathSeparator, that is ';' in Win32 hosts. Thanks to Bogon Kim! llvm-svn: 169964
* 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
* Driver/ToolChains.cpp: Add the name CentOS5 32bit gcc44 (aka ↵NAKAMURA Takumi2012-12-071-0/+1
| | | | | | | | i386-redhat-linux6E). Thanks to Bruce Stephens. llvm-svn: 169610
* Hexagon TC: add cc1 defaults for hexagon-gccMatthew Curtis2012-12-071-3/+2
| | | | | | compatibility llvm-svn: 169599
* Revert r169557. It seems that the test is too restrictedLogan Chien2012-12-061-1/+0
| | | | | | and will break the build on buildbot. llvm-svn: 169562
* Add i686-linux-android for gcc toolchain detection.Logan Chien2012-12-061-0/+1
| | | | | | | | | * Look for i686-linux-android under <sysroot>/lib/gcc. * This patch also slightly enhance the test suite for Android GCC toolchain detection. llvm-svn: 169557
* 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-063-47/+218
| | | | | | | | linker directly Rather than calling gcc. llvm-svn: 169512
* Hexagon TC: Move getHexagonTargetCPU from Tools.cpp toMatthew Curtis2012-12-063-52/+44
| | | | | | | | | | | | 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-064-26/+94
| | | | | | | | | | 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
* Driver.cpp: Restore clang/Config/config.h to be included at last not to ↵NAKAMURA Takumi2012-12-051-1/+4
| | | | | | | | prevent llvm-config.h. Or "llvm/Support/system_error.h" could not be compiled on mingw. llvm-svn: 169354
* 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
* ToolChains.cpp: Fixup r169260, clang/Config/config.h needs to be listed ↵NAKAMURA Takumi2012-12-041-4/+5
| | | | | | *last*, or llvm/Config/llvm-config.h could not be read in header files. llvm-svn: 169268
* Autotools has the same include guard for both Clang and LLVM's config.h.Chandler Carruth2012-12-041-1/+4
| | | | | | | | | | | | Shuffling order causes the wrong one to win. CMake didn't exhibit this problem because Clang's has *no* guards. I'll fix this properly tomorrow when Eric and I can check both build systems and get them to DTRT, but for now unbreak some bots by hoisting this header. llvm-svn: 169260
OpenPOWER on IntegriCloud