Skip to content

Commit

Permalink
Always use my_installed_module_stem instead of my_built_module_stem
Browse files Browse the repository at this point in the history
This will prevent link errors in case my_installed_module_stem is different
from my_built_module_stem.

Change-Id: Ic72571637ea404c92128b9cd5a28e82a36bc0033
  • Loading branch information
Anshuman Dani authored and tdm committed Mar 30, 2018
1 parent e3cd8f8 commit 9c50967
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions build/core/sdllvm-lto-defs.mk
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $(LOCAL_BUILT_MODULE) : $(combo_var_prefix)GLOBAL_ARFLAGS := $(ARFLAGS)

# For 64 bit
intermediates := $(call local-intermediates-dir,,$(LOCAL_2ND_ARCH_VAR_PREFIX))
LOCAL_BUILT_MODULE_64 := $(intermediates)/$(my_built_module_stem)
LOCAL_BUILT_MODULE_64 := $(intermediates)/$(my_installed_module_stem)

$(LOCAL_BUILT_MODULE_64) : TARGET_AR := $(AR)
$(LOCAL_BUILT_MODULE_64) : TARGET_GLOBAL_ARFLAGS := $(ARFLAGS)
Expand All @@ -24,12 +24,11 @@ else
# For SHARED_LIBRARIES and EXECUTABLES we need to filter out flags not
# needed/understood by SD LLVM's Linker.

linked_module_32 := $(intermediates)/LINKED/$(my_built_module_stem)
FLAGS_TO_BE_FILTERED := -Wl,--icf=safe -Wl,--no-undefined-version -Wl,--fix-cortex-a53-843419 -fuse-ld=gold
linked_module_32 := $(intermediates)/LINKED/$(my_installed_module_stem)
intermediates := $(call local-intermediates-dir,,$(LOCAL_2ND_ARCH_VAR_PREFIX))
linked_module_64 := $(intermediates)/LINKED/$(my_built_module_stem)
linked_module_64 := $(intermediates)/LINKED/$(my_installed_module_stem)

FLAGS_TO_BE_FILTERED := -Wl,--icf=safe -Wl,--no-undefined-version -Wl,--fix-cortex-a53-843419 -fuse-ld=gold
$(linked_module_32) : PRIVATE_TARGET_GLOBAL_LDFLAGS := $(filter-out $(FLAGS_TO_BE_FILTERED),$(PRIVATE_TARGET_GLOBAL_LDFLAGS))
$(linked_module_64) : PRIVATE_TARGET_GLOBAL_LDFLAGS := $(filter-out $(FLAGS_TO_BE_FILTERED),$(PRIVATE_TARGET_GLOBAL_LDFLAGS))

endif

0 comments on commit 9c50967

Please sign in to comment.