From 9e86573fd145d64ea5096b3d2a1dda19ecd8ed02 Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Wed, 7 Nov 2018 16:33:11 -0800 Subject: [PATCH] Use llvm-{strip,objcopy} by default ... except for Darwin Mach-O, as it is not supported by llvm-strip. Test: m checkbuild Bug: 119221035 Change-Id: I492853486e49dd0e82abe60cbf354d79b760b9a7 --- core/dynamic_binary.mk | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/dynamic_binary.mk b/core/dynamic_binary.mk index a42afe9c05..0accdc0fe7 100644 --- a/core/dynamic_binary.mk +++ b/core/dynamic_binary.mk @@ -103,11 +103,9 @@ ifeq (,$(filter no_debuglink mini-debug-info,$(my_strip_module))) endif endif -ifeq ($(my_use_clang_lld),true) - # b/80093681: GNU strip and objcopy --{add,remove}-section have bug in handling - # GNU_RELRO segment of files lnked by clang lld; so they are replaced - # by llvm-strip and llvm-objcopy here. - my_strip_args += --use-llvm-strip +ifeq ($($(my_prefix)OS),darwin) + # llvm-strip does not support Darwin Mach-O yet. + my_strip_args += --use-gnu-strip endif valid_strip := mini-debug-info keep_symbols true no_debuglink