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

Commit 55f73e6c authored by Evgenii Stepanov's avatar Evgenii Stepanov
Browse files

Only add libdl dependency for ASan/TSan on target.

Only sanitizers that intercept stuff need that. For example,
SafeStack does not, and I think UBSan too.

Bug: 27729263
Change-Id: I413cd46cc6c6914a363a3c53da7954beacd8f0d8
parent ff3341b3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -101,9 +101,11 @@ ifneq ($(my_sanitize),)
      my_cflags += -fsanitize-trap=all
      my_cflags += -ftrap-function=abort
    endif
    ifneq ($(filter address thread,$(my_sanitize)),)
      my_shared_libraries += libdl
    endif
  endif
endif

# If local or global modules need ASAN, add linker flags.
ifneq ($(filter address,$(my_global_sanitize) $(my_sanitize)),)