[Lldb-commits] [lldb] r233908 - Use objcopy provided next to the compiler on android
Tamas Berghammer
tberghammer at google.com
Thu Apr 2 04:09:28 PDT 2015
Author: tberghammer
Date: Thu Apr 2 06:09:28 2015
New Revision: 233908
URL: http://llvm.org/viewvc/llvm-project?rev=233908&view=rev
Log:
Use objcopy provided next to the compiler on android
Differential revision: http://reviews.llvm.org/D8765
Modified:
lldb/trunk/test/make/Makefile.rules
Modified: lldb/trunk/test/make/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/make/Makefile.rules?rev=233908&r1=233907&r2=233908&view=diff
==============================================================================
--- lldb/trunk/test/make/Makefile.rules (original)
+++ lldb/trunk/test/make/Makefile.rules Thu Apr 2 06:09:28 2015
@@ -184,6 +184,8 @@ cxx_linker_notdir = $(if $(findstring cl
$(subst cc,c++,$(1))))))
cxx_linker = $(if $(findstring /,$(1)),$(join $(dir $(1)), $(call cxx_linker_notdir,$(notdir $(1)))),$(call cxx_linker_notdir,$(1)))
+OBJCOPY = objcopy
+
#----------------------------------------------------------------------
# Windows specific options
#----------------------------------------------------------------------
@@ -202,7 +204,15 @@ endif
# Android specific options
#----------------------------------------------------------------------
ifeq "$(OS)" "Android"
- LDFLAGS += -pie
+ objcopy_notdir = $(if $(findstring clang,$(1)), \
+ $(subst clang,objcopy,$(1)), \
+ $(if $(findstring gcc,$(1)), \
+ $(subst gcc,objcopy,$(1)), \
+ $(subst cc,objcopy,$(1))))))
+ objcopy = $(if $(findstring /,$(1)),$(join $(dir $(1)), $(call objcopy_notdir,$(notdir $(1)))),$(call objcopy_notdir,$(1)))
+
+ LDFLAGS += -pie
+ OBJCOPY = $(call objcopy $(CC))
endif
#----------------------------------------------------------------------
@@ -342,8 +352,8 @@ ifneq "$(MAKE_DSYM)" "NO"
endif
else
ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES"
- objcopy --only-keep-debug "$(EXE)" "$(DSYM)"
- objcopy --strip-debug --add-gnu-debuglink="$(DSYM)" "$(EXE)" "$(EXE)"
+ $(OBJCOPY) --only-keep-debug "$(EXE)" "$(DSYM)"
+ $(OBJCOPY) --strip-debug --add-gnu-debuglink="$(DSYM)" "$(EXE)" "$(EXE)"
endif
endif
endif
@@ -392,8 +402,8 @@ endif
else
$(LD) $(LDFLAGS) $(DYLIB_OBJECTS) -shared -o "$(DYLIB_FILENAME)"
ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES"
- objcopy --only-keep-debug "$(DYLIB_FILENAME)" "$(DYLIB_FILENAME).debug"
- objcopy --strip-debug --add-gnu-debuglink="$(DYLIB_FILENAME).debug" "$(DYLIB_FILENAME)" "$(DYLIB_FILENAME)"
+ $(OBJCOPY) --only-keep-debug "$(DYLIB_FILENAME)" "$(DYLIB_FILENAME).debug"
+ $(OBJCOPY) --strip-debug --add-gnu-debuglink="$(DYLIB_FILENAME).debug" "$(DYLIB_FILENAME)" "$(DYLIB_FILENAME)"
endif
endif
More information about the lldb-commits
mailing list