Skip to content

Commit 5eedf07

Browse files
committed
[apple clang] disable in-process CC1 to preserve crashlog compatibility
The in-process CC1 currently doesn't interoperate with the macOS crash analytics, which we would like to keep enabled for Apple clang. This commit restores the out-of-process CC1 to the Apple clang CMake configuration for now. Differential Revision: https://reviews.llvm.org/D80849
1 parent 12e5b02 commit 5eedf07

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed

clang/cmake/caches/Apple-stage1.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ set(CMAKE_MACOSX_RPATH ON CACHE BOOL "")
2020
set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "")
2121
set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
2222
set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")
23+
set(CLANG_SPAWN_CC1 ON CACHE BOOL "")
2324
set(CLANG_BOOTSTRAP_PASSTHROUGH
2425
CMAKE_OSX_ARCHITECTURES
2526
CACHE STRING "")

clang/cmake/caches/Apple-stage2.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
1616
set(LLVM_ENABLE_MODULES ON CACHE BOOL "")
1717
set(LLVM_EXTERNALIZE_DEBUGINFO ON CACHE BOOL "")
1818
set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")
19+
set(CLANG_SPAWN_CC1 ON CACHE BOOL "")
1920
set(BUG_REPORT_URL "http://developer.apple.com/bugreporter/" CACHE STRING "")
2021

2122
set(LLVM_BUILD_EXTERNAL_COMPILER_RT ON CACHE BOOL "Build Compiler-RT with just-built clang")
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// RUN: %clang -c %s -### 2>&1 | FileCheck %s --check-prefix=APPLE-CLANG
2+
// RUN: %clang -fintegrated-cc1 -c %s -### 2>&1 | FileCheck %s --check-prefix=EXPLICIT-IN-PROCESS
3+
4+
// REQUIRES: clang-vendor=com.apple.clang
5+
6+
// APPLE-CLANG-NOT: (in-process)
7+
// EXPLICIT-IN-PROCESS: (in-process)

clang/test/lit.cfg.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,7 @@ def calculate_arch_features(arch_string):
198198

199199
if config.enable_shared:
200200
config.available_features.add("enable_shared")
201+
202+
# Add a vendor-specific feature.
203+
if config.clang_vendor_uti:
204+
config.available_features.add('clang-vendor=' + config.clang_vendor_uti)

clang/test/lit.site.cfg.py.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ config.host_arch = "@HOST_ARCH@"
3030
config.python_executable = "@Python3_EXECUTABLE@"
3131
config.use_z3_solver = lit_config.params.get('USE_Z3_SOLVER', "@USE_Z3_SOLVER@")
3232
config.has_plugins = @LLVM_ENABLE_PLUGINS@
33+
config.clang_vendor_uti = "@CLANG_VENDOR_UTI@"
3334

3435
# Support substitution of the tools and libs dirs with user parameters. This is
3536
# used when we can't determine the tool dir at configuration time.

0 commit comments

Comments
 (0)