summaryrefslogtreecommitdiffstats
path: root/clang/tools/driver/cc1_main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* cc1_main: fix -Wsign-compare on FreeBSDFangrui Song2018-07-251-2/+4
| | | | | | | Its __rlim_t is intentionally signed (__int64_t) because of legacy code that uses -1 for RLIM_INFINITY. llvm-svn: 337892
* Factor out Clang's desired 8MB stack size constant from the variousRichard Smith2018-07-031-14/+8
| | | | | | places we hardcode it. llvm-svn: 336231
* IWYU for llvm-config.h in clang. See r331124 for details.Nico Weber2018-04-301-0/+1
| | | | llvm-svn: 331177
* 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
* 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
* 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-091-4/+0
| | | | llvm-svn: 272233
* Make the clang module container format selectable from the command line.Adrian Prantl2015-07-171-2/+6
| | | | | | | | | | | | | - introduces a new cc1 option -fmodule-format=[raw,obj] with 'raw' being the default - supports arbitrary module container formats that libclang is agnostic to - adds the format to the module hash to avoid collisions - splits the old PCHContainerOperations into PCHContainerWriter and a PCHContainerReader. Thanks to Richard Smith for reviewing this patch! llvm-svn: 242499
* Revert "Revert r241620 and follow-up commits" and move the initializationAdrian Prantl2015-07-081-3/+3
| | | | | | of the llvm targets from clang/CodeGen into ClangCheck.cpp and CIndex.cpp. llvm-svn: 241653
* Revert r241620 and follow-up commits while investigating linux buildbot ↵Adrian Prantl2015-07-071-3/+3
| | | | | | failures. llvm-svn: 241642
* Wrap clang modules and pch files in an object file container.Adrian Prantl2015-07-071-3/+3
| | | | | | | | | | | | | This patch adds ObjectFilePCHContainerOperations uses the LLVM backend to put the contents of a PCH into a __clangast section inside a COFF, ELF, or Mach-O object file container. This is done to facilitate module debugging by makeing it possible to store the debug info for the types defined by a module alongside the AST. rdar://problem/20091852 llvm-svn: 241620
* Introduce a PCHContainerOperations interface (NFC).Adrian Prantl2015-06-201-1/+3
| | | | | | | | | | | | | | | | A PCHContainerOperations abstract interface provides operations for creating and unwrapping containers for serialized ASTs (precompiled headers and clang modules). The default implementation is RawPCHContainerOperations, which uses a flat file for the output. The main application for this interface will be an ObjectFilePCHContainerOperations implementation that uses LLVM to wrap the module in an ELF/Mach-O/COFF container to store debug info alongside the AST. rdar://problem/20091852 llvm-svn: 240225
* One other BuryPointer of a unique_ptr cleanup.David Blaikie2014-08-291-1/+1
| | | | llvm-svn: 216743
* ArrayRef'izeSean Silva2014-08-151-5/+3
| | | | | | | I've shied away from ArrayRef'izing CompilerInvocation::CreateFromArgs in this commit because that is a less localized change. llvm-svn: 215773
* static link pollySebastian Pop2014-03-141-0/+11
| | | | llvm-svn: 203887
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-071-1/+1
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* Change OwningPtr::take() to OwningPtr::release().Ahmed Charles2014-03-071-1/+1
| | | | | | This is a precursor to moving to std::unique_ptr. llvm-svn: 203275
* Bury leaked pointers in a global array to silence a leak detector in ↵Kostya Serebryany2013-12-271-1/+2
| | | | | | | | | | | | | | | | --disable-free mode Summary: This is an alternative to http://llvm-reviews.chandlerc.com/D2475 suggested by Chandler. Reviewers: chandlerc, rnk, dblaikie CC: cfe-commits, earthdok Differential Revision: http://llvm-reviews.chandlerc.com/D2478 llvm-svn: 198073
* [Driver] Refactor clang driver to use LLVM's Option libraryReid Kleckner2013-06-141-3/+4
| | | | | | | | | | | | | | | | | | The big changes are: - Deleting Driver/(Arg|Opt)* - Rewriting includes to llvm/Option/ and re-sorting - 'using namespace llvm::opt' in clang::driver - Fixing the autoconf build by adding option everywhere As discussed in the review, this change includes using directives in header files. I'll make follow up changes to remove those in favor of name specifiers. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D975 llvm-svn: 183989
* Update the error handing static functions for r178161.Chad Rosier2013-03-271-4/+5
| | | | | | Part of rdar://13296693 llvm-svn: 178162
* Nuke SetUpBuildDumpLog.Sean Silva2013-01-201-1/+1
| | | | | | | Also, it was the only reason that `argc` and `argv` were being passed into createDiagnostics, so remove those parameters and clean up callers. llvm-svn: 172945
* Sort #include lines for tools/...Chandler Carruth2012-12-041-2/+2
| | | | | | Completely automated with sort_includes.py llvm-svn: 169240
* If we encounter a fatal error, exit with status 70. For BSD systems this isChad Rosier2012-11-121-2/+4
| | | | | | | | defined as an internal software error. This notifies the driver to report diagnostics information. rdar://11951540 llvm-svn: 167754
* If we encounter a fatal error, call the interrupt handler to ensure anyChad Rosier2012-11-121-0/+5
| | | | | | | temporary files are removed. rdar://12282296 llvm-svn: 167741
* Remove CompilerInvocation::toArgs and clang -cc1test mode. These were untestedRichard Smith2012-11-011-77/+0
| | | | | | | and apparently unused (and since they are untested, they're presumably also broken). llvm-svn: 167210
* Make DiagnosticOptions intrusively reference-counted, and make sureDouglas Gregor2012-10-231-3/+6
| | | | | | | the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
* Unify Options.td and CC1Options.td, in a first step towards unifying the ↵James Molloy2012-05-011-2/+2
| | | | | | | | serialization logic in Frontend and Driver. Reviewed by Eric, Doug and Chandler, and here: http://llvm.org/reviews/r/7/ llvm-svn: 155916
* Basic: import IntrusiveRefCntPtr<> into clang namespaceDylan Noblesmith2012-02-201-1/+1
| | | | | | | The class name is long enough without the llvm:: added. Also bring in RefCountedBase and RefCountedBaseVPTR. llvm-svn: 150958
* drop more llvm:: prefixes on OwningPtr<>Dylan Noblesmith2012-02-131-1/+1
| | | | | | More cleanup after r149798. llvm-svn: 150379
* [driver] Do emit the diagnostics when CompilerInvocation::CreateFromArgs() ↵Argyrios Kyrtzidis2012-01-251-2/+2
| | | | | | fails. llvm-svn: 148970
* Let CompilerInvocation initialization indicate failureDylan Noblesmith2011-12-231-6/+11
| | | | | | | | | This fixes the FIXMEs in ParseAnalyzeArgs. (Also a precursor to moving the analyzer into an AST plugin.) For consistency, do the same with AssemblerInvocation. llvm-svn: 147218
* Add LinkAllPasses to clangTobias Grosser2011-11-011-0/+1
| | | | | | | | This patch ensures that no passes are deleted from clang, such that the loading of plugins does not fail because of passes being unavailable. This increases the size of the clang binary from 43029853 to 43915291 bytes (around 2%). llvm-svn: 143414
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-251-4/+4
| | | | llvm-svn: 140478
* Match LLVM change: TargetRegistry and TargetSelect have been moved to Support.Evan Cheng2011-08-241-1/+1
| | | | llvm-svn: 138451
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-2/+2
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Match LLVM API change.Evan Cheng2011-07-221-3/+1
| | | | llvm-svn: 135813
* Match createTargetMachine API change.Evan Cheng2011-07-191-0/+1
| | | | llvm-svn: 135469
* Match llvm API change.Evan Cheng2011-07-141-0/+1
| | | | llvm-svn: 135220
* cc1 must initialize MC subtarget infos for inline asm parsing. Re-enable ↵Evan Cheng2011-07-091-0/+1
| | | | | | asm-errors.c llvm-svn: 134811
* Fix an obvious typo.Benjamin Kramer2011-02-271-1/+1
| | | | | | GCC -Waddress warns about this but clang doesn't (PR9043). llvm-svn: 126577
* cc1: Fix stats printing by default when using -mllvm -stats.Daniel Dunbar2011-02-261-1/+1
| | | | llvm-svn: 126559
* Re-instate r125819 and r125820 with no functionality changePeter Collingbourne2011-02-191-3/+0
| | | | llvm-svn: 126060
* Revert 125820 and 125819 to fix PR9266.Rafael Espindola2011-02-191-0/+3
| | | | llvm-svn: 126050
OpenPOWER on IntegriCloud