From c0460bb10fbba656a4073a320a5c2005603cc882 Mon Sep 17 00:00:00 2001 From: MBaesken Date: Mon, 18 Nov 2024 12:16:20 +0100 Subject: [PATCH] handle INCLUDE_LINK_TIME_OPTIMIZATION in macros.hpp --- make/hotspot/lib/JvmFeatures.gmk | 4 ++-- src/hotspot/share/utilities/macros.hpp | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/make/hotspot/lib/JvmFeatures.gmk b/make/hotspot/lib/JvmFeatures.gmk index 36b12bbf07d1b..b94031515f79e 100644 --- a/make/hotspot/lib/JvmFeatures.gmk +++ b/make/hotspot/lib/JvmFeatures.gmk @@ -170,12 +170,12 @@ ifeq ($(call check-jvm-feature, link-time-opt), true) # later on if desired JVM_OPTIMIZATION := HIGHEST_JVM ifeq ($(call isCompiler, gcc), true) - JVM_CFLAGS_FEATURES += -DINCLUDE_LINK_TIME_OPTIMIZATION=1 -flto=auto -fuse-linker-plugin -fno-strict-aliasing \ + 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 += -DINCLUDE_LINK_TIME_OPTIMIZATION=1 -GL + JVM_CFLAGS_FEATURES += -GL JVM_LDFLAGS_FEATURES += -LTCG:INCREMENTAL endif else diff --git a/src/hotspot/share/utilities/macros.hpp b/src/hotspot/share/utilities/macros.hpp index 23094c9e8c4ac..332c53f709731 100644 --- a/src/hotspot/share/utilities/macros.hpp +++ b/src/hotspot/share/utilities/macros.hpp @@ -129,6 +129,10 @@ #define NOT_CDS_RETURN_(code) { return code; } #endif // INCLUDE_CDS +#ifndef INCLUDE_LINK_TIME_OPTIMIZATION +#define INCLUDE_LINK_TIME_OPTIMIZATION 0 +#endif + #ifndef INCLUDE_MANAGEMENT #define INCLUDE_MANAGEMENT 1 #endif // INCLUDE_MANAGEMENT