Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44d966cf authored by Colin Cross's avatar Colin Cross Committed by android-build-merger
Browse files

Merge "Don't pass -Wl,--no-undefined to host targets"

am: fe3e1818

Change-Id: Ic6635ee93ef979c00f3925b852f853bea53a0a61
parents c9f8b3fa fe3e1818
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -64,10 +64,11 @@ else
  my_native_coverage := false
endif

my_allow_undefined_symbols := $(strip $(LOCAL_ALLOW_UNDEFINED_SYMBOLS))
ifdef SANITIZE_HOST
ifdef LOCAL_IS_HOST_MODULE
my_allow_undefined_symbols := true
else
my_allow_undefined_symbols := $(strip $(LOCAL_ALLOW_UNDEFINED_SYMBOLS))
endif
endif

my_ndk_sysroot :=
@@ -626,8 +627,17 @@ endif
# up if --no-undefined is passed to the linker.
ifeq ($(strip $(LOCAL_NO_DEFAULT_COMPILER_FLAGS)),)
  ifeq ($(my_allow_undefined_symbols),)
    ifneq ($(HOST_OS),darwin)
      my_ldflags += -Wl,--no-undefined
    endif
  else
    ifdef LOCAL_IS_HOST_MODULE
      ifeq ($(HOST_OS),darwin)
        # darwin defaults to treating undefined symbols as errors
        my_ldflags += -Wl,-undefined,dynamic_lookup
      endif
    endif
  endif
endif

ifeq (true,$(LOCAL_GROUP_STATIC_LIBRARIES))