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

Commit c8f97acc authored by Evgenii Stepanov's avatar Evgenii Stepanov Committed by Gerrit Code Review
Browse files

Merge "SANITIZE_TARGET: allow undef symbols in non-sanitized shared libraries."

parents 8f180b90 5adfcb16
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -34,6 +34,20 @@ ifeq ($(my_sanitize),never)
  my_sanitize :=
endif

# Undefined symbols can occur if a non-sanitized library links
# sanitized static libraries. That's OK, because the executable
# always depends on the ASan runtime library, which defines these
# symbols.
ifneq ($(strip $(SANITIZE_TARGET)),)
  ifndef LOCAL_IS_HOST_MODULE
    ifeq ($(LOCAL_MODULE_CLASS),SHARED_LIBRARIES)
      ifeq ($(my_sanitize),)
        my_allow_undefined_symbols := true
      endif
    endif
  endif
endif

# Sanitizers can only be used with clang.
ifneq ($(my_clang),true)
  ifneq ($(my_sanitize),)