Skip to content

Commit 5b22baf

Browse files
author
Greg Parker
committed
Suppress CrashTracer aggregation for crashes in non-production compilers.
rdar://18177298 Swift SVN r22058
1 parent 0279b57 commit 5b22baf

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

tools/driver/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ add_swift_executable(swift
99
selectiondag ${LLVM_TARGETS_TO_BUILD})
1010

1111
find_library(CORE_FOUNDATION NAMES CoreFoundation)
12+
find_library(CRASH_REPORTER_CLIENT NAMES CrashReporterClient)
1213

13-
target_link_libraries(swift edit ${CORE_FOUNDATION})
14+
target_link_libraries(swift edit ${CRASH_REPORTER_CLIENT} ${CORE_FOUNDATION})
1415

1516
# If building as part of clang, make sure the headers are installed.
1617
if(SWIFT_PATH_TO_CLANG_BUILD STREQUAL ${CMAKE_BINARY_DIR})

tools/driver/driver.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
using namespace swift;
3939
using namespace swift::driver;
4040

41+
#endif
42+
43+
4144
std::string getExecutablePath(const char *FirstArg) {
4245
void *P = (void *)(intptr_t)getExecutablePath;
4346
return llvm::sys::fs::getMainExecutable(FirstArg, P);
@@ -56,6 +59,12 @@ int main(int argc_, const char **argv_) {
5659
// Set up an object which will call llvm::llvm_shutdown() on exit.
5760
llvm::llvm_shutdown_obj Y;
5861

62+
#ifndef __OPEN_SOURCE__
63+
// If this is a non-production build, tell the crash log analyzer
64+
// to ignore any crash logs.
65+
suppressCrashTracerForDevelopment();
66+
#endif
67+
5968
llvm::SmallVector<const char *, 256> argv;
6069
llvm::SpecificBumpPtrAllocator<char> ArgAllocator;
6170
std::error_code EC = llvm::sys::Process::GetArgumentVector(

0 commit comments

Comments
 (0)