Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
a3b1aff
8372046: compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java f…
RealFYang Nov 20, 2025
473471c
8369838: Likely invalid assert or function call in jimage.cpp
slowhog Nov 20, 2025
5d3e73b
8371248: Crash in -Xdoclint with invalid @link
lahodaj Nov 20, 2025
72c45a4
8355225: Test gtest/AsyncLogGtest.java failed at droppingMessage_vm: …
jdksjolen Nov 20, 2025
852141b
8372004: Have SSLLogger implement System.Logger
coffeys Nov 20, 2025
6fc8e49
8372097: C2: PhasePrintLevel requires setting PrintPhaseLevel explici…
robcasloz Nov 20, 2025
b41146c
8367531: Template Framework: use scopes and tokens instead of misbeha…
eme64 Nov 20, 2025
ad38a12
8371557: java/net/httpclient/http3/H3RequestRejectedTest.java: javax.…
dfuch Nov 20, 2025
c419dda
8372163: G1: Remove unused G1HeapRegion::remove_code_root
albertnetymk Nov 20, 2025
7b11bd1
8372047: ClassTransform.transformingMethodBodies andThen composes inc…
liach Nov 20, 2025
f125c76
8247690: RunTest does not support running of JTREG manual tests
Nov 20, 2025
b9ee954
8371200: ZGC: C2 allocation deopt race
fisk Nov 20, 2025
45a2fd3
8325448: Hybrid Public Key Encryption
wangweij Nov 20, 2025
a890185
8333727: Use JOpt in jpackage to parse command line
Nov 20, 2025
267ce91
8372149: G1: Remove unnecessary num_added_to_group from G1CollectionS…
Nov 20, 2025
ea19ad2
8347167: Reduce allocation in com.sun.net.httpserver.Headers::normalize
SentryMan Nov 20, 2025
de0a1f8
8372277: Fix for JDK-8369517 is applied starting from source 24 inste…
Nov 20, 2025
b3acc48
8362894: PKCS12 KeyStore PBMAC1 interoperability testing
Nov 20, 2025
aa7718d
8372110: GenShen: Fix erroneous assert
kdnilsen Nov 20, 2025
0187f4d
8372023: Javac JMH failures
Nov 20, 2025
41d6dc3
8372117: Correct the misleading comment in Character.UnicodeBlock
naotoj Nov 20, 2025
45246bc
8371965: Convert TaskQueueSuper to use Atomic<T>
Nov 20, 2025
0972ba6
8371383: Test sun/security/tools/jarsigner/DefaultOptions.java failed…
Nov 21, 2025
d887359
8370976: Review the behavioral changes of core reflection descriptor …
liach Nov 21, 2025
2358d40
8371953: Document null handling in core reflection APIs
liach Nov 21, 2025
c2ea75b
8353749: Improve security warning when using JKS or JCEKS keystores
Nov 21, 2025
df24b90
8360571: Description of launchers is lost in two phase packaging
Nov 21, 2025
5922c3c
8371990: Remove two second delayed OOME after GC shutdown
stefank Nov 21, 2025
eeb7c3f
8371895: Lower GCTimeLimit in TestUseGCOverheadLimit.java
Nov 21, 2025
88ec4e6
8372154: AArch64: Match rule failure with some CompareAndSwap operand…
shipilev Nov 21, 2025
b7dc3af
8371574: Improve code coverage of PEM classes decode functionality
myankelev Nov 21, 2025
8a5c9e0
8372146: Follow-up changes to the Lazy Constants JEP
minborg Nov 21, 2025
d57fc1b
8372135: clang compilation error
Nov 21, 2025
30410fe
8333871: Check return values of sysinfo
MBaesken Nov 21, 2025
d01e7d9
8371783: Refactor GCCause in VM_CollectForMetadataAllocation
jsikstro Nov 21, 2025
018284d
8372162: G1: Merge subclasses of G1IHOPControl into parent class
albertnetymk Nov 21, 2025
41e0017
8372269: Parallel: Remove unused ParallelScavengeHeap::base
albertnetymk Nov 21, 2025
f912772
8372290: jpackage test lib improvements
Nov 21, 2025
e439909
8372292: Remove redundant "throws ConfigException"
Nov 21, 2025
3b1eb76
8367585: Prevent creation of unrepresentable Utf8Entry
liach Nov 21, 2025
5f806e7
8367049: URLPermission.<init> throws StringIndexOutOfBoundsException …
OumaIntissar Nov 21, 2025
e24e782
8372319: com/sun/crypto/provider/Cipher/HPKE/KAT9180 test has externa…
shipilev Nov 21, 2025
e4b583a
8372294: Fix Malformed problem list entry in ProblemList-jvmti-stress…
plummercj Nov 21, 2025
5b5d85b
8372360: Exclude jdk.jsobject from micros-javac input source packages
Nov 21, 2025
3a45e61
8369129: Raster createPackedRaster methods specification clean up
prrace Nov 21, 2025
2b5cd14
8282441: [LOOM] The debug agent should attempt to free vthread Thread…
plummercj Nov 21, 2025
2d815ac
8349535: Refactor ./pkcs11/Provider/MultipleLogins.sh to java test
myankelev Nov 21, 2025
ee9d553
8372307: Clean up the leftover code comment references to file.encodi…
hextriclosan Nov 21, 2025
d3328b4
8372125: containers/docker/TestPids.java fails after 8365606
Nov 23, 2025
e18e95e
8346962: Test CRLReadTimeout.java fails with -Xcomp on a fastdebug build
myankelev Nov 23, 2025
3f47e57
8372240: Convert FreeListAllocator to use Atomic<T>
Nov 24, 2025
43af7b5
8371309: Diagnostic.getEndPosition can throw an NPE with typical brok…
lahodaj Nov 24, 2025
99be0e7
8371581: C2: PhaseCCP should reach fixpoint by revisiting deeply-Valu…
shipilev Nov 24, 2025
0f01444
8371998: G1: Rename G1MergeHeapRootsTask::G1ClearBitmapClosure to be …
Nov 24, 2025
a7bb99e
8372119: Missing copyright header in MinMaxVector
galderz Nov 24, 2025
0c1ef36
8372256: ClassCastException in `ConcurrentHashMap#equals`
Nov 24, 2025
8ae4ea8
8371262: sun/security/pkcs11/Cipher/KeyWrap tests may silently skip
myankelev Nov 24, 2025
0a963b6
8371701: Add ability to set NUMA-affinity for threads
jsikstro Nov 24, 2025
aec5472
8372159: HttpClient SelectorManager thread could be a VirtualThread
dfuch Nov 24, 2025
c12389d
8372359: Clean jpackage error messages
Nov 24, 2025
a091af1
8371475: HttpClient: Implement CUBIC congestion controller
djelinski Nov 24, 2025
f8cf9ca
8370039: GenShen: array copy SATB barrier improvements
Nov 24, 2025
67b57f4
8370978: Zero JVM fails to build on i386 after JDK-8351149
Nov 24, 2025
2177260
8371458: [REDO] Remove exception handler stub code in C2
ruben-arm Nov 24, 2025
8bafc2f
8371789: C2: More explicit dump results for TypePtr
Nov 24, 2025
507a6d3
8368001: java/text/Format/NumberFormat/NumberRoundTrip.java timed out
Nov 24, 2025
e00dec5
8371667: Shenandoah: Re-design alloc request type enum for better eff…
Nov 24, 2025
42b108b
8372155: ReleaseInfoPlugin doesn't handle input file as UTF-8 properly
jerboaa Nov 24, 2025
dea95e6
8371869: RISC-V: too many warnings when build on BPI-F3 SBC
RealFYang Nov 25, 2025
cc5b35b
8370887: DelayScheduler.replace method may break the 4-ary heap in ce…
Nov 25, 2025
1226873
8372410: ThreadFactory used by Thread.Builder::factory uses non-optim…
franz1981 Nov 25, 2025
5ef2c9a
8370438: Offer link time optimization support on library level
MBaesken Nov 25, 2025
34d6cc0
8372344: QUIC transfer may deadlock if pacing rate is too high
djelinski Nov 25, 2025
ba3d4c4
8372337: clang compilation error on hardware_constructive_interferenc…
Nov 25, 2025
42f3333
8371368: SIGSEGV in JfrVframeStream::next_vframe() on arm64
Nov 25, 2025
67ef81e
8362958: Unnecessary copying / sorting in Streams using Comparator.na…
kilink Nov 25, 2025
c19b129
8326498: java.net.http.HttpClient connection leak using http/2
jaikiran Nov 25, 2025
49176e3
8372103: Metal JButton doesn't show focus if no text or icon
prsadhuk Nov 25, 2025
35f4a74
8366888: C2: incorrect assertion predicate with short running long co…
rwestrel Nov 25, 2025
c00d29a
8372414: Command "make test-prebuilt" fails when listing tests
Nov 25, 2025
d94c52c
8367656: Refactor Constantpool's operand array into two
jdksjolen Nov 25, 2025
81ea144
8372412: Increase buffer size for ring-buffer events in CollectedHeap
jsikstro Nov 25, 2025
c123006
8363943: ARM32: Represent Registers as values
iv-sukhanov Nov 25, 2025
c0abecd
8372441: JFR: Improve logging of TestBackToBackSensitive
egahlin Nov 25, 2025
b36b694
8371259: ML-DSA AVX2 and AVX512 intrinsics and improvements
Nov 25, 2025
d9b6c31
8372324: jdk/jfr/event/gc/detailed/TestStringDeduplicationEvent.java#…
fandreuz Nov 26, 2025
65f1ad6
8370203: Add jcmd AOT.end_recording diagnostic command
Nov 26, 2025
4ffdf7a
8366224: Introduce DecimalDigits.appendPair for efficient two-digit f…
wenshao Nov 26, 2025
7cc584f
8372399: Add missing CPE statements
Nov 26, 2025
e13dfd3
8370942: test/jdk/java/security/Provider/NewInstance.java and /test/j…
nehajoshinj Nov 26, 2025
cdf5fbe
8334928: Test sun/security/ssl/SSLSocketImpl/ReuseAddr.java failed: j…
nehajoshinj Nov 26, 2025
f3fddd6
8372251: Convert PartialArrayStepper/State to use Atomic<T>
Nov 26, 2025
3ef3f25
8372253: Improve logging to show why a class was excluded from AOT Cache
Delawen Nov 26, 2025
46ee8d5
8372547: New test sun/security/provider/acvp/ML_DSA_Intrinsic_Test.ja…
Nov 26, 2025
275cb9f
8360510: C2: Template Assertion Predicates are not cloned to the inne…
chhagedorn Nov 26, 2025
5fe731d
8349835: C2: Simplify IGV property printing
Nov 26, 2025
5291e1c
8372513: Shenandoah: ShenandoahMaxRegionSize can produce an unaligned…
stefank Nov 26, 2025
ac04662
8372336: javac fails with an exception when a class is missing while …
lahodaj Nov 26, 2025
4ae2f31
8371626: [linux] use icf=all for linking libraries
MBaesken Nov 26, 2025
c146805
8368551: Core dump warning may be confusing
Arraying Nov 26, 2025
74354f2
8372585: TestVerifyLoopOptimizationsHitsMemLimit fails with product b…
chhagedorn Nov 26, 2025
85d4f55
8372055: Fragment link tag does not work in package info
hns Nov 26, 2025
0a3809f
8369531: Wrong tooltip used in external class links
hns Nov 26, 2025
e3a0855
8371146: C2 SuperWord: VTransform::add_speculative_check uses pre_ini…
eme64 Nov 26, 2025
1ce2a44
8371571: Consolidate and enhance bulk memory segment ops benchmarks
minborg Nov 26, 2025
10ba0ab
8371637: allocateNativeInternal sometimes return incorrectly aligned …
Nov 26, 2025
c028369
8350938: ResourceParsingClassHierarchyResolver inflates all Utf8 CP e…
trevorkbond Nov 26, 2025
6e920fb
8372380: Make hs_err reporting more robust for unattached threads
Nov 26, 2025
42db9ab
8298432: Investigate the benefits of usage of GetPrimitiveArrayCritic…
mrserb Nov 26, 2025
847fbab
8352654: [REDO] nsk/jvmti/ tests should fail when nsk_jvmti_setFailS…
lmesnik Nov 26, 2025
79a6e5d
8372586: Crashes on ppc64(le) after JDK-8371368
Nov 27, 2025
d21114d
8372685: C2 SuperWord: wrong requires in test after JDK-8371146
eme64 Dec 1, 2025
178cd63
8372566: Genshen: crash at ShenandoahScanRemembered::process_clusters…
Dec 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions doc/testing.html
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,8 @@ <h4 id="repeat_count">REPEAT_COUNT</h4>
<h4 id="report">REPORT</h4>
<p>Use this report style when reporting test results (sent to JTReg as
<code>-report</code>). Defaults to <code>files</code>.</p>
<h4 id="manual">MANUAL</h4>
<p>Set to <code>true</code> to execute manual tests only.</p>
<h3 id="gtest-keywords">Gtest keywords</h3>
<h4 id="repeat">REPEAT</h4>
<p>The number of times to repeat the tests
Expand Down
4 changes: 4 additions & 0 deletions doc/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,10 @@ helps to reproduce intermittent test failures. Defaults to 0.
Use this report style when reporting test results (sent to JTReg as `-report`).
Defaults to `files`.

