Skip to content

Commit

Permalink
fix: ensure that dsymutil available even when `FORCE_USE_SYSTEM_CLA…
Browse files Browse the repository at this point in the history
…NG=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.
  • Loading branch information
kwvg committed Dec 31, 2024
1 parent 416e154 commit f0a0040
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions depends/hosts/darwin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ 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

# 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
Expand All @@ -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))))))))))))))))))))))))))

Expand Down

0 comments on commit f0a0040

Please sign in to comment.