llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-driver

Author: Xing Xue (xingxue-ibm)

<details>
<summary>Changes</summary>

This PR adds comments to address post‑commit review feedback on commit 
15488a7f78ce7b9ae3c06b031134e5cb339b335c.

---
Full diff: https://github.com/llvm/llvm-project/pull/183206.diff


2 Files Affected:

- (modified) clang/tools/driver/driver.cpp (+1-1) 
- (modified) llvm/cmake/modules/AddLLVM.cmake (+2) 


``````````diff
diff --git a/clang/tools/driver/driver.cpp b/clang/tools/driver/driver.cpp
index e6cabcc7eb530..9e200f1031de6 100644
--- a/clang/tools/driver/driver.cpp
+++ b/clang/tools/driver/driver.cpp
@@ -381,7 +381,7 @@ int clang_main(int Argc, char **Argv, const 
llvm::ToolContext &ToolContext) {
   if (!UseNewCC1Process) {
     TheDriver.CC1Main = ExecuteCC1WithContext;
     // Ensure the CC1Command actually catches cc1 crashes
-    llvm::CrashRecoveryContext::Enable(true);
+    
llvm::CrashRecoveryContext::Enable(/*NeedsPOSIXUtilitySignalHandling=*/true);
   }
 
   std::unique_ptr<Compilation> C(TheDriver.BuildCompilation(Args));
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 1dda6cba4a183..f59002bc6c837 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -1091,6 +1091,8 @@ macro(generate_llvm_objects name)
 
     set(INITLLVM_ARGS "")
 
+    # When Clang is invoked as an OS utility (e.g., c17), it needs to follow 
the POSIX specification
+    # for how utilities respond to signals.
     if(${name} STREQUAL "clang")
       set(INITLLVM_ARGS ", /*InstallPipeSignalExitHandler=*/true, 
/*NeedsPOSIXUtilitySignalHandling=*/true")
     endif()

``````````

</details>


https://github.com/llvm/llvm-project/pull/183206
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to