summaryrefslogtreecommitdiffstats
path: root/tools/driver
Commit message (Collapse)AuthorAgeFilesLines
* [Driver] Actually report errors during parsing instead of stopping when ↵Benjamin Kramer2017-06-301-1/+1
| | | | | | | | | | | | | | there's an error somewhere. This is a more principled version of r303756. That change was both very brittle about the state of the Diags object going into the driver and also broke tooling in funny ways. In particular it prevented tools from capturing diagnostics properly and made the compilation database logic fail to provide arguments to the tool, falling back to scanning directories for JSON files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306822 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Revert r305164/5/7."Saleem Abdulrasool2017-06-231-3/+16
| | | | | | | | | | | | | | | | | | | | | | | Restore the `-gz` option to the driver with some minor tweaks to handle the additional case for `-Wa,--compress-debug-sections`. This intends to make the compression of the debug information controllable from the driver. The following is the behaviour: -gz enable compression (ambiguous for format, will default to zlib-gnu) -gz=none disable compression -gz=zlib-gnu enable compression (deprecated GNU style zlib compression) -gz=zlib enable compression (zlib based compression) Although -Wa,-compress-debug-sections works, it should be discouraged when using the driver to invoke the assembler. However, we permit the assembler to accept the GNU as style argument --compress-debug-sections to maintain compatibility. Note, -gz/-gz= does *NOT* imply -g. That is, you need to additionally specific -g for debug information to be generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306115 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Do a PATH lookup if needed when using -no-canonical-prefixesPetr Hosek2017-06-161-2/+9
| | | | | | | | | | | | | When -no-canonical-prefixes option is used and argv0 contains only a program name, we need to do a PATH lookup to get an executable path, otherwise the return value won't be a valid path and any subsequent uses of it (e.g. when invoking -cc1) will fail with an error. This patch fixes PR9576. Differential Revision: https://reviews.llvm.org/D34290 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305600 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r305164/5/7.Daniel Jasper2017-06-121-16/+3
| | | | | | | | | | | | | | cc1as does not currently access the "--" version of this flag. At the very least this needs to be fixed and proper test cases need to be added. Simple reproducer: clang -Wa,--compress-debug-sections /tmp/test.cc Result: error: unknown argument: '--compress-debug-sections' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305182 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: add support for `-gz` and `-gz=`Saleem Abdulrasool2017-06-111-3/+16
| | | | | | | | | | | | | | | | | These options control the behaviour of the compression of debug info sections on ELF targets. Our behaviour slightly diverges from the behaviour of GCC. `-gz` maps to the `-compress-debug-sections` rather than `-compress-debug-sections=zlib` or `-compress-debug-sections=zlib-gnu`. This small divergence allows us to be compatible across versions of binutils (=zlib support was introduced in 2.26, while earlier versions only support =zlib-gnu). This also allows users to not have to worry about the version of the assembler they may be using if they are not using the IAS. Previously, users would have had to go through the internal option `-compress-debug-sectionss` and pass that through to the assembler, which is no longer needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305165 91177308-0d34-0410-b5e6-96231b3b80d8
* Represent debug information compression type fullySaleem Abdulrasool2017-06-091-4/+6
| | | | | | | | | | | This is tied with the LLVM side of the change to expose the debug information compression types to clang. We now track the compression type as an enumeration rather than a boolean. We still use the same value (GNU) that we did previously. This is in preparation to support passing down the compression type and switch it based on the command line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305039 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver must return non-zero code on errors in command lineSerge Pavlov2017-05-241-27/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is recommit of r302775, reverted in r302777 due to a fail in clang-tidy. Original mesage is below. Now if clang driver is given wrong arguments, in some cases it continues execution and returns zero code. This change fixes this behavior. The fix revealed some errors in clang test set. File test/Driver/gfortran.f90 added in r118203 checks forwarding gfortran flags to GCC. Now driver reports error on this file, because the option -working-directory implemented in clang differs from the option with the same name implemented in gfortran, in clang the option requires argument, in gfortran does not. In the file test/Driver/arm-darwin-builtin.c clang is called with options -fbuiltin-strcat and -fbuiltin-strcpy. These option were removed in r191435 and now clang reports error on this test. File arm-default-build-attributes.s uses option -verify, which is not supported by driver, it is cc1 option. Similarly, the file split-debug.h uses options -fmodules-embed-all-files and -fmodule-format=obj, which are not supported by driver. Other revealed errors are mainly mistypes. Differential Revision: https://reviews.llvm.org/D33013 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303756 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverted r302775Serge Pavlov2017-05-111-28/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302777 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver must return non-zero code on errors in command lineSerge Pavlov2017-05-111-27/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now if clang driver is given wrong arguments, in some cases it continues execution and returns zero code. This change fixes this behavior. The fix revealed some errors in clang test set. File test/Driver/gfortran.f90 added in r118203 checks forwarding gfortran flags to GCC. Now driver reports error on this file, because the option -working-directory implemented in clang differs from the option with the same name implemented in gfortran, in clang the option requires argument, in gfortran does not. In the file test/Driver/arm-darwin-builtin.c clang is called with options -fbuiltin-strcat and -fbuiltin-strcpy. These option were removed in r191435 and now clang reports error on this test. File arm-default-build-attributes.s uses option -verify, which is not supported by driver, it is cc1 option. Similarly, the file split-debug.h uses options -fmodules-embed-all-files and -fmodule-format=obj, which are not supported by driver. Other revealed errors are mainly mistypes. Differential Revision: https://reviews.llvm.org/D33013 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302775 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a leak in tools/driver/cc1as_main.cppKostya Serebryany2017-04-191-2/+2
| | | | | | | | | | | | | | Summary: For some reason, the asan bot has recently started reporting this leak even though it existed for ages. Reviewers: pcc Reviewed By: pcc Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D32243 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300755 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Add compiler option to generate a reproducerBruno Cardoso Lopes2017-04-121-2/+3
| | | | | | | | | | | | | | | | | | | | | One way to currently test the reproducers is to setup "FORCE_CLANG_DIAGNOSTICS_CRASH=1" before invoking clang. This simulates a crash and produces the same contents needed by the reproducers. The reproducers are specially useful when triaging Modules issues, not only on crashes, but also for reproducing misleading warnings, errors, etc. Add a '-gen-reproducer' driver option to clang (or any similar name) and give users a flag option. Note that clang already has a -fno-crash-diagnostics, which disables the crash reproducers. I've decided not to propose "-fcrash-diagnostics" since it doesn't convey the ideia of reproduction despite a crash. rdar://problem/24114619 Differential Revision: https://reviews.llvm.org/D27604 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300109 91177308-0d34-0410-b5e6-96231b3b80d8
* Create msbuild only when using MSVCReid Kleckner2017-03-161-1/+1
| | | | | | | | | | | | | | | | Patch by: Mateusz Mikula Reviewers: rnk Reviewed By: rnk Subscribers: asl, mgorny, cfe-commits Tags: #clang-c Differential Revision: https://reviews.llvm.org/D29772 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297998 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup: use range-based for rather than separate calls to begin and end.Richard Smith2017-02-181-6/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295524 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang] Enable using --section-ordering-file option of ld.goldAlexander Shaposhnikov2017-01-091-8/+12
| | | | | | | | | | This diffs enables using --section-ordering-file option of ld.gold via the variable CLANG_ORDER_FILE. Differential revision: https://reviews.llvm.org/D28461 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291449 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang] Fix D26214: Move error handling out of MC and to the callers.Mandeep Singh Grang2016-12-061-4/+7
| | | | | | | | | | | | | | Summary: Related llvm patch: https://reviews.llvm.org/D27359 Reviewers: echristo, t.p.northover, rengolin, grosbach, compnerd Subscribers: mehdi_amini, cfe-commits, llvm-commits Tags: #clang-c Differential Revision: https://reviews.llvm.org/D27360 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288762 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang] Implement support for -defsym assembler optionMandeep Singh Grang2016-12-011-0/+12
| | | | | | | | | | | | | | | | | Summary: Adds support for -Wa,-defsym,abc=1 option. Related llvm patch: https://reviews.llvm.org/D26214 Reviewers: rafael, t.p.northover, colinl, echristo, compnerd, rengolin Subscribers: mehdi_amini Tags: #clang-c Differential Revision: https://reviews.llvm.org/D26213 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288397 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Fixing clang standalone buildChris Bieneman2016-11-191-1/+5
| | | | | | I broke this in r287406 and r287407. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287463 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] clang depends on intrinsics_genChris Bieneman2016-11-181-0/+3
| | | | | | | | | | | | | | | cc1_main.cpp has the following include chain: llvm/LinkAllPasses.h llvm/Analysis/AliasSetTracker.h llvm/Analysis/AliasAnalysis.h llvm/IR/CallSite.h llvm/IR/Attributes.h llvm/IR/Attributes.gen This means clang needs to depend on intrinsics_gen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287407 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Fixing variable names that were mistypedChris Bieneman2016-11-181-1/+1
| | | | | | This is a silly bug that I'm sure I caused... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287366 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the unused POLLY_LINK_LIBS for linking polly into clangHongbin Zheng2016-11-031-5/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285971 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable a silly GCC diagnostic for combining a scanf length specifier with theRichard Smith2016-10-151-0/+10
| | | | | | | | '*' specifier. Apparently the GNU folks want to discourage self-documenting code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284300 91177308-0d34-0410-b5e6-96231b3b80d8
* [linux] When pre-reserving stack pages to work around broken address spaceRichard Smith2016-10-141-7/+35
| | | | | | | | | layout for PIE binaries, ask the OS how much stack space is already in use to avoid stack overflow if we are run with more than 512K of combined command line arguments + environment variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284271 91177308-0d34-0410-b5e6-96231b3b80d8
* [cmake] Install 'clang-cpp' symlinkMichal Gorny2016-10-021-1/+1
| | | | | | | | | | | | | | | Install the 'clang-cpp' symlink used to spawn the preprocessor. The code handling this suffix is already included in Driver. FreeBSD is already creating such a symlink in ports, and a similar one was requested by Gentoo/FreeBSD team. The goal is to handle software that takes a C preprocessor via a variable but does not handle passing options correctly (i.e. 'clang -E' does not work). Bug: https://bugs.gentoo.org/478810 Differential Revision: https://reviews.llvm.org/D25161 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283075 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-cl] Check that we are in clang cl mode before enabling support for ↵Pierre Gousseau2016-09-061-1/+1
| | | | | | | | | | the CL environment variable. Checking for the type of the command line tokenizer should not be the criteria to enable support for the CL environment variable, this change checks that we are in clang-cl mode instead. Differential Revision: https://reviews.llvm.org/D23503 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280702 91177308-0d34-0410-b5e6-96231b3b80d8
* driver: Support checking for rlimits via cmake (when bootstrapping)Chris Bieneman2016-08-231-5/+3
| | | | | | | | | | | | | | | | | Summary: Add a cmake check for sys/resource.h and replace the __has_include() check with its result, in order to make it possible to use rlimits when building with compilers not supporting __has_include() -- i.e. when bootstrapping. // Please also re-apply dfcd52eb1d8e5d322404b40414cb7331c7380a8c (llvm-config.h fix) Patch by: Michał Górny Reviewers: rsmith, beanz Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23744 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279559 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Remove unused #include of llvm/Support/config.hVedant Kumar2016-08-191-1/+0
| | | | | | | | This is a follow-up to r279112 (which removed the need for the header) and in the same spirit as r279035 (which attempted to un-break out-of-tree builds). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279348 91177308-0d34-0410-b5e6-96231b3b80d8
* Use __has_include rather than a configure-time macro to determine ifRichard Smith2016-08-181-2/+7
| | | | | | | | | | <sys/resource.h> is available. This should fix out-of-tree builds, at the cost of not providing the higher rlimits to stage 1 clang when built with an old host compiler not implementing this feature yet (bootstrap builds should be fine, though). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279112 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[Driver] Use llvm-config.h, not config.h to unbreak out-of-tree builds"Vedant Kumar2016-08-181-1/+1
| | | | | | | This reverts commit r279035. According to Richard Smith, llvm-config.h does not contain the right definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279097 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Use llvm-config.h, not config.h to unbreak out-of-tree buildsVedant Kumar2016-08-181-1/+1
| | | | | | | | | | llvm/Config/config.h has intentionally been excluded from llvm installations (see: llvm/CMakeLists.txt). Un-break out-of-tree builds post-r278882 by switching to llvm-config.h, which is exported. Suggested by Will Dietz! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279035 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing close brace to fix Windows bots. Oops :(Richard Smith2016-08-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278891 91177308-0d34-0410-b5e6-96231b3b80d8
* If possible, set the stack rlimit to at least 8MiB on cc1 startup, and workRichard Smith2016-08-171-0/+65
| | | | | | | | | | | | | | | | | | | | | | around a Linux kernel bug where the actual amount of available stack may be a *lot* lower than the rlimit. GCC also sets a higher stack rlimit on startup, but it goes all the way to 64MiB. We can increase this limit if it proves necessary. The kernel bug is as follows: Linux kernels prior to version 4.1 may choose to map the process's heap as little as 128MiB before the process's stack for a PIE binary, even in a 64-bit virtual address space. This means that allocating more than 128MiB before you reach the process's stack high water mark can lead to crashes, even if you don't recurse particularly deeply. We work around the kernel bug by touching a page deep within the stack (after ensuring that we know how big it is), to preallocate virtual address space for the stack so that the kernel doesn't allow the brk() area to wander into it, when building clang as a Linux PIE binary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278882 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Fixing typo in Info.plist generationChris Bieneman2016-08-161-1/+1
| | | | | | This is causing an error in the generation of the clang info plist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278850 91177308-0d34-0410-b5e6-96231b3b80d8
* [Order Files] Don't use empty order filesChris Bieneman2016-08-111-2/+9
| | | | | | | | LD64 does optimization on symbol layouts that gets disabled whenever an order file is passed (even if it is empty). This change prevents disabling that optimization, and still enables iterative generation and usage of order files. If the order file is empty it does not setup the order file flags, instead it sets the empty order file as a configuration dependency. When the order file changes it will then trigger a re-configuration that adds the linker flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278306 91177308-0d34-0410-b5e6-96231b3b80d8
* [cc1as] Add MCTargetOptions argument to createAsmBackendJoel Jones2016-07-251-2/+4
| | | | | | | | | | | | | | Allow an assembler backend to get ABI options. This is to match the changes to http://reviews.llvm.org/D16213. Tested with "make check-clang" Patch by: Joel Jones Differential Revision: https://reviews.llvm.org/D16538 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276655 91177308-0d34-0410-b5e6-96231b3b80d8
* [NFC] Header cleanupMehdi Amini2016-07-181-3/+1
| | | | | | | | | | Summary: Removed unused headers, replaced some headers with forward class declarations Patch by: Eugene <claprix@yandex.ru> Differential Revision: https://reviews.llvm.org/D20100 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275882 91177308-0d34-0410-b5e6-96231b3b80d8
* cc1_main: Do not print statistics twice in -disable_free mode.Matthias Braun2016-06-151-2/+0
| | | | | | | | | | | | | | | llvm statistics are currently printed when the destructor of a "static ManagedStatic<StatisticInfo> StatInfo" in llvm runs. This destructor currently runs in each case as part of llvm_shutdown() which is run even in disable_free mode as part of main(). I assume that this hasn't always been the case. Removing the special code here avoids the statistics getting printed twice. Differential Revision: http://reviews.llvm.org/D21338 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272820 91177308-0d34-0410-b5e6-96231b3b80d8
* Update to match LLVM r272232.Richard Smith2016-06-093-14/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272233 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle -Wa,--mrelax-relocations=[no|yes].Rafael Espindola2016-05-291-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271162 91177308-0d34-0410-b5e6-96231b3b80d8
* Update for following LLVM commit.George Rimar2016-05-271-1/+1
| | | | | | | It will be: Recommit 270977 - [llvm-mc] - Teach llvm-mc to generate zlib styled compression sections. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270985 91177308-0d34-0410-b5e6-96231b3b80d8
* Update for llvm change.Rafael Espindola2016-05-181-6/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269910 91177308-0d34-0410-b5e6-96231b3b80d8
* driver: Add a `--rsp-quoting` flag to pick response file quoting.Nico Weber2016-04-251-5/+12
| | | | | | | | | | | | | | | | | | | | | Currently, clang-cl always uses Windows style for unquoting, and clang always uses POSIX style for unquoting. With this flag, it's possible to change these defaults. In general, response file quoting should match the shell the response file is used in. On Windows, it's possible to run clang-cl in a bash shell, or clang in cmd.exe, so a flag for overriding the default behavior is natural there. On non-Windows, Windows quoting probably never makes sense (except maybe in Wine), but having clang-cl behave differently based on the host OS seems strange too. So require that people who want to use posix-style response files with clang-cl on non-Windows pass --rsp-quoting=posix. http://reviews.llvm.org/D19425 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267474 91177308-0d34-0410-b5e6-96231b3b80d8
* MarkEOLs should only be true for clang-cl.exe.Stephen Hines2016-04-201-5/+13
| | | | | | | | | | | | | | | | | | | | | Summary: https://llvm.org/bugs/show_bug.cgi?id=27396 This fixes an issue in response files where "\r\n" was being interpreted as two EOL markers (i.e. we consumed the '\r' as terminating the previous token, and then parsed the '\n' as a significant EOL). This breaks response files where joined arguments get split across multiple lines (like "-x\r\nc"). I also fixed an accidental issue in the response-file.c test, where the response file is appended to, instead of being overwritten. Reviewers: rnk Subscribers: danalbert, llvm-commits Differential Revision: http://reviews.llvm.org/D19289 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266840 91177308-0d34-0410-b5e6-96231b3b80d8
* cc1as: Don't crash when CIE is requested and no DWARF version is specified.Adrian Prantl2016-04-191-1/+1
| | | | | | | | | This patch changes the default DWARF version for cc1as from invalid 0 to 2, which should be the lowest common denominator on all platforms. rdar://problem/24735813 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266814 91177308-0d34-0410-b5e6-96231b3b80d8
* [Perf-Training] Reworked workflow improvements for order-file generationChris Bieneman2016-04-081-2/+19
| | | | | | | | | | | | | | | | | | | This is re-landing r260742. I've reworked the conditionals so that it only hits when targeting Apple platforms with ld64. Original Summary: With this change generating clang order files using dtrace uses the following workflow: cmake <whatever options you want> ninja generate-order-file ninja clang This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one. CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265864 91177308-0d34-0410-b5e6-96231b3b80d8
* [Order Files] Fix order file usageChris Bieneman2016-03-291-1/+1
| | | | | | The CMake EXISTS operator needs to have the variable expanded. Not expanding this was causing the if statement to always be false, which made it impossible to pass linker order files in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264757 91177308-0d34-0410-b5e6-96231b3b80d8
* [cmake] Revert r260742 (and r260744) to improve order file support.Chandler Carruth2016-02-171-18/+2
| | | | | | | | | | This appears to be passing '-Wl,-order_file' to Linux link commands, which then causes the linker to silently, behind the scenes, write the output to 'rder_file' instead of somewhere else. Will work with Chris to figure out the proper support for this, but so far there are numerous people who can't get Clang to update when they build because of this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261054 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce the number of implicit StringRef->std::string conversions by ↵Benjamin Kramer2016-02-131-1/+1
| | | | | | | | threading StringRef through more APIs. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260815 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Improve the clang order-file generation workflowChris Bieneman2016-02-121-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit re-lands r259862. The underlying cause of the build breakage was an incorrectly written capabilities test. In tools/Driver/CMakeLists.txt I was attempting to check if a linker flag worked, the test was passing it to the compiler, not the linker. CMake doesn't have a linker test, so we have a hand-rolled one. Original Patch Review: http://reviews.llvm.org/D16896 Original Summary: With this change generating clang order files using dtrace uses the following workflow: cmake <whatever options you want> ninja generate-order-file ninja clang This patch works by setting a default path to the order file (which can be overridden by the user). If the order file doesn't exist during configuration CMake will create an empty one. CMake then ties up the dependencies between the clang link job and the order file, and generate-order-file overwrites CLANG_ORDER_FILE with the new order file. Reviewers: bogner Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16999 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260742 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] One more try to make CMake clean up after itselfChris Bieneman2016-02-051-1/+1
| | | | | | Seriously... CMake... You're on my list... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259873 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[CMake] Improve the clang order-file generation workflow"Chris Bieneman2016-02-051-5/+1
| | | | | | | | | | | | | This reverts commit r259862, and attempts to fix builder CMakeCaches. Will try this again some other time... Conflicts: CMakeLists.txt tools/driver/CMakeLists.txt git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259872 91177308-0d34-0410-b5e6-96231b3b80d8