https://github.com/xingxue-ibm created https://github.com/llvm/llvm-project/pull/183206
This PR adds comments to address post‑commit review feedback on commit 15488a7f78ce7b9ae3c06b031134e5cb339b335c. >From fdd865cc932625651cc677abc55b625934ed68ed Mon Sep 17 00:00:00 2001 From: Xing Xue <[email protected]> Date: Tue, 24 Feb 2026 18:36:00 -0500 Subject: [PATCH] Address post-commit comments on PR [LLVM][CLANG] Update signal-handling behavior to comply with POSIX. - add comments. --- clang/tools/driver/driver.cpp | 2 +- llvm/cmake/modules/AddLLVM.cmake | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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() _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
