mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 01:19:28 +01:00
JBR-9125 move building JBR on AL2 instead of OL7
This commit is contained in:
@@ -109,6 +109,12 @@ else
|
||||
WITH_BUNDLED_FREETYPE=""
|
||||
fi
|
||||
|
||||
if [ "$bundle_type" == "lb" ]; then
|
||||
WITH_VULKAN=""
|
||||
else
|
||||
WITH_VULKAN="--with-vulkan"
|
||||
fi
|
||||
|
||||
REPRODUCIBLE_BUILD_OPTS="--with-source-date=$SOURCE_DATE_EPOCH
|
||||
--with-hotspot-build-time=$BUILD_TIME
|
||||
--with-copyright-year=$COPYRIGHT_YEAR
|
||||
|
||||
@@ -35,7 +35,7 @@ function do_configure {
|
||||
--with-version-opt=b"$build_number" \
|
||||
--with-boot-jdk="$BOOT_JDK" \
|
||||
--enable-cds=yes \
|
||||
--with-vulkan \
|
||||
$WITH_VULKAN \
|
||||
$DISABLE_WARNINGS_AS_ERRORS \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
@@ -113,6 +113,11 @@ case "$bundle_type" in
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
do_maketest=1
|
||||
;;
|
||||
"lb")
|
||||
do_reset_changes=1
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
|
||||
@@ -32,13 +32,6 @@ function do_configure {
|
||||
--build=x86_64-unknown-linux-gnu \
|
||||
--openjdk-target=x86_64-unknown-linux-gnu"
|
||||
fi
|
||||
|
||||
if [ -n "${JCEF_BUILD_LEGACY:-}" ]; then
|
||||
WITH_VULKAN=""
|
||||
else
|
||||
WITH_VULKAN="--with-vulkan"
|
||||
fi
|
||||
|
||||
sh configure \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
@@ -102,9 +95,7 @@ function create_image_bundle {
|
||||
|
||||
# jmod does not preserve file permissions (JDK-8173610)
|
||||
[ -f "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper ] && chmod a+x "$IMAGES_DIR"/"$__root_dir"/lib/jcef_helper
|
||||
if [ ! -n "${JCEF_BUILD_LEGACY:-}" ]; then
|
||||
[ -f "$IMAGES_DIR"/"$__root_dir"/lib/cef_server ] && chmod a+x "$IMAGES_DIR"/"$__root_dir"/lib/cef_server
|
||||
fi
|
||||
[ -f "$IMAGES_DIR"/"$__root_dir"/lib/cef_server ] && chmod a+x "$IMAGES_DIR"/"$__root_dir"/lib/cef_server
|
||||
|
||||
echo Creating "$JBR".tar.gz ...
|
||||
|
||||
@@ -130,6 +121,11 @@ case "$bundle_type" in
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
do_maketest=1
|
||||
;;
|
||||
"lb")
|
||||
do_reset_changes=1
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
@@ -158,7 +154,7 @@ JBRSDK_BUNDLE=jbrsdk
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "lb" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
@@ -171,7 +167,7 @@ create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" ||
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ]|| [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "lb" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
@@ -93,7 +93,7 @@ WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=linux-x86-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
"jcef" | "lb")
|
||||
echo "not implemented" && do_exit 1
|
||||
;;
|
||||
"nomod" | "")
|
||||
@@ -120,7 +120,7 @@ JBRSDK_BUNDLE=jbrsdk
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "lb" ]; then
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
|
||||
@@ -30,14 +30,18 @@ import java.io.InputStreamReader;
|
||||
/**
|
||||
* @test
|
||||
* @summary VerifyDependencies checks readability verifies that a Linux shared
|
||||
* library has no dependency on symbols from glibc version higher than 2.28
|
||||
* library has no dependency on symbols from glibc version higher than <code>expectedVersion</code>
|
||||
* @run main VerifyDependencies
|
||||
* @requires (os.family == "linux")
|
||||
*/
|
||||
|
||||
public class VerifyDependencies {
|
||||
|
||||
static final public String EXPECTED_VERSION = "2.28";
|
||||
static final public String EXPECTED_VERSION_LEGACY = "2.26";
|
||||
static final public String EXPECTED_VERSION_VULKAN = "2.28";
|
||||
|
||||
static String expectedVersion;
|
||||
|
||||
public static void verifyLibrary(String libraryPath) throws IOException {
|
||||
Process process;
|
||||
BufferedReader reader;
|
||||
@@ -52,12 +56,12 @@ public class VerifyDependencies {
|
||||
System.out.println(line);
|
||||
if (line.contains("GLIBC_")) {
|
||||
String version = extractVersion(line);
|
||||
if (compareVersions(version, EXPECTED_VERSION) > 0) {
|
||||
if (compareVersions(version, expectedVersion) > 0) {
|
||||
throw new RuntimeException(libraryPath + " has a dependency on glibc version " + version);
|
||||
}
|
||||
}
|
||||
}
|
||||
System.out.println(libraryPath + " has no dependency on glibc version higher than " + EXPECTED_VERSION);
|
||||
System.out.println(libraryPath + " has no dependency on glibc version higher than " + expectedVersion);
|
||||
}
|
||||
|
||||
private static String extractVersion(String line) {
|
||||
@@ -125,6 +129,12 @@ public class VerifyDependencies {
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
String javaHome = System.getProperty("java.home");
|
||||
|
||||
String vendorVersion = System.getProperty("java.vendor.version");
|
||||
expectedVersion = vendorVersion.substring(Math.max(vendorVersion.length() - 3, 0)).compareTo("-lb") == 0
|
||||
? EXPECTED_VERSION_LEGACY : EXPECTED_VERSION_VULKAN;
|
||||
System.out.println("supporting glibc version is not less than " + expectedVersion);
|
||||
|
||||
findInDirectory(javaHome + "/bin", false);
|
||||
findInDirectory(javaHome + "/lib", true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user