summaryrefslogtreecommitdiffstats
path: root/clang/tools/driver
Commit message (Collapse)AuthorAgeFilesLines
...
* [CMake] Fixing clang standalone buildChris Bieneman2016-11-191-1/+5
| | | | | | I broke this in r287406 and r287407. llvm-svn: 287463
* [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. llvm-svn: 287407
* [CMake] Fixing variable names that were mistypedChris Bieneman2016-11-181-1/+1
| | | | | | This is a silly bug that I'm sure I caused... llvm-svn: 287366
* Remove the unused POLLY_LINK_LIBS for linking polly into clangHongbin Zheng2016-11-031-5/+0
| | | | llvm-svn: 285971
* 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. llvm-svn: 284300
* [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. llvm-svn: 284271
* [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 llvm-svn: 283075
* [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 llvm-svn: 280702
* 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 llvm-svn: 279559
* [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). llvm-svn: 279348
* 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). llvm-svn: 279112
* 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. llvm-svn: 279097
* [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! llvm-svn: 279035
* Add missing close brace to fix Windows bots. Oops :(Richard Smith2016-08-171-1/+1
| | | | llvm-svn: 278891
* 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. llvm-svn: 278882
* [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. llvm-svn: 278850
* [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. llvm-svn: 278306
* [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 llvm-svn: 276655
* [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 llvm-svn: 275882
* 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 llvm-svn: 272820
* Update to match LLVM r272232.Richard Smith2016-06-093-14/+2
| | | | llvm-svn: 272233
* Handle -Wa,--mrelax-relocations=[no|yes].Rafael Espindola2016-05-291-0/+4
| | | | llvm-svn: 271162
* 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. llvm-svn: 270985
* Update for llvm change.Rafael Espindola2016-05-181-6/+5
| | | | llvm-svn: 269910
* 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 llvm-svn: 267474
* 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 llvm-svn: 266840
* 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 llvm-svn: 266814
* [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. llvm-svn: 265864
* [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. llvm-svn: 264757
* [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. llvm-svn: 261054
* 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. llvm-svn: 260815
* [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 llvm-svn: 260742
* [CMake] One more try to make CMake clean up after itselfChris Bieneman2016-02-051-1/+1
| | | | | | Seriously... CMake... You're on my list... llvm-svn: 259873
* 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 llvm-svn: 259872
* [CMake] Trying to fix a bot failure I introduced in r259862Chris Bieneman2016-02-051-1/+1
| | | | | | CMake caching behavior makes me sad. llvm-svn: 259864
* [CMake] Improve the clang order-file generation workflowChris Bieneman2016-02-051-1/+5
| | | | | | | | | | | | | | | | | | | | | | | 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/D16896 llvm-svn: 259862
* Update for LLVM change.Benjamin Kramer2016-01-271-1/+1
| | | | llvm-svn: 258918
* Remove autoconf supportChris Bieneman2016-01-261-75/+0
| | | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "This is the way [autoconf] ends Not with a bang but a whimper." -T.S. Eliot Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D16472 llvm-svn: 258862
* [CMake] Creating add_clang_tool macro to wrap add_clang_executable and ↵Chris Bieneman2016-01-191-13/+1
| | | | | | | | | | generate install actions and targets. This change brings forward the LLVM convention that "executables" are just runnable binaries, and "tools" are executables that are part of the project's install. Having this abstraction will allow us to simplify some of the tool CMakeLists files, and it will standardize some of the install behaviors. llvm-svn: 258209
* Avoid self-assignment of SmallString, trigger UB behavior down the road.Joerg Sonnenberger2016-01-151-3/+3
| | | | llvm-svn: 257947
* [clang-cl] Add support for /BreproDavid Majnemer2015-12-211-3/+8
| | | | | | | | | | | | The /Brepro flag controls whether or not the compiler should embed timestamps into the object file. Object files which do not embed timestamps are not suitable for incremental linking but are suitable for hermetic build systems and staged self-hosts of clang. A normal clang spelling of this flag has been added, -mincremental-linker-compatible. llvm-svn: 256204
* No longer creating the install-clang target for IDEs, as it was never meant ↵Aaron Ballman2015-11-101-5/+8
| | | | | | for those. llvm-svn: 252601
* [CMake]Getting rid of references to LLVM_SUBMIT_VERSION and ↵Chris Bieneman2015-10-131-4/+1
| | | | | | | | LLVM_SUBMIT_SUBVERSION in favor of LLVM_VERSION_MAJOR and LLVM_VERSION_MINOR. LLVM_SUBMIT_VERSION and LLVM_SUBMIT_SUBVERSION are commonly used variable names in the autoconf build system. They seem to have leeched into clang's CMake in a few places, and should just be replaced by the LLVM_VERSION_* variables where appropriate. llvm-svn: 250246
* Always pass a -dwarf-version argument to integrated as.Douglas Katzman2015-10-131-1/+1
| | | | | | | | This removes the default of 3 hidden in the assembler previously. Fixes breakage caused by r249655, reported by vsukharev. llvm-svn: 250173
* Stop messing with the 'g' group of options in CompilerInvocation.Douglas Katzman2015-10-081-8/+3
| | | | | | | | | | | | | | | | With this change, most 'g' options are rejected by CompilerInvocation. They remain only as Driver options. The new way to request debug info from cc1 is with "-debug-info-kind={line-tables-only|limited|standalone}" and "-dwarf-version={2|3|4}". In the absence of a command-line option to specify Dwarf version, the Toolchain decides it, rather than placing Toolchain-specific logic in CompilerInvocation. Also fix a bug in the Windows compatibility argument parsing in which the "rightmost argument wins" principle failed. Differential Revision: http://reviews.llvm.org/D13221 llvm-svn: 249655
* The Clang gcc-compatible driver (clang/tools/driver/driver.cpp) has someEric Christopher2015-09-251-93/+16
| | | | | | | | | | | | | | | | | | | | | | | logic to select an alternate target based on the executable it was called as. For instance, if you symlink i686-linux-android-gcc to clang and invoke it, the driver will act as though it were called with another argument ("-target i686-linux-android"). This leads to visible effects even in syntax-only compilations (like the ANDROID preprocessor symbol being defined). This behavior is not replicated for tool invocations--for instance, clang::createInvocationFromCommandLine will not choose an alternate target based on ArgList[0]. This means that configurations stored in compilation databases aren't accurately replayed. This patch separates the logic for selecting a mode flag and target from the executable name into a new member function on ToolChain. It should have no functional effects (but will allow other code to reuse the target/mode selection logic). Patch by Luke Zarko! llvm-svn: 248592
* Add msbuild-bin/cl to CLANG_LINKS_TO_CREATEHans Wennborg2015-09-211-0/+4
| | | | | | This got lost in r248043 which refactored the symlink creation. llvm-svn: 248221
* [CMake] Refactoring and cleaning up clang symlink generation.Chris Bieneman2015-09-182-72/+7
| | | | | | | | Generation of clang symlinks now uses add_clang_symlink macro which uses add_llvm_symlink. Also the list of symlinks to generate is configurable via CLANG_LINKS_TO_CREATE. This re-lands r248015, with fixes for clang symlinks to always be generated as part of the clang and install-clang targets. llvm-svn: 248043
* Revert "[CMake] Refactoring and cleaning up clang symlink generation."Chris Bieneman2015-09-182-7/+72
| | | | | | This reverts commit r248015, because it broke bots. I'll revise and recommit. llvm-svn: 248025
* [CMake] Refactoring and cleaning up clang symlink generation.Chris Bieneman2015-09-182-72/+7
| | | | | | Generation of clang symlinks now uses add_clang_symlink macro which uses add_llvm_symlink. Also the list of symlinks to generate is configurable via CLANG_LINKS_TO_CREATE. llvm-svn: 248015
OpenPOWER on IntegriCloud