Skip to content

Commit

Permalink
handle INCLUDE_LINK_TIME_OPTIMIZATION in macros.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
MBaesken committed Nov 18, 2024
1 parent 85cd7de commit c0460bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions make/hotspot/lib/JvmFeatures.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/hotspot/share/utilities/macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c0460bb

Please sign in to comment.