mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
ANDROID: x86: add support for CONFIG_LTO_CLANG
Bug: 133186739 Change-Id: I8e7a8976f9381233f28badc324145b9c4c7eacb0 Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
This commit is contained in:
committed by
Alistair Strachan
parent
3e1624332a
commit
0a90c27ba0
@@ -78,6 +78,7 @@ config X86
|
||||
select ARCH_SUPPORTS_ACPI
|
||||
select ARCH_SUPPORTS_ATOMIC_RMW
|
||||
select ARCH_SUPPORTS_NUMA_BALANCING if X86_64
|
||||
select ARCH_SUPPORTS_LTO_CLANG if X86_64
|
||||
select ARCH_USE_BUILTIN_BSWAP
|
||||
select ARCH_USE_QUEUED_RWLOCKS
|
||||
select ARCH_USE_QUEUED_SPINLOCKS
|
||||
|
||||
@@ -214,6 +214,11 @@ ifdef CONFIG_X86_64
|
||||
KBUILD_LDFLAGS += $(call ld-option, -z max-page-size=0x200000)
|
||||
endif
|
||||
|
||||
ifdef CONFIG_LTO_CLANG
|
||||
KBUILD_LDFLAGS += -plugin-opt=-code-model=kernel \
|
||||
-plugin-opt=-stack-alignment=$(if $(CONFIG_X86_32),4,8)
|
||||
endif
|
||||
|
||||
# Speed up the build
|
||||
KBUILD_CFLAGS += -pipe
|
||||
# Workaround for a gcc prelease that unfortunately was shipped in a suse release
|
||||
|
||||
Reference in New Issue
Block a user