Disable AArch64 XOM when not using lld.

AArch64 execute-only memory is only supported when using lld as the
linker. There's still a few modules which don't use lld, so in those
cases we need to disable this option.

Bug: 77958880
Test: Module with LOCAL_USE_CLANG_LLD false builds without XOM
Test: Module without LOCAL_USE_CLANG_LLD defined builds with XOM

Change-Id: I5dfe3cd1e1cac2b3ead13912af9f7fe896d507e9
This commit is contained in:
Ivan Lozano 2018-11-27 14:39:33 -08:00
parent 159eb0938b
commit f9f03e0119
1 changed files with 3 additions and 1 deletions

View File

@ -91,7 +91,9 @@ ifeq ($(strip $(ENABLE_XOM)),true)
ifeq ($(strip $(my_xom)),true) ifeq ($(strip $(my_xom)),true)
ifeq (arm64,$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) ifeq (arm64,$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH))
my_ldflags += -Wl,-execute-only ifeq ($(my_use_clang_lld),true)
my_ldflags += -Wl,-execute-only
endif
endif endif
endif endif
endif endif