From 0820c194170fa211a8300bbb8eb71d55be5096d4 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Sun, 15 Sep 2024 19:07:12 +0100 Subject: [PATCH] shims/super/cc: don't strip prefixes with `--debug-symbols` --- Library/Homebrew/shims/super/cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/shims/super/cc b/Library/Homebrew/shims/super/cc index 631f444ce4747..8690475877dc4 100755 --- a/Library/Homebrew/shims/super/cc +++ b/Library/Homebrew/shims/super/cc @@ -318,7 +318,7 @@ class Cmd args << "-nostdinc" if @deps.include?("glibc@2.13") # Ideally this would be -ffile-prefix-map, but that requires a minimum of GCC 8, LLVM Clang 10 or Apple Clang 12 # and detecting the version dynamically based on what `HOMEBREW_CC` may have been rewritten to point to is awkward - args << "-fdebug-prefix-map=#{formula_buildpath}=." if formula_buildpath + args << "-fdebug-prefix-map=#{formula_buildpath}=." if formula_buildpath && !debug_symbols? args end @@ -447,7 +447,7 @@ class Cmd end def oso_prefix? - config.include?("o") && !configure? + config.include?("o") && !configure? && !debug_symbols? end def ld_classic?