Skip to content

Commit 9576546

Browse files
committed
8343698: Linux x86_64 lto build gives a lot of warnings and fails lto-wrapper: fatal error: make returned 2 exit status
Reviewed-by: ihse, jwaters
1 parent 68ba7ee commit 9576546

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

make/hotspot/lib/JvmOverrideFiles.gmk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ ifeq ($(TOOLCHAIN_TYPE), gcc)
3737
# Need extra inlining to collapse shared marking code into the hot marking loop
3838
BUILD_LIBJVM_shenandoahMark.cpp_CXXFLAGS := --param inline-unit-growth=1000
3939
endif
40+
# disable lto in g1ParScanThreadState because of special inlining/flattening used there
41+
ifeq ($(call check-jvm-feature, link-time-opt), true)
42+
BUILD_LIBJVM_g1ParScanThreadState.cpp_CXXFLAGS := -fno-lto
43+
endif
4044
endif
4145

4246
LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_FLAG_NONE)

0 commit comments

Comments
 (0)