From f0a0040ed1d2f189058c899b7245822d6ea87188 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Mon, 30 Dec 2024 11:55:53 +0000 Subject: [PATCH] fix: ensure that `dsymutil` available even when `FORCE_USE_SYSTEM_CLANG=1` `dsymutil` is defined as only available in `cctools` but Guix builds with `FORCE_USE_SYSTEM_CLANG`, which omits `cctools` (and therefore, `dsymutil`) but we use `dsymutil` to generate debug symbols, so we need to make sure that we get `dsymutil` one way or another. --- depends/hosts/darwin.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index 2c4ef0644d2c5..7f717d1eacdef 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -8,6 +8,8 @@ OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with- darwin_native_binutils=native_cctools +cctools_TOOLS=AR RANLIB STRIP NM + ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) # FORCE_USE_SYSTEM_CLANG is empty, so we use our depends-managed, pinned clang # from llvm.org @@ -15,6 +17,8 @@ ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) # Clang is a dependency of native_cctools when FORCE_USE_SYSTEM_CLANG is empty darwin_native_toolchain=native_cctools +cctools_TOOLS+=" DSYMUTIL" + clang_prog=$(build_prefix)/bin/clang clangxx_prog=$(clang_prog)++ llvm_config_prog=$(build_prefix)/bin/llvm-config @@ -40,11 +44,10 @@ llvm_config_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-config") llvm_lib_dir=$(shell $(llvm_config_prog) --libdir) +darwin_DSYMUTIL=$(shell $(SHELL) $(.SHELLFLAGS) "command -v dsymutil") darwin_OBJDUMP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-objdump") endif -cctools_TOOLS=AR RANLIB STRIP NM DSYMUTIL - # Make-only lowercase function lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1))))))))))))))))))))))))))