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

Commit 8b80f3e4 authored by Peter Collingbourne's avatar Peter Collingbourne
Browse files

Only link the MTE notes against executables.

Soong has equivalent logic but it was missing on the .mk side.

Bug: 135772972
Change-Id: I5fc5a387313f6ae43c6510ee63d153aa81fb58b1
parent 69973f0a
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -211,11 +211,13 @@ endif

ifneq ($(filter memtag_heap,$(my_sanitize)),)
  # Add memtag ELF note.
  ifneq ($(filter EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
    ifneq ($(filter memtag_heap,$(my_sanitize_diag)),)
      my_whole_static_libraries += note_memtag_heap_sync
    else
      my_whole_static_libraries += note_memtag_heap_async
    endif
  endif
  # This is all that memtag_heap does - it is not an actual -fsanitize argument.
  # Remove it from the list.
  my_sanitize := $(filter-out memtag_heap,$(my_sanitize))