#### MANUAL

Set to `true` to execute manual tests only.

### Gtest keywords

#### REPEAT
Expand Down
11 changes: 9 additions & 2 deletions make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ $(eval $(call ParseKeywordVariable, JTREG, \
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR FAILURE_HANDLER_TIMEOUT \
TEST_MODE ASSERT VERBOSE RETAIN TEST_THREAD_FACTORY JVMTI_STRESS_AGENT \
MAX_MEM RUN_PROBLEM_LISTS RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT \
AOT_JDK $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
AOT_JDK MANUAL $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS \
$(CUSTOM_JTREG_STRING_KEYWORDS), \
Expand Down Expand Up @@ -911,7 +911,13 @@ define SetupRunJtregTestBody
-vmoption:-Dtest.boot.jdk="$$(BOOT_JDK)" \
-vmoption:-Djava.io.tmpdir="$$($1_TEST_TMP_DIR)"

$1_JTREG_BASIC_OPTIONS += -automatic -ignore:quiet
$1_JTREG_BASIC_OPTIONS += -ignore:quiet

ifeq ($$(JTREG_MANUAL), true)
$1_JTREG_BASIC_OPTIONS += -manual
else
$1_JTREG_BASIC_OPTIONS += -automatic
endif

# Make it possible to specify the JIB_DATA_DIR for tests using the
# JIB Artifact resolver
Expand Down Expand Up @@ -1151,6 +1157,7 @@ define SetupRunJtregTestBody
$$(EXPR) $$($1_PASSED) + $$($1_FAILED) + $$($1_ERROR) + $$($1_SKIPPED))) \
, \
$$(eval $1_PASSED_AND_RUNTIME_SKIPPED := 0) \
$$(eval $1_PASSED := 0) \
$$(eval $1_RUNTIME_SKIPPED := 0) \
$$(eval $1_SKIPPED := 0) \
$$(eval $1_FAILED := 0) \
Expand Down
12 changes: 12 additions & 0 deletions make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,17 @@ AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
C_O_FLAG_DEBUG_JVM="-O0"
C_O_FLAG_NONE="-O0"

