aboutsummaryrefslogtreecommitdiff
path: root/src/zig_clang_driver.cpp
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2020-12-16 10:40:56 +0100
committerJakub Konka <kubkon@jakubkonka.com>2020-12-16 12:18:14 +0100
commit83ff94406e13e18c8826cd48a68c2c8d676feaac (patch)
tree2d59a8986d026dc8831d6cabb2fbacf703c3ab18 /src/zig_clang_driver.cpp
parent9c2d8056ce177fef2a1b859016b11362686213b1 (diff)
downloadzig-83ff94406e13e18c8826cd48a68c2c8d676feaac.tar.gz
zig-83ff94406e13e18c8826cd48a68c2c8d676feaac.zip
Update clang drivers
llvm commit b2851aea80e5a8f0cfd6c3c5a56a6b00fb28c6b6
Diffstat (limited to 'src/zig_clang_driver.cpp')
-rw-r--r--src/zig_clang_driver.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/zig_clang_driver.cpp b/src/zig_clang_driver.cpp
index fbe407a06c..ac892f95e8 100644
--- a/src/zig_clang_driver.cpp
+++ b/src/zig_clang_driver.cpp
@@ -529,6 +529,13 @@ int ZigClang_main(int argc_, const char **argv_) {
#ifdef _WIN32
IsCrash |= CommandRes == 3;
#endif
+#if LLVM_ON_UNIX
+ // When running in integrated-cc1 mode, the CrashRecoveryContext returns
+ // the same codes as if the program crashed. See section "Exit Status for
+ // Commands":
+ // https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html
+ IsCrash |= CommandRes > 128;
+#endif
if (IsCrash) {
TheDriver.generateCompilationDiagnostics(*C, *FailingCommand);
break;