mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
ANDROID: Clang LTO: Only set -fvisibility=hidden for x86
Otherwise this upsets ABI monitoring as symbols are hidden and as such
do not get considered for ABI analysis.
Bug: 182194803
Bug: 203411090
Fixes: dc5723b02e ("kbuild: add support for Clang LTO")
Signed-off-by: Giuliano Procida <gprocida@google.com>
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: If6011ad739ecccd23a92cfa2f9fd43084f9a0b4f
This commit is contained in:
committed by
Matthias Maennich
parent
839c8821c7
commit
5e93939f6d
6
Makefile
6
Makefile
@@ -952,7 +952,13 @@ KBUILD_LDFLAGS += --thinlto-cache-dir=$(extmod_prefix).thinlto-cache
|
||||
else
|
||||
CC_FLAGS_LTO := -flto
|
||||
endif
|
||||
|
||||
ifeq ($(SRCARCH),x86)
|
||||
# Workaround for compiler / linker bug
|
||||
CC_FLAGS_LTO += -fvisibility=hidden
|
||||
else
|
||||
CC_FLAGS_LTO += -fvisibility=default
|
||||
endif
|
||||
|
||||
# Limit inlining across translation units to reduce binary size
|
||||
KBUILD_LDFLAGS += -mllvm -import-instr-limit=5
|
||||
|
||||
Reference in New Issue
Block a user