llvm-project/clang/tools
Alexandre Ganea b4a99a061f [Clang][Driver] Re-use the calling process instead of creating a new process for the cc1 invocation
With this patch, the clang tool will now call the -cc1 invocation directly inside the same process. Previously, the -cc1 invocation was creating, and waiting for, a new process.
This patch therefore reduces the number of created processes during a build, thus it reduces build times on platforms where process creation can be costly (Windows) and/or impacted by a antivirus.
It also makes debugging a bit easier, as there's no need to attach to the secondary -cc1 process anymore, breakpoints will be hit inside the same process.

Crashes or signaling inside the -cc1 invocation will have the same side-effect as before, and will be reported through the same means.

This behavior can be controlled at compile-time through the CLANG_SPAWN_CC1 cmake flag, which defaults to OFF. Setting it to ON will revert to the previous behavior, where any -cc1 invocation will create/fork a secondary process.
At run-time, it is also possible to tweak the CLANG_SPAWN_CC1 environment variable. Setting it and will override the compile-time setting. A value of 0 calls -cc1 inside the calling process; a value of 1 will create a secondary process, as before.

Differential Revision: https://reviews.llvm.org/D69825
2020-01-13 10:40:18 -05:00
..
arcmt-test Revert "Use InitLLVM to setup a pretty stack printer" 2019-11-25 21:06:56 -05:00
c-arcmt-test [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
c-index-test [Wdocumentation] Implement \anchor 2019-12-21 14:52:21 +01:00
clang-check Revert "Use InitLLVM to setup a pretty stack printer" 2019-11-25 21:06:56 -05:00
clang-diff [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
clang-extdef-mapping Revert "Use InitLLVM to setup a pretty stack printer" 2019-11-25 21:06:56 -05:00
clang-format update string comparison in clang-format.py 2019-12-06 17:36:56 +00:00
clang-format-vs clang-format-vs : Fix Unicode formatting 2019-11-27 09:58:59 +01:00
clang-fuzzer [clang-fuzzer] Update proto fuzzer example for r375453. 2019-10-22 07:51:37 +00:00
clang-import-test [clang][lldb][NFC] Encapsulate ExternalASTMerger::ImporterSource 2019-10-01 09:02:05 +00:00
clang-offload-bundler Revert "Use InitLLVM to setup a pretty stack printer" 2019-11-25 21:06:56 -05:00
clang-offload-wrapper Revert "Use InitLLVM to setup a pretty stack printer" 2019-11-25 21:06:56 -05:00
clang-refactor [NFC] Fixes -Wrange-loop-analysis warnings 2020-01-01 20:01:37 +01:00
clang-rename Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC 2019-08-05 05:43:48 +00:00
clang-scan-deps Revert "[clang][clang-scan-deps] Aggregate the full dependency information." 2019-12-11 16:35:55 -08:00
clang-shlib [CMake] Clang: Don't use object libraries with Xcode 2019-10-04 18:17:58 +00:00
diag-build
diagtool [diagtool] Use `operator<<(Colors)` to print out colored output. 2019-08-08 07:04:01 +00:00
driver [Clang][Driver] Re-use the calling process instead of creating a new process for the cc1 invocation 2020-01-13 10:40:18 -05:00
libclang [OPENMP50]Codegen for nontemporal clause. 2019-12-23 10:04:46 -05:00
scan-build [clang] [cmake] Add distribution install targets for remaining components 2019-10-04 05:43:20 +00:00
scan-build-py [scan-build-py] Set of small fixes 2019-12-05 09:00:16 -08:00
scan-view [clang] [cmake] Add distribution install targets for remaining components 2019-10-04 05:43:20 +00:00
CMakeLists.txt [Clang][OpenMP Offload] Add new tool for wrapping offload device binaries 2019-10-09 20:42:58 +00:00