Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR to simplify review #9

Open
wants to merge 139 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
5f05b07
initial commit - mapping elements and comparing since values
nizarbenalla Feb 16, 2024
6512885
fixed OutOfMemoryError error
nizarbenalla Feb 19, 2024
2bb9df6
getElementName returns correct ID for Interface types - Created TriCo…
nizarbenalla Feb 20, 2024
bcaa855
getElementName returns correct ID for Interface types - Created TriCo…
nizarbenalla Feb 20, 2024
19728b2
checking until --release 23
nizarbenalla Feb 21, 2024
3bcaaed
improved getElementName used method overloading for better readability
nizarbenalla Feb 22, 2024
e902a7c
made use of Elements interface
nizarbenalla Feb 22, 2024
04056e1
improve code - better practices
nizarbenalla Feb 22, 2024
e687733
clearer variable names
nizarbenalla Feb 23, 2024
bba9410
Correctly using Consumer interface - following good practices
nizarbenalla Feb 23, 2024
6d1763c
Limit the universe of observable modules - code runs faster
nizarbenalla Feb 23, 2024
817d0dc
working demo of tool + output of program
nizarbenalla Feb 27, 2024
602d0d2
small updqte
nizarbenalla Feb 27, 2024
c8141fd
temp- did some checks
nizarbenalla Feb 28, 2024
0589820
removed statements used for debugging purposes
nizarbenalla Feb 29, 2024
442c520
removed unused method parameter in analyzeClassCheck
nizarbenalla Feb 29, 2024
2952907
closing file manager
nizarbenalla Mar 1, 2024
423e280
experimental trying to run program without cli commands
nizarbenalla Mar 1, 2024
73288e7
made some changes to run from cmd
nizarbenalla Mar 1, 2024
55a64aa
removed functional interface
nizarbenalla Mar 1, 2024
0c6cc3b
made changes to run program from cli -removed functional interface- c…
nizarbenalla Mar 1, 2024
779901d
Merge remote-tracking branch 'origin/sincechecker' into sincechecker
nizarbenalla Mar 1, 2024
53eb0e0
draft- changes
nizarbenalla Mar 12, 2024
e8c514b
create java.base test, use Records, rename main class
nizarbenalla Mar 12, 2024
5f3b337
minor changes 2
nizarbenalla Mar 12, 2024
16562b3
Moved SinceCheckerHelper to /test, added jtreg config for JUnit test …
nizarbenalla Mar 14, 2024
cb37de2
get src.zip from java.home, fixed some IO issues
nizarbenalla Mar 14, 2024
553f980
running two tests, separate class for algorithm, tests , jtreg header
nizarbenalla Mar 15, 2024
80b98c8
8320503: Print warning if VM reaches MallocLimit during error reporting
tstuefe Mar 15, 2024
bf990c8
8328269: NonFocusablePopupMenuTest.java should be marked as headful
DamonFool Mar 15, 2024
90ab52e
8328166: Epsilon: 'EpsilonHeap::allocate_work' misuses the parameter …
lgxbslgx Mar 15, 2024
42aec8c
8328146: Set LIBCXX automatically
magicus Mar 15, 2024
bfba489
8328157: Move C[XX]FLAGS_JDK[LIB/EXE] to JdkNativeCompilation.gmk
magicus Mar 15, 2024
71f9c4e
8320534: fatal error for the NMTBenchmark test run for the mainline b…
Mar 15, 2024
3284e20
fixed header-merged main method into SinceCheckerHelper-renamed Since…
nizarbenalla Mar 15, 2024
044f4ed
8326979: (jdeps) improve the error message for FindException caused b…
Mar 15, 2024
65a84c2
8328006: refactor large anonymous inner class in HtmlDocletWriter
jonathan-gibbons Mar 15, 2024
9bc1b06
8328242: Add a log area to the PassFailJFrame
Mar 15, 2024
0204aac
8328115: Convert java/awt/font/TextLayout/TestJustification.html appl…
Mar 15, 2024
0719419
8328236: module_entry in CDS map file has stale value
iklam Mar 16, 2024
d32ce65
8327651: Rename DictionaryEntry members related to protection domain
iklam Mar 17, 2024
232c886
hashmap shouldn't be static
nizarbenalla Mar 17, 2024
ece4124
8328247: Remove redundant dir for tests converted from applet to main
prsadhuk Mar 18, 2024
48717d6
8326333: jshell <TAB> completion on arrays is incomplete
lahodaj Mar 18, 2024
3c70f26
8328112: Remove CardTable::_guard_region
lgxbslgx Mar 18, 2024
c342188
8328074: Add jcheck whitespace checking for assembly files
magicus Mar 18, 2024
7baec66
8328168: Epsilon: Premature OOM when allocating object larger than un…
lgxbslgx Mar 18, 2024
86f1744
8328248: Convert javax/swing/JSlider/6587742/bug6587742.java applet t…
Mar 18, 2024
fb390d2
8327839: Crash with unboxing and widening primitive conversion in switch
biboudis Mar 18, 2024
f3af918
8327945: Inline HasScavengableOops
albertnetymk Mar 18, 2024
9e98118
8328177: Move LDFLAGS_JDK[LIB/EXE] to JdkNativeCompilation.gmk
magicus Mar 18, 2024
7734466
8325871: Move StringTable and SymbolTable rehashing calls
coleenp Mar 18, 2024
dec68d7
8328234: Remove unused nativeUtils files
lmesnik Mar 18, 2024
569b05a
8327818: Implement Kerberos debug with sun.security.util.Debug
wangweij Mar 18, 2024
85fc47c
8327180: Failed: java/io/ObjectStreamClass/ObjectStreamClassCaching.j…
Mar 18, 2024
fc0472b
8328000: Convert /java/awt/im/8154816/bug8154816.java applet test to …
Mar 18, 2024
9e32db2
8328309: Remove malformed masked shift instruction selection patterns
Mar 18, 2024
c901da4
8327098: GTest needs larger combination limit
kdnilsen Mar 18, 2024
3f2e849
8280392: java/awt/Focus/NonFocusableWindowTest/NonfocusableOwnerTest.…
Mar 18, 2024
2dd5fba
8319889: Vector API tests trigger VM crashes with -XX:+StressIncremen…
Mar 19, 2024
9059727
8327182: Move serverAlias into the loop
Mar 19, 2024
652fb3a
8328154: Convert sun/java2d/loops/CopyAreaSpeed.java applet test to main
Mar 19, 2024
ac5b6cb
8327757: Convert javax/swing/JSlider/6524424/bug6524424.java applet t…
prsadhuk Mar 19, 2024
4ef591f
8326964: Remove Eclipse Shared Workspaces
TheShermanTanker Mar 19, 2024
c0fc956
8328275: CodeCache::print_internals should not be called in PRODUCT code
djelinski Mar 19, 2024
e1b0af2
8323972: C2 compilation fails with assert(!x->as_Loop()->is_loop_nest…
rwestrel Mar 19, 2024
053ff76
8308660: C2 compilation hits 'node must be dead' assert
rwestrel Mar 19, 2024
6eea5d6
8325187: JVMTI GetThreadState says virtual thread is JVMTI_THREAD_STA…
Mar 19, 2024
c59c41a
8326941: Remove StringUTF16::isBigEndian
minborg Mar 19, 2024
5b6b514
8325362: Allow to create a simple in-memory input JavaFileObject
lahodaj Mar 19, 2024
f1c69cc
8289822: G1: Make concurrent mark code owner of TAMSes
Mar 19, 2024
c01095c
8328262: Convert javax/swing/JSplitPane/8132123/bug8132123.java apple…
Mar 19, 2024
8360e7c
moved methods that are close to each other (in what they do), closer …
nizarbenalla Mar 19, 2024
2b2d012
do away with hardcoded current JDK version
nizarbenalla Mar 19, 2024
9c327b9
no need for finalCt, limited scope of Javatask
nizarbenalla Mar 19, 2024
db4842c
8328364: Remove redundant fields in 'BOTConstants'
lgxbslgx Mar 19, 2024
2094ff3
8328279: Convert java/awt/Cursor/CursorOverlappedPanelsTest test to main
Mar 19, 2024
5f2a92d
8328244: Convert javax/swing/JSlider/6742358/bug6742358.java applet t…
Mar 19, 2024
f140eb4
8297879: javadoc link to preview JEP 1000 has grouping character comma
Mar 19, 2024
3b305d5
8313306: More sensible memory reservation logging
Mar 19, 2024
f83bdca
small improvements
nizarbenalla Mar 19, 2024
1329216
8328261: public lookup fails with IllegalAccessException when used wh…
Mar 19, 2024
9214a62
8328341: Remove deprecated per-thread compiler stats in sun.management
Mar 19, 2024
8ed13c0
handling exceptions
nizarbenalla Mar 19, 2024
2d50842
Revert "handling exceptions"
nizarbenalla Mar 19, 2024
9ca4ae3
8328264: AArch64: remove UseNeon condition in CRC32 intrinsic
Mar 19, 2024
bef26a5
added jtreg.SkippedException
nizarbenalla Mar 19, 2024
3c2de9a
do away with StringBuilder in favor of List
nizarbenalla Mar 19, 2024
1dbba0d
method overloading not needed
nizarbenalla Mar 19, 2024
eb4187e
fix logic around throwing SkippedException
nizarbenalla Mar 19, 2024
5bb8b27
big step - limit the tool to the specific module passed to it as para…
nizarbenalla Mar 19, 2024
4f8f486
8328012: Convert InputMethod (/java/awt/im) applet tests to main
Mar 19, 2024
379ea57
removed unnecessary parameter that was always null
nizarbenalla Mar 19, 2024
7231fd7
8328350: G1: Remove DO_DISCOVERED_AND_DISCOVERY
albertnetymk Mar 19, 2024
04eb41c
Merge branch 'master' into sincechecker
nizarbenalla Mar 20, 2024
d59cbca
removed JavaSource class after openjdk#18149
nizarbenalla Mar 20, 2024
a7b4e73
fixed mistake related to SimpleJavaFileObject
nizarbenalla Mar 20, 2024
e2281fa
better error handling
nizarbenalla Mar 20, 2024
553cf05
small change
nizarbenalla Mar 20, 2024
13abf83
small change
nizarbenalla Mar 20, 2024
3104150
do away with public modifiers
nizarbenalla Mar 20, 2024
0a8f395
do away with public modifiers
nizarbenalla Mar 20, 2024
b6a646d
do away with public modifier
nizarbenalla Mar 20, 2024
670ed5d
fixed error, should handle baseline better
nizarbenalla Mar 20, 2024
a96ae6e
fixed error, should handle baseline better
nizarbenalla Mar 20, 2024
4cc5158
more consistent error message for wrong tags
nizarbenalla Mar 20, 2024
1f65e80
small change
nizarbenalla Mar 20, 2024
b737ffb
get main program for testing
nizarbenalla Feb 27, 2024
fa195b1
using local path for testing - temporary
nizarbenalla Mar 21, 2024
8854845
added output for modules for reference - need to further improve erro…
nizarbenalla Mar 21, 2024
3deab5b
added rules for @ since - subject for modification/review. was forced…
nizarbenalla Mar 21, 2024
d50f0b1
added all tests - runs under 30 seconds
nizarbenalla Mar 22, 2024
91ab481
added legacy methods in jdk.compiler from JDK 13
nizarbenalla Mar 22, 2024
e8ef2b4
13 test with `@since`, 23 without mistakes found, few outhers with mi…
nizarbenalla Mar 24, 2024
613ac5f
get `@since` from package-info, some improvments some TODOs to finalize
nizarbenalla Mar 25, 2024
9b4b124
get `@since` from package-info, some improvments
nizarbenalla Mar 26, 2024
acfecc3
many hours were lost here
nizarbenalla Mar 27, 2024
a238bb3
somewhat of a fix for modules without any unqualified exports
nizarbenalla Mar 27, 2024
22c2a5f
checking `@since` of module-info.java - step 1
nizarbenalla Mar 29, 2024
9fd7713
added `@since` checks to langtools tier 3 tests - location subject to…
nizarbenalla Apr 1, 2024
d3491a6
dealing with modules with no unqualified exports
nizarbenalla Apr 1, 2024
0556bb6
added some jtreg tests under `test/jdk`
nizarbenalla Apr 2, 2024
2f683c6
errors or `@since` not matching known patterns should not stop execution
nizarbenalla Apr 3, 2024
9fece1c
better mapping of preview elements before `@PreviewFeature`
nizarbenalla Apr 4, 2024
442014b
improvements around dealing with root modules, renamed main file
nizarbenalla Apr 6, 2024
973d773
building a workaround for dealing with overriding methods
nizarbenalla Apr 8, 2024
ad3cdf3
current attempt at dealing with overriden methods- still needs work
nizarbenalla Apr 8, 2024
f867607
current attempt at dealing with overriden methods- still needs work
nizarbenalla Apr 8, 2024
6ac6abf
no longer using package version as enclosing version
nizarbenalla Apr 8, 2024
f4cfaea
Version 1 of the Tool - to revert to in case things break
nizarbenalla Mar 22, 2024
8607d44
Trying to look at the overriden method from the supertype - work in p…
nizarbenalla Apr 9, 2024
68f3f33
added note
nizarbenalla Apr 9, 2024
516cc3c
Since checker v1.0
nizarbenalla Apr 15, 2024
3bc65ce
fixed typo
nizarbenalla Apr 15, 2024
5b0bac5
unnecesary condition
nizarbenalla Apr 16, 2024
8dc0365
moved check for cmd arguments
nizarbenalla Apr 16, 2024
58f55f5
removed some tests for now
nizarbenalla Apr 18, 2024
59280f9
added test for `java.base` to tier 3
nizarbenalla Apr 18, 2024
22df6b1
Improvement from Jan : An attempt to make the rules more explicit, an…
nizarbenalla Apr 18, 2024
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
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,5 @@ NashornProfile.txt
/src/utils/LogCompilation/target/
/.project/
/.settings/
/.project
/.classpath
/.cproject
/compile_commands.json
/.cache
2 changes: 1 addition & 1 deletion .jcheck/conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ version=0
domain=openjdk.org

[checks "whitespace"]
files=.*\.cpp|.*\.hpp|.*\.c|.*\.h|.*\.java|.*\.cc|.*\.hh|.*\.m|.*\.mm|.*\.md|.*\.properties|.*\.gmk|.*\.m4|.*\.ac|Makefile
files=.*\.cpp|.*\.hpp|.*\.c|.*\.h|.*\.java|.*\.cc|.*\.hh|.*\.m|.*\.mm|.*\.S|.*\.md|.*\.properties|.*\.gmk|.*\.m4|.*\.ac|Makefile
ignore-tabs=.*\.gmk|Makefile

[checks "merge"]
Expand Down
7 changes: 0 additions & 7 deletions doc/ide.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ <h4 id="eclipse-cdt">Eclipse CDT</h4>
<pre><code>make eclipse-mixed-env</code></pre>
<p>Do note that this generates all features that come with both Java and
C/C++ natures.</p>
<p>By default, the Eclipse Workspace is located in the ide subdirectory
in the build output. To share the JDK's source directory with the
Eclipse Workspace, you can instead run:</p>
<pre><code>make eclipse-shared-&lt;ENV&gt;-env</code></pre>
<p>Eclipse support in the JDK is relatively new, so do keep in mind that
not everything may work at the moment. As such, the resulting Workspace
also has compilation database parsing support enabled, so you can pass
Expand Down Expand Up @@ -160,9 +156,6 @@ <h4 id="eclipse">Eclipse</h4>
<p>If doing so results in an error, you can also import the JDK via
<code>File -&gt; Import -&gt; Existing Projects into Workspace</code> as
a last resort.</p>
<p>Alternatively, if you want a Java Workspace inside the JDK's source
directory, you can instead run:</p>
<pre><code>make eclipse-shared-java-env</code></pre>
<p>As mentioned above for Eclipse CDT, you can create a combined Java
and C/C++ Workspace which can conveniently switch between Java and C/C++
natures during development by running:</p>
Expand Down
15 changes: 0 additions & 15 deletions doc/ide.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,6 @@ make eclipse-mixed-env
Do note that this generates all features that come with both Java and C/C++
natures.

By default, the Eclipse Workspace is located in the ide subdirectory in the
build output. To share the JDK's source directory with the Eclipse Workspace,
you can instead run:

```
make eclipse-shared-<ENV>-env
```

Eclipse support in the JDK is relatively new, so do keep in mind that not
everything may work at the moment. As such, the resulting Workspace also
has compilation database parsing support enabled, so you can pass Eclipse
Expand Down Expand Up @@ -176,13 +168,6 @@ If doing so results in an error, you can also import the JDK via
`File -> Import -> Existing Projects into Workspace`
as a last resort.

Alternatively, if you want a Java Workspace inside the JDK's source directory,
you can instead run:

```
make eclipse-shared-java-env
```

As mentioned above for Eclipse CDT, you can create a combined Java and C/C++
Workspace which can conveniently switch between Java and C/C++ natures during
development by running:
Expand Down
16 changes: 9 additions & 7 deletions make/Hsdis.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ REAL_HSDIS_NAME := hsdis-$(OPENJDK_TARGET_CPU_LEGACY_LIB)$(SHARED_LIBRARY_SUFFIX
BUILT_HSDIS_LIB := $(HSDIS_OUTPUT_DIR)/$(REAL_HSDIS_NAME)

HSDIS_LINK_TYPE := C
HSDIS_TOOLCHAIN_CFLAGS := $(CFLAGS_JDKLIB)
HSDIS_TOOLCHAIN_LDFLAGS := $(LDFLAGS_JDKLIB)

ifeq ($(HSDIS_BACKEND), capstone)
ifeq ($(call isTargetCpuArch, x86), true)
Expand All @@ -60,7 +58,6 @@ endif
ifeq ($(HSDIS_BACKEND), llvm)
# Use C++ instead of C
HSDIS_LINK_TYPE := C++
HSDIS_TOOLCHAIN_CFLAGS := $(CXXFLAGS_JDKLIB)

ifeq ($(call isTargetOs, linux), true)
LLVM_OS := pc-linux-gnu
Expand Down Expand Up @@ -128,8 +125,9 @@ ifeq ($(HSDIS_BACKEND), binutils)
CFLAGS_WARNINGS_ARE_ERRORS := -Werror
SHARED_LIBRARY_FLAGS := -shared

HSDIS_TOOLCHAIN_CFLAGS :=
HSDIS_TOOLCHAIN_LDFLAGS := -L$(MINGW_GCC_LIB_PATH) -L$(MINGW_SYSROOT_LIB_PATH)
HSDIS_TOOLCHAIN_DEFAULT_CFLAGS := false
HSDIS_TOOLCHAIN_DEFAULT_LDFLAGS := false
HSDIS_LDFLAGS += -L$(MINGW_GCC_LIB_PATH) -L$(MINGW_SYSROOT_LIB_PATH)
MINGW_DLLCRT := $(MINGW_SYSROOT_LIB_PATH)/dllcrt2.o
HSDIS_TOOLCHAIN_LIBS := $(MINGW_DLLCRT) -lmingw32 -lgcc -lgcc_eh -lmoldname \
-lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32
Expand All @@ -147,8 +145,12 @@ $(eval $(call SetupJdkLibrary, BUILD_HSDIS, \
OBJECT_DIR := $(HSDIS_OUTPUT_DIR), \
DISABLED_WARNINGS_gcc := undef format-nonliteral sign-compare, \
DISABLED_WARNINGS_clang := undef format-nonliteral, \
CFLAGS := $(HSDIS_TOOLCHAIN_CFLAGS) $(HSDIS_CFLAGS), \
LDFLAGS := $(HSDIS_TOOLCHAIN_LDFLAGS) $(HSDIS_LDFLAGS) $(SHARED_LIBRARY_FLAGS), \
DEFAULT_CFLAGS := $(HSDIS_TOOLCHAIN_DEFAULT_CFLAGS), \
CFLAGS := $(HSDIS_CFLAGS), \
CXXFLAGS := $(HSDIS_CFLAGS), \
LD_SET_ORIGIN := false, \
DEFAULT_LDFLAGS := $(HSDIS_TOOLCHAIN_DEFAULT_LDFLAGS), \
LDFLAGS := $(HSDIS_LDFLAGS) $(SHARED_LIBRARY_FLAGS), \
LIBS := $(HSDIS_LIBS) $(HSDIS_TOOLCHAIN_LIBS), \
))

Expand Down
28 changes: 4 additions & 24 deletions make/Main.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -268,42 +268,22 @@ $(eval $(call SetupTarget, hotspot-ide-project, \

$(eval $(call SetupTarget, eclipse-java-env, \
MAKEFILE := ide/eclipse/CreateWorkspace, \
ARGS := --always-make WORKSPACE=java SHARED=false, \
ARGS := --always-make WORKSPACE=java, \
))

$(eval $(call SetupTarget, eclipse-hotspot-env, \
MAKEFILE := ide/eclipse/CreateWorkspace, \
ARGS := --always-make WORKSPACE=hotspot SHARED=false, \
ARGS := --always-make WORKSPACE=hotspot, \
))

$(eval $(call SetupTarget, eclipse-native-env, \
MAKEFILE := ide/eclipse/CreateWorkspace, \
ARGS := --always-make WORKSPACE=native SHARED=false, \
ARGS := --always-make WORKSPACE=native, \
))

$(eval $(call SetupTarget, eclipse-mixed-env, \
MAKEFILE := ide/eclipse/CreateWorkspace, \
ARGS := --always-make SHARED=false, \
))

$(eval $(call SetupTarget, eclipse-shared-java-env, \
MAKEFILE := ide/eclipse/CreateWorkspace, \
ARGS := --always-make WORKSPACE=java SHARED=true, \
))

$(eval $(call SetupTarget, eclipse-shared-hotspot-env, \
MAKEFILE := ide/eclipse/CreateWorkspace, \
ARGS := --always-make WORKSPACE=hotspot SHARED=true, \
))

$(eval $(call SetupTarget, eclipse-shared-native-env, \
MAKEFILE := ide/eclipse/CreateWorkspace, \
ARGS := --always-make WORKSPACE=native SHARED=true, \
))

$(eval $(call SetupTarget, eclipse-shared-mixed-env, \
MAKEFILE := ide/eclipse/CreateWorkspace, \
ARGS := --always-make SHARED=true, \
ARGS := --always-make, \
))

ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \
Expand Down
47 changes: 46 additions & 1 deletion make/common/JdkNativeCompilation.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -140,6 +140,10 @@ define SetupJdkLibraryBody
endif
endif

ifeq ($$($1_LINK_TYPE), C++)
$1_LIBS += $(LIBCXX)
endif

ifeq ($$($1_SRC), )
ifneq ($$(MODULE), )
$1_SRC := $$(call FindSrcDirsForLib, $$(MODULE), $$($1_NAME))
Expand Down Expand Up @@ -189,6 +193,14 @@ define SetupJdkLibraryBody
$1_EXTRA_HEADER_FLAGS := $$(addprefix -I, $$($1_PROCESSED_EXTRA_HEADER_DIRS))
endif

ifneq ($$($1_DEFAULT_CFLAGS), false)
# Set the default flags first to be able to override
$1_CFLAGS := $$(filter-out $$($1_CFLAGS_FILTER_OUT), $$(CFLAGS_JDKLIB)) $$($1_CFLAGS)

# Set the default flags first to be able to override
$1_CXXFLAGS := $$(filter-out $$($1_CXXFLAGS_FILTER_OUT), $$(CXXFLAGS_JDKLIB)) $$($1_CXXFLAGS)
endif

ifneq ($$($1_CFLAGS), )
$1_CFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_EXTRA_HEADER_FLAGS)
endif
Expand All @@ -199,6 +211,18 @@ define SetupJdkLibraryBody
$1_CFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_EXTRA_HEADER_FLAGS)
endif

ifneq ($$($1_DEFAULT_LDFLAGS), false)
# Set the default flags first to be able to override
$1_LDFLAGS := $$(filter-out $$($1_LDFLAGS_FILTER_OUT), $$(LDFLAGS_JDKLIB)) $$($1_LDFLAGS)
endif

ifneq ($$($1_LD_SET_ORIGIN), false)
$1_LDFLAGS += $$(call SET_SHARED_LIBRARY_ORIGIN)
endif
# APPEND_LDFLAGS, if it exists, must be set after the origin flags
# This is a workaround to keep existing behavior
$1_LDFLAGS += $$($1_APPEND_LDFLAGS)

# Since we reuse the rule name ($1), all our arguments will pass through.
# We lose in transparency, but gain in brevity in this call...
$$(eval $$(call SetupNativeCompilation, $1, ))
Expand Down Expand Up @@ -233,6 +257,10 @@ define SetupJdkExecutableBody
endif
endif

ifeq ($$($1_LINK_TYPE), C++)
$1_LIBS += $(LIBCXX)
endif

ifeq ($$($1_VERSIONINFO_RESOURCE), )
$1_VERSIONINFO_RESOURCE := $$(GLOBAL_VERSION_INFO_RESOURCE)
endif
Expand All @@ -245,6 +273,23 @@ define SetupJdkExecutableBody
-I$(TOPDIR)/src/java.base/windows/native/common \
$$($1_EXTRA_RCFLAGS)

ifneq ($$($1_DEFAULT_CFLAGS), false)
# Set the default flags first to be able to override
$1_CFLAGS := $$(filter-out $$($1_CFLAGS_FILTER_OUT), $$(CFLAGS_JDKEXE)) $$($1_CFLAGS)

# Set the default flags first to be able to override
$1_CXXFLAGS := $$(filter-out $$($1_CXXFLAGS_FILTER_OUT), $$(CXXFLAGS_JDKEXE)) $$($1_CXXFLAGS)
endif

ifneq ($$($1_DEFAULT_LDFLAGS), false)
# Set the default flags first to be able to override
$1_LDFLAGS := $$(filter-out $$($1_LDFLAGS_FILTER_OUT), $$(LDFLAGS_JDKEXE)) $$($1_LDFLAGS)
endif

ifneq ($$($1_LD_SET_ORIGIN), false)
$1_LDFLAGS += $$(call SET_EXECUTABLE_ORIGIN)
endif

# Since we reuse the rule name ($1), all our arguments will pass through.
# We lose in transparency, but gain in brevity in this call...
$$(eval $$(call SetupNativeCompilation, $1))
Expand Down
7 changes: 2 additions & 5 deletions make/common/modules/LauncherCommon.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,14 @@ define SetupBuildLauncherBody
NAME := $1, \
EXTRA_FILES := $$($1_EXTRA_FILES), \
OPTIMIZATION := $$($1_OPTIMIZATION), \
CFLAGS := $$(CFLAGS_JDKEXE) \
$$(LAUNCHER_CFLAGS) \
CFLAGS := $$(LAUNCHER_CFLAGS) \
$$(VERSION_CFLAGS) \
-DLAUNCHER_NAME='"$$(LAUNCHER_NAME)"' \
-DPROGNAME='"$1"' \
$$($1_CFLAGS), \
CFLAGS_windows := $$($1_CFLAGS_windows), \
DISABLED_WARNINGS_gcc := unused-function, \
LDFLAGS := $$(LDFLAGS_JDKEXE) \
$$(call SET_EXECUTABLE_ORIGIN) \
$$($1_LDFLAGS), \
LDFLAGS := $$($1_LDFLAGS), \
LDFLAGS_linux := $$(call SET_EXECUTABLE_ORIGIN,/../lib) \
-L$(call FindLibDirForModule, java.base), \
LDFLAGS_macosx := $$(call SET_EXECUTABLE_ORIGIN,/../lib) \
Expand Down
8 changes: 6 additions & 2 deletions make/hotspot/lib/CompileGtest.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBGTEST, \
INCLUDE_FILES := gtest-all.cc gmock-all.cc, \
DISABLED_WARNINGS_gcc := undef unused-result format-nonliteral maybe-uninitialized, \
DISABLED_WARNINGS_clang := undef unused-result format-nonliteral, \
DEFAULT_CFLAGS := false, \
CFLAGS := $(JVM_CFLAGS) \
-I$(GTEST_FRAMEWORK_SRC)/googletest \
-I$(GTEST_FRAMEWORK_SRC)/googletest/include \
Expand Down Expand Up @@ -88,6 +89,7 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \
EXTRA_OBJECT_FILES := $(filter-out %/operator_new$(OBJ_SUFFIX), \
$(BUILD_LIBJVM_ALL_OBJS)), \
DEFAULT_CFLAGS := false, \
CFLAGS := $(JVM_CFLAGS) \
-I$(GTEST_FRAMEWORK_SRC)/googletest/include \
-I$(GTEST_FRAMEWORK_SRC)/googlemock/include \
Expand All @@ -103,6 +105,8 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
DISABLED_WARNINGS_clang_test_g1ServiceThread.cpp := delete-abstract-non-virtual-dtor, \
DISABLED_WARNINGS_clang_test_logDecorations.cpp := missing-field-initializers, \
DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft), \
LD_SET_ORIGIN := false, \
DEFAULT_LDFLAGS := false, \
LDFLAGS := $(JVM_LDFLAGS), \
LDFLAGS_unix := -L$(JVM_OUTPUTDIR)/libgtest, \
LIBS := $(JVM_LIBS), \
Expand Down Expand Up @@ -134,14 +138,14 @@ $(eval $(call SetupJdkExecutable, BUILD_GTEST_LAUNCHER, \
OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
EXTRA_FILES := $(GTEST_LAUNCHER_SRC), \
OBJECT_DIR := $(JVM_OUTPUTDIR)/gtest/launcher-objs, \
DEFAULT_CFLAGS := false, \
CFLAGS := $(JVM_CFLAGS) \
-I$(GTEST_FRAMEWORK_SRC)/googletest \
-I$(GTEST_FRAMEWORK_SRC)/googletest/include \
-I$(GTEST_FRAMEWORK_SRC)/googlemock \
-I$(GTEST_FRAMEWORK_SRC)/googlemock/include, \
LDFLAGS := $(LDFLAGS_JDKEXE), \
LD_SET_ORIGIN := false, \
LDFLAGS_unix := -L$(JVM_OUTPUTDIR)/gtest $(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_linux := $(LIBCXX), \
LIBS_unix := -ljvm, \
LIBS_windows := $(JVM_OUTPUTDIR)/gtest/objs/jvm.lib, \
COPY_DEBUG_SYMBOLS := $(GTEST_COPY_DEBUG_SYMBOLS), \
Expand Down
3 changes: 3 additions & 0 deletions make/hotspot/lib/CompileJvm.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
EXCLUDES := $(JVM_EXCLUDES), \
EXCLUDE_FILES := $(JVM_EXCLUDE_FILES), \
EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \
DEFAULT_CFLAGS := false, \
CFLAGS := $(JVM_CFLAGS), \
abstract_vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
arguments.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
Expand Down Expand Up @@ -202,6 +203,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
DISABLED_WARNINGS_clang_aix_osThread_aix.cpp := tautological-undefined-compare, \
DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft), \
ASFLAGS := $(JVM_ASFLAGS), \
LD_SET_ORIGIN := false, \
DEFAULT_LDFLAGS := false, \
LDFLAGS := $(JVM_LDFLAGS), \
LIBS := $(JVM_LIBS), \
OPTIMIZATION := $(JVM_OPTIMIZATION), \
Expand Down
Loading