Skip to content

Commit

Permalink
Attempting to prefer llvm-dwp over gnu's dwp
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Frei committed Jul 2, 2024
1 parent e6246cc commit 883ba67
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions lldb/packages/Python/lldbsuite/test/make/Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,17 @@ ifneq "$(OS)" "Darwin"

OBJCOPY ?= $(call replace_cc_with,objcopy)
ARCHIVER ?= $(call replace_cc_with,ar)
DWP ?= $(call replace_cc_with,dwp)
# Look for llvm-dwp or gnu dwp
DWP ?= $(call replace_cc_with,llvm-dwp)
ifeq ($(wildcard $(DWP)),)
DWP = $(call replace_cc_with,dwp)
ifeq ($(wildcard $(DWP)),)
DWP = $(shell command -v llvm-dwp 2> /dev/null)
ifeq ($(wildcard $(DWP)),)
DWP = $(shell command -v dwp 2> /dev/null)
endif
endif
endif
override AR = $(ARCHIVER)
endif

Expand Down Expand Up @@ -629,9 +639,9 @@ endif
else
$(LD) $(DYLIB_OBJECTS) $(LDFLAGS) -shared -o "$(DYLIB_FILENAME)"
ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES"
ifeq "$(SAVE_FULL_DEBUG_BINARY)" "YES"
ifeq "$(SAVE_FULL_DEBUG_BINARY)" "YES"
cp "$(DYLIB_FILENAME)" "$(DYLIB_FILENAME).unstripped"
endif
endif
$(OBJCOPY) --only-keep-debug "$(DYLIB_FILENAME)" "$(DYLIB_FILENAME).debug"
$(OBJCOPY) --strip-debug --add-gnu-debuglink="$(DYLIB_FILENAME).debug" "$(DYLIB_FILENAME)" "$(DYLIB_FILENAME)"
endif
Expand Down

0 comments on commit 883ba67

Please sign in to comment.