8245832: JDK build make-static-libs should build all JDK libraries

Reviewed-by: erikj
This commit is contained in:
Bob Vandette 2020-05-29 19:18:23 +00:00
parent 5314d28f84
commit f79801b74d
6 changed files with 11 additions and 20 deletions

View File

@ -217,7 +217,7 @@ $(eval $(call DeclareRecipesForPhase, STATIC_LIBS, \
TARGET_SUFFIX := static-libs, \
FILE_PREFIX := Lib, \
MAKE_SUBDIR := lib, \
CHECK_MODULES := $(STATIC_LIBS_MODULES), \
CHECK_MODULES := $(ALL_MODULES), \
EXTRA_ARGS := STATIC_LIBS=true, \
))
@ -798,10 +798,14 @@ else
# If not already set, set the JVM variant target so that the JVM will be built.
JVM_MAIN_LIB_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-libs
JVM_MAIN_GENSRC_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-gensrc
# Building one JVM variant is enough to start building the other libs
$(LIBS_TARGETS): $(JVM_MAIN_LIB_TARGETS)
# Static libs depend on hotspot gensrc
$(STATIC_LIBS_TARGETS): $(JVM_MAIN_GENSRC_TARGETS)
$(LAUNCHER_TARGETS): java.base-libs
ifeq ($(STATIC_BUILD), true)

View File

@ -32,11 +32,13 @@ include $(SPEC)
include MakeBase.gmk
include Modules.gmk
ALL_MODULES = $(call FindAllModules)
################################################################################
TARGETS :=
$(foreach m, $(STATIC_LIBS_MODULES), \
$(foreach m, $(ALL_MODULES), \
$(eval $(call SetupCopyFiles, COPY_STATIC_LIBS_$m, \
FLATTEN := true, \
SRC := $(SUPPORT_OUTPUTDIR)/native/$m, \

View File

@ -193,21 +193,6 @@ HOTSPOT_MODULES := \
jdk.internal.vm.compiler.management \
#
# The native dynamic libraries in these modules will also get built into static
# libraries for consumption by downstream projects that need to statically link
# the JDK libraries. Those static libraries are not part of the main JDK
# distribution.
STATIC_LIBS_MODULES := \
java.base \
jdk.crypto.ec \
jdk.security.auth \
java.prefs \
java.security.jgss \
java.smartcardio \
jdk.crypto.cryptoki \
jdk.net \
#
################################################################################
# Some platforms don't have the serviceability agent

View File

@ -39,7 +39,7 @@ DEF_STATIC_JNI_OnLoad
* Get the AWT native structure.
* This function returns JNI_FALSE if an error occurs.
*/
JNIEXPORT jboolean JNICALL JAWT_GetAWT
_JNI_IMPORT_OR_EXPORT_ jboolean JNICALL JAWT_GetAWT
(JNIEnv* env, JAWT* awt)
{
if (awt == NULL) {

View File

@ -37,7 +37,7 @@ DEF_STATIC_JNI_OnLoad
* Get the AWT native structure. This function returns JNI_FALSE if
* an error occurs.
*/
JNIEXPORT jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt)
_JNI_IMPORT_OR_EXPORT_ jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt)
{
#if defined(HEADLESS)
/* there are no AWT libs available at all */

View File

@ -39,7 +39,7 @@ DEF_STATIC_JNI_OnLoad
* Get the AWT native structure. This function returns JNI_FALSE if
* an error occurs.
*/
extern "C" JNIEXPORT jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt)
extern "C" _JNI_IMPORT_OR_EXPORT_ jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt)
{
if (awt == NULL) {
return JNI_FALSE;