if test "x$TOOLCHAIN_TYPE" = xgcc; then
C_O_FLAG_LTO="-flto=auto -fuse-linker-plugin -fno-strict-aliasing -fno-fat-lto-objects"
else
C_O_FLAG_LTO="-flto -fno-strict-aliasing"
fi

if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
C_O_FLAG_HIGHEST_JVM="${C_O_FLAG_HIGHEST_JVM} -finline-functions"
C_O_FLAG_HIGHEST="${C_O_FLAG_HIGHEST} -finline-functions"
C_O_FLAG_HI="${C_O_FLAG_HI} -finline-functions"
C_O_FLAG_LTO="${C_O_FLAG_LTO} -ffat-lto-objects"
fi

# -D_FORTIFY_SOURCE=2 hardening option needs optimization (at least -O1) enabled
Expand Down Expand Up @@ -317,6 +324,7 @@ AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
C_O_FLAG_DEBUG_JVM=""
C_O_FLAG_NONE="-Od"
C_O_FLAG_SIZE="-O1"
C_O_FLAG_LTO="-GL"
fi

# Now copy to C++ flags
Expand All @@ -328,6 +336,7 @@ AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
CXX_O_FLAG_LTO="$C_O_FLAG_LTO"

# Adjust optimization flags according to debug level.
case $DEBUG_LEVEL in
Expand Down Expand Up @@ -360,12 +369,15 @@ AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
AC_SUBST(C_O_FLAG_NORM)
AC_SUBST(C_O_FLAG_NONE)
AC_SUBST(C_O_FLAG_SIZE)
AC_SUBST(C_O_FLAG_LTO)

