Skip to content
Permalink
Browse files
Automatic merge of jdk:master into master
  • Loading branch information
duke committed Feb 12, 2021
2 parents 39850bf + 682e78e commit 91e3df39610b6917fcbff3745cd29f809d6ffd6f
Showing 528 changed files with 14,494 additions and 9,377 deletions.
@@ -189,8 +189,10 @@ ifeq ($(OPENJDK_TARGET_CPU), x86_64)
endif

ifeq ($(OPENJDK_TARGET_OS), windows)
FIXPATH := $(BASH) $(TOPDIR)/make/scripts/fixpath.sh exec
FIXPATH_BASE := $(BASH) $(TOPDIR)/make/scripts/fixpath.sh
FIXPATH := $(FIXPATH_BASE) exec
else
FIXPATH_BASE :=
FIXPATH :=
endif

@@ -273,6 +275,7 @@ $(call CreateNewSpec, $(NEW_SPEC), \
MAKE := $(MAKE), \
BASH := $(BASH), \
JIB_JAR := $(JIB_JAR), \
FIXPATH_BASE := $(FIXPATH_BASE), \
FIXPATH := $(FIXPATH), \
OPENJDK_TARGET_OS := $(OPENJDK_TARGET_OS), \
OPENJDK_TARGET_OS_TYPE := $(OPENJDK_TARGET_OS_TYPE), \
@@ -1362,15 +1362,15 @@ var concatObjects = function (o1, o2) {
* @param patch Override patch version
* @returns {String} The numeric version string
*/
var getVersion = function (feature, interim, update, patch) {
var getVersion = function (feature, interim, update, patch, extra1, extra2, extra3) {
var version_numbers = getVersionNumbers();
var version = (feature != null ? feature : version_numbers.get("DEFAULT_VERSION_FEATURE"))
+ "." + (interim != null ? interim : version_numbers.get("DEFAULT_VERSION_INTERIM"))
+ "." + (update != null ? update : version_numbers.get("DEFAULT_VERSION_UPDATE"))
+ "." + (patch != null ? patch : version_numbers.get("DEFAULT_VERSION_PATCH"))
+ "." + version_numbers.get("DEFAULT_VERSION_EXTRA1")
+ "." + version_numbers.get("DEFAULT_VERSION_EXTRA2")
+ "." + version_numbers.get("DEFAULT_VERSION_EXTRA3");
+ "." + (extra1 != null ? extra1 : version_numbers.get("DEFAULT_VERSION_EXTRA1"))
+ "." + (extra2 != null ? extra2 : version_numbers.get("DEFAULT_VERSION_EXTRA2"))
+ "." + (extra3 != null ? extra3 : version_numbers.get("DEFAULT_VERSION_EXTRA3"));
while (version.match(".*\\.0$")) {
version = version.substring(0, version.length - 2);
}

This file was deleted.

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2021, 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
@@ -49,53 +49,40 @@ public class $NAME_CLZ$ extends Charset
}

public CharsetDecoder newDecoder() {
initb2c();
return new DoubleByte.Decoder$DECTYPE$(this, b2c, b2cSB, $B2MIN$, $B2MAX$, $ASCIICOMPATIBLE$);
return new DoubleByte.Decoder$DECTYPE$(this, DecodeHolder.b2c, DecodeHolder.b2cSB, $B2MIN$, $B2MAX$, $ASCIICOMPATIBLE$);
}

public CharsetEncoder newEncoder() {
initc2b();
return new DoubleByte.Encoder$ENCTYPE$(this, $ENC_REPLACEMENT$ c2b, c2bIndex, $ASCIICOMPATIBLE$);
return new DoubleByte.Encoder$ENCTYPE$(this, $ENC_REPLACEMENT$ EncodeHolder.c2b, EncodeHolder.c2bIndex, $ASCIICOMPATIBLE$);
}

$B2C$
static char[][] b2c = new char[b2cStr.length][];
static char[] b2cSB;
private static volatile boolean b2cInitialized = false;
static class DecodeHolder {
$B2C$
static final char[][] b2c = new char[b2cStr.length][];
static final char[] b2cSB;

static void initb2c() {
if (b2cInitialized)
return;
synchronized (b2c) {
if (b2cInitialized)
return;
static {
for (int i = 0; i < b2cStr.length; i++) {
if (b2cStr[i] == null)
b2c[i] = DoubleByte.B2C_UNMAPPABLE;
else
b2c[i] = b2cStr[i].toCharArray();
}
b2cSB = b2cSBStr.toCharArray();
b2cInitialized = true;
}
}

static char[] c2b = new char[$C2BLENGTH$];
static char[] c2bIndex = new char[0x100];
private static volatile boolean c2bInitialized = false;
static class EncodeHolder {
static final char[] c2b = new char[$C2BLENGTH$];
static final char[] c2bIndex = new char[0x100];

static void initc2b() {
if (c2bInitialized)
return;
synchronized (c2b) {
if (c2bInitialized)
return;
static {
$NONROUNDTRIP_B2C$
$NONROUNDTRIP_C2B$
DoubleByte.Encoder.initC2B(b2cStr, b2cSBStr, b2cNR, c2bNR,
DoubleByte.Encoder.initC2B(DecodeHolder.b2cStr, DecodeHolder.b2cSBStr,
b2cNR, c2bNR,
$B2MIN$, $B2MAX$,
c2b, c2bIndex);
c2bInitialized = true;
}
}
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2021, 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
@@ -48,24 +48,26 @@ public class $NAME_CLZ$ extends Charset implements HistoricallyNamedCharset
}

public CharsetDecoder newDecoder() {
return new SingleByte.Decoder(this, b2c, $ASCIICOMPATIBLE$, $LATIN1DECODABLE$);
return new SingleByte.Decoder(this, Holder.b2c, $ASCIICOMPATIBLE$, $LATIN1DECODABLE$);
}

public CharsetEncoder newEncoder() {
return new SingleByte.Encoder(this, c2b, c2bIndex, $ASCIICOMPATIBLE$);
return new SingleByte.Encoder(this, Holder.c2b, Holder.c2bIndex, $ASCIICOMPATIBLE$);
}

private final static String b2cTable = $B2CTABLE$
private static class Holder {
private static final String b2cTable = $B2CTABLE$

private final static char[] b2c = b2cTable.toCharArray();
private final static char[] c2b = new char[$C2BLENGTH$];
private final static char[] c2bIndex = new char[0x100];
private static final char[] b2c = b2cTable.toCharArray();
private static final char[] c2b = new char[$C2BLENGTH$];
private static final char[] c2bIndex = new char[0x100];

static {
char[] b2cMap = b2c;
char[] c2bNR = null;
$NONROUNDTRIP_B2C$
$NONROUNDTRIP_C2B$
SingleByte.initC2B(b2cMap, c2bNR, c2b, c2bIndex);
static {
char[] b2cMap = b2c;
char[] c2bNR = null;
$NONROUNDTRIP_B2C$
$NONROUNDTRIP_C2B$
SingleByte.initC2B(b2cMap, c2bNR, c2b, c2bIndex);
}
}
}
@@ -28,9 +28,17 @@ include LibCommon.gmk
################################################################################


JPACKAGE_APPLAUNCHER_SRC := \
$(call FindSrcDirsForComponent, jdk.jpackage, applauncher) \
$(call FindSrcDirsForComponent, jdk.jpackage, common)
ifeq ($(call isTargetOs, linux), true)
JPACKAGE_APPLAUNCHER_SRC := \
$(call FindSrcDirsForComponent, jdk.jpackage, applauncher)
JPACKAGE_APPLAUNCHER_TOOLCHAIN := TOOLCHAIN_DEFAULT
JPACKAGE_APPLAUNCHER_INCLUDE_FILES := %.c
else
JPACKAGE_APPLAUNCHER_SRC := \
$(call FindSrcDirsForComponent, jdk.jpackage, applauncher) \
$(call FindSrcDirsForComponent, jdk.jpackage, common)
JPACKAGE_APPLAUNCHER_TOOLCHAIN := TOOLCHAIN_LINK_CXX
endif


ifeq ($(call isTargetOs, windows), true)
@@ -44,27 +52,63 @@ endif

JPACKAGE_OUTPUT_DIR := $(JDK_OUTPUTDIR)/modules/$(MODULE)/jdk/jpackage/internal/resources
JPACKAGE_CXXFLAGS_windows := -EHsc -DUNICODE -D_UNICODE
JPACKAGE_CFLAGS_windows := -DUNICODE -D_UNICODE
JPACKAGE_APPLAUNCHER_INCLUDES := $(addprefix -I, $(JPACKAGE_APPLAUNCHER_SRC))

# Output app launcher executable in resources dir, and symbols in the object dir
$(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHEREXE, \
NAME := jpackageapplauncher, \
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncher, \
SRC := $(JPACKAGE_APPLAUNCHER_SRC), \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
INCLUDE_FILES := $(JPACKAGE_APPLAUNCHER_INCLUDE_FILES), \
TOOLCHAIN := $(JPACKAGE_APPLAUNCHER_TOOLCHAIN), \
OPTIMIZATION := LOW, \
CXXFLAGS := $(call JpackageWithStaticCrt, $(CXXFLAGS_JDKEXE)) \
$(addprefix -I, $(JPACKAGE_APPLAUNCHER_SRC)), \
$(JPACKAGE_APPLAUNCHER_INCLUDES), \
CFLAGS := $(call JpackageWithStaticCrt, $(CFLAGS_JDKEXE)) \
$(JPACKAGE_APPLAUNCHER_INCLUDES), \
CFLAGS_macosx := -Wno-format-nonliteral, \
CXXFLAGS_windows := $(JPACKAGE_CXXFLAGS_windows), \
CFLAGS_windows := $(JPACKAGE_CFLAGS_windows), \
LDFLAGS := $(LDFLAGS_JDKEXE), \
LIBS_macosx := -framework Cocoa, \
LIBS := $(LIBCXX), \
LIBS_macosx := $(LIBCXX) -framework Cocoa, \
LIBS_windows := $(LIBCXX), \
LIBS_linux := -ldl, \
))

$(BUILD_JPACKAGE_APPLAUNCHEREXE): $(call FindLib, java.base, java)
JPACKAGE_TARGETS += $(BUILD_JPACKAGE_APPLAUNCHEREXE)


################################################################################

ifeq ($(call isTargetOs, linux), true)

JPACKAGE_LIBAPPLAUNCHER_SRC := \
$(call FindSrcDirsForComponent, jdk.jpackage, applauncher) \
$(call FindSrcDirsForComponent, jdk.jpackage, libapplauncher) \
$(call FindSrcDirsForComponent, jdk.jpackage, common)

JPACKAGE_LIBAPPLAUNCHER_INCLUDES := $(addprefix -I, $(JPACKAGE_LIBAPPLAUNCHER_SRC))

$(eval $(call SetupJdkLibrary, BUILD_JPACKAGE_LIBAPPLAUNCHER, \
NAME := jpackageapplauncher, \
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjpackageapplauncher, \
SRC := $(JPACKAGE_LIBAPPLAUNCHER_SRC), \
EXCLUDE_FILES := LinuxLauncher.c LinuxPackage.c, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
OPTIMIZATION := LOW, \
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JPACKAGE_LIBAPPLAUNCHER_INCLUDES), \
CFLAGS := $(CFLAGS_JDKLIB) $(JPACKAGE_LIBAPPLAUNCHER_INCLUDES), \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LIBS := $(LIBCXX) -ldl, \
))

JPACKAGE_TARGETS += $(BUILD_JPACKAGE_LIBAPPLAUNCHER)

endif

TARGETS += $(BUILD_JPACKAGE_APPLAUNCHEREXE)

################################################################################

@@ -80,7 +124,7 @@ ifeq ($(call isTargetOs, windows), true)
LIBS := $(LIBCXX), \
))

TARGETS += $(BUILD_LIB_JPACKAGE)
JPACKAGE_TARGETS += $(BUILD_LIB_JPACKAGE)

# Build Wix custom action helper
# Output library in resources dir, and symbols in the object dir
@@ -96,7 +140,7 @@ ifeq ($(call isTargetOs, windows), true)
LIBS_windows := msi.lib Shlwapi.lib User32.lib, \
))

TARGETS += $(BUILD_LIB_WIXHELPER)
JPACKAGE_TARGETS += $(BUILD_LIB_WIXHELPER)

JPACKAGE_MSIWRAPPER_SRC := \
$(call FindSrcDirsForComponent, jdk.jpackage, msiwrapper) \
@@ -114,22 +158,30 @@ ifeq ($(call isTargetOs, windows), true)
LIBS := $(LIBCXX), \
))

