8292226: Prepare make for better Link Time Optimization support
Reviewed-by: ihse
This commit is contained in:
parent
79597f1ea6
commit
1ed03d82b2
@ -367,6 +367,9 @@ isBuildCpu = \
|
|||||||
isBuildCpuArch = \
|
isBuildCpuArch = \
|
||||||
$(strip $(if $(filter $(OPENJDK_BUILD_CPU_ARCH), $1), true, false))
|
$(strip $(if $(filter $(OPENJDK_BUILD_CPU_ARCH), $1), true, false))
|
||||||
|
|
||||||
|
isCompiler = \
|
||||||
|
$(strip $(if $(filter $(TOOLCHAIN_TYPE), $1), true, false))
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Converts a space separated list to a comma separated list.
|
# Converts a space separated list to a comma separated list.
|
||||||
#
|
#
|
||||||
|
@ -169,12 +169,13 @@ endif
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
ifeq ($(call check-jvm-feature, link-time-opt), true)
|
ifeq ($(call check-jvm-feature, link-time-opt), true)
|
||||||
# NOTE: Disable automatic opimization level and let the explicit cflag control
|
# Set JVM_OPTIMIZATION directly so other jvm-feature flags can override it
|
||||||
# optimization level instead. This activates O3 on slowdebug builds, just
|
# later on if desired
|
||||||
# like the old build, but it's probably not right.
|
JVM_OPTIMIZATION := HIGHEST_JVM
|
||||||
JVM_OPTIMIZATION :=
|
ifeq ($(call isCompiler, gcc), true)
|
||||||
JVM_CFLAGS_FEATURES += -O3 -flto
|
JVM_CFLAGS_FEATURES += -flto -fuse-linker-plugin
|
||||||
JVM_LDFLAGS_FEATURES += -O3 -flto -fuse-linker-plugin -fno-strict-aliasing
|
JVM_LDFLAGS_FEATURES += -flto -fuse-linker-plugin -fno-strict-aliasing
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(call check-jvm-feature, opt-size), true)
|
ifeq ($(call check-jvm-feature, opt-size), true)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user