AC_SUBST(CXX_O_FLAG_HIGHEST_JVM)
AC_SUBST(CXX_O_FLAG_HIGHEST)
AC_SUBST(CXX_O_FLAG_HI)
AC_SUBST(CXX_O_FLAG_NORM)
AC_SUBST(CXX_O_FLAG_NONE)
AC_SUBST(CXX_O_FLAG_SIZE)
AC_SUBST(CXX_O_FLAG_LTO)
])

AC_DEFUN([FLAGS_SETUP_CFLAGS],
Expand Down
11 changes: 11 additions & 0 deletions make/autoconf/flags-ldflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
# add -z,relro (mark relocations read only) for all libs
# add -z,now ("full relro" - more of the Global Offset Table GOT is marked read only)
# add --no-as-needed to disable default --as-needed link flag on some GCC toolchains
# add --icf=all (Identical Code Folding — merges identical functions)
BASIC_LDFLAGS="-Wl,-z,defs -Wl,-z,relro -Wl,-z,now -Wl,--no-as-needed -Wl,--exclude-libs,ALL"
if test "x$LINKER_TYPE" = "xgold"; then
if test x$DEBUG_LEVEL = xrelease; then
BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,--icf=all"
fi
fi

# Linux : remove unused code+data in link step
if test "x$ENABLE_LINKTIME_GC" = xtrue; then
if test "x$OPENJDK_TARGET_CPU" = xs390x; then
Expand All @@ -61,13 +68,15 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
fi

BASIC_LDFLAGS_JVM_ONLY=""
LDFLAGS_LTO="-flto=auto -fuse-linker-plugin -fno-strict-aliasing"

LDFLAGS_CXX_PARTIAL_LINKING="$MACHINE_FLAG -r"

elif test "x$TOOLCHAIN_TYPE" = xclang; then
BASIC_LDFLAGS_JVM_ONLY="-mno-omit-leaf-frame-pointer -mstack-alignment=16 \
-fPIC"

LDFLAGS_LTO="-flto=auto -fuse-linker-plugin -fno-strict-aliasing"
LDFLAGS_CXX_PARTIAL_LINKING="$MACHINE_FLAG -r"

if test "x$OPENJDK_TARGET_OS" = xlinux; then
Expand All @@ -87,6 +96,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
BASIC_LDFLAGS="-opt:ref"
BASIC_LDFLAGS_JDK_ONLY="-incremental:no"
BASIC_LDFLAGS_JVM_ONLY="-opt:icf,8 -subsystem:windows"
LDFLAGS_LTO="-LTCG:INCREMENTAL"
fi

if (test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang) \
Expand Down Expand Up @@ -148,6 +158,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],