TARGETS += $(BUILD_JPACKAGE_MSIWRAPPER)
JPACKAGE_TARGETS += $(BUILD_JPACKAGE_MSIWRAPPER)

# Build non-console version of launcher
$(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHERWEXE, \
NAME := jpackageapplauncherw, \
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncherw, \
SRC := $(BUILD_JPACKAGE_APPLAUNCHEREXE_SRC), \
TOOLCHAIN := $(BUILD_JPACKAGE_APPLAUNCHEREXE_TOOLCHAIN), \
OPTIMIZATION := $(BUILD_JPACKAGE_APPLAUNCHEREXE_OPTIMIZATION), \
CXXFLAGS := $(BUILD_JPACKAGE_APPLAUNCHEREXE_CXXFLAGS), \
CXXFLAGS_windows := $(BUILD_JPACKAGE_APPLAUNCHEREXE_CXXFLAGS_windows) -DJP_LAUNCHERW, \
LDFLAGS := $(BUILD_JPACKAGE_APPLAUNCHEREXE_LDFLAGS), \
LIBS := $(BUILD_JPACKAGE_APPLAUNCHEREXE_LIBS), \
))
NAME := jpackageapplauncherw, \
OUTPUT_DIR := $(JPACKAGE_OUTPUT_DIR), \
SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jpackageapplauncherw, \
SRC := $(BUILD_JPACKAGE_APPLAUNCHEREXE_SRC), \
TOOLCHAIN := $(BUILD_JPACKAGE_APPLAUNCHEREXE_TOOLCHAIN), \
OPTIMIZATION := $(BUILD_JPACKAGE_APPLAUNCHEREXE_OPTIMIZATION), \
CXXFLAGS := $(BUILD_JPACKAGE_APPLAUNCHEREXE_CXXFLAGS), \
CXXFLAGS_windows := $(BUILD_JPACKAGE_APPLAUNCHEREXE_CXXFLAGS_windows) -DJP_LAUNCHERW, \
CFLAGS := $(BUILD_JPACKAGE_APPLAUNCHEREXE_CFLAGS), \
CFLAGS_windows := $(BUILD_JPACKAGE_APPLAUNCHEREXE_CFLAGS_windows) -DJP_LAUNCHERW, \
LDFLAGS := $(BUILD_JPACKAGE_APPLAUNCHEREXE_LDFLAGS), \
LIBS := $(BUILD_JPACKAGE_APPLAUNCHEREXE_LIBS), \
LIBS_windows := $(BUILD_JPACKAGE_APPLAUNCHEREXE_LIBS_windows), \
))

TARGETS += $(BUILD_JPACKAGE_APPLAUNCHERWEXE)
JPACKAGE_TARGETS += $(BUILD_JPACKAGE_APPLAUNCHERWEXE)

endif


TARGETS += $(JPACKAGE_TARGETS)

$(JPACKAGE_TARGETS): $(call FindLib, java.base, java)
Loading

0 comments on commit 91e3df3

Please sign in to comment.