[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 10 08:12:41 PDT 2024


================
@@ -2271,6 +2271,12 @@ bool Driver::HandleImmediateArgs(const Compilation &C) {
   if (C.getArgs().hasArg(options::OPT_print_libgcc_file_name)) {
     ToolChain::RuntimeLibType RLT = TC.GetRuntimeLibType(C.getArgs());
     const llvm::Triple Triple(TC.ComputeEffectiveClangTriple(C.getArgs()));
+    // The 'Darwin' toolchain is initialized only when its arguments are
----------------
Xazax-hun wrote:

Hmm, I only want to initialize the targets when this function returns false to avoid potential side effects when jobs are actually created or executed. This minimizes the risk of affecting existing code paths until the proper initialization is figured out in the driver. I'll look into something. 

https://github.com/llvm/llvm-project/pull/98325


More information about the cfe-commits mailing list