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

Commit d08699e4 authored by Colin Cross's avatar Colin Cross
Browse files

Only add linker_asan as dependency to shared executables

linker_asan is only needed by shared exectuables, prevent adding it as a
dependency of anything else.  Avoids a dependency loop from
linker_asan -> linker -> linker_asan.

Change-Id: Id7744ad8a5901468518fac80741c75e764adb559
parent 1e92cfb9
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -157,11 +157,15 @@ ifneq ($(filter address,$(my_global_sanitize) $(my_sanitize)),)
      my_ldflags += -Wl,--as-needed
    endif

    ifeq ($(LOCAL_MODULE_CLASS),EXECUTABLES)
      ifneq ($(LOCAL_FORCE_STATIC_EXECUTABLE),true)
        my_linker := $($(LOCAL_2ND_ARCH_VAR_PREFIX)ADDRESS_SANITIZER_LINKER)
        # Make sure linker_asan get installed.
        $(LOCAL_INSTALLED_MODULE) : | $(PRODUCT_OUT)$($(LOCAL_2ND_ARCH_VAR_PREFIX)ADDRESS_SANITIZER_LINKER)
      endif
    endif
  endif
endif

# If local module needs ASAN, add compiler flags.
ifneq ($(filter address,$(my_sanitize)),)