aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Lozano <ivanlozano@google.com>2018-11-27 14:39:33 -0800
committerIvan Lozano <ivanlozano@google.com>2018-11-27 14:53:33 -0800
commitf9f03e0119b21b2f3b46de24acd93f68b2b1dc7a (patch)
tree22e6f3981bc102a322627bd12068aff60f1c5dc7
parent159eb0938b3de4a6a4192dbb4ab192152234116c (diff)
downloadbuild-f9f03e0119b21b2f3b46de24acd93f68b2b1dc7a.tar.gz
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
-rw-r--r--core/binary.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/binary.mk b/core/binary.mk
index 23defdc5d1..917d7ee0ef 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -91,7 +91,9 @@ ifeq ($(strip $(ENABLE_XOM)),true)
ifeq ($(strip $(my_xom)),true)
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