mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
ANDROID: kbuild: export LTO and CFI flags
Export the compiler flags for LTO and CFI, so we can filter them out elsewhere when needed. Bug: 145297900 Change-Id: I873d0f9ebef8f510eb5b56ab2e1888324f4bb84d Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
This commit is contained in:
parent
8c25f26ead
commit
194910dc6b
12
Makefile
12
Makefile
@ -855,11 +855,11 @@ export DISABLE_LTO_CLANG
|
||||
endif
|
||||
|
||||
ifdef CONFIG_LTO
|
||||
lto-flags := $(lto-clang-flags)
|
||||
KBUILD_CFLAGS += $(lto-flags)
|
||||
LTO_CFLAGS := $(lto-clang-flags)
|
||||
KBUILD_CFLAGS += $(LTO_CFLAGS)
|
||||
|
||||
DISABLE_LTO := $(DISABLE_LTO_CLANG)
|
||||
export DISABLE_LTO
|
||||
export LTO_CFLAGS DISABLE_LTO
|
||||
|
||||
# LDFINAL_vmlinux and LDFLAGS_FINAL_vmlinux can be set to override
|
||||
# the linker and flags for vmlinux_link.
|
||||
@ -885,12 +885,12 @@ endif
|
||||
|
||||
ifdef CONFIG_CFI
|
||||
# cfi-flags are re-tested in prepare-compiler-check
|
||||
cfi-flags := $(cfi-clang-flags)
|
||||
KBUILD_CFLAGS += $(cfi-flags)
|
||||
CFI_CFLAGS := $(cfi-clang-flags)
|
||||
KBUILD_CFLAGS += $(CFI_CFLAGS)
|
||||
|
||||
DISABLE_CFI := $(DISABLE_CFI_CLANG)
|
||||
DISABLE_LTO += $(DISABLE_CFI)
|
||||
export DISABLE_CFI
|
||||
export CFI_CFLAGS DISABLE_CFI
|
||||
endif
|
||||
|
||||
ifdef CONFIG_SHADOW_CALL_STACK
|
||||
|
Loading…
x
Reference in New Issue
Block a user