8304930: Enable Link Time Optimization as an option for Visual C++

Reviewed-by: erikj
This commit is contained in:
Julian Waters 2023-04-14 17:18:28 +00:00
parent 30a140b5a2
commit 5a7886575e

View File

@ -171,6 +171,9 @@ ifeq ($(call check-jvm-feature, link-time-opt), true)
ifeq ($(call isCompiler, gcc), true) ifeq ($(call isCompiler, gcc), true)
JVM_CFLAGS_FEATURES += -flto=auto -fuse-linker-plugin -fno-strict-aliasing -fno-fat-lto-objects JVM_CFLAGS_FEATURES += -flto=auto -fuse-linker-plugin -fno-strict-aliasing -fno-fat-lto-objects
JVM_LDFLAGS_FEATURES += $(CXX_O_FLAG_HIGHEST_JVM) -flto=auto -fuse-linker-plugin -fno-strict-aliasing JVM_LDFLAGS_FEATURES += $(CXX_O_FLAG_HIGHEST_JVM) -flto=auto -fuse-linker-plugin -fno-strict-aliasing
else ifeq ($(call isCompiler, microsoft), true)
JVM_CFLAGS_FEATURES += -GL
JVM_LDFLAGS_FEATURES += -LTCG:INCREMENTAL
endif endif
else else
ifeq ($(call isCompiler, gcc), true) ifeq ($(call isCompiler, gcc), true)