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

Commit aa73cefb authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

Use ASAN linker for native tests

Native tests (BUILD_NATIVE_TEST) use their own MODULE_CLASS.
Check for it when selecting the linker for ASAN.

Test: build a native test, readelf -l <test> | grep linker
Change-Id: I34ca8c443c792bdf8b4b1fa812806c56f13a72d0
parent 92b62325
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -337,7 +337,7 @@ ifneq ($(filter address,$(my_global_sanitize) $(my_sanitize)),)
      my_ldflags += -Wl,--as-needed
    endif

    ifeq ($(LOCAL_MODULE_CLASS),EXECUTABLES)
    ifneq ($(filter EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
      ifneq ($(LOCAL_FORCE_STATIC_EXECUTABLE),true)
        my_linker := $($(LOCAL_2ND_ARCH_VAR_PREFIX)ADDRESS_SANITIZER_LINKER)
        # Make sure linker_asan get installed.