# Export some intermediate variables for compatibility
LDFLAGS_CXX_JDK="$DEBUGLEVEL_LDFLAGS_JDK_ONLY"
AC_SUBST(LDFLAGS_LTO)
AC_SUBST(LDFLAGS_CXX_JDK)
AC_SUBST(LDFLAGS_CXX_PARTIAL_LINKING)
])
Expand Down
5 changes: 5 additions & 0 deletions make/autoconf/spec.gmk.template
Original file line number Diff line number Diff line change
Expand Up @@ -513,12 +513,14 @@ C_O_FLAG_HI := @C_O_FLAG_HI@
C_O_FLAG_NORM := @C_O_FLAG_NORM@
C_O_FLAG_NONE := @C_O_FLAG_NONE@
C_O_FLAG_SIZE := @C_O_FLAG_SIZE@
C_O_FLAG_LTO := @C_O_FLAG_LTO@
CXX_O_FLAG_HIGHEST_JVM := @CXX_O_FLAG_HIGHEST_JVM@
CXX_O_FLAG_HIGHEST := @CXX_O_FLAG_HIGHEST@
CXX_O_FLAG_HI := @CXX_O_FLAG_HI@
CXX_O_FLAG_NORM := @CXX_O_FLAG_NORM@
CXX_O_FLAG_NONE := @CXX_O_FLAG_NONE@
CXX_O_FLAG_SIZE := @CXX_O_FLAG_SIZE@
CXX_O_FLAG_LTO := @CXX_O_FLAG_LTO@

GENDEPS_FLAGS := @GENDEPS_FLAGS@

Expand Down Expand Up @@ -587,6 +589,9 @@ LDFLAGS_CXX_JDK := @LDFLAGS_CXX_JDK@
# LDFLAGS specific to partial linking.
LDFLAGS_CXX_PARTIAL_LINKING := @LDFLAGS_CXX_PARTIAL_LINKING@

# LDFLAGS specific to link time optimization
LDFLAGS_LTO := @LDFLAGS_LTO@

