From 5a7886575eb7cbf444375cfed3755ef97bf55a4e Mon Sep 17 00:00:00 2001 From: Julian Waters Date: Fri, 14 Apr 2023 17:18:28 +0000 Subject: [PATCH] 8304930: Enable Link Time Optimization as an option for Visual C++ Reviewed-by: erikj --- make/hotspot/lib/JvmFeatures.gmk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/make/hotspot/lib/JvmFeatures.gmk b/make/hotspot/lib/JvmFeatures.gmk index c4278168697..4a8e10d7353 100644 --- a/make/hotspot/lib/JvmFeatures.gmk +++ b/make/hotspot/lib/JvmFeatures.gmk @@ -171,6 +171,9 @@ ifeq ($(call check-jvm-feature, link-time-opt), true) ifeq ($(call isCompiler, gcc), true) 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 + else ifeq ($(call isCompiler, microsoft), true) + JVM_CFLAGS_FEATURES += -GL + JVM_LDFLAGS_FEATURES += -LTCG:INCREMENTAL endif else ifeq ($(call isCompiler, gcc), true)