Skip to content

Commit

Permalink
Symlink lld and dsymutil in correct build_depsbindir when `USE_SYSTEM…
Browse files Browse the repository at this point in the history
…_LLD=1` (#53050)

Fixes #53049.

Two things are addressed:

1. `dsymutil` wasn't linked
2. `lld` was put in `build_bindir`, but on install was looked for in
`build_depsbindir`
  • Loading branch information
haampie authored Jan 25, 2024
1 parent 936701e commit 55c13d2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -205,18 +205,24 @@ $(build_bindir)/7z$(EXE):
rm -f "$@" && \
ln -svf "$(7Z_PATH)" "$@"

symlink_lld: $(build_bindir)/lld$(EXE)
symlink_llvm_utils: $(build_depsbindir)/lld$(EXE) $(build_depsbindir)/dsymutil$(EXE)

ifneq ($(USE_SYSTEM_LLD),0)
SYMLINK_SYSTEM_LIBRARIES += symlink_lld
SYMLINK_SYSTEM_LIBRARIES += symlink_llvm_utils
LLD_PATH := $(shell which lld$(EXE))
DSYMUTIL_PATH := $(shell which dsymutil$(EXE))
endif

$(build_bindir)/lld$(EXE):
$(build_depsbindir)/lld$(EXE):
[ -e "$(LLD_PATH)" ] && \
rm -f "$@" && \
ln -svf "$(LLD_PATH)" "$@"

$(build_depsbindir)/dsymutil$(EXE):
[ -e "$(DSYMUTIL_PATH)" ] && \
rm -f "$@" && \
ln -svf "$(DSYMUTIL_PATH)" "$@"

# the following excludes: libuv.a, libutf8proc.a

ifneq ($(USE_SYSTEM_LIBM),0)
Expand Down

0 comments on commit 55c13d2

Please sign in to comment.