# Sometimes a different linker is needed for c++ libs
LDCXX := @LDCXX@
# The flags for linking libstdc++ linker.
Expand Down
1 change: 1 addition & 0 deletions make/autoconf/toolchain.m4
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_LD_VERSION],
if [ [[ "$LINKER_VERSION_STRING" == *gold* ]] ]; then
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
$SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*) .*/\1/'` ]
LINKER_TYPE=gold
else
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
$SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*/\1/'` ]
Expand Down
1 change: 1 addition & 0 deletions make/common/NativeCompilation.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ include native/Paths.gmk
# SYSROOT_CFLAGS the compiler flags for using the specific sysroot
# SYSROOT_LDFLAGS the linker flags for using the specific sysroot
# OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST, HIGHEST_JVM, SIZE
# LINK_TIME_OPTIMIZATION if set to true, enables link time optimization
# DISABLED_WARNINGS_<toolchain> Disable the given warnings for the specified toolchain
# DISABLED_WARNINGS_<toolchain>_<OS> Disable the given warnings for the specified
# toolchain and target OS
Expand Down
9 changes: 9 additions & 0 deletions make/common/native/Flags.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ define SetupCompilerFlags
$1_EXTRA_CXXFLAGS += $(CFLAGS_WARNINGS_ARE_ERRORS)
endif

ifeq (true, $$($1_LINK_TIME_OPTIMIZATION))
$1_EXTRA_CFLAGS += $(C_O_FLAG_LTO)
$1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_LTO)
endif

ifeq (NONE, $$($1_OPTIMIZATION))
$1_OPT_CFLAGS := $(C_O_FLAG_NONE)
$1_OPT_CXXFLAGS := $(CXX_O_FLAG_NONE)
Expand Down Expand Up @@ -222,6 +227,10 @@ define SetupLinkerFlags
# Pickup extra OPENJDK_TARGET_OS_TYPE, OPENJDK_TARGET_OS and TOOLCHAIN_TYPE
# dependent variables for LDFLAGS and LIBS, and additionally the pair dependent
# TOOLCHAIN_TYPE plus OPENJDK_TARGET_OS
ifeq ($$($1_LINK_TIME_OPTIMIZATION), true)
$1_EXTRA_LDFLAGS += $(LDFLAGS_LTO)
endif

$1_EXTRA_LDFLAGS += $$($1_LDFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS)) \
$$($1_LDFLAGS_$(TOOLCHAIN_TYPE)) $$($1_LDFLAGS_$(TOOLCHAIN_TYPE)_$(OPENJDK_TARGET_OS))
$1_EXTRA_LIBS += $$($1_LIBS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LIBS_$(OPENJDK_TARGET_OS)) \
Expand Down
1 change: 1 addition & 0 deletions make/hotspot/lib/CompileJvm.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
LDFLAGS := $(JVM_LDFLAGS), \
LIBS := $(JVM_LIBS), \
OPTIMIZATION := $(JVM_OPTIMIZATION), \
LINK_TIME_OPTIMIZATION := $(JVM_LTO), \
OBJECT_DIR := $(JVM_OUTPUTDIR)/objs, \
STRIPFLAGS := $(JVM_STRIPFLAGS), \
EMBED_MANIFEST := true, \
Expand Down
18 changes: 4 additions & 14 deletions make/hotspot/lib/JvmFeatures.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -175,22 +175,12 @@ ifeq ($(call check-jvm-feature, link-time-opt), true)
# Set JVM_OPTIMIZATION directly so other jvm-feature flags can override it
# later on if desired
JVM_OPTIMIZATION := HIGHEST_JVM
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, clang), true)
JVM_CFLAGS_FEATURES += -flto -fno-strict-aliasing
ifeq ($(call isBuildOs, aix), true)
JVM_CFLAGS_FEATURES += -ffat-lto-objects
endif
JVM_LDFLAGS_FEATURES += $(CXX_O_FLAG_HIGHEST_JVM) -flto -fno-strict-aliasing
else ifeq ($(call isCompiler, microsoft), true)
JVM_CFLAGS_FEATURES += -GL
JVM_LDFLAGS_FEATURES += -LTCG:INCREMENTAL
JVM_LTO := true
ifneq ($(call isCompiler, microsoft), true)
JVM_LDFLAGS_FEATURES += $(CXX_O_FLAG_HIGHEST_JVM)
endif
else
JVM_LTO := false
ifeq ($(call isCompiler, gcc), true)
JVM_LDFLAGS_FEATURES += -O1
endif
Expand Down
1 change: 1 addition & 0 deletions make/modules/java.desktop/lib/ClientLibraries.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \
OPTIMIZATION := SIZE, \
LINK_TIME_OPTIMIZATION := true, \
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) \
$(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS) \
$(ICONV_CFLAGS), \
Expand Down
Loading
Loading