mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-23 01:39:44 +01:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b299c5d440 |
4
.github/actions/do-build/action.yml
vendored
4
.github/actions/do-build/action.yml
vendored
@@ -66,7 +66,7 @@ runs:
|
||||
shell: bash
|
||||
|
||||
- name: 'Upload build logs'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: failure-logs-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: failure-logs
|
||||
@@ -74,7 +74,7 @@ runs:
|
||||
|
||||
# This is the best way I found to abort the job with an error message
|
||||
- name: 'Notify about build failures'
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: core.setFailed('Build failed. See summary for details.')
|
||||
if: steps.check.outputs.failure == 'true'
|
||||
|
||||
8
.github/actions/get-bootjdk/action.yml
vendored
8
.github/actions/get-bootjdk/action.yml
vendored
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, 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
|
||||
@@ -65,7 +65,7 @@ runs:
|
||||
|
||||
- name: 'Check cache for BootJDK'
|
||||
id: get-cached-bootjdk
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: bootjdk/jdk
|
||||
key: boot-jdk-${{ inputs.platform }}-${{ steps.sha256.outputs.value }}
|
||||
@@ -104,6 +104,6 @@ runs:
|
||||
- name: 'Export path to where BootJDK is installed'
|
||||
id: path-name
|
||||
run: |
|
||||
# Export the absolute path
|
||||
echo "path=`pwd`/bootjdk/jdk" >> $GITHUB_OUTPUT
|
||||
# Export the path
|
||||
echo 'path=bootjdk/jdk' >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
4
.github/actions/get-bundles/action.yml
vendored
4
.github/actions/get-bundles/action.yml
vendored
@@ -48,14 +48,14 @@ runs:
|
||||
steps:
|
||||
- name: 'Download bundles artifact'
|
||||
id: download-bundles
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: bundles
|
||||
continue-on-error: true
|
||||
|
||||
- name: 'Download bundles artifact (retry)'
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: bundles
|
||||
|
||||
2
.github/actions/get-gtest/action.yml
vendored
2
.github/actions/get-gtest/action.yml
vendored
@@ -40,7 +40,7 @@ runs:
|
||||
var: GTEST_VERSION
|
||||
|
||||
- name: 'Checkout GTest source'
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: google/googletest
|
||||
ref: 'v${{ steps.version.outputs.value }}'
|
||||
|
||||
14
.github/actions/get-jtreg/action.yml
vendored
14
.github/actions/get-jtreg/action.yml
vendored
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2023, 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
|
||||
@@ -41,13 +41,13 @@ runs:
|
||||
|
||||
- name: 'Check cache for JTReg'
|
||||
id: get-cached-jtreg
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: jtreg/installed
|
||||
key: jtreg-${{ steps.version.outputs.value }}
|
||||
|
||||
- name: 'Checkout the JTReg source'
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: openjdk/jtreg
|
||||
ref: jtreg-${{ steps.version.outputs.value }}
|
||||
@@ -56,14 +56,8 @@ runs:
|
||||
|
||||
- name: 'Build JTReg'
|
||||
run: |
|
||||
# If runner architecture is x64 set JAVA_HOME_17_X64 otherwise set to JAVA_HOME_17_arm64
|
||||
if [[ '${{ runner.arch }}' == 'X64' ]]; then
|
||||
JDK="$JAVA_HOME_17_X64"
|
||||
else
|
||||
JDK="$JAVA_HOME_17_arm64"
|
||||
fi
|
||||
# Build JTReg and move files to the proper locations
|
||||
bash make/build.sh --jdk "$JDK"
|
||||
bash make/build.sh --jdk "$JAVA_HOME_17_X64"
|
||||
mkdir ../installed
|
||||
mv build/images/jtreg/* ../installed
|
||||
working-directory: jtreg/src
|
||||
|
||||
3
.github/actions/get-msys2/action.yml
vendored
3
.github/actions/get-msys2/action.yml
vendored
@@ -30,7 +30,8 @@ runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Install MSYS2'
|
||||
uses: msys2/setup-msys2@v2.22.0
|
||||
# use a specific release of msys2/setup-msys2 to prevent jtreg build failures on newer release
|
||||
uses: msys2/setup-msys2@7efe20baefed56359985e327d329042cde2434ff
|
||||
with:
|
||||
install: 'autoconf tar unzip zip make'
|
||||
path-type: minimal
|
||||
|
||||
2
.github/actions/upload-bundles/action.yml
vendored
2
.github/actions/upload-bundles/action.yml
vendored
@@ -69,7 +69,7 @@ runs:
|
||||
shell: bash
|
||||
|
||||
- name: 'Upload bundles artifact'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: bundles
|
||||
|
||||
18
.github/scripts/gen-test-results.sh
vendored
18
.github/scripts/gen-test-results.sh
vendored
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, 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
|
||||
@@ -44,8 +44,8 @@ for test in $failures $errors; do
|
||||
base_path="$(echo "$test" | tr '#' '_')"
|
||||
report_file="$report_dir/$base_path.jtr"
|
||||
hs_err_files=$(ls $report_dir/$base_path/hs_err*.log 2> /dev/null || true)
|
||||
replay_files=$(ls $report_dir/$base_path/replay*.log 2> /dev/null || true)
|
||||
echo "#### <a id="$anchor">$test"
|
||||
|
||||
echo '<details><summary>View test results</summary>'
|
||||
echo ''
|
||||
echo '```'
|
||||
@@ -73,20 +73,6 @@ for test in $failures $errors; do
|
||||
echo ''
|
||||
fi
|
||||
|
||||
if [[ "$replay_files" != "" ]]; then
|
||||
echo '<details><summary>View HotSpot replay file</summary>'
|
||||
echo ''
|
||||
for replay in $replay_files; do
|
||||
echo '```'
|
||||
echo "$replay:"
|
||||
echo ''
|
||||
cat "$replay"
|
||||
echo '```'
|
||||
done
|
||||
|
||||
echo '</details>'
|
||||
echo ''
|
||||
fi
|
||||
done >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
# With many failures, the summary can easily exceed 1024 kB, the limit set by Github
|
||||
|
||||
1
.github/scripts/gen-test-summary.sh
vendored
1
.github/scripts/gen-test-summary.sh
vendored
@@ -42,7 +42,6 @@ error_count=$(echo $errors | wc -w || true)
|
||||
|
||||
if [[ "$failures" = "" && "$errors" = "" ]]; then
|
||||
# We know something went wrong, but not what
|
||||
echo 'failure=true' >> $GITHUB_OUTPUT
|
||||
echo 'error-message=Unspecified test suite failure. Please see log for job for details.' >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
fi
|
||||
|
||||
58
.github/workflows/build-cross-compile.yml
vendored
58
.github/workflows/build-cross-compile.yml
vendored
@@ -31,6 +31,12 @@ on:
|
||||
gcc-major-version:
|
||||
required: true
|
||||
type: string
|
||||
apt-gcc-version:
|
||||
required: true
|
||||
type: string
|
||||
apt-gcc-cross-version:
|
||||
required: true
|
||||
type: string
|
||||
extra-conf-options:
|
||||
required: false
|
||||
type: string
|
||||
@@ -61,36 +67,32 @@ jobs:
|
||||
debian-arch: arm64
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
tolerate-sysroot-errors: false
|
||||
- target-cpu: arm
|
||||
gnu-arch: arm
|
||||
debian-arch: armhf
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
tolerate-sysroot-errors: false
|
||||
gnu-abi: eabihf
|
||||
- target-cpu: s390x
|
||||
gnu-arch: s390x
|
||||
debian-arch: s390x
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
tolerate-sysroot-errors: false
|
||||
- target-cpu: ppc64le
|
||||
gnu-arch: powerpc64le
|
||||
debian-arch: ppc64el
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
tolerate-sysroot-errors: false
|
||||
- target-cpu: riscv64
|
||||
gnu-arch: riscv64
|
||||
debian-arch: riscv64
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-repository: https://deb.debian.org/debian-ports
|
||||
debian-keyring: /usr/share/keyrings/debian-ports-archive-keyring.gpg
|
||||
debian-version: sid
|
||||
tolerate-sysroot-errors: true
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'Get the BootJDK'
|
||||
id: bootjdk
|
||||
@@ -98,9 +100,12 @@ jobs:
|
||||
with:
|
||||
platform: linux-x64
|
||||
|
||||
- name: 'Get GTest'
|
||||
id: gtest
|
||||
uses: ./.github/actions/get-gtest
|
||||
# Use linux-x64 JDK bundle as build JDK
|
||||
- name: 'Get build JDK'
|
||||
id: buildjdk
|
||||
uses: ./.github/actions/get-bundles
|
||||
with:
|
||||
platform: linux-x64
|
||||
|
||||
# Upgrading apt to solve libc6 installation bugs, see JDK-8260460.
|
||||
- name: 'Install toolchain and dependencies'
|
||||
@@ -109,16 +114,17 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install --only-upgrade apt
|
||||
sudo apt-get install \
|
||||
gcc-${{ inputs.gcc-major-version }} \
|
||||
g++-${{ inputs.gcc-major-version }} \
|
||||
gcc-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}} \
|
||||
g++-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}} \
|
||||
libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
|
||||
gcc-${{ inputs.gcc-major-version }}=${{ inputs.apt-gcc-version }} \
|
||||
g++-${{ inputs.gcc-major-version }}=${{ inputs.apt-gcc-version }} \
|
||||
gcc-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-cross-version }} \
|
||||
g++-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-cross-version }} \
|
||||
libxrandr-dev libxtst-dev libcups2-dev libasound2-dev \
|
||||
debian-ports-archive-keyring
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }}
|
||||
|
||||
- name: 'Check cache for sysroot'
|
||||
id: get-cached-sysroot
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: sysroot
|
||||
key: sysroot-${{ matrix.debian-arch }}-${{ hashFiles('./.github/workflows/build-cross-compile.yml') }}
|
||||
@@ -128,18 +134,16 @@ jobs:
|
||||
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Create sysroot'
|
||||
id: create-sysroot
|
||||
run: >
|
||||
sudo debootstrap
|
||||
--arch=${{ matrix.debian-arch }}
|
||||
--verbose
|
||||
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype-dev,libpng-dev
|
||||
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev
|
||||
--resolve-deps
|
||||
--variant=minbase
|
||||
$(test -n "${{ matrix.debian-keyring }}" && echo "--keyring=${{ matrix.debian-keyring }}")
|
||||
${{ matrix.debian-version }}
|
||||
sysroot
|
||||
${{ matrix.debian-repository }}
|
||||
continue-on-error: ${{ matrix.tolerate-sysroot-errors }}
|
||||
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Prepare sysroot'
|
||||
@@ -149,14 +153,8 @@ jobs:
|
||||
sudo chown ${USER} -R sysroot
|
||||
rm -rf sysroot/{dev,proc,run,sys,var}
|
||||
rm -rf sysroot/usr/{sbin,bin,share}
|
||||
rm -rf sysroot/usr/lib/{apt,gcc,udev,systemd}
|
||||
rm -rf sysroot/usr/libexec/gcc
|
||||
if: steps.create-sysroot.outcome == 'success' && steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Remove broken sysroot'
|
||||
run: |
|
||||
sudo rm -rf sysroot/
|
||||
if: steps.create-sysroot.outcome != 'success' && steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||
rm -rf sysroot/usr/lib/{apt,udev,systemd}
|
||||
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Configure'
|
||||
run: >
|
||||
@@ -164,12 +162,12 @@ jobs:
|
||||
--with-conf-name=linux-${{ matrix.target-cpu }}
|
||||
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||
--with-zlib=system
|
||||
--enable-debug
|
||||
--disable-precompiled-headers
|
||||
--openjdk-target=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}
|
||||
--with-sysroot=sysroot
|
||||
--with-build-jdk=${{ steps.buildjdk.outputs.jdk-path }}
|
||||
--with-jmod-compress=zip-1
|
||||
CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-gcc-${{ inputs.gcc-major-version }}
|
||||
CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-g++-${{ inputs.gcc-major-version }}
|
||||
@@ -177,7 +175,6 @@ jobs:
|
||||
echo "Dumping config.log:" &&
|
||||
cat config.log &&
|
||||
exit 1)
|
||||
if: steps.create-sysroot.outcome == 'success' || steps.get-cached-sysroot.outputs.cache-hit == 'true'
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
@@ -185,4 +182,3 @@ jobs:
|
||||
with:
|
||||
make-target: 'hotspot ${{ inputs.make-arguments }}'
|
||||
platform: linux-${{ matrix.target-cpu }}
|
||||
if: steps.create-sysroot.outcome == 'success' || steps.get-cached-sysroot.outputs.cache-hit == 'true'
|
||||
|
||||
7
.github/workflows/build-linux.yml
vendored
7
.github/workflows/build-linux.yml
vendored
@@ -49,6 +49,9 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: ''
|
||||
apt-gcc-version:
|
||||
required: true
|
||||
type: string
|
||||
apt-architecture:
|
||||
required: false
|
||||
type: string
|
||||
@@ -78,7 +81,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'Get the BootJDK'
|
||||
id: bootjdk
|
||||
@@ -111,7 +114,7 @@ jobs:
|
||||
fi
|
||||
sudo apt-get update
|
||||
sudo apt-get install --only-upgrade apt
|
||||
sudo apt-get install gcc-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }} g++-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }}
|
||||
sudo apt-get install gcc-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }}=${{ inputs.apt-gcc-version }} g++-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }}=${{ inputs.apt-gcc-version }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }}
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }}
|
||||
|
||||
- name: 'Configure'
|
||||
|
||||
13
.github/workflows/build-macos.yml
vendored
13
.github/workflows/build-macos.yml
vendored
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, 2023, 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
|
||||
@@ -31,9 +31,6 @@ on:
|
||||
platform:
|
||||
required: true
|
||||
type: string
|
||||
runs-on:
|
||||
required: true
|
||||
type: string
|
||||
extra-conf-options:
|
||||
required: false
|
||||
type: string
|
||||
@@ -58,7 +55,7 @@ on:
|
||||
jobs:
|
||||
build-macos:
|
||||
name: build
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
runs-on: macos-11
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -71,13 +68,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'Get the BootJDK'
|
||||
id: bootjdk
|
||||
uses: ./.github/actions/get-bootjdk
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
platform: macos-x64
|
||||
|
||||
- name: 'Get JTReg'
|
||||
id: jtreg
|
||||
@@ -90,7 +87,7 @@ jobs:
|
||||
- name: 'Install toolchain and dependencies'
|
||||
run: |
|
||||
# Run Homebrew installation and xcode-select
|
||||
brew install autoconf make
|
||||
brew install make
|
||||
sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-toolset-version }}.app/Contents/Developer
|
||||
# This will make GNU make available as 'make' and not only as 'gmake'
|
||||
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
|
||||
|
||||
2
.github/workflows/build-windows.yml
vendored
2
.github/workflows/build-windows.yml
vendored
@@ -79,7 +79,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'Get MSYS2'
|
||||
uses: ./.github/actions/get-msys2
|
||||
|
||||
38
.github/workflows/main.yml
vendored
38
.github/workflows/main.yml
vendored
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, 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
|
||||
@@ -127,9 +127,11 @@ jobs:
|
||||
with:
|
||||
platform: linux-x64
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.linux-x64 == 'true'
|
||||
# The linux-x64 jdk bundle is used as buildjdk for the cross-compile job
|
||||
if: needs.select.outputs.linux-x64 == 'true' || needs.select.outputs.linux-cross-compile == 'true'
|
||||
|
||||
build-linux-x86:
|
||||
name: linux-x86
|
||||
@@ -139,10 +141,11 @@ jobs:
|
||||
platform: linux-x86
|
||||
gcc-major-version: '10'
|
||||
gcc-package-suffix: '-multilib'
|
||||
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
|
||||
apt-architecture: 'i386'
|
||||
# Some multilib libraries do not have proper inter-dependencies, so we have to
|
||||
# install their dependencies manually.
|
||||
apt-extra-packages: 'libfreetype-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libc6-i386 libgcc-s1:i386 libstdc++6:i386'
|
||||
apt-extra-packages: 'libfreetype6-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libc6-i386 libgcc-s1:i386 libstdc++6:i386'
|
||||
extra-conf-options: '--with-target-bits=32'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
@@ -157,6 +160,7 @@ jobs:
|
||||
make-target: 'hotspot'
|
||||
debug-levels: '[ "debug" ]'
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
|
||||
extra-conf-options: '--disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
@@ -171,6 +175,7 @@ jobs:
|
||||
make-target: 'hotspot'
|
||||
debug-levels: '[ "debug" ]'
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
|
||||
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
@@ -185,6 +190,7 @@ jobs:
|
||||
make-target: 'hotspot'
|
||||
debug-levels: '[ "debug" ]'
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
|
||||
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
@@ -200,6 +206,7 @@ jobs:
|
||||
# Technically this is not the "debug" level, but we can't inject a new matrix state for just this job
|
||||
debug-levels: '[ "debug" ]'
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
|
||||
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
@@ -209,9 +216,12 @@ jobs:
|
||||
name: linux-cross-compile
|
||||
needs:
|
||||
- select
|
||||
- build-linux-x64
|
||||
uses: ./.github/workflows/build-cross-compile.yml
|
||||
with:
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
|
||||
apt-gcc-cross-version: '10.4.0-4ubuntu1~22.04cross1'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.linux-cross-compile == 'true'
|
||||
@@ -222,8 +232,7 @@ jobs:
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
platform: macos-x64
|
||||
runs-on: 'macos-13'
|
||||
xcode-toolset-version: '14.3.1'
|
||||
xcode-toolset-version: '12.5.1'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.macos-x64 == 'true'
|
||||
@@ -234,8 +243,8 @@ jobs:
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
platform: macos-aarch64
|
||||
runs-on: 'macos-14'
|
||||
xcode-toolset-version: '14.3.1'
|
||||
xcode-toolset-version: '12.5.1'
|
||||
extra-conf-options: '--openjdk-target=aarch64-apple-darwin'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.macos-aarch64 == 'true'
|
||||
@@ -278,6 +287,7 @@ jobs:
|
||||
# build JDK, and we do not need the additional testing of the graphs.
|
||||
extra-conf-options: '--disable-full-docs'
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.4.0-4ubuntu1~22.04'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.docs == 'true'
|
||||
@@ -314,17 +324,7 @@ jobs:
|
||||
with:
|
||||
platform: macos-x64
|
||||
bootjdk-platform: macos-x64
|
||||
runs-on: macos-13
|
||||
|
||||
test-macos-aarch64:
|
||||
name: macos-aarch64
|
||||
needs:
|
||||
- build-macos-aarch64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: macos-aarch64
|
||||
bootjdk-platform: macos-aarch64
|
||||
runs-on: macos-14
|
||||
runs-on: macos-11
|
||||
|
||||
test-windows-x64:
|
||||
name: windows-x64
|
||||
@@ -362,7 +362,7 @@ jobs:
|
||||
# Hack to get hold of the api environment variables that are only defined for actions
|
||||
- name: 'Get API configuration'
|
||||
id: api
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }'
|
||||
|
||||
|
||||
31
.github/workflows/test.yml
vendored
31
.github/workflows/test.yml
vendored
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, 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
|
||||
@@ -60,10 +60,7 @@ jobs:
|
||||
- 'jdk/tier1 part 3'
|
||||
- 'langtools/tier1'
|
||||
- 'hs/tier1 common'
|
||||
- 'hs/tier1 compiler part 1'
|
||||
- 'hs/tier1 compiler part 2'
|
||||
- 'hs/tier1 compiler part 3'
|
||||
- 'hs/tier1 compiler not-xcomp'
|
||||
- 'hs/tier1 compiler'
|
||||
- 'hs/tier1 gc'
|
||||
- 'hs/tier1 runtime'
|
||||
- 'hs/tier1 serviceability'
|
||||
@@ -86,20 +83,8 @@ jobs:
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_common'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 compiler part 1'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_1'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 compiler part 2'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_2'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 compiler part 3'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_3'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 compiler not-xcomp'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_not_xcomp'
|
||||
- test-name: 'hs/tier1 compiler'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 gc'
|
||||
@@ -120,7 +105,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'Get MSYS2'
|
||||
uses: ./.github/actions/get-msys2
|
||||
@@ -147,7 +132,7 @@ jobs:
|
||||
run: |
|
||||
# On macOS we need to install some dependencies for testing
|
||||
brew install make
|
||||
sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
|
||||
sudo xcode-select --switch /Applications/Xcode_11.7.app/Contents/Developer
|
||||
# This will make GNU make available as 'make' and not only as 'gmake'
|
||||
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
|
||||
if: runner.os == 'macOS'
|
||||
@@ -211,7 +196,7 @@ jobs:
|
||||
if: always()
|
||||
|
||||
- name: 'Upload test results'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: results
|
||||
name: ${{ steps.package.outputs.artifact-name }}
|
||||
@@ -219,7 +204,7 @@ jobs:
|
||||
|
||||
# This is the best way I found to abort the job with an error message
|
||||
- name: 'Notify about test failures'
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: core.setFailed('${{ steps.run-tests.outputs.error-message }}')
|
||||
if: steps.run-tests.outputs.failure == 'true'
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -23,4 +23,3 @@ NashornProfile.txt
|
||||
/.cproject
|
||||
/compile_commands.json
|
||||
/.cache
|
||||
/jbr-api/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[general]
|
||||
project=jdk-updates
|
||||
project=jdk
|
||||
jbs=JDK
|
||||
version=21.0.4
|
||||
version=21
|
||||
|
||||
[checks]
|
||||
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
|
||||
|
||||
17
README.md
17
README.md
@@ -21,13 +21,11 @@ can be found on the [releases page](https://github.com/JetBrains/JetBrainsRuntim
|
||||
|
||||
## Releases based on JDK 17
|
||||
|
||||
| IDE Version | Latest JBR | Date Released |
|
||||
|-------------|---------------------------------------------------------------------------------------------------------|---------------|
|
||||
| 2023.3 | [17.0.9b1087.7](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.9b1087.7) | 20-Nov-2023 |
|
||||
| 2023.2 | [17.0.9b1000.46](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.9b1000.46) | 01-Nov-2023 |
|
||||
| 2023.1 | [17.0.6-b829.5](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.6b829.5) | 01-Mar-2023 |
|
||||
| 2022.3 | [17.0.6-b653.34](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.6b653.34) | 28-Feb-2023 |
|
||||
| 2022.2 | [17.0.6-b469.82](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.6b469.82) | 06-Mar-2023 |
|
||||
| IDE Version | Latest JBR | Date Released |
|
||||
|-------------|--------------------------------------------------------------------------------------------------------|---------------|
|
||||
| 2023.1 | [17.0.6-b829.5](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.6b829.5) | 01-Mar-2023 |
|
||||
| 2022.3 | [17.0.6-b653.34](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.6b653.34) | 28-Feb-2023 |
|
||||
| 2022.2 | [17.0.6-b469.82](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.6b469.82) | 06-Mar-2023 |
|
||||
|
||||
## Releases based on JDK 11
|
||||
|
||||
@@ -126,9 +124,8 @@ $ docker run -v `pwd`../../../../:/JetBrainsRuntime -it 942ea9900054
|
||||
### Ubuntu Linux
|
||||
Install the necessary tools, libraries, and headers with:
|
||||
```
|
||||
$ sudo apt-get install autoconf make build-essential libx11-dev libxext-dev libxrender-dev \
|
||||
libxtst-dev libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev libwayland-dev \
|
||||
libxkbcommon-x11-0
|
||||
$ sudo apt-get install autoconf make build-essential libx11-dev libxext-dev libxrender-dev libxtst-dev \
|
||||
libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev
|
||||
```
|
||||
Get Java 19 (for instance, [Azul Zulu Builds of OpenJDK 19](https://www.azul.com/downloads/?version=java-19-sts&os=linux&package=jdk)).
|
||||
|
||||
|
||||
@@ -179,9 +179,8 @@ more tab-completion friendly. For more complex test runs, the
|
||||
<p>The test specifications given in <code>TEST</code> is parsed into
|
||||
fully qualified test descriptors, which clearly and unambigously show
|
||||
which tests will be run. As an example, <code>:tier1</code> will expand
|
||||
to include all subcomponent test directories that define `tier1`,
|
||||
for example:
|
||||
<code>jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 ...</code>.
|
||||
to
|
||||
<code>jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1 jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 jtreg:$(TOPDIR)/test/nashorn:tier1 jtreg:$(TOPDIR)/test/jaxp:tier1</code>.
|
||||
You can always submit a list of fully qualified test descriptors in the
|
||||
<code>TEST</code> variable if you want to shortcut the parser.</p>
|
||||
<h3 id="common-test-groups">Common Test Groups</h3>
|
||||
@@ -578,15 +577,12 @@ PKCS11 tests. Improper NSS version may lead to unexpected failures which
|
||||
are hard to diagnose. For example,
|
||||
sun/security/pkcs11/Secmod/AddTrustedCert.java may fail on Ubuntu 18.04
|
||||
with the default NSS version in the system. To run these tests
|
||||
correctly, the system property
|
||||
<code>jdk.test.lib.artifacts.<NAME></code> is required on Ubuntu
|
||||
18.04 to specify the alternative NSS lib directory. The
|
||||
<code><NAME></code> component should be replaced with the name
|
||||
element of the appropriate <code>@Artifact</code> class. (See
|
||||
<code>test/jdk/sun/security/pkcs11/PKCS11Test.java</code>)</p>
|
||||
correctly, the system property <code>test.nss.lib.paths</code> is
|
||||
required on Ubuntu 18.04 to specify the alternative NSS lib
|
||||
directories.</p>
|
||||
<p>For example:</p>
|
||||
<pre><code>$ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" \
|
||||
JTREG="JAVA_OPTIONS=-Djdk.test.lib.artifacts.nsslib-linux_aarch64=/path/to/NSS-libs"</code></pre>
|
||||
JTREG="JAVA_OPTIONS=-Dtest.nss.lib.paths=/path/to/your/latest/NSS-libs"</code></pre>
|
||||
<p>For more notes about the PKCS11 tests, please refer to
|
||||
test/jdk/sun/security/pkcs11/README.</p>
|
||||
<h3 id="client-ui-tests">Client UI Tests</h3>
|
||||
|
||||
@@ -102,11 +102,11 @@ test runs, the `test TEST="x"` solution needs to be used.
|
||||
|
||||
The test specifications given in `TEST` is parsed into fully qualified test
|
||||
descriptors, which clearly and unambigously show which tests will be run. As an
|
||||
example, `:tier1` will expand to include all subcomponent test directories
|
||||
that define `tier1`, for example: `jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1
|
||||
jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1 ...`. You
|
||||
can always submit a list of fully qualified test descriptors in the `TEST`
|
||||
variable if you want to shortcut the parser.
|
||||
example, `:tier1` will expand to `jtreg:$(TOPDIR)/test/hotspot/jtreg:tier1
|
||||
jtreg:$(TOPDIR)/test/jdk:tier1 jtreg:$(TOPDIR)/test/langtools:tier1
|
||||
jtreg:$(TOPDIR)/test/nashorn:tier1 jtreg:$(TOPDIR)/test/jaxp:tier1`. You can
|
||||
always submit a list of fully qualified test descriptors in the `TEST` variable
|
||||
if you want to shortcut the parser.
|
||||
|
||||
### Common Test Groups
|
||||
|
||||
@@ -600,16 +600,14 @@ It is highly recommended to use the latest NSS version when running PKCS11
|
||||
tests. Improper NSS version may lead to unexpected failures which are hard to
|
||||
diagnose. For example, sun/security/pkcs11/Secmod/AddTrustedCert.java may fail
|
||||
on Ubuntu 18.04 with the default NSS version in the system. To run these tests
|
||||
correctly, the system property `jdk.test.lib.artifacts.<NAME>` is required on
|
||||
Ubuntu 18.04 to specify the alternative NSS lib directory. The `<NAME>`
|
||||
component should be replaced with the name element of the appropriate
|
||||
`@Artifact` class. (See `test/jdk/sun/security/pkcs11/PKCS11Test.java`)
|
||||
correctly, the system property `test.nss.lib.paths` is required on Ubuntu 18.04
|
||||
to specify the alternative NSS lib directories.
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
$ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" \
|
||||
JTREG="JAVA_OPTIONS=-Djdk.test.lib.artifacts.nsslib-linux_aarch64=/path/to/NSS-libs"
|
||||
JTREG="JAVA_OPTIONS=-Dtest.nss.lib.paths=/path/to/your/latest/NSS-libs"
|
||||
```
|
||||
|
||||
For more notes about the PKCS11 tests, please refer to
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
SCANNER=wayland-scanner
|
||||
else
|
||||
SCANNER="$1"
|
||||
fi
|
||||
|
||||
set -ex
|
||||
|
||||
"$SCANNER" client-header src/java.desktop/share/native/libwakefield/protocol/wakefield.xml src/java.desktop/unix/native/libawt_wlawt/wakefield-client-protocol.h
|
||||
"$SCANNER" private-code src/java.desktop/share/native/libwakefield/protocol/wakefield.xml src/java.desktop/unix/native/libawt_wlawt/wakefield-client-protocol.c
|
||||
@@ -1 +0,0 @@
|
||||
1.0.2
|
||||
@@ -8,36 +8,15 @@
|
||||
FROM arm64v8/alpine:3.12
|
||||
|
||||
# Install the necessary build tools
|
||||
RUN apk --no-cache add --update \
|
||||
alsa-lib-dev=1.2.2-r0 \
|
||||
autoconf=2.69-r2 \
|
||||
bash=5.0.17-r0 \
|
||||
build-base=0.5-r2 \
|
||||
bzip2=1.0.8-r1 \
|
||||
cups-dev=2.3.3-r0 \
|
||||
file=5.38-r0 \
|
||||
fontconfig=2.13.1-r2 \
|
||||
fontconfig-dev=2.13.1-r2 \
|
||||
freetype-dev=2.10.4-r2 \
|
||||
git=2.26.3-r1 \
|
||||
grep=3.4-r0 \
|
||||
libx11-dev=1.6.12-r1 \
|
||||
libxext-dev=1.3.4-r0 \
|
||||
libxrandr-dev=1.5.2-r0 \
|
||||
libxrender-dev=0.9.10-r3 \
|
||||
libxt-dev=1.2.0-r0 \
|
||||
libxtst-dev=1.2.3-r3 \
|
||||
linux-headers=5.4.5-r1 \
|
||||
rsync=3.1.3-r3 \
|
||||
tar=1.32-r2 \
|
||||
wayland-dev=1.18.0-r4 \
|
||||
zip=3.0-r8
|
||||
|
||||
RUN apk --no-cache add --update bash grep tar zip bzip2 rsync fontconfig build-base \
|
||||
git libx11-dev libxext-dev libxrandr-dev libxrender-dev libxt-dev \
|
||||
libxtst-dev autoconf freetype-dev cups-dev alsa-lib-dev file \
|
||||
fontconfig fontconfig-dev linux-headers
|
||||
|
||||
# Set up boot JDK for building
|
||||
COPY boot_jdk_musl_aarch64.tar.gz /jdk20/
|
||||
RUN cd /jdk20 && tar --strip-components=1 -xzf boot_jdk_musl_aarch64.tar.gz && rm /jdk20/boot_jdk_musl_aarch64.tar.gz
|
||||
ENV BOOT_JDK=/jdk20
|
||||
COPY boot_jdk_musl_aarch64.tar.gz /jdk17/
|
||||
RUN cd /jdk17 && tar --strip-components=1 -xzf boot_jdk_musl_aarch64.tar.gz && rm /jdk17/boot_jdk_musl_aarch64.tar.gz
|
||||
ENV BOOT_JDK=/jdk17
|
||||
|
||||
RUN git config --global user.email "teamcity@jetbrains.com" && \
|
||||
git config --global user.name "builduser"
|
||||
|
||||
@@ -8,35 +8,15 @@
|
||||
FROM alpine:3.14
|
||||
|
||||
# Install the necessary build tools
|
||||
RUN apk --no-cache add --update \
|
||||
alsa-lib-dev=1.2.5-r2 \
|
||||
autoconf=2.71-r0 \
|
||||
bash=5.1.16-r0 \
|
||||
build-base=0.5-r3 \
|
||||
bzip2=1.0.8-r1 \
|
||||
cups-dev=2.3.3-r3 \
|
||||
file=5.40-r1 \
|
||||
fontconfig=2.13.1-r4 \
|
||||
fontconfig-dev=2.13.1-r4 \
|
||||
freetype-dev=2.10.4-r3 \
|
||||
git=2.32.7-r0 \
|
||||
grep=3.7-r0 \
|
||||
libx11-dev=1.7.3.1-r0 \
|
||||
libxext-dev=1.3.4-r0 \
|
||||
libxrandr-dev=1.5.2-r1 \
|
||||
libxrender-dev=0.9.10-r3 \
|
||||
libxt-dev=1.2.1-r0 \
|
||||
libxtst-dev=1.2.3-r3 \
|
||||
linux-headers=5.10.41-r0 \
|
||||
rsync=3.2.5-r0 \
|
||||
tar=1.34-r1 \
|
||||
wayland-dev=1.19.0-r0 \
|
||||
zip=3.0-r9
|
||||
RUN apk --no-cache add --update bash grep tar zip bzip2 rsync fontconfig build-base \
|
||||
git libx11-dev libxext-dev libxrandr-dev libxrender-dev libxt-dev \
|
||||
libxtst-dev autoconf freetype-dev cups-dev alsa-lib-dev file \
|
||||
fontconfig fontconfig-dev linux-headers
|
||||
|
||||
# Set up boot JDK for building
|
||||
COPY boot_jdk_musl_amd64.tar.gz /jdk20/
|
||||
RUN cd /jdk20 && tar --strip-components=1 -xzf boot_jdk_musl_amd64.tar.gz && rm /jdk20/boot_jdk_musl_amd64.tar.gz
|
||||
ENV BOOT_JDK=/jdk20
|
||||
COPY boot_jdk_musl_amd64.tar.gz /jdk17/
|
||||
RUN cd /jdk17 && tar --strip-components=1 -xzf boot_jdk_musl_amd64.tar.gz && rm /jdk17/boot_jdk_musl_amd64.tar.gz
|
||||
ENV BOOT_JDK=/jdk17
|
||||
|
||||
RUN git config --global user.email "teamcity@jetbrains.com" && \
|
||||
git config --global user.name "builduser"
|
||||
|
||||
@@ -25,8 +25,7 @@ RUN yum -y install centos-release-scl; \
|
||||
wayland-devel-1.15.0-1.el7 \
|
||||
wget-1.14-18.el7_6.1 \
|
||||
which-2.20-7.el7 \
|
||||
zip-3.0-11.el7 \
|
||||
python3-3.6.8-17.el7
|
||||
zip-3.0-11.el7
|
||||
|
||||
RUN mkdir .git && \
|
||||
git config user.email "teamcity@jetbrains.com" && \
|
||||
@@ -34,40 +33,4 @@ RUN mkdir .git && \
|
||||
|
||||
ENV LD_LIBRARY_PATH="/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib:/opt/rh/devtoolset-10/root/usr/lib64/dyninst:/opt/rh/devtoolset-10/root/usr/lib/dyninst:/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib"
|
||||
ENV PATH="/opt/rh/devtoolset-10/root/usr/bin::${PATH}"
|
||||
ENV PKG_CONFIG_PATH="/opt/rh/devtoolset-10/root/usr/lib64/pkgconfig"
|
||||
|
||||
# Build GLSLC
|
||||
RUN curl -OL https://github.com/Kitware/CMake/releases/download/v3.27.5/cmake-3.27.5-linux-x86_64.tar.gz \
|
||||
&& echo 138c68addae825b16ed78d792dafef5e0960194833f48bd77e7e0429c6bc081c *cmake-3.27.5-linux-x86_64.tar.gz | sha256sum -c - \
|
||||
&& tar -xzf cmake-3.27.5-linux-x86_64.tar.gz \
|
||||
&& rm cmake-3.27.5-linux-x86_64.tar.gz \
|
||||
&& git clone https://github.com/google/shaderc --branch v2023.6 \
|
||||
&& cd shaderc \
|
||||
&& ./utils/git-sync-deps \
|
||||
&& mkdir build \
|
||||
&& cd build \
|
||||
&& /cmake-3.27.5-linux-x86_64/bin/cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr/local \
|
||||
-DSHADERC_SKIP_TESTS=ON \
|
||||
-DSHADERC_SKIP_EXAMPLES=ON \
|
||||
-DSHADERC_SKIP_COPYRIGHT_CHECK=ON \
|
||||
.. \
|
||||
&& make install
|
||||
ENV PATH="/cmake-3.27.5-linux-x86_64/bin::${PATH}"
|
||||
|
||||
# Checkout Vulkan headers
|
||||
RUN mkdir /vulkan \
|
||||
&& cd /vulkan \
|
||||
&& git init \
|
||||
&& git remote add -f origin https://github.com/KhronosGroup/Vulkan-Headers.git \
|
||||
&& git fetch origin \
|
||||
&& git checkout v1.3.265 -- include \
|
||||
&& rm -r .git \
|
||||
&& mkdir /vulkan_hpp \
|
||||
&& cd /vulkan_hpp \
|
||||
&& git init \
|
||||
&& git remote add -f origin https://github.com/KhronosGroup/Vulkan-Hpp.git \
|
||||
&& git fetch origin \
|
||||
&& git checkout v1.3.265 -- vulkan \
|
||||
&& rm -r .git
|
||||
ENV PKG_CONFIG_PATH="/opt/rh/devtoolset-10/root/usr/lib64/pkgconfig"
|
||||
@@ -4,10 +4,10 @@ set -euo pipefail
|
||||
set -x
|
||||
|
||||
# This script creates a Docker image suitable for building musl AArch64 variant
|
||||
# of the JetBrains Runtime version 21.
|
||||
# of the JetBrains Runtime version 17.
|
||||
|
||||
BOOT_JDK_REMOTE_FILE=zulu20.32.11-ca-jdk20.0.2-linux_musl_aarch64.tar.gz
|
||||
BOOT_JDK_SHA=eec57cf744c2438f695221f041d4804de3033ad33b6dba769d3359813ba3f90d
|
||||
BOOT_JDK_REMOTE_FILE=zulu17.32.13-ca-jdk17.0.2-linux_musl_aarch64.tar.gz
|
||||
BOOT_JDK_SHA=6b920559abafbe9bdef386a20ecf3a2f318bc1f0d8359eb1f95aee26606bbc70
|
||||
BOOT_JDK_LOCAL_FILE=boot_jdk_musl_aarch64.tar.gz
|
||||
|
||||
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
|
||||
@@ -22,7 +22,7 @@ sha256sum -c - <<EOF
|
||||
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
|
||||
EOF
|
||||
|
||||
docker build -t jetbrains/runtime:jbr21env_musl_aarch64 -f Dockerfile.musl_aarch64 .
|
||||
docker build -t jbr17buildenv -f Dockerfile.musl_aarch64 .
|
||||
|
||||
# NB: the resulting container can (and should) be used without the network
|
||||
# connection (--network none) during build in order to reduce the chance
|
||||
|
||||
@@ -4,10 +4,10 @@ set -euo pipefail
|
||||
set -x
|
||||
|
||||
# This script creates a Docker image suitable for building musl-x64 variant
|
||||
# of the JetBrains Runtime version 21.
|
||||
# of the JetBrains Runtime version 17.
|
||||
|
||||
BOOT_JDK_REMOTE_FILE=zulu20.32.11-ca-jdk20.0.2-linux_musl_x64.tar.gz
|
||||
BOOT_JDK_SHA=fca5081dd6da847fcd06f5b755e58edae22d6784f21b81bf73da2b538f842c07
|
||||
BOOT_JDK_REMOTE_FILE=zulu17.32.13-ca-jdk17.0.2-linux_musl_x64.tar.gz
|
||||
BOOT_JDK_SHA=bcc5342011bd9f3643372aadbdfa68d47463ff0d8621668a0bdf2910614d95c6
|
||||
BOOT_JDK_LOCAL_FILE=boot_jdk_musl_amd64.tar.gz
|
||||
|
||||
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
|
||||
@@ -22,7 +22,7 @@ sha256sum -c - <<EOF
|
||||
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
|
||||
EOF
|
||||
|
||||
docker build -t jetbrains/runtime:jbr21env_musl_x64 -f Dockerfile.musl_x64 .
|
||||
docker build -t jbr17buildenv -f Dockerfile.musl_x64 .
|
||||
|
||||
# NB: the resulting container can (and should) be used without the network
|
||||
# connection (--network none) during build in order to reduce the chance
|
||||
|
||||
13
jb/project/idea-project-files/jetbrains.api.iml
Normal file
13
jb/project/idea-project-files/jetbrains.api.iml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$/src/jetbrains.api">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/jetbrains.api/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/jetbrains.api/templates" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/jdk.iml" filepath="$PROJECT_DIR$/.idea/jdk.iml" />
|
||||
###MODULE_IMLS###
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/jetbrains.api.iml" filepath="$PROJECT_DIR$/.idea/jetbrains.api.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/test.iml" filepath="$PROJECT_DIR$/.idea/test.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
|
||||
18
jb/project/tools/common/scripts/build-jbr-api.sh
Normal file
18
jb/project/tools/common/scripts/build-jbr-api.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin//bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# $1 - Boot JDK
|
||||
# $2 - JBR part of API version
|
||||
|
||||
cd "`dirname "$0"`/../../../../.."
|
||||
PWD="`pwd`"
|
||||
CONF="$PWD/build/jbr-api.conf"
|
||||
./configure --with-debug-level=release --with-boot-jdk=$1 || exit $?
|
||||
make jbr-api CONF=release MAKEOVERRIDES= "JBR_API_CONF_FILE=$CONF" JBR_API_JBR_VERSION=$2 || exit $?
|
||||
. $CONF || exit $?
|
||||
echo "##teamcity[buildNumber '$VERSION']"
|
||||
cp "$JAR" ./jbr-api-${VERSION}.jar || exit $?
|
||||
cp "$SOURCES_JAR" ./jbr-api-${VERSION}-sources.jar || exit $?
|
||||
echo "##teamcity[publishArtifacts '$PWD/jbr-api-${VERSION}.jar']"
|
||||
echo "##teamcity[publishArtifacts '$PWD/jbr-api-${VERSION}-sources.jar']"
|
||||
@@ -5,7 +5,7 @@ set -x
|
||||
|
||||
function check_bundle_type_maketest() {
|
||||
# check whether last char is 't', if so remove it
|
||||
if [ "${bundle_type: -1}" == "t" ] && [ "${bundle_type: -2}" != "ft" ]; then
|
||||
if [ "${bundle_type: -1}" == "t" ]; then
|
||||
bundle_type="${bundle_type%?}"
|
||||
do_maketest=1
|
||||
else
|
||||
@@ -17,11 +17,9 @@ function getVersionProp() {
|
||||
grep "^${1}" make/conf/version-numbers.conf | cut -d'=' -f2
|
||||
}
|
||||
|
||||
DISABLE_WARNINGS_AS_ERRORS=""
|
||||
while getopts ":iw?" o; do
|
||||
while getopts ":i?" o; do
|
||||
case "${o}" in
|
||||
i) INC_BUILD=1 ;;
|
||||
w) DISABLE_WARNINGS_AS_ERRORS="--disable-warnings-as-errors" ;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
@@ -38,8 +36,8 @@ architecture=${3:-x64} # aarch64 or x64
|
||||
|
||||
check_bundle_type_maketest
|
||||
|
||||
tag_prefix="jbr-"
|
||||
OPENJDK_TAG=$(git log --simplify-by-decoration --decorate=short --pretty=short | grep "$tag_prefix" | cut -d "(" -f2 | cut -d ")" -f1 | awk '{print $2}' | sort -t "-" -k 2 -g | tail -n 1 | tr -d ",")
|
||||
tag_prefix="jdk-"
|
||||
OPENJDK_TAG=$(git log --simplify-by-decoration --decorate=short --pretty=short | grep "$tag_prefix" | cut -d "(" -f2 | cut -d ")" -f1 | awk '{print $2}' | tr -d ',' | sort -t "-" -k 2 -g | tail -n 1)
|
||||
VERSION_FEATURE=$(getVersionProp "DEFAULT_VERSION_FEATURE")
|
||||
VERSION_INTERIM=$(getVersionProp "DEFAULT_VERSION_INTERIM")
|
||||
VERSION_UPDATE=$(getVersionProp "DEFAULT_VERSION_UPDATE")
|
||||
@@ -96,12 +94,6 @@ esac
|
||||
|
||||
WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS="--with-native-debug-symbols=zipped"
|
||||
|
||||
if [ "$bundle_type" == "nomodft" ]; then
|
||||
WITH_BUNDLED_FREETYPE="--with-freetype=bundled"
|
||||
else
|
||||
WITH_BUNDLED_FREETYPE=""
|
||||
fi
|
||||
|
||||
REPRODUCIBLE_BUILD_OPTS="--with-source-date=$SOURCE_DATE_EPOCH
|
||||
--with-hotspot-build-time=$BUILD_TIME
|
||||
--with-copyright-year=$COPYRIGHT_YEAR
|
||||
|
||||
@@ -35,11 +35,9 @@ function do_configure {
|
||||
--with-version-opt=b"$build_number" \
|
||||
--with-boot-jdk="$BOOT_JDK" \
|
||||
--enable-cds=yes \
|
||||
$DISABLE_WARNINGS_AS_ERRORS \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||
$WITH_BUNDLED_FREETYPE \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
@@ -60,20 +58,19 @@ function create_image_bundle {
|
||||
|
||||
libc_type_suffix=''
|
||||
fastdebug_infix=''
|
||||
__cds_opt=''
|
||||
|
||||
if is_musl; then libc_type_suffix='musl-' ; fi
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then __cds_opt="--generate-cds-archive"; fi
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}aarch64-${fastdebug_infix}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}aarch64-${fastdebug_infix:-}b${build_number}
|
||||
|
||||
|
||||
echo Running jlink....
|
||||
[ -d "$IMAGES_DIR"/"$__root_dir" ] && rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
$JSDK/bin/jlink \
|
||||
--module-path "$__modules_path" --no-man-pages --compress=2 \
|
||||
$__cds_opt --add-modules "$__modules" --output "$IMAGES_DIR"/"$__root_dir"
|
||||
--add-modules "$__modules" --output "$IMAGES_DIR"/"$__root_dir"
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__root_dir"/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
@@ -86,7 +83,6 @@ 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
|
||||
[ -f "$IMAGES_DIR"/"$__root_dir"/lib/cef_server ] && chmod a+x "$IMAGES_DIR"/"$__root_dir"/lib/cef_server
|
||||
|
||||
echo Creating "$JBR".tar.gz ...
|
||||
|
||||
@@ -104,23 +100,16 @@ function create_image_bundle {
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=linux-aarch64-server-release
|
||||
|
||||
jbr_name_postfix=""
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=1
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"nomodft" | "")
|
||||
jbr_name_postfix="_ft"
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=1
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=linux-aarch64-server-fastdebug
|
||||
;;
|
||||
@@ -144,7 +133,11 @@ if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module_aarch64.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
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
@@ -162,7 +155,8 @@ if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-linux-${libc_type_suffix}test-aarch64-b${build_number}
|
||||
echo Creating "$JBRSDK_TEST" ...
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
|
||||
make test-image CONF=$RELEASE_NAME JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
make test-image jbr-api CONF=$RELEASE_NAME JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
cp "build/${RELEASE_NAME}/jbr-api/jbr-api.jar" "${IMAGES_DIR}/test"
|
||||
tar -pcf "$JBRSDK_TEST".tar -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
|
||||
gzip "$JBRSDK_TEST".tar || do_exit $?
|
||||
|
||||
@@ -25,13 +25,6 @@ source jb/project/tools/common/scripts/common.sh
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_linux_x64}
|
||||
|
||||
function do_configure {
|
||||
if is_musl; then
|
||||
LINUX_TARGET=""
|
||||
else
|
||||
LINUX_TARGET="\
|
||||
--build=x86_64-unknown-linux-gnu \
|
||||
--openjdk-target=x86_64-unknown-linux-gnu"
|
||||
fi
|
||||
sh configure \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
@@ -42,12 +35,9 @@ function do_configure {
|
||||
--with-version-opt=b"$build_number" \
|
||||
--with-boot-jdk="$BOOT_JDK" \
|
||||
--enable-cds=yes \
|
||||
$LINUX_TARGET \
|
||||
$DISABLE_WARNINGS_AS_ERRORS \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||
$WITH_BUNDLED_FREETYPE \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
@@ -68,10 +58,8 @@ function create_image_bundle {
|
||||
|
||||
libc_type_suffix=''
|
||||
fastdebug_infix=''
|
||||
__cds_opt=''
|
||||
|
||||
if is_musl; then libc_type_suffix='musl-' ; fi
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then __cds_opt="--generate-cds-archive"; fi
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x64-${fastdebug_infix}b${build_number}
|
||||
@@ -81,7 +69,7 @@ function create_image_bundle {
|
||||
[ -d "$IMAGES_DIR"/"$__root_dir" ] && rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
$JSDK/bin/jlink \
|
||||
--module-path "$__modules_path" --no-man-pages --compress=2 \
|
||||
$__cds_opt --add-modules "$__modules" --output "$IMAGES_DIR"/"$__root_dir"
|
||||
--add-modules "$__modules" --output "$IMAGES_DIR"/"$__root_dir"
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__root_dir"/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
@@ -94,7 +82,6 @@ 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
|
||||
[ -f "$IMAGES_DIR"/"$__root_dir"/lib/cef_server ] && chmod a+x "$IMAGES_DIR"/"$__root_dir"/lib/cef_server
|
||||
|
||||
echo Creating "$JBR".tar.gz ...
|
||||
|
||||
@@ -112,23 +99,16 @@ function create_image_bundle {
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=linux-x86_64-server-release
|
||||
|
||||
jbr_name_postfix=""
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=1
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"nomodft" | "")
|
||||
jbr_name_postfix="_ft"
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=1
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=linux-x86_64-server-fastdebug
|
||||
;;
|
||||
@@ -152,7 +132,11 @@ if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; 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
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
@@ -170,7 +154,8 @@ if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-linux-${libc_type_suffix}test-x64-b${build_number}
|
||||
echo Creating "$JBRSDK_TEST" ...
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
|
||||
make test-image CONF=$RELEASE_NAME JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
make test-image jbr-api CONF=$RELEASE_NAME JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
cp "build/${RELEASE_NAME}/jbr-api/jbr-api.jar" "${IMAGES_DIR}/test"
|
||||
tar -pcf "$JBRSDK_TEST".tar -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
|
||||
gzip "$JBRSDK_TEST".tar || do_exit $?
|
||||
|
||||
@@ -25,7 +25,6 @@ function do_configure {
|
||||
--with-boot-jdk="$BOOT_JDK" \
|
||||
$STATIC_CONF_ARGS \
|
||||
--enable-cds=yes \
|
||||
$DISABLE_WARNINGS_AS_ERRORS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||
|| do_exit $?
|
||||
@@ -48,10 +47,8 @@ function create_image_bundle {
|
||||
|
||||
libc_type_suffix=''
|
||||
fastdebug_infix=''
|
||||
__cds_opt=''
|
||||
|
||||
if is_musl; then libc_type_suffix='musl-' ; fi
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then __cds_opt="--generate-cds-archive"; fi
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x86-${fastdebug_infix}b${build_number}
|
||||
@@ -61,7 +58,7 @@ function create_image_bundle {
|
||||
[ -d "$IMAGES_DIR"/"$__root_dir" ] && rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
$JSDK/bin/jlink \
|
||||
--module-path "$__modules_path" --no-man-pages --compress=2 \
|
||||
$__cds_opt --add-modules "$__modules" --output "$IMAGES_DIR"/"$__root_dir"
|
||||
--add-modules "$__modules" --output "$IMAGES_DIR"/"$__root_dir"
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__root_dir"/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
@@ -137,7 +134,8 @@ if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-linux-${libc_type_suffix}test-x86-b${build_number}
|
||||
echo Creating "$JBRSDK_TEST" ...
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
|
||||
make test-image CONF=$RELEASE_NAME JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
make test-image jbr-api CONF=$RELEASE_NAME JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
cp "build/${RELEASE_NAME}/jbr-api/jbr-api.jar" "${IMAGES_DIR}/test"
|
||||
tar -pcf "$JBRSDK_TEST".tar -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
|
||||
gzip "$JBRSDK_TEST".tar || do_exit $?
|
||||
|
||||
@@ -26,6 +26,11 @@ JCEF_PATH=${JCEF_PATH:=./jcef_mac}
|
||||
BOOT_JDK=${BOOT_JDK:=$(/usr/libexec/java_home -v 17)}
|
||||
|
||||
function do_configure {
|
||||
if [[ "${architecture}" == *aarch64* ]]; then
|
||||
ENABLE_CDS="--enable-cds=no"
|
||||
else
|
||||
ENABLE_CDS="--enable-cds=yes"
|
||||
fi
|
||||
sh configure \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
@@ -38,7 +43,6 @@ function do_configure {
|
||||
--with-version-opt=b"$build_number" \
|
||||
--with-boot-jdk="$BOOT_JDK" \
|
||||
--enable-cds=yes \
|
||||
$DISABLE_WARNINGS_AS_ERRORS \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||
@@ -52,8 +56,6 @@ function create_image_bundle {
|
||||
__modules=$4
|
||||
|
||||
fastdebug_infix=''
|
||||
__cds_opt=''
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then __cds_opt="--generate-cds-archive"; fi
|
||||
|
||||
tmp=.bundle.$$.tmp
|
||||
mkdir "$tmp" || do_exit $?
|
||||
@@ -68,7 +70,7 @@ function create_image_bundle {
|
||||
echo Running jlink...
|
||||
"$JSDK"/bin/jlink \
|
||||
--module-path "$__modules_path" --no-man-pages --compress=2 \
|
||||
$__cds_opt --add-modules "$__modules" --output "$JRE_CONTENTS/Home" || do_exit $?
|
||||
--add-modules "$__modules" --output "$JRE_CONTENTS/Home" || do_exit $?
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$JRE_CONTENTS/Home/release"
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
@@ -160,7 +162,8 @@ if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-osx-test-${architecture}-b${build_number}
|
||||
echo Creating "$JBRSDK_TEST" ...
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
|
||||
make test-image CONF=$RELEASE_NAME JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
make test-image jbr-api CONF=$RELEASE_NAME JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
cp "build/${RELEASE_NAME}/jbr-api/jbr-api.jar" "${IMAGES_DIR}/test"
|
||||
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
|
||||
COPYFILE_DISABLE=1 tar -pczf "$JBRSDK_TEST".tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
fi
|
||||
|
||||
@@ -100,7 +100,7 @@ done
|
||||
log "Signing whole frameworks..."
|
||||
# shellcheck disable=SC2043
|
||||
if [ "$JB_SIGN" = true ]; then for f in \
|
||||
"Contents/Frameworks/cef_server.app/Contents/Frameworks" "Contents/Home/Frameworks" "Contents/Frameworks"; do
|
||||
"Contents/Home/Frameworks" "Contents/Frameworks"; do
|
||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
||||
find "$APPLICATION_PATH/$f" \( -name '*.framework' -o -name '*.app' \) -maxdepth 1 | while read -r line
|
||||
do
|
||||
|
||||
@@ -49,7 +49,6 @@ function do_configure {
|
||||
--with-nvdacontrollerclient=$NVDA_PATH \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes \
|
||||
$DISABLE_WARNINGS_AS_ERRORS \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
|| do_exit $?
|
||||
@@ -104,13 +103,13 @@ esac
|
||||
if [ -z "${INC_BUILD:-}" ]; then
|
||||
do_configure || do_exit $?
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME clean images test-image JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
make LOG=info CONF=$RELEASE_NAME clean images test-image jbr-api JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME clean images || do_exit $?
|
||||
fi
|
||||
else
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME images test-image JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
make LOG=info CONF=$RELEASE_NAME images test-image jbr-api JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME images || do_exit $?
|
||||
fi
|
||||
|
||||
@@ -40,7 +40,6 @@ function do_configure {
|
||||
--with-nvdacontrollerclient=$NVDA_PATH \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes \
|
||||
$DISABLE_WARNINGS_AS_ERRORS \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
|| do_exit $?
|
||||
@@ -53,8 +52,6 @@ function create_image_bundle {
|
||||
__modules=$4
|
||||
|
||||
fastdebug_infix=''
|
||||
__cds_opt=''
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then __cds_opt="--generate-cds-archive"; fi
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-x64-${fastdebug_infix}b${build_number}
|
||||
@@ -62,10 +59,10 @@ function create_image_bundle {
|
||||
echo Running jlink ...
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path $__modules_path --no-man-pages --compress=2 \
|
||||
$__cds_opt --add-modules $__modules --output $__root_dir || do_exit $?
|
||||
--add-modules $__modules --output $__root_dir || do_exit $?
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> $__root_dir/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> $__root_dir/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
sed 's/JBR/JBRSDK/g' $__root_dir/release > release
|
||||
mv release $__root_dir/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip $__root_dir/lib
|
||||
@@ -97,13 +94,13 @@ esac
|
||||
if [ -z "${INC_BUILD:-}" ]; then
|
||||
do_configure || do_exit $?
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME clean images test-image JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
make LOG=info CONF=$RELEASE_NAME clean images test-image jbr-api JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME clean images || do_exit $?
|
||||
fi
|
||||
else
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME images test-image JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
make LOG=info CONF=$RELEASE_NAME images test-image jbr-api JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME images || do_exit $?
|
||||
fi
|
||||
|
||||
@@ -36,7 +36,6 @@ function do_configure {
|
||||
--with-nvdacontrollerclient=$NVDA_PATH \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes \
|
||||
$DISABLE_WARNINGS_AS_ERRORS \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
|| do_exit $?
|
||||
@@ -49,8 +48,6 @@ function create_image_bundle {
|
||||
__modules=$4
|
||||
|
||||
fastdebug_infix=''
|
||||
__cds_opt=''
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then __cds_opt="--generate-cds-archive"; fi
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-x86-${fastdebug_infix}b${build_number}
|
||||
@@ -58,7 +55,7 @@ function create_image_bundle {
|
||||
echo Running jlink ...
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path $__modules_path --no-man-pages --compress=2 \
|
||||
$__cds_opt --add-modules $__modules --output $__root_dir || do_exit $?
|
||||
--add-modules $__modules --output $__root_dir || do_exit $?
|
||||
|
||||
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> $__root_dir/release
|
||||
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||
@@ -92,13 +89,13 @@ esac
|
||||
if [ -z "${INC_BUILD:-}" ]; then
|
||||
do_configure || do_exit $?
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME clean images test-image JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
make LOG=info CONF=$RELEASE_NAME clean images test-image jbr-api JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME clean images || do_exit $?
|
||||
fi
|
||||
else
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
make LOG=info CONF=$RELEASE_NAME images test-image JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
make LOG=info CONF=$RELEASE_NAME images test-image jbr-api JBR_API_JBR_VERSION=TEST || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME images || do_exit $?
|
||||
fi
|
||||
|
||||
@@ -51,6 +51,7 @@ pack_jbr jbrsdk${jbr_name_postfix} jbrsdk
|
||||
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=$JBRSDK_BUNDLE-$JBSDK_VERSION-windows-test-aarch64-b$build_number
|
||||
cp "build/${RELEASE_NAME}/jbr-api/jbr-api.jar" "${IMAGES_DIR}/test" || do_exit $?
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
fi
|
||||
@@ -51,6 +51,7 @@ pack_jbr jbrsdk${jbr_name_postfix} jbrsdk
|
||||
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=$JBRSDK_BUNDLE-$JBSDK_VERSION-windows-test-x64-b$build_number
|
||||
cp "build/${RELEASE_NAME}/jbr-api/jbr-api.jar" "${IMAGES_DIR}/test" || do_exit $?
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
fi
|
||||
@@ -47,6 +47,7 @@ pack_jbr jbrsdk${jbr_name_postfix} jbrsdk
|
||||
|
||||
if [ $do_maketest -eq 1 ]; then
|
||||
JBRSDK_TEST=$JBRSDK_BUNDLE-$JBSDK_VERSION-windows-test-x86-b$build_number
|
||||
cp "build/${RELEASE_NAME}/jbr-api/jbr-api.jar" "${IMAGES_DIR}/test" || do_exit $?
|
||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
||||
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $BASE_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||
fi
|
||||
@@ -100,7 +100,6 @@ $(eval $(call SetupJavaCompilation, $(MODULE), \
|
||||
BIN := $(if $($(MODULE)_BIN), $($(MODULE)_BIN), $(JDK_OUTPUTDIR)/modules), \
|
||||
HEADERS := $(SUPPORT_OUTPUTDIR)/headers, \
|
||||
CREATE_API_DIGEST := true, \
|
||||
PROCESS_JBR_API := true, \
|
||||
CLEAN := $(CLEAN), \
|
||||
CLEAN_FILES := $(CLEAN_FILES), \
|
||||
COPY := $(COPY), \
|
||||
|
||||
@@ -84,7 +84,7 @@ $(eval $(call SetupJavaCompilation, COMPILE_DEPEND, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||
SRC := $(TOPDIR)/make/jdk/src/classes, \
|
||||
INCLUDES := build/tools/depend, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/plugins, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/depend, \
|
||||
DISABLED_WARNINGS := options, \
|
||||
JAVAC_FLAGS := \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
|
||||
@@ -97,21 +97,13 @@ $(eval $(call SetupJavaCompilation, COMPILE_DEPEND, \
|
||||
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.javadoc.interim, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupJavaCompilation, COMPILE_JBR_API_PLUGIN, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||
SRC := $(TOPDIR)/make/jdk/src/classes, \
|
||||
INCLUDES := build/tools/jbrapi, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/plugins, \
|
||||
))
|
||||
DEPEND_SERVICE_PROVIDER := $(BUILDTOOLS_OUTPUTDIR)/depend/META-INF/services/com.sun.source.util.Plugin
|
||||
|
||||
PLUGINS_SERVICE_PROVIDER := $(BUILDTOOLS_OUTPUTDIR)/plugins/META-INF/services/com.sun.source.util.Plugin
|
||||
|
||||
$(PLUGINS_SERVICE_PROVIDER):
|
||||
$(call MakeDir, $(BUILDTOOLS_OUTPUTDIR)/plugins/META-INF/services)
|
||||
$(DEPEND_SERVICE_PROVIDER):
|
||||
$(call MakeDir, $(BUILDTOOLS_OUTPUTDIR)/depend/META-INF/services)
|
||||
$(ECHO) build.tools.depend.Depend > $@
|
||||
$(ECHO) build.tools.jbrapi.JBRApiPlugin >> $@
|
||||
|
||||
TARGETS += $(COMPILE_DEPEND) $(COMPILE_JBR_API_PLUGIN) $(PLUGINS_SERVICE_PROVIDER)
|
||||
TARGETS += $(COMPILE_DEPEND) $(DEPEND_SERVICE_PROVIDER)
|
||||
|
||||
################################################################################
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2022, 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
|
||||
@@ -81,11 +81,13 @@ endif
|
||||
ifneq ($(CMDS_DIR), )
|
||||
DEPS += $(call FindFiles, $(CMDS_DIR))
|
||||
ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
|
||||
# For public debug symbols on Windows, we have to use stripped pdbs and rename them
|
||||
# For public debug symbols on Windows, we have to use stripped pdbs, rename them
|
||||
# and filter out a few launcher pdbs where there's a lib that goes by the same name
|
||||
rename_stripped = $(patsubst %.stripped.pdb,%.pdb,$1)
|
||||
CMDS_DIR_FILTERED := $(subst modules_cmds,modules_cmds_filtered, $(CMDS_DIR))
|
||||
FILES_CMDS := $(filter-out %.pdb, $(call FindFiles, $(CMDS_DIR))) \
|
||||
$(filter %.stripped.pdb, $(call FindFiles, $(CMDS_DIR)))
|
||||
$(filter-out %jimage.stripped.pdb %jpackage.stripped.pdb %java.stripped.pdb, \
|
||||
$(filter %.stripped.pdb, $(call FindFiles, $(CMDS_DIR))))
|
||||
$(eval $(call SetupCopyFiles, COPY_FILTERED_CMDS, \
|
||||
SRC := $(CMDS_DIR), \
|
||||
DEST := $(CMDS_DIR_FILTERED), \
|
||||
@@ -94,6 +96,18 @@ ifneq ($(CMDS_DIR), )
|
||||
))
|
||||
DEPS += $(COPY_FILTERED_CMDS)
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR_FILTERED)
|
||||
else ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+full)
|
||||
# For full debug symbols on Windows, we have to filter out a few launcher pdbs
|
||||
# where there's a lib that goes by the same name
|
||||
CMDS_DIR_FILTERED := $(subst modules_cmds,modules_cmds_filtered, $(CMDS_DIR))
|
||||
$(eval $(call SetupCopyFiles, COPY_FILTERED_CMDS, \
|
||||
SRC := $(CMDS_DIR), \
|
||||
DEST := $(CMDS_DIR_FILTERED), \
|
||||
FILES := $(filter-out %jimage.pdb %jpackage.pdb %java.pdb, \
|
||||
$(call FindFiles, $(CMDS_DIR))), \
|
||||
))
|
||||
DEPS += $(COPY_FILTERED_CMDS)
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR_FILTERED)
|
||||
else
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR)
|
||||
endif
|
||||
|
||||
@@ -267,6 +267,9 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
FILTERED_PDBS := %jimage.stripped.pdb %jpackage.stripped.pdb %java.stripped.pdb \
|
||||
%jimage.pdb %jpackage.pdb %java.pdb %jimage.map %jpackage.map %java.map
|
||||
|
||||
# Param 1 - either JDK or JRE
|
||||
SetupCopyDebuginfo = \
|
||||
$(foreach m, $(ALL_$1_MODULES), \
|
||||
@@ -280,8 +283,8 @@ SetupCopyDebuginfo = \
|
||||
$(eval $(call SetupCopyFiles, COPY_$1_CMDS_DEBUGINFO_$m, \
|
||||
SRC := $(SUPPORT_OUTPUTDIR)/modules_cmds/$m, \
|
||||
DEST := $($1_IMAGE_DIR)/$(CMDS_TARGET_SUBDIR), \
|
||||
FILES := $(call FindDebuginfoFiles, \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_cmds/$m), \
|
||||
FILES := $(filter-out $(FILTERED_PDBS), $(call FindDebuginfoFiles, \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_cmds/$m)), \
|
||||
)) \
|
||||
$(eval $1_TARGETS += $$(COPY_$1_CMDS_DEBUGINFO_$m)) \
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2022, 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
|
||||
@@ -138,10 +138,7 @@ ifeq ($(HAS_SPEC),)
|
||||
# The spec files depend on the autoconf source code. This check makes sure
|
||||
# the configuration is up to date after changes to configure.
|
||||
$(SPECS): $(wildcard $(topdir)/make/autoconf/*) \
|
||||
$(if $(CUSTOM_CONFIG_DIR), $(wildcard $(CUSTOM_CONFIG_DIR)/*)) \
|
||||
$(addprefix $(topdir)/make/conf/, version-numbers.conf branding.conf) \
|
||||
$(if $(CUSTOM_CONF_DIR), $(wildcard $(addprefix $(CUSTOM_CONF_DIR)/, \
|
||||
version-numbers.conf branding.conf)))
|
||||
$(if $(CUSTOM_CONFIG_DIR), $(wildcard $(CUSTOM_CONFIG_DIR)/*))
|
||||
ifeq ($(CONF_CHECK), fail)
|
||||
@echo Error: The configuration is not up to date for \
|
||||
"'$(lastword $(subst /, , $(dir $@)))'."
|
||||
|
||||
100
make/JBRApi.gmk
100
make/JBRApi.gmk
@@ -25,49 +25,69 @@
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include Utils.gmk
|
||||
include JavaCompilation.gmk
|
||||
|
||||
JBR_API_ORIGIN := https://github.com/JetBrains/JetBrainsRuntimeApi.git
|
||||
JBR_API_DIR := $(TOPDIR)/jbr-api
|
||||
JBR_API_ROOT_DIR := $(TOPDIR)/src/jetbrains.api
|
||||
JBR_API_TOOLS_DIR := $(JBR_API_ROOT_DIR)/tools
|
||||
JBR_API_SRC_DIR := $(JBR_API_ROOT_DIR)/src
|
||||
JBR_API_OUTPUT_DIR := $(OUTPUTDIR)/jbr-api
|
||||
JBR_API_GENSRC_DIR := $(JBR_API_OUTPUT_DIR)/gensrc
|
||||
JBR_API_BIN_DIR := $(JBR_API_OUTPUT_DIR)/bin
|
||||
JBR_API_VERSION_PROPERTIES := $(JBR_API_ROOT_DIR)/version.properties
|
||||
JBR_API_VERSION_GENSRC := $(JBR_API_OUTPUT_DIR)/jbr-api.version
|
||||
JBR_API_GENSRC_BATCH := $(JBR_API_VERSION_GENSRC)
|
||||
|
||||
ARTIFACT_NAME := jbr-api-SNAPSHOT
|
||||
ifeq ($(call isBuildOsEnv, windows.cygwin windows.msys2), true)
|
||||
HOME := $$USERPROFILE
|
||||
M2_REPO := $(shell $(PATHTOOL) $(HOME))/.m2/repository
|
||||
else ifeq ($(call isBuildOsEnv, windows.wsl1 windows.wsl2), true)
|
||||
HOME := `cmd.exe /C "echo %USERPROFILE%" 2> /dev/null`
|
||||
M2_REPO := $(shell $(PATHTOOL) $(HOME))/.m2/repository
|
||||
JBR_API_SRC_FILES := $(call FindFiles, $(JBR_API_SRC_DIR))
|
||||
JBR_API_GENSRC_FILES := $(foreach f, $(call FindFiles, $(JBR_API_SRC_DIR)), \
|
||||
$(JBR_API_GENSRC_DIR)/$(call RelativePath, $f, $(JBR_API_SRC_DIR)))
|
||||
|
||||
ifeq ($(JBR_API_JBR_VERSION),)
|
||||
JBR_API_JBR_VERSION := DEVELOPMENT
|
||||
JBR_API_FAIL_ON_HASH_MISMATCH := false
|
||||
else
|
||||
M2_REPO := $(HOME)/.m2/repository
|
||||
.PHONY: $(JBR_API_VERSION_PROPERTIES)
|
||||
JBR_API_FAIL_ON_HASH_MISMATCH := true
|
||||
endif
|
||||
M2_ARTIFACT := $(M2_REPO)/com/jetbrains/jbr-api/SNAPSHOT
|
||||
M2_POM_CONTENT := \
|
||||
<?xml version="1.0" encoding="UTF-8"?> \
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" \
|
||||
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> \
|
||||
<modelVersion>4.0.0</modelVersion> \
|
||||
<groupId>com.jetbrains</groupId> \
|
||||
<artifactId>jbr-api</artifactId> \
|
||||
<version>SNAPSHOT</version> \
|
||||
</project> \
|
||||
|
||||
jbr-api:
|
||||
if [ -d "$(JBR_API_DIR)" ]; then \
|
||||
$(GIT) -C "$(JBR_API_DIR)" fetch; \
|
||||
$(GIT) -C "$(JBR_API_DIR)" merge-base --is-ancestor origin/main HEAD || \
|
||||
$(ECHO) "!!! Current JBR API revision is outdated, update the branch in $(JBR_API_DIR) !!!"; \
|
||||
else \
|
||||
$(ECHO) "JBR API directory does not exist. Initializing..."; \
|
||||
$(GIT) clone "$(JBR_API_ORIGIN)" "$(JBR_API_DIR)" --config core.autocrlf=false; \
|
||||
fi
|
||||
$(BASH) "$(JBR_API_DIR)/tools/build.sh" dev "$(BOOT_JDK)"
|
||||
if [ -d "$(M2_REPO)" ]; then \
|
||||
$(MKDIR) -p $(M2_ARTIFACT); \
|
||||
$(ECHO) "$(M2_POM_CONTENT)" > $(M2_ARTIFACT)/$(ARTIFACT_NAME).pom; \
|
||||
$(CP) "$(JBR_API_DIR)/out/$(ARTIFACT_NAME).jar" "$(M2_ARTIFACT)"; \
|
||||
$(ECHO) "Installed into local Maven repository as com.jetbrains:jbr-api:SNAPSHOT"; \
|
||||
else \
|
||||
$(ECHO) "No Maven repository found at $(M2_REPO) - skipping local installation"; \
|
||||
fi
|
||||
ARCHIVE_BUILD_JBR_API_BIN := $(JBR_API_BIN_DIR)
|
||||
$(eval $(call SetupJavaCompilation, BUILD_JBR_API, \
|
||||
SMALL_JAVA := true, \
|
||||
COMPILER := bootjdk, \
|
||||
SRC := $(JBR_API_GENSRC_DIR), \
|
||||
EXTRA_FILES := $(JBR_API_GENSRC_FILES), \
|
||||
BIN := $(JBR_API_BIN_DIR), \
|
||||
JAR := $(JBR_API_OUTPUT_DIR)/jbr-api.jar, \
|
||||
))
|
||||
|
||||
.PHONY: jbr-api
|
||||
$(eval $(call SetupJarArchive, BUILD_JBR_API_SOURCES_JAR, \
|
||||
DEPENDENCIES := $(JBR_API_GENSRC_FILES), \
|
||||
SRCS := $(JBR_API_GENSRC_DIR), \
|
||||
JAR := $(JBR_API_OUTPUT_DIR)/jbr-api-sources.jar, \
|
||||
SUFFIXES := .java, \
|
||||
BIN := $(JBR_API_BIN_DIR), \
|
||||
))
|
||||
|
||||
# Grouped targets may not be supported, so hack dependencies: sources -> version file -> generated sources
|
||||
$(JBR_API_VERSION_GENSRC): $(JBR_API_SRC_FILES) $(JBR_API_VERSION_PROPERTIES) $(JBR_API_TOOLS_DIR)/Gensrc.java
|
||||
$(ECHO) Generating sources for JBR API
|
||||
$(JAVA_CMD) $(JAVA_FLAGS_SMALL) "$(JBR_API_TOOLS_DIR)/Gensrc.java" \
|
||||
"$(TOPDIR)/src" "$(JBR_API_OUTPUT_DIR)" "$(JBR_API_JBR_VERSION)"
|
||||
$(JBR_API_GENSRC_FILES): $(JBR_API_VERSION_GENSRC)
|
||||
$(TOUCH) $@
|
||||
|
||||
jbr-api-check-version: $(JBR_API_GENSRC_FILES) $(JBR_API_VERSION_PROPERTIES)
|
||||
$(JAVA_CMD) $(JAVA_FLAGS_SMALL) "$(JBR_API_TOOLS_DIR)/CheckVersion.java" \
|
||||
"$(JBR_API_ROOT_DIR)" "$(JBR_API_GENSRC_DIR)" "$(JBR_API_FAIL_ON_HASH_MISMATCH)"
|
||||
|
||||
jbr-api: $(BUILD_JBR_API) $(BUILD_JBR_API_SOURCES_JAR) jbr-api-check-version
|
||||
|
||||
.PHONY: jbr-api jbr-api-check-version
|
||||
|
||||
ifneq ($(JBR_API_CONF_FILE),)
|
||||
$(JBR_API_CONF_FILE): $(JBR_API_GENSRC_FILES)
|
||||
$(ECHO) "VERSION=`$(CAT) $(JBR_API_VERSION_GENSRC)`" > $(JBR_API_CONF_FILE)
|
||||
$(ECHO) "JAR=$(JBR_API_OUTPUT_DIR)/jbr-api.jar" >> $(JBR_API_CONF_FILE)
|
||||
$(ECHO) "SOURCES_JAR=$(JBR_API_OUTPUT_DIR)/jbr-api-sources.jar" >> $(JBR_API_CONF_FILE)
|
||||
jbr-api: $(JBR_API_CONF_FILE)
|
||||
.PHONY: $(JBR_API_CONF_FILE)
|
||||
endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2022, 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
|
||||
@@ -46,10 +46,8 @@ JIMAGE_PKGS := \
|
||||
jdk/internal/jrtfs \
|
||||
#
|
||||
|
||||
# Compile jrt-fs.jar with the interim compiler, as it
|
||||
# ends up in the image, this will ensure reproducible classes
|
||||
$(eval $(call SetupJavaCompilation, BUILD_JRTFS, \
|
||||
COMPILER := interim, \
|
||||
COMPILER := bootjdk, \
|
||||
DISABLED_WARNINGS := options, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_JDK8), \
|
||||
SRC := $(TOPDIR)/src/java.base/share/classes, \
|
||||
|
||||
@@ -178,8 +178,7 @@ ifeq ($(TEST_JOBS), 0)
|
||||
c = c * $(TEST_JOBS_FACTOR_JDL); \
|
||||
c = c * $(TEST_JOBS_FACTOR_MACHINE); \
|
||||
if (c < 1) c = 1; \
|
||||
c = c + 0.5; \
|
||||
printf "%d", c; \
|
||||
printf "%.0f", c; \
|
||||
}')
|
||||
endif
|
||||
|
||||
@@ -357,7 +356,7 @@ ExpandJtregPath = \
|
||||
# with test id: dir/Test.java#selection -> Test.java#selection -> .java#selection -> #selection
|
||||
# without: dir/Test.java -> Test.java -> .java -> <<empty string>>
|
||||
TestID = \
|
||||
$(subst .jasm,,$(subst .sh,,$(subst .html,,$(subst .java,,$(suffix $(notdir $1))))))
|
||||
$(subst .sh,,$(subst .html,,$(subst .java,,$(suffix $(notdir $1)))))
|
||||
|
||||
# The test id starting with a hash (#testid) will be stripped by all
|
||||
# evals in ParseJtregTestSelectionInner and will be reinserted by calling
|
||||
@@ -801,10 +800,8 @@ define SetupRunJtregTestBody
|
||||
$1_JTREG_BASIC_OPTIONS += -e:JIB_DATA_DIR
|
||||
# If running on Windows, propagate the _NT_SYMBOL_PATH to enable
|
||||
# symbol lookup in hserr files
|
||||
# The minidumps are disabled by default on client Windows, so enable them
|
||||
ifeq ($$(call isTargetOs, windows), true)
|
||||
$1_JTREG_BASIC_OPTIONS += -e:_NT_SYMBOL_PATH
|
||||
$1_JTREG_BASIC_OPTIONS += -vmoption:-XX:+CreateCoredumpOnCrash
|
||||
else ifeq ($$(call isTargetOs, linux), true)
|
||||
$1_JTREG_BASIC_OPTIONS += -e:_JVM_DWARF_PATH=$$(SYMBOLS_IMAGE_DIR)
|
||||
endif
|
||||
@@ -863,12 +860,11 @@ define SetupRunJtregTestBody
|
||||
|
||||
$$(eval $$(call SetupRunJtregTestCustom, $1))
|
||||
|
||||
clean-outputdirs-$1:
|
||||
clean-workdir-$1:
|
||||
$$(RM) -r $$($1_TEST_SUPPORT_DIR)
|
||||
$$(RM) -r $$($1_TEST_RESULTS_DIR)
|
||||
|
||||
$1_COMMAND_LINE := \
|
||||
$$(JTREG_JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \
|
||||
$$(JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \
|
||||
-Dprogram=jtreg -jar $$(JT_HOME)/lib/jtreg.jar \
|
||||
$$($1_JTREG_BASIC_OPTIONS) \
|
||||
-testjdk:$$(JDK_UNDER_TEST) \
|
||||
@@ -911,7 +907,7 @@ define SetupRunJtregTestBody
|
||||
done
|
||||
endif
|
||||
|
||||
run-test-$1: pre-run-test clean-outputdirs-$1
|
||||
run-test-$1: pre-run-test clean-workdir-$1
|
||||
$$(call LogWarn)
|
||||
$$(call LogWarn, Running test '$$($1_TEST)')
|
||||
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR) \
|
||||
@@ -948,9 +944,9 @@ define SetupRunJtregTestBody
|
||||
$$(eval $1_TOTAL := 1) \
|
||||
)
|
||||
|
||||
$1: run-test-$1 parse-test-$1 clean-outputdirs-$1
|
||||
$1: run-test-$1 parse-test-$1 clean-workdir-$1
|
||||
|
||||
TARGETS += $1 run-test-$1 parse-test-$1 clean-outputdirs-$1
|
||||
TARGETS += $1 run-test-$1 parse-test-$1 clean-workdir-$1
|
||||
TEST_TARGETS += parse-test-$1
|
||||
|
||||
endef
|
||||
|
||||
@@ -122,7 +122,6 @@ $(eval $(call SetupVariable,JT_HOME))
|
||||
$(eval $(call SetupVariable,JDK_IMAGE_DIR,$(OUTPUTDIR)/images/jdk))
|
||||
$(eval $(call SetupVariable,TEST_IMAGE_DIR,$(OUTPUTDIR)/images/test))
|
||||
$(eval $(call SetupVariable,SYMBOLS_IMAGE_DIR,$(OUTPUTDIR)/images/symbols,NO_CHECK))
|
||||
$(eval $(call SetupVariable,JTREG_JDK,$(BOOT_JDK)))
|
||||
|
||||
# Provide default values for tools that we need
|
||||
$(eval $(call SetupVariable,MAKE,make,NO_CHECK))
|
||||
@@ -158,10 +157,6 @@ ifeq ($(UNAME_OS), CYGWIN)
|
||||
OPENJDK_TARGET_OS := windows
|
||||
OPENJDK_TARGET_OS_TYPE := windows
|
||||
OPENJDK_TARGET_OS_ENV := windows.cygwin
|
||||
else ifeq ($(UNAME_OS), MINGW64)
|
||||
OPENJDK_TARGET_OS := windows
|
||||
OPENJDK_TARGET_OS_TYPE := windows
|
||||
OPENJDK_TARGET_OS_ENV := windows.msys2
|
||||
else
|
||||
OPENJDK_TARGET_OS_TYPE:=unix
|
||||
ifeq ($(UNAME_OS), Linux)
|
||||
@@ -174,9 +169,6 @@ else
|
||||
OPENJDK_TARGET_OS_ENV := $(OPENJDK_TARGET_OS)
|
||||
endif
|
||||
|
||||
# Sanity check env detection
|
||||
$(info Detected target OS, type and env: [$(OPENJDK_TARGET_OS)] [$(OPENJDK_TARGET_OS_TYPE)] [$(OPENJDK_TARGET_OS_ENV)])
|
||||
|
||||
# Assume little endian unless otherwise specified
|
||||
OPENJDK_TARGET_CPU_ENDIAN := little
|
||||
|
||||
@@ -256,7 +248,6 @@ $(call CreateNewSpec, $(NEW_SPEC), \
|
||||
TOPDIR := $(TOPDIR), \
|
||||
OUTPUTDIR := $(OUTPUTDIR), \
|
||||
BOOT_JDK := $(BOOT_JDK), \
|
||||
JTREG_JDK := $(JTREG_JDK), \
|
||||
JT_HOME := $(JT_HOME), \
|
||||
JDK_IMAGE_DIR := $(JDK_IMAGE_DIR), \
|
||||
JCOV_IMAGE_DIR := $(JCOV_IMAGE_DIR), \
|
||||
|
||||
@@ -124,8 +124,6 @@ JAR := $(FIXPATH) $(JAR_CMD)
|
||||
JLINK := $(FIXPATH) $(JLINK_CMD)
|
||||
JMOD := $(FIXPATH) $(JMOD_CMD)
|
||||
|
||||
JTREG_JAVA := $(FIXPATH) $(JTREG_JDK)/bin/java $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
|
||||
|
||||
BUILD_JAVA := $(JDK_IMAGE_DIR)/bin/JAVA
|
||||
################################################################################
|
||||
# Some common tools. Assume most common name and no path.
|
||||
|
||||
@@ -88,9 +88,9 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
$(eval $(call SetupZipArchive,BUILD_JGSS_BIN_ZIP, \
|
||||
SRC := $(SUPPORT_OUTPUTDIR), \
|
||||
INCLUDE_FILES := modules_libs/java.security.jgss/w2k_lsa_auth.dll \
|
||||
modules_libs/java.security.jgss/w2k_lsa_auth.dll.diz \
|
||||
modules_libs/java.security.jgss/w2k_lsa_auth.dll.map \
|
||||
modules_libs/java.security.jgss/w2k_lsa_auth.dll.pdb, \
|
||||
modules_libs/java.security.jgss/w2k_lsa_auth.diz \
|
||||
modules_libs/java.security.jgss/w2k_lsa_auth.map \
|
||||
modules_libs/java.security.jgss/w2k_lsa_auth.pdb, \
|
||||
ZIP := $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)))
|
||||
|
||||
TARGETS += $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)
|
||||
|
||||
@@ -406,9 +406,9 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
# WARNING: This might be a bad thing to do. You need to be sure you want to
|
||||
# have a configuration in this directory. Do some sanity checks!
|
||||
|
||||
if test ! -e "$OUTPUTDIR/spec.gmk" && test ! -e "$OUTPUTDIR/configure-support/generated-configure.sh"; then
|
||||
# If we have a spec.gmk or configure-support/generated-configure.sh,
|
||||
# we have run here before and we are OK. Otherwise, check for other files
|
||||
if test ! -e "$OUTPUTDIR/spec.gmk"; then
|
||||
# If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
|
||||
# other files
|
||||
files_present=`$LS $OUTPUTDIR`
|
||||
# Configure has already touched config.log and confdefs.h in the current dir when this check
|
||||
# is performed.
|
||||
@@ -423,9 +423,8 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
AC_MSG_NOTICE([Current directory is $CONFIGURE_START_DIR.])
|
||||
AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])
|
||||
AC_MSG_NOTICE([(as opposed to creating a configuration in <src_root>/build/<conf-name>).])
|
||||
AC_MSG_NOTICE([However, this directory is not empty, additionally to some allowed files])
|
||||
AC_MSG_NOTICE([it contains $filtered_files.])
|
||||
AC_MSG_NOTICE([This is not allowed, since it could seriously mess up just about everything.])
|
||||
AC_MSG_NOTICE([However, this directory is not empty. This is not allowed, since it could])
|
||||
AC_MSG_NOTICE([seriously mess up just about everything.])
|
||||
AC_MSG_NOTICE([Try 'cd $TOPDIR' and restart configure])
|
||||
AC_MSG_NOTICE([(or create a new empty directory and cd to it).])
|
||||
AC_MSG_ERROR([Will not continue creating configuration in $CONFIGURE_START_DIR])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2023, 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
|
||||
@@ -28,7 +28,7 @@
|
||||
# Setup flags for C/C++ compiler
|
||||
#
|
||||
|
||||
################################################################################
|
||||
###############################################################################
|
||||
#
|
||||
# How to compile shared libraries.
|
||||
#
|
||||
@@ -37,10 +37,7 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
# Default works for linux, might work on other platforms as well.
|
||||
SHARED_LIBRARY_FLAGS='-shared'
|
||||
# --disable-new-dtags forces use of RPATH instead of RUNPATH for rpaths.
|
||||
# This protects internal library dependencies within the JDK from being
|
||||
# overridden using LD_LIBRARY_PATH. See JDK-8326891 for more information.
|
||||
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1 -Wl,--disable-new-dtags'
|
||||
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
|
||||
SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
|
||||
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
|
||||
SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
|
||||
@@ -66,9 +63,6 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
||||
# Default works for linux, might work on other platforms as well.
|
||||
SHARED_LIBRARY_FLAGS='-shared'
|
||||
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
SET_EXECUTABLE_ORIGIN="$SET_EXECUTABLE_ORIGIN -Wl,--disable-new-dtags"
|
||||
fi
|
||||
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
|
||||
SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
|
||||
|
||||
@@ -123,16 +117,6 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${DEBUG_PREFIX_CFLAGS}],
|
||||
IF_FALSE: [
|
||||
DEBUG_PREFIX_CFLAGS=
|
||||
],
|
||||
IF_TRUE: [
|
||||
# Add debug prefix map gcc system include paths, as they cause
|
||||
# non-deterministic debug paths depending on gcc path location.
|
||||
DEBUG_PREFIX_MAP_GCC_INCLUDE_PATHS
|
||||
|
||||
# Add debug prefix map for OUTPUTDIR to handle the scenario when
|
||||
# it is not located within WORKSPACE_ROOT
|
||||
outputdir_slash="${OUTPUTDIR%/}/"
|
||||
DEBUG_PREFIX_CFLAGS="$DEBUG_PREFIX_CFLAGS -fdebug-prefix-map=${outputdir_slash}="
|
||||
]
|
||||
)
|
||||
fi
|
||||
@@ -174,55 +158,6 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
|
||||
AC_SUBST(ASFLAGS_DEBUG_SYMBOLS)
|
||||
])
|
||||
|
||||
# gcc will embed the full system include paths in the debug info
|
||||
# resulting in non-deterministic debug symbol files and thus
|
||||
# non-reproducible native libraries if gcc includes are located
|
||||
# in different paths.
|
||||
# Add -fdebug-prefix-map'ings for root and gcc include paths,
|
||||
# pointing to a common set of folders so that the binaries are deterministic:
|
||||
# root include : /usr/include
|
||||
# gcc include : /usr/local/gcc_include
|
||||
# g++ include : /usr/local/gxx_include
|
||||
AC_DEFUN([DEBUG_PREFIX_MAP_GCC_INCLUDE_PATHS],
|
||||
[
|
||||
# Determine gcc system include paths.
|
||||
# Assume default roots to start with:
|
||||
GCC_ROOT_INCLUDE="/usr/include"
|
||||
|
||||
# Determine is sysroot or devkit specified?
|
||||
if test "x$SYSROOT" != "x"; then
|
||||
GCC_ROOT_INCLUDE="${SYSROOT%/}/usr/include"
|
||||
fi
|
||||
|
||||
# Add root include mapping => /usr/include
|
||||
GCC_INCLUDE_DEBUG_MAP_FLAGS="-fdebug-prefix-map=${GCC_ROOT_INCLUDE}/=/usr/include/"
|
||||
|
||||
# Add gcc system include mapping => /usr/local/gcc_include
|
||||
# Find location of stddef.h using build C compiler
|
||||
GCC_SYSTEM_INCLUDE=`$ECHO "#include <stddef.h>" | \
|
||||
$CC $CFLAGS -v -E - 2>&1 | \
|
||||
$GREP stddef | $TAIL -1 | $TR -s " " | $CUT -d'"' -f2`
|
||||
if test "x$GCC_SYSTEM_INCLUDE" != "x"; then
|
||||
GCC_SYSTEM_INCLUDE=`$DIRNAME $GCC_SYSTEM_INCLUDE`
|
||||
GCC_INCLUDE_DEBUG_MAP_FLAGS="$GCC_INCLUDE_DEBUG_MAP_FLAGS \
|
||||
-fdebug-prefix-map=${GCC_SYSTEM_INCLUDE}/=/usr/local/gcc_include/"
|
||||
fi
|
||||
|
||||
# Add g++ system include mapping => /usr/local/gxx_include
|
||||
# Find location of cstddef using build C++ compiler
|
||||
GXX_SYSTEM_INCLUDE=`$ECHO "#include <cstddef>" | \
|
||||
$CXX $CXXFLAGS -v -E -x c++ - 2>&1 | \
|
||||
$GREP cstddef | $TAIL -1 | $TR -s " " | $CUT -d'"' -f2`
|
||||
if test "x$GXX_SYSTEM_INCLUDE" != "x"; then
|
||||
GXX_SYSTEM_INCLUDE=`$DIRNAME $GXX_SYSTEM_INCLUDE`
|
||||
GCC_INCLUDE_DEBUG_MAP_FLAGS="$GCC_INCLUDE_DEBUG_MAP_FLAGS \
|
||||
-fdebug-prefix-map=${GXX_SYSTEM_INCLUDE}/=/usr/local/gxx_include/"
|
||||
fi
|
||||
|
||||
# Add to debug prefix cflags
|
||||
DEBUG_PREFIX_CFLAGS="$DEBUG_PREFIX_CFLAGS $GCC_INCLUDE_DEBUG_MAP_FLAGS"
|
||||
])
|
||||
|
||||
AC_DEFUN([FLAGS_SETUP_WARNINGS],
|
||||
[
|
||||
# Set default value.
|
||||
@@ -490,13 +425,13 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
[
|
||||
#### OS DEFINES, these should be independent on toolchain
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
CFLAGS_OS_DEF_JVM="-DLINUX -D_FILE_OFFSET_BITS=64"
|
||||
CFLAGS_OS_DEF_JVM="-DLINUX"
|
||||
CFLAGS_OS_DEF_JDK="-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
CFLAGS_OS_DEF_JVM="-D_ALLBSD_SOURCE -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
|
||||
CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
CFLAGS_OS_DEF_JVM="-DAIX -D_LARGE_FILES"
|
||||
CFLAGS_OS_DEF_JVM="-DAIX"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xbsd; then
|
||||
CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
@@ -881,7 +816,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
REPRODUCIBLE_CFLAGS=
|
||||
]
|
||||
)
|
||||
AC_SUBST(REPRODUCIBLE_CFLAGS)
|
||||
fi
|
||||
|
||||
# Prevent the __FILE__ macro from generating absolute paths into the built
|
||||
@@ -915,22 +849,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
FILE_MACRO_CFLAGS=
|
||||
]
|
||||
)
|
||||
if test "x$FILE_MACRO_CFLAGS" != x; then
|
||||
# Add -pathmap for all VS system include paths using Windows
|
||||
# full Long path name that is generated by the compiler
|
||||
# Not enabled under WSL as there is no easy way to obtain the
|
||||
# Windows full long paths, thus reproducible WSL builds will
|
||||
# depend on building with the same VS toolchain install location.
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" != "xwindows.wsl1" && test "x$OPENJDK_BUILD_OS_ENV" != "xwindows.wsl2"; then
|
||||
for ipath in ${$3SYSROOT_CFLAGS}; do
|
||||
if test "x${ipath:0:2}" == "x-I"; then
|
||||
ipath_path=${ipath#"-I"}
|
||||
UTIL_FIXUP_WIN_LONG_PATH(ipath_path)
|
||||
FILE_MACRO_CFLAGS="$FILE_MACRO_CFLAGS -pathmap:\"$ipath_path\"=vsi"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([how to prevent absolute paths in output])
|
||||
|
||||
@@ -88,16 +88,6 @@ AC_DEFUN([FLAGS_SETUP_RCFLAGS],
|
||||
AC_SUBST(RCFLAGS)
|
||||
])
|
||||
|
||||
AC_DEFUN([FLAGS_SETUP_NMFLAGS],
|
||||
[
|
||||
# On AIX, we need to set NM flag -X64 for processing 64bit object files
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
NMFLAGS="-X64"
|
||||
fi
|
||||
|
||||
AC_SUBST(NMFLAGS)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# platform independent
|
||||
AC_DEFUN([FLAGS_SETUP_ASFLAGS],
|
||||
|
||||
@@ -428,7 +428,6 @@ AC_DEFUN([FLAGS_SETUP_FLAGS],
|
||||
FLAGS_SETUP_ARFLAGS
|
||||
FLAGS_SETUP_STRIPFLAGS
|
||||
FLAGS_SETUP_RCFLAGS
|
||||
FLAGS_SETUP_NMFLAGS
|
||||
|
||||
FLAGS_SETUP_ASFLAGS
|
||||
FLAGS_SETUP_ASFLAGS_CPU_DEP([TARGET])
|
||||
|
||||
@@ -190,17 +190,6 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
fi
|
||||
AC_SUBST(INCLUDE_SA)
|
||||
|
||||
# Setup default CDS alignment. On platforms where one build may run on machines with different
|
||||
# page sizes, the JVM choses a compatible alignment to fit all possible page sizes. This slightly
|
||||
# increases archive size.
|
||||
# The only platform having this problem at the moment is Linux on aarch64, which may encounter
|
||||
# three different page sizes: 4K, 64K, and if run on Mac m1 hardware, 16K.
|
||||
COMPATIBLE_CDS_ALIGNMENT_DEFAULT=false
|
||||
if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
|
||||
COMPATIBLE_CDS_ALIGNMENT_DEFAULT=true
|
||||
fi
|
||||
AC_SUBST(COMPATIBLE_CDS_ALIGNMENT_DEFAULT)
|
||||
|
||||
# Compress jars
|
||||
COMPRESS_JARS=false
|
||||
|
||||
@@ -527,7 +516,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER],
|
||||
[
|
||||
# GCC reports lots of likely false positives for stringop-truncation and format-overflow.
|
||||
# Silence them for now.
|
||||
UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment"
|
||||
UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base"
|
||||
UBSAN_CFLAGS="$UBSAN_CHECKS -Wno-stringop-truncation -Wno-format-overflow -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER"
|
||||
UBSAN_LDFLAGS="$UBSAN_CHECKS"
|
||||
UTIL_ARG_ENABLE(NAME: ubsan, DEFAULT: false, RESULT: UBSAN_ENABLED,
|
||||
@@ -709,7 +698,7 @@ AC_DEFUN([JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE],
|
||||
#
|
||||
AC_DEFUN([JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT],
|
||||
[
|
||||
UTIL_ARG_ENABLE(NAME: compatible-cds-alignment, DEFAULT: $COMPATIBLE_CDS_ALIGNMENT_DEFAULT,
|
||||
UTIL_ARG_ENABLE(NAME: compatible-cds-alignment, DEFAULT: false,
|
||||
RESULT: ENABLE_COMPATIBLE_CDS_ALIGNMENT,
|
||||
DESC: [enable use alternative compatible cds core region alignment],
|
||||
DEFAULT_DESC: [disabled],
|
||||
@@ -858,9 +847,6 @@ AC_DEFUN([JDKOPT_CHECK_CODESIGN_PARAMS],
|
||||
$RM "$CODESIGN_TESTFILE"
|
||||
$TOUCH "$CODESIGN_TESTFILE"
|
||||
CODESIGN_SUCCESS=false
|
||||
|
||||
$ECHO "check codesign, calling $CODESIGN $PARAMS $CODESIGN_TESTFILE" >&AS_MESSAGE_LOG_FD
|
||||
|
||||
eval \"$CODESIGN\" $PARAMS \"$CODESIGN_TESTFILE\" 2>&AS_MESSAGE_LOG_FD \
|
||||
>&AS_MESSAGE_LOG_FD && CODESIGN_SUCCESS=true
|
||||
$RM "$CODESIGN_TESTFILE"
|
||||
|
||||
@@ -110,15 +110,6 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY_PRINTABLE])
|
||||
AC_SUBST(COMPANY_NAME)
|
||||
|
||||
# Set the JDK RC Company name
|
||||
# Otherwise uses the value set for "vendor-name".
|
||||
UTIL_ARG_WITH(NAME: jdk-rc-company-name, TYPE: string,
|
||||
DEFAULT: $COMPANY_NAME,
|
||||
DESC: [Set JDK RC company name. This is used for CompanyName properties of MS Windows binaries.],
|
||||
DEFAULT_DESC: [from branding.conf],
|
||||
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY_PRINTABLE])
|
||||
AC_SUBST(JDK_RC_COMPANY_NAME)
|
||||
|
||||
# The vendor URL, if any
|
||||
# Only set VENDOR_URL if '--with-vendor-url' was used and is not empty.
|
||||
# Otherwise we will use the value from "branding.conf" included above.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2016, 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
|
||||
@@ -68,20 +68,12 @@ AC_DEFUN_ONCE([LIB_SETUP_CUPS],
|
||||
fi
|
||||
fi
|
||||
if test "x$CUPS_FOUND" = xno; then
|
||||
# Are the cups headers installed in the default AIX or /usr/include location?
|
||||
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
|
||||
AC_CHECK_HEADERS([/opt/freeware/include/cups/cups.h /opt/freeware/include/cups/ppd.h], [
|
||||
CUPS_FOUND=yes
|
||||
CUPS_CFLAGS="-I/opt/freeware/include"
|
||||
DEFAULT_CUPS=yes
|
||||
])
|
||||
else
|
||||
AC_CHECK_HEADERS([cups/cups.h cups/ppd.h], [
|
||||
CUPS_FOUND=yes
|
||||
CUPS_CFLAGS=
|
||||
DEFAULT_CUPS=yes
|
||||
])
|
||||
fi
|
||||
# Are the cups headers installed in the default /usr/include location?
|
||||
AC_CHECK_HEADERS([cups/cups.h cups/ppd.h], [
|
||||
CUPS_FOUND=yes
|
||||
CUPS_CFLAGS=
|
||||
DEFAULT_CUPS=yes
|
||||
])
|
||||
fi
|
||||
if test "x$CUPS_FOUND" = xno; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([cups])
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2024, JetBrains s.r.o.. 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
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Check if a potential dbus library match is correct and usable
|
||||
################################################################################
|
||||
AC_DEFUN_ONCE([LIB_SETUP_DBUS],
|
||||
[
|
||||
AC_ARG_WITH(dbus-includes, [AS_HELP_STRING([--with-dbus-includes],
|
||||
[specify include directories for the dbus files as list separated by space])])
|
||||
|
||||
if test "x$NEEDS_LIB_DBUS" = xfalse; then
|
||||
DBUS_CFLAGS=
|
||||
DBUS_FOUND=false
|
||||
else
|
||||
if test "x${with_dbus_includes}" != x; then
|
||||
DBUS_FOUND=true
|
||||
DBUS_CFLAGS=""
|
||||
for include in $with_dbus_includes; do
|
||||
DBUS_CFLAGS="${DBUS_CFLAGS}-I${include} "
|
||||
done
|
||||
else
|
||||
PKG_CHECK_MODULES(DBUS, dbus-1, [DBUS_FOUND=true], [
|
||||
DBUS_FOUND=false
|
||||
AC_MSG_NOTICE([Can't find dbus-1 library. This library is needed to use some features. You can install dbus-1 library or specify include directories manually by giving --with-dbus-includes option.])
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(DBUS_CFLAGS)
|
||||
AC_SUBST(DBUS_FOUND)
|
||||
])
|
||||
@@ -28,7 +28,7 @@
|
||||
################################################################################
|
||||
|
||||
# Minimum supported versions
|
||||
JTREG_MINIMUM_VERSION=7.3.1
|
||||
JTREG_MINIMUM_VERSION=7.2
|
||||
GTEST_MINIMUM_VERSION=1.13.0
|
||||
|
||||
###############################################################################
|
||||
@@ -227,47 +227,12 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_JTREG],
|
||||
UTIL_FIXUP_PATH(JT_HOME)
|
||||
AC_SUBST(JT_HOME)
|
||||
|
||||
# Specify a JDK for running jtreg. Defaults to the BOOT_JDK.
|
||||
AC_ARG_WITH(jtreg-jdk, [AS_HELP_STRING([--with-jdk],
|
||||
[path to JDK for running jtreg @<:@BOOT_JDK@:>@])])
|
||||
|
||||
AC_MSG_CHECKING([for jtreg jdk])
|
||||
if test "x${with_jtreg_jdk}" != x; then
|
||||
if test "x${with_jtreg_jdk}" = xno; then
|
||||
AC_MSG_RESULT([no, jtreg jdk not specified])
|
||||
elif test "x${with_jtreg_jdk}" = xyes; then
|
||||
AC_MSG_RESULT([not specified])
|
||||
AC_MSG_ERROR([--with-jtreg-jdk needs a value])
|
||||
else
|
||||
JTREG_JDK="${with_jtreg_jdk}"
|
||||
AC_MSG_RESULT([$JTREG_JDK])
|
||||
UTIL_FIXUP_PATH(JTREG_JDK)
|
||||
if test ! -f "$JTREG_JDK/bin/java"; then
|
||||
AC_MSG_ERROR([Could not find jtreg java at $JTREG_JDK/bin/java])
|
||||
fi
|
||||
fi
|
||||
else
|
||||
JTREG_JDK="${BOOT_JDK}"
|
||||
AC_MSG_RESULT([no, using BOOT_JDK])
|
||||
fi
|
||||
|
||||
UTIL_FIXUP_PATH(JTREG_JDK)
|
||||
AC_SUBST([JTREG_JDK])
|
||||
# For use in the configure script
|
||||
JTREG_JAVA="$FIXPATH $JTREG_JDK/bin/java"
|
||||
|
||||
# Verify jtreg version
|
||||
if test "x$JT_HOME" != x; then
|
||||
AC_MSG_CHECKING([jtreg jar existence])
|
||||
if test ! -f "$JT_HOME/lib/jtreg.jar"; then
|
||||
AC_MSG_ERROR([Could not find jtreg jar at $JT_HOME/lib/jtreg.jar])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([jtreg version number])
|
||||
# jtreg -version looks like this: "jtreg 6.1+1-19"
|
||||
# Extract actual version part ("6.1" in this case)
|
||||
jtreg_version_full=$($JTREG_JAVA -jar $JT_HOME/lib/jtreg.jar -version | $HEAD -n 1 | $CUT -d ' ' -f 2)
|
||||
|
||||
jtreg_version_full=`$JAVA -jar $JT_HOME/lib/jtreg.jar -version | $HEAD -n 1 | $CUT -d ' ' -f 2`
|
||||
jtreg_version=${jtreg_version_full/%+*}
|
||||
AC_MSG_RESULT([$jtreg_version])
|
||||
|
||||
|
||||
@@ -34,9 +34,6 @@ AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
||||
(expecting the headers under PATH/include)])])
|
||||
AC_ARG_WITH(wayland-include, [AS_HELP_STRING([--with-wayland-include],
|
||||
[specify directory for the wayland include files])])
|
||||
AC_ARG_WITH(wayland-lib, [AS_HELP_STRING([--with-wayland-lib],
|
||||
[specify directory for the wayland library files])])
|
||||
|
||||
|
||||
if test "x$NEEDS_LIB_WAYLAND" = xfalse; then
|
||||
if (test "x${with_wayland}" != x && test "x${with_wayland}" != xno) || \
|
||||
@@ -76,10 +73,6 @@ AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
||||
AC_MSG_ERROR([Can't find 'wayland-client.h' and 'wayland-cursor.h' under ${with_wayland_include} given with the --with-wayland-include option.])
|
||||
fi
|
||||
fi
|
||||
if test "x${with_wayland_lib}" != x; then
|
||||
WAYLAND_LIBS="-L${with_wayland_lib} -lwayland-client -lwayland-cursor"
|
||||
fi
|
||||
|
||||
if test "x$WAYLAND_FOUND" = xno; then
|
||||
# Are the wayland headers installed in the default /usr/include location?
|
||||
AC_CHECK_HEADERS([wayland-client.h wayland-cursor.h],
|
||||
@@ -104,10 +97,7 @@ AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
||||
[specify whether we use vulkan])])
|
||||
|
||||
AC_ARG_WITH(vulkan-include, [AS_HELP_STRING([--with-vulkan-include],
|
||||
[specify directory for the vulkan include files ({with-vulkan-include}/vulkan/vulkan.h)])])
|
||||
|
||||
AC_ARG_WITH(vulkan-shader-compiler, [AS_HELP_STRING([--with-vulkan-shader-compiler],
|
||||
[specify which shader compiler to use: glslc/glslangValidator])])
|
||||
[specify directory for the vulkan include files])])
|
||||
|
||||
if test "x$SUPPORTS_LIB_VULKAN" = xfalse; then
|
||||
|
||||
@@ -127,15 +117,13 @@ AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
||||
VULKAN_FOUND=no
|
||||
|
||||
if test "x${with_vulkan_include}" != x; then
|
||||
AC_MSG_CHECKING([for vulkan.h])
|
||||
if test -s "${with_vulkan_include}/vulkan/vulkan.h"; then
|
||||
VULKAN_FOUND=yes
|
||||
VULKAN_FLAGS="-DVK_USE_PLATFORM_WAYLAND_KHR -I${with_vulkan_include} -DVULKAN_ENABLED"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Can't find 'vulkan/vulkan.h' under '${with_vulkan_include}'])
|
||||
fi
|
||||
AC_CHECK_HEADERS([${with_vulkan_include}/include/vulkan/vulkan.h],
|
||||
[ VULKAN_FOUND=yes
|
||||
VULKAN_FLAGS="-DVK_USE_PLATFORM_WAYLAND_KHR -I${with_vulkan_include}/include -DVULKAN_ENABLED"
|
||||
VULKAN_ENABLED=true
|
||||
],
|
||||
[ AC_MSG_ERROR([Can't find 'vulkan/vulkan.h' under '${with_vulkan_include}']) ]
|
||||
)
|
||||
fi
|
||||
|
||||
if test "x$VULKAN_FOUND" = xno; then
|
||||
@@ -143,6 +131,7 @@ AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
||||
AC_CHECK_HEADERS([$VULKAN_SDK/include/vulkan/vulkan.h],
|
||||
[ VULKAN_FOUND=yes
|
||||
VULKAN_FLAGS="-DVK_USE_PLATFORM_WAYLAND_KHR -I${VULKAN_SDK}/include -DVULKAN_ENABLED"
|
||||
VULKAN_ENABLED=true
|
||||
],
|
||||
[ VULKAN_FOUND=no; break ]
|
||||
)
|
||||
@@ -153,6 +142,7 @@ AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
||||
AC_CHECK_HEADERS([vulkan/vulkan.h],
|
||||
[ VULKAN_FOUND=yes
|
||||
VULKAN_FLAGS="-DVK_USE_PLATFORM_WAYLAND_KHR -DVULKAN_ENABLED"
|
||||
VULKAN_ENABLED=true
|
||||
],
|
||||
[ VULKAN_FOUND=no; break ]
|
||||
)
|
||||
@@ -161,32 +151,11 @@ AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
||||
if test "x$VULKAN_FOUND" = xno; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([vulkan])
|
||||
AC_MSG_ERROR([Could not find vulkan! $HELP_MSG ])
|
||||
else
|
||||
# Find shader compiler - glslc or glslangValidator
|
||||
if (test "x${with_vulkan_shader_compiler}" = x || test "x${with_vulkan_shader_compiler}" = xglslc); then
|
||||
UTIL_LOOKUP_PROGS(GLSLC, glslc)
|
||||
SHADER_COMPILER="$GLSLC"
|
||||
VULKAN_SHADER_COMPILER="glslc --target-env=vulkan1.2 -mfmt=num -o"
|
||||
fi
|
||||
|
||||
if (test "x${with_vulkan_shader_compiler}" = x || test "x${with_vulkan_shader_compiler}" = xglslangValidator) && \
|
||||
test "x$SHADER_COMPILER" = x; then
|
||||
UTIL_LOOKUP_PROGS(GLSLANG, glslangValidator)
|
||||
SHADER_COMPILER="$GLSLANG"
|
||||
VULKAN_SHADER_COMPILER="glslangValidator --target-env vulkan1.2 -x -o"
|
||||
fi
|
||||
|
||||
if test "x$SHADER_COMPILER" != x; then
|
||||
VULKAN_ENABLED=true
|
||||
else
|
||||
AC_MSG_ERROR([Can't find shader compiler])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(VULKAN_FLAGS)
|
||||
AC_SUBST(VULKAN_SHADER_COMPILER)
|
||||
AC_SUBST(VULKAN_ENABLED)
|
||||
AC_SUBST(WAYLAND_CFLAGS)
|
||||
AC_SUBST(WAYLAND_LIBS)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, 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
|
||||
@@ -35,7 +35,6 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
|
||||
X_CFLAGS=
|
||||
X_LIBS=
|
||||
else
|
||||
x_libraries_orig="$x_libraries"
|
||||
|
||||
if test "x${with_x}" = xno; then
|
||||
AC_MSG_ERROR([It is not possible to disable the use of X11. Remove the --without-x option.])
|
||||
@@ -49,7 +48,6 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
|
||||
fi
|
||||
if test "x$x_libraries" = xNONE; then
|
||||
x_libraries="${with_x}/lib"
|
||||
x_libraries_orig="$x_libraries"
|
||||
fi
|
||||
else
|
||||
# Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
|
||||
@@ -84,8 +82,8 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
|
||||
AC_PATH_XTRA
|
||||
|
||||
# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
|
||||
# this doesn't make sense so we remove it; same for sysroot (devkit).
|
||||
if test "x$COMPILE_TYPE" = xcross || (test "x$SYSROOT" != "x" && test "x$x_libraries_orig" = xNONE); then
|
||||
# this doesn't make sense so we remove it.
|
||||
if test "x$COMPILE_TYPE" = xcross; then
|
||||
X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'`
|
||||
fi
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ m4_include([lib-fontconfig.m4])
|
||||
m4_include([lib-speechd.m4])
|
||||
m4_include([lib-nvdacontrollerclient.m4])
|
||||
m4_include([lib-wayland.m4])
|
||||
m4_include([lib-dbus.m4])
|
||||
|
||||
m4_include([lib-tests.m4])
|
||||
|
||||
################################################################################
|
||||
@@ -90,13 +90,11 @@ AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
|
||||
NEEDS_LIB_FREETYPE=true
|
||||
fi
|
||||
|
||||
# Check if alsa and dbus is needed
|
||||
# Check if alsa is needed
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
NEEDS_LIB_ALSA=true
|
||||
NEEDS_LIB_DBUS=true
|
||||
else
|
||||
NEEDS_LIB_ALSA=false
|
||||
NEEDS_LIB_DBUS=false
|
||||
fi
|
||||
|
||||
# Check if ffi is needed
|
||||
@@ -133,6 +131,12 @@ AC_DEFUN([LIB_SETUP_JVM_LIBS],
|
||||
BASIC_JVM_LIBS_$1="$BASIC_JVM_LIBS_$1 -latomic"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Because RISC-V only has word-sized atomics, it requires libatomic where
|
||||
# other common architectures do not, so link libatomic by default.
|
||||
if test "x$OPENJDK_$1_OS" = xlinux && test "x$OPENJDK_$1_CPU" = xriscv64; then
|
||||
BASIC_JVM_LIBS_$1="$BASIC_JVM_LIBS_$1 -latomic"
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
@@ -154,7 +158,7 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
|
||||
LIB_SETUP_SPEECHD
|
||||
LIB_SETUP_NVDACONTROLLERCLIENT
|
||||
LIB_SETUP_WAYLAND
|
||||
LIB_SETUP_DBUS
|
||||
|
||||
LIB_TESTS_SETUP_GTEST
|
||||
|
||||
BASIC_JDKLIB_LIBS=""
|
||||
|
||||
@@ -567,6 +567,8 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
|
||||
HOTSPOT_$1_CPU_DEFINE=PPC64
|
||||
elif test "x$OPENJDK_$1_CPU" = xppc64le; then
|
||||
HOTSPOT_$1_CPU_DEFINE=PPC64
|
||||
elif test "x$OPENJDK_$1_CPU" = xriscv32; then
|
||||
HOTSPOT_$1_CPU_DEFINE=RISCV32
|
||||
elif test "x$OPENJDK_$1_CPU" = xriscv64; then
|
||||
HOTSPOT_$1_CPU_DEFINE=RISCV64
|
||||
|
||||
@@ -575,14 +577,10 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
|
||||
HOTSPOT_$1_CPU_DEFINE=SPARC
|
||||
elif test "x$OPENJDK_$1_CPU" = xppc; then
|
||||
HOTSPOT_$1_CPU_DEFINE=PPC32
|
||||
elif test "x$OPENJDK_$1_CPU" = xriscv32; then
|
||||
HOTSPOT_$1_CPU_DEFINE=RISCV32
|
||||
elif test "x$OPENJDK_$1_CPU" = xs390; then
|
||||
HOTSPOT_$1_CPU_DEFINE=S390
|
||||
elif test "x$OPENJDK_$1_CPU" = xs390x; then
|
||||
HOTSPOT_$1_CPU_DEFINE=S390
|
||||
elif test "x$OPENJDK_$1_CPU" = xloongarch64; then
|
||||
HOTSPOT_$1_CPU_DEFINE=LOONGARCH64
|
||||
elif test "x$OPENJDK_$1_CPU" != x; then
|
||||
HOTSPOT_$1_CPU_DEFINE=$(echo $OPENJDK_$1_CPU | tr a-z A-Z)
|
||||
fi
|
||||
|
||||
@@ -191,7 +191,6 @@ PRODUCT_NAME:=@PRODUCT_NAME@
|
||||
PRODUCT_SUFFIX:=@PRODUCT_SUFFIX@
|
||||
JDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@
|
||||
JDK_RC_NAME:=@JDK_RC_NAME@
|
||||
JDK_RC_COMPANY_NAME:=@JDK_RC_COMPANY_NAME@
|
||||
COMPANY_NAME:=@COMPANY_NAME@
|
||||
HOTSPOT_VM_DISTRO:=@HOTSPOT_VM_DISTRO@
|
||||
MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
|
||||
@@ -425,7 +424,6 @@ LIBFFI_CFLAGS:=@LIBFFI_CFLAGS@
|
||||
ENABLE_LIBFFI_BUNDLING:=@ENABLE_LIBFFI_BUNDLING@
|
||||
LIBFFI_LIB_FILE:=@LIBFFI_LIB_FILE@
|
||||
FILE_MACRO_CFLAGS := @FILE_MACRO_CFLAGS@
|
||||
REPRODUCIBLE_CFLAGS := @REPRODUCIBLE_CFLAGS@
|
||||
BRANCH_PROTECTION_CFLAGS := @BRANCH_PROTECTION_CFLAGS@
|
||||
|
||||
STATIC_LIBS_CFLAGS := @STATIC_LIBS_CFLAGS@
|
||||
@@ -467,10 +465,6 @@ UBSAN_LDFLAGS:=@UBSAN_LDFLAGS@
|
||||
X_CFLAGS:=@X_CFLAGS@
|
||||
X_LIBS:=@X_LIBS@
|
||||
|
||||
# Necessary additional compiler flags to compile dbus
|
||||
DBUS_CFLAGS := @DBUS_CFLAGS@
|
||||
DBUS_FOUND := @DBUS_FOUND@
|
||||
|
||||
# Linux speechd a11y announcer
|
||||
A11Y_SPEECHD_ANNOUNCING_ENABLED:=@A11Y_SPEECHD_ANNOUNCING_ENABLED@
|
||||
SPEECHD_CFLAGS:=@SPEECHD_CFLAGS@
|
||||
@@ -488,7 +482,6 @@ A11Y_JAWS_ANNOUNCING_ENABLED:=@A11Y_JAWS_ANNOUNCING_ENABLED@
|
||||
WAYLAND_CFLAGS:=@WAYLAND_CFLAGS@
|
||||
WAYLAND_LIBS:=@WAYLAND_LIBS@
|
||||
VULKAN_FLAGS:=@VULKAN_FLAGS@
|
||||
VULKAN_SHADER_COMPILER:=@VULKAN_SHADER_COMPILER@
|
||||
VULKAN_ENABLED:=@VULKAN_ENABLED@
|
||||
|
||||
# The lowest required version of macosx
|
||||
@@ -627,7 +620,6 @@ AR := @AR@
|
||||
ARFLAGS:=@ARFLAGS@
|
||||
|
||||
NM:=@NM@
|
||||
NMFLAGS:=@NMFLAGS@
|
||||
STRIP:=@STRIP@
|
||||
OBJDUMP:=@OBJDUMP@
|
||||
CXXFILT:=@CXXFILT@
|
||||
@@ -705,9 +697,6 @@ JAR = $(JAR_CMD)
|
||||
JLINK = $(JLINK_CMD)
|
||||
JMOD = $(JMOD_CMD)
|
||||
|
||||
JTREG_JDK := @JTREG_JDK@
|
||||
JTREG_JAVA = @FIXPATH@ $(JTREG_JDK)/bin/java $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
|
||||
|
||||
BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
|
||||
BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
|
||||
BUILD_JAVAC=@FIXPATH@ $(BUILD_JDK)/bin/javac
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2023, 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
|
||||
@@ -389,10 +389,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_POST_DETECTION],
|
||||
# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
|
||||
CFLAGS="$ORG_CFLAGS"
|
||||
CXXFLAGS="$ORG_CXXFLAGS"
|
||||
|
||||
# filter out some unwanted additions autoconf may add to CXX; we saw this on macOS with autoconf 2.72
|
||||
UTIL_GET_NON_MATCHING_VALUES(cxx_filtered, $CXX, -std=c++11 -std=gnu++11)
|
||||
CXX="$cxx_filtered"
|
||||
])
|
||||
|
||||
# Check if a compiler is of the toolchain type we expect, and save the version
|
||||
@@ -808,11 +804,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
|
||||
|
||||
case $TOOLCHAIN_TYPE in
|
||||
gcc|clang)
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
UTIL_REQUIRE_TOOLCHAIN_PROGS(CXXFILT, ibm-llvm-cxxfilt)
|
||||
else
|
||||
UTIL_REQUIRE_TOOLCHAIN_PROGS(CXXFILT, c++filt)
|
||||
fi
|
||||
UTIL_REQUIRE_TOOLCHAIN_PROGS(CXXFILT, c++filt)
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, 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
|
||||
@@ -199,7 +199,7 @@ AC_DEFUN([UTIL_GET_NON_MATCHING_VALUES],
|
||||
if test -z "$legal_values"; then
|
||||
$1="$2"
|
||||
else
|
||||
result=`$GREP -Fvx -- "$legal_values" <<< "$values_to_check" | $GREP -v '^$'`
|
||||
result=`$GREP -Fvx "$legal_values" <<< "$values_to_check" | $GREP -v '^$'`
|
||||
$1=${result//$'\n'/ }
|
||||
fi
|
||||
])
|
||||
@@ -226,7 +226,7 @@ AC_DEFUN([UTIL_GET_MATCHING_VALUES],
|
||||
if test -z "$illegal_values"; then
|
||||
$1=""
|
||||
else
|
||||
result=`$GREP -Fx -- "$illegal_values" <<< "$values_to_check" | $GREP -v '^$'`
|
||||
result=`$GREP -Fx "$illegal_values" <<< "$values_to_check" | $GREP -v '^$'`
|
||||
$1=${result//$'\n'/ }
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -118,24 +118,6 @@ AC_DEFUN([UTIL_FIXUP_PATH],
|
||||
fi
|
||||
])
|
||||
|
||||
##############################################################################
|
||||
# Fixup path to be a Windows full long path
|
||||
# Note: Only supported with cygwin/msys2 (cygpath tool)
|
||||
AC_DEFUN([UTIL_FIXUP_WIN_LONG_PATH],
|
||||
[
|
||||
# Only process if variable expands to non-empty
|
||||
path="[$]$1"
|
||||
if test "x$path" != x; then
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
win_path=$($PATHTOOL -wl "$path")
|
||||
if test "x$win_path" != "x$path"; then
|
||||
$1="$win_path"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Check if the given file is a unix-style or windows-style executable, that is,
|
||||
# if it expects paths in unix-style or windows-style.
|
||||
|
||||
@@ -168,7 +168,6 @@ endef
|
||||
# CREATE_API_DIGEST:=Set to true to use a javac plugin to generate a public API
|
||||
# hash which can be used for down stream dependencies to only rebuild
|
||||
# when the API changes.
|
||||
# PROCESS_JBR_API:=Set to true to use an annotation processor to generate JBR API bindings.
|
||||
# KEEP_ALL_TRANSLATIONS:=Set to true to skip translation filtering
|
||||
SetupJavaCompilation = $(NamedParamsMacroTemplate)
|
||||
define SetupJavaCompilationBody
|
||||
@@ -443,22 +442,13 @@ define SetupJavaCompilationBody
|
||||
|
||||
ifeq ($$($1_CREATE_API_DIGEST), true)
|
||||
$1_API_DIGEST_FLAGS := \
|
||||
-classpath $$(BUILDTOOLS_OUTPUTDIR)/depend \
|
||||
-Xplugin:"depend $$($1_API_TARGET)" \
|
||||
"-XDinternalAPIPath=$$($1_API_INTERNAL)" \
|
||||
"-XDLOG_LEVEL=$(LOG_LEVEL)" \
|
||||
#
|
||||
|
||||
$1_EXTRA_DEPS := $$($1_EXTRA_DEPS) $$(BUILDTOOLS_OUTPUTDIR)/plugins/_the.COMPILE_DEPEND_batch
|
||||
endif
|
||||
|
||||
ifeq ($$($1_PROCESS_JBR_API), true)
|
||||
# Automatic path conversion doesn't work for two arguments, so call fixpath manually
|
||||
$1_JBR_API_FLAGS := -Xplugin:"jbr-api $$(call FixPath, $$($1_BIN)/java.base/META-INF/jbrapi.registry) $$(call FixPath, $(TOPDIR)/jb/jbr-api.version)"
|
||||
$1_EXTRA_DEPS := $$($1_EXTRA_DEPS) $$(BUILDTOOLS_OUTPUTDIR)/plugins/_the.COMPILE_JBR_API_PLUGIN_batch
|
||||
endif
|
||||
|
||||
ifeq ($$(call Or, $$($1_CREATE_API_DIGEST) $$($1_PROCESS_JBR_API)), true)
|
||||
$1_PROCESSORPATH := -processorpath $$(BUILDTOOLS_OUTPUTDIR)/plugins
|
||||
$1_EXTRA_DEPS := $$(BUILDTOOLS_OUTPUTDIR)/depend/_the.COMPILE_DEPEND_batch
|
||||
endif
|
||||
|
||||
# Create a file with all sources, to pass to javac in an @file.
|
||||
@@ -497,7 +487,7 @@ define SetupJavaCompilationBody
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(call ExecuteWithLog, $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$$($1_SAFE_NAME)_batch, \
|
||||
$$($1_JAVAC_CMD) $$($1_FLAGS) \
|
||||
$$($1_PROCESSORPATH) $$($1_API_DIGEST_FLAGS) $$($1_JBR_API_FLAGS) \
|
||||
$$($1_API_DIGEST_FLAGS) \
|
||||
-XDmodifiedInputs=$$($1_MODFILELIST_FIXED) \
|
||||
-d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_FILELIST)) && \
|
||||
$(TOUCH) $$@
|
||||
|
||||
@@ -98,7 +98,7 @@ GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/ve
|
||||
|
||||
JDK_RCFLAGS=$(RCFLAGS) \
|
||||
-D"JDK_VERSION_STRING=$(VERSION_STRING)" \
|
||||
-D"JDK_COMPANY=$(JDK_RC_COMPANY_NAME)" \
|
||||
-D"JDK_COMPANY=$(COMPANY_NAME)" \
|
||||
-D"JDK_VER=$(VERSION_NUMBER_FOUR_POSITIONS)" \
|
||||
-D"JDK_COPYRIGHT=Copyright \xA9 $(COPYRIGHT_YEAR)" \
|
||||
-D"JDK_NAME=$(JDK_RC_NAME) $(VERSION_SHORT)" \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, 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
|
||||
@@ -152,10 +152,6 @@ define SetupLogging
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($$(findstring $$(LOG_LEVEL), debug trace),)
|
||||
SHELL := $$(SHELL) -x
|
||||
endif
|
||||
|
||||
ifeq ($$(LOG_LEVEL), trace)
|
||||
SHELL_NO_RECURSE := $$(SHELL)
|
||||
# Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
|
||||
|
||||
@@ -48,12 +48,12 @@ define GetSymbols
|
||||
$(SED) -e 's/#.*//;s/global://;s/local://;s/\;//;s/^[ ]*/_/;/^_$$$$/d' | \
|
||||
$(EGREP) -v "JNI_OnLoad|JNI_OnUnload|Agent_OnLoad|Agent_OnUnload|Agent_OnAttach" > \
|
||||
$$(@D)/$$(basename $$(@F)).symbols || true; \
|
||||
$(NM) $(NMFLAGS) $$($1_TARGET) | $(GREP) " T " | \
|
||||
$(NM) $$($1_TARGET) | $(GREP) " T " | \
|
||||
$(EGREP) "JNI_OnLoad|JNI_OnUnload|Agent_OnLoad|Agent_OnUnload|Agent_OnAttach" | \
|
||||
$(CUT) -d ' ' -f 3 >> $$(@D)/$$(basename $$(@F)).symbols || true;\
|
||||
else \
|
||||
$(ECHO) "Getting symbols from nm"; \
|
||||
$(NM) $(NMFLAGS) -m $$($1_TARGET) | $(GREP) "__TEXT" | \
|
||||
$(NM) -m $$($1_TARGET) | $(GREP) "__TEXT" | \
|
||||
$(EGREP) -v "non-external|private extern|__TEXT,__eh_frame" | \
|
||||
$(SED) -e 's/.* //' > $$(@D)/$$(basename $$(@F)).symbols; \
|
||||
fi
|
||||
@@ -1050,13 +1050,13 @@ define SetupNativeCompilationBody
|
||||
ifneq ($$($1_TYPE), STATIC_LIBRARY)
|
||||
# Generate debuginfo files.
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
$1_EXTRA_LDFLAGS += -debug "-pdb:$$($1_SYMBOLS_DIR)/$$($1_BASENAME).pdb" \
|
||||
"-map:$$($1_SYMBOLS_DIR)/$$($1_BASENAME).map"
|
||||
$1_EXTRA_LDFLAGS += -debug "-pdb:$$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).pdb" \
|
||||
"-map:$$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).map"
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), public)
|
||||
$1_EXTRA_LDFLAGS += "-pdbstripped:$$($1_SYMBOLS_DIR)/$$($1_BASENAME).stripped.pdb"
|
||||
$1_EXTRA_LDFLAGS += "-pdbstripped:$$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).stripped.pdb"
|
||||
endif
|
||||
$1_DEBUGINFO_FILES := $$($1_SYMBOLS_DIR)/$$($1_BASENAME).pdb \
|
||||
$$($1_SYMBOLS_DIR)/$$($1_BASENAME).map
|
||||
$1_DEBUGINFO_FILES := $$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).pdb \
|
||||
$$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).map
|
||||
|
||||
else ifeq ($(call isTargetOs, linux), true)
|
||||
$1_DEBUGINFO_FILES := $$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).debuginfo
|
||||
@@ -1104,11 +1104,7 @@ define SetupNativeCompilationBody
|
||||
$1 += $$($1_DEBUGINFO_FILES)
|
||||
|
||||
ifeq ($$($1_ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
$1_DEBUGINFO_ZIP := $$($1_SYMBOLS_DIR)/$$($1_BASENAME).diz
|
||||
else
|
||||
$1_DEBUGINFO_ZIP := $$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).diz
|
||||
endif
|
||||
$1_DEBUGINFO_ZIP := $$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).diz
|
||||
$1 += $$($1_DEBUGINFO_ZIP)
|
||||
|
||||
# The dependency on TARGET is needed for debuginfo files
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2020, 2023, 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
|
||||
@@ -26,20 +26,16 @@
|
||||
# Versions and download locations for dependencies used by GitHub Actions (GHA)
|
||||
|
||||
GTEST_VERSION=1.13.0
|
||||
JTREG_VERSION=7.3.1+1
|
||||
JTREG_VERSION=7.2+1
|
||||
|
||||
LINUX_X64_BOOT_JDK_EXT=tar.gz
|
||||
LINUX_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_x64_linux_hotspot_21.0.3_9.tar.gz
|
||||
LINUX_X64_BOOT_JDK_SHA256=fffa52c22d797b715a962e6c8d11ec7d79b90dd819b5bc51d62137ea4b22a340
|
||||
LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk20/bdc68b4b9cbc4ebcb30745c85038d91d/36/GPL/openjdk-20_linux-x64_bin.tar.gz
|
||||
LINUX_X64_BOOT_JDK_SHA256=bb863b2d542976d1ae4b7b81af3e78b1e4247a64644350b552d298d8dc5980dc
|
||||
|
||||
MACOS_X64_BOOT_JDK_EXT=tar.gz
|
||||
MACOS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_x64_mac_hotspot_21.0.3_9.tar.gz
|
||||
MACOS_X64_BOOT_JDK_SHA256=f777103aab94330d14a29bd99f3a26d60abbab8e2c375cec9602746096721a7c
|
||||
|
||||
MACOS_AARCH64_BOOT_JDK_EXT=tar.gz
|
||||
MACOS_AARCH64_BOOT_JDK_URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_aarch64_mac_hotspot_21.0.3_9.tar.gz
|
||||
MACOS_AARCH64_BOOT_JDK_SHA256=b6be6a9568be83695ec6b7cb977f4902f7be47d74494c290bc2a5c3c951e254f
|
||||
MACOS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk20/bdc68b4b9cbc4ebcb30745c85038d91d/36/GPL/openjdk-20_macos-x64_bin.tar.gz
|
||||
MACOS_X64_BOOT_JDK_SHA256=47cf960d9bb89dbe987535a389f7e26c42de7c984ef5108612d77c81aa8cc6a4
|
||||
|
||||
WINDOWS_X64_BOOT_JDK_EXT=zip
|
||||
WINDOWS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_x64_windows_hotspot_21.0.3_9.zip
|
||||
WINDOWS_X64_BOOT_JDK_SHA256=c43a66cff7a403d56c5c5e1ff10d3d5f95961abf80f97f0e35380594909f0e4d
|
||||
WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk20/bdc68b4b9cbc4ebcb30745c85038d91d/36/GPL/openjdk-20_windows-x64_bin.zip
|
||||
WINDOWS_X64_BOOT_JDK_SHA256=c92fae5e42b9aecf444a66c8ec563c652f60b1e231dfdd33a4f5a3e3603058fb
|
||||
|
||||
@@ -945,7 +945,10 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
target_os: input.build_os,
|
||||
target_cpu: input.build_cpu,
|
||||
dependencies: [ "jtreg", "gnumake", "boot_jdk", "devkit", "jib" ],
|
||||
labels: "test"
|
||||
labels: "test",
|
||||
environment: {
|
||||
"JT_JAVA": common.boot_jdk_home
|
||||
}
|
||||
}
|
||||
};
|
||||
profiles = concatObjects(profiles, testOnlyProfiles);
|
||||
@@ -1185,9 +1188,9 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
jtreg: {
|
||||
server: "jpg",
|
||||
product: "jtreg",
|
||||
version: "7.3.1",
|
||||
version: "7.2",
|
||||
build_number: "1",
|
||||
file: "bundles/jtreg-7.3.1+1.zip",
|
||||
file: "bundles/jtreg-7.2+1.zip",
|
||||
environment_name: "JT_HOME",
|
||||
environment_path: input.get("jtreg", "home_path") + "/bin",
|
||||
configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2023, 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
|
||||
@@ -28,15 +28,15 @@
|
||||
|
||||
DEFAULT_VERSION_FEATURE=21
|
||||
DEFAULT_VERSION_INTERIM=0
|
||||
DEFAULT_VERSION_UPDATE=4
|
||||
DEFAULT_VERSION_UPDATE=0
|
||||
DEFAULT_VERSION_PATCH=0
|
||||
DEFAULT_VERSION_EXTRA1=0
|
||||
DEFAULT_VERSION_EXTRA2=0
|
||||
DEFAULT_VERSION_EXTRA3=0
|
||||
DEFAULT_VERSION_DATE=2024-07-16
|
||||
DEFAULT_VERSION_DATE=2023-09-19
|
||||
DEFAULT_VERSION_CLASSFILE_MAJOR=65 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
|
||||
DEFAULT_VERSION_CLASSFILE_MINOR=0
|
||||
DEFAULT_VERSION_DOCS_API_SINCE=11
|
||||
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="20 21"
|
||||
DEFAULT_JDK_SOURCE_TARGET_VERSION=21
|
||||
DEFAULT_PROMOTED_VERSION_PRE=
|
||||
DEFAULT_PROMOTED_VERSION_PRE=ea
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2023, 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
|
||||
@@ -539,7 +539,6 @@ $(BUILDDIR)/$(gcc_ver)/Makefile \
|
||||
$(PATHPRE) $(ENVS) $(GCC_CFG) $(EXTRA_CFLAGS) \
|
||||
$(CONFIG) \
|
||||
--with-sysroot=$(SYSROOT) \
|
||||
--with-debug-prefix-map=$(OUTPUT_ROOT)=devkit \
|
||||
--enable-languages=c,c++ \
|
||||
--enable-shared \
|
||||
--disable-nls \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2018, 2023, 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
|
||||
@@ -26,10 +26,9 @@
|
||||
# Create a bundle in the build directory, containing what's needed to
|
||||
# build and run JMH microbenchmarks from the OpenJDK build.
|
||||
|
||||
JMH_VERSION=1.37
|
||||
COMMONS_MATH3_VERSION=3.6.1
|
||||
JMH_VERSION=1.36
|
||||
COMMONS_MATH3_VERSION=3.2
|
||||
JOPT_SIMPLE_VERSION=5.0.4
|
||||
MAVEN_MIRROR=${MAVEN_MIRROR:-https://repo.maven.apache.org/maven2}
|
||||
|
||||
BUNDLE_NAME=jmh-$JMH_VERSION.tar.gz
|
||||
|
||||
@@ -42,7 +41,7 @@ cd $JAR_DIR
|
||||
rm -f *
|
||||
|
||||
fetchJar() {
|
||||
url="${MAVEN_MIRROR}/$1/$2/$3/$2-$3.jar"
|
||||
url="https://repo.maven.apache.org/maven2/$1/$2/$3/$2-$3.jar"
|
||||
if command -v curl > /dev/null; then
|
||||
curl -O --fail $url
|
||||
elif command -v wget > /dev/null; then
|
||||
|
||||
@@ -51,7 +51,7 @@ ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
endif
|
||||
|
||||
# Set the C++ standard
|
||||
ADLC_CFLAGS += $(ADLC_LANGSTD_CXXFLAGS)
|
||||
ADLC_CFLAGS += $(ADLC_LANGSTD_CXXFLAG)
|
||||
|
||||
# NOTE: The old build didn't set -DASSERT for windows but it doesn't seem to
|
||||
# hurt.
|
||||
@@ -62,7 +62,7 @@ ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
ADLC_CFLAGS += -I$(TOPDIR)/src/hotspot/share
|
||||
|
||||
# Add file macro mappings
|
||||
ADLC_CFLAGS += $(FILE_MACRO_CFLAGS) $(REPRODUCIBLE_CFLAGS)
|
||||
ADLC_CFLAGS += $(FILE_MACRO_CFLAGS)
|
||||
|
||||
ifeq ($(UBSAN_ENABLED), true)
|
||||
ADLC_CFLAGS += $(UBSAN_CFLAGS)
|
||||
@@ -133,21 +133,6 @@ ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
ADLCFLAGS += -DARM=1
|
||||
endif
|
||||
|
||||
# Set ASSERT, NDEBUG and PRODUCT flags just like in JvmFlags.gmk
|
||||
ifeq ($(DEBUG_LEVEL), release)
|
||||
# release builds disable uses of assert macro from <assert.h>.
|
||||
ADLCFLAGS += -DNDEBUG
|
||||
# For hotspot, release builds differ internally between "optimized" and "product"
|
||||
# in that "optimize" does not define PRODUCT.
|
||||
ifneq ($(HOTSPOT_DEBUG_LEVEL), optimized)
|
||||
ADLCFLAGS += -DPRODUCT
|
||||
endif
|
||||
else ifeq ($(DEBUG_LEVEL), fastdebug)
|
||||
ADLCFLAGS += -DASSERT
|
||||
else ifeq ($(DEBUG_LEVEL), slowdebug)
|
||||
ADLCFLAGS += -DASSERT
|
||||
endif
|
||||
|
||||
##############################################################################
|
||||
# Concatenate all ad source files into a single file, which will be fed to
|
||||
# adlc. Also include a #line directive at the start of every included file
|
||||
|
||||
@@ -276,10 +276,10 @@ ifneq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
|
||||
define SetupOperatorNewDeleteCheck
|
||||
$1.op_check: $1
|
||||
$$(call ExecuteWithLog, $1.op_check, \
|
||||
$$(NM) $$(NMFLAGS) $$< 2>&1 | $$(GREP) $$(addprefix -e , $$(MANGLED_SYMS)) | $$(GREP) $$(UNDEF_PATTERN) > $1.op_check || true)
|
||||
$$(NM) $$< 2>&1 | $$(GREP) $$(addprefix -e , $$(MANGLED_SYMS)) | $$(GREP) $$(UNDEF_PATTERN) > $1.op_check || true)
|
||||
if [ -s $1.op_check ]; then \
|
||||
$$(ECHO) "$$(notdir $$<): Error: Use of global operators new and delete is not allowed in Hotspot:"; \
|
||||
$$(NM) $$(NMFLAGS) $$< | $$(CXXFILT) | $$(EGREP) '$$(DEMANGLED_REGEXP)' | $$(GREP) $$(UNDEF_PATTERN); \
|
||||
$$(NM) $$< | $$(CXXFILT) | $$(EGREP) '$$(DEMANGLED_REGEXP)' | $$(GREP) $$(UNDEF_PATTERN); \
|
||||
$$(ECHO) "See: $$(TOPDIR)/make/hotspot/lib/CompileJvm.gmk"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
@@ -53,7 +53,7 @@ endif
|
||||
# platform dependent.
|
||||
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
DUMP_SYMBOLS_CMD := $(NM) $(NMFLAGS) --defined-only *$(OBJ_SUFFIX)
|
||||
DUMP_SYMBOLS_CMD := $(NM) --defined-only *$(OBJ_SUFFIX)
|
||||
ifneq ($(FILTER_SYMBOLS_PATTERN), )
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
|
||||
endif
|
||||
@@ -67,7 +67,7 @@ ifeq ($(call isTargetOs, linux), true)
|
||||
else ifeq ($(call isTargetOs, macosx), true)
|
||||
# nm on macosx prints out "warning: nm: no name list" to stderr for
|
||||
# files without symbols. Hide this, even at the expense of hiding real errors.
|
||||
DUMP_SYMBOLS_CMD := $(NM) $(NMFLAGS) -Uj *$(OBJ_SUFFIX) 2> /dev/null
|
||||
DUMP_SYMBOLS_CMD := $(NM) -Uj *$(OBJ_SUFFIX) 2> /dev/null
|
||||
ifneq ($(FILTER_SYMBOLS_PATTERN), )
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
|
||||
endif
|
||||
@@ -89,7 +89,7 @@ else ifeq ($(call isTargetOs, aix), true)
|
||||
# which may be installed under /opt/freeware/bin. So better use an absolute path here!
|
||||
# NM=/usr/bin/nm
|
||||
|
||||
DUMP_SYMBOLS_CMD := $(NM) $(NMFLAGS) -B -C *$(OBJ_SUFFIX)
|
||||
DUMP_SYMBOLS_CMD := $(NM) -X64 -B -C *$(OBJ_SUFFIX)
|
||||
FILTER_SYMBOLS_AWK_SCRIPT := \
|
||||
'{ \
|
||||
if (($$2="d" || $$2="D") && ($$3 ~ /^__vft/ || $$3 ~ /^gHotSpotVM/)) print $$3; \
|
||||
|
||||
@@ -61,7 +61,7 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
$(eval $(call SetupCopyFiles, COPY_GTEST_PDB_$v, \
|
||||
SRC := $(HOTSPOT_OUTPUTDIR)/variant-$v/libjvm/gtest, \
|
||||
DEST := $(TEST_IMAGE_DIR)/hotspot/gtest/$v, \
|
||||
FILES := jvm.dll.pdb gtestLauncher.exe.pdb, \
|
||||
FILES := jvm.pdb gtestLauncher.pdb, \
|
||||
)) \
|
||||
$(eval TARGETS += $$(COPY_GTEST_PDB_$v)) \
|
||||
) \
|
||||
|
||||
@@ -329,7 +329,7 @@ class CompilerInterfaceVC10 extends CompilerInterface {
|
||||
addAttr(rv, "PrecompiledHeaderOutputFile", outDir+Util.sep+"vm.pch");
|
||||
addAttr(rv, "AssemblerListingLocation", outDir);
|
||||
addAttr(rv, "ObjectFileName", outDir+Util.sep);
|
||||
addAttr(rv, "ProgramDataBaseFileName", outDir+Util.sep+"jvm.dll.pdb");
|
||||
addAttr(rv, "ProgramDataBaseFileName", outDir+Util.sep+"jvm.pdb");
|
||||
// Set /nologo option
|
||||
addAttr(rv, "SuppressStartupBanner", "true");
|
||||
// Surpass the default /Tc or /Tp.
|
||||
@@ -409,7 +409,7 @@ class CompilerInterfaceVC10 extends CompilerInterface {
|
||||
addAttr(rv, "OutputFile", outDll);
|
||||
addAttr(rv, "SuppressStartupBanner", "true");
|
||||
addAttr(rv, "ModuleDefinitionFile", outDir+Util.sep+"vm.def");
|
||||
addAttr(rv, "ProgramDatabaseFile", outDir+Util.sep+"jvm.dll.pdb");
|
||||
addAttr(rv, "ProgramDatabaseFile", outDir+Util.sep+"jvm.pdb");
|
||||
addAttr(rv, "SubSystem", "Windows");
|
||||
addAttr(rv, "BaseAddress", "0x8000000");
|
||||
addAttr(rv, "ImportLibrary", outDir+Util.sep+"jvm.lib");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2020, 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
|
||||
@@ -32,7 +32,6 @@ import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
@@ -340,15 +339,9 @@ public class GenerateCurrencyData {
|
||||
validCurrencyCodes.substring(i * 7 + 3, i * 7 + 6));
|
||||
checkCurrencyCode(currencyCode);
|
||||
int tableEntry = mainTable[(currencyCode.charAt(0) - 'A') * A_TO_Z + (currencyCode.charAt(1) - 'A')];
|
||||
|
||||
// Do not allow a future currency to be classified as an otherCurrency,
|
||||
// otherwise it will leak out into Currency:getAvailableCurrencies
|
||||
boolean futureCurrency = Arrays.asList(specialCaseNewCurrencies).contains(currencyCode);
|
||||
boolean simpleCurrency = (tableEntry & SIMPLE_CASE_COUNTRY_FINAL_CHAR_MASK) == (currencyCode.charAt(2) - 'A');
|
||||
|
||||
// If neither a simple currency, or one defined in the future
|
||||
// then the current currency is applicable to be added to the otherTable
|
||||
if (!futureCurrency && !simpleCurrency) {
|
||||
if (tableEntry == INVALID_COUNTRY_ENTRY ||
|
||||
(tableEntry & SPECIAL_CASE_COUNTRY_MASK) != 0 ||
|
||||
(tableEntry & SIMPLE_CASE_COUNTRY_FINAL_CHAR_MASK) != (currencyCode.charAt(2) - 'A')) {
|
||||
if (otherCurrenciesCount == maxOtherCurrencies) {
|
||||
throw new RuntimeException("too many other currencies");
|
||||
}
|
||||
|
||||
@@ -1,451 +0,0 @@
|
||||
package build.tools.jbrapi;
|
||||
|
||||
import com.sun.source.tree.CompilationUnitTree;
|
||||
import com.sun.source.tree.Tree;
|
||||
import com.sun.source.util.*;
|
||||
|
||||
import javax.lang.model.element.*;
|
||||
import javax.lang.model.type.ArrayType;
|
||||
import javax.lang.model.type.DeclaredType;
|
||||
import javax.lang.model.type.ExecutableType;
|
||||
import javax.lang.model.type.TypeMirror;
|
||||
import javax.lang.model.util.ElementScanner14;
|
||||
import javax.lang.model.util.Elements;
|
||||
import javax.lang.model.util.Types;
|
||||
import javax.tools.Diagnostic;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.nio.channels.OverlappingFileLockException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.locks.LockSupport;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class JBRApiPlugin implements Plugin {
|
||||
|
||||
enum Binding {
|
||||
SERVICE,
|
||||
PROVIDES,
|
||||
PROVIDED,
|
||||
TWO_WAY
|
||||
}
|
||||
|
||||
record DiagnosticTree(CompilationUnitTree root, Tree tree) {}
|
||||
record TypeBinding(DiagnosticTree diagnostic, TypeElement element, String currentType, String bindType, Binding binding) {}
|
||||
record MethodBinding(DiagnosticTree diagnostic, ExecutableElement element, Registry.StaticDescriptor currentMethod, Registry.StaticMethod bindMethod) {}
|
||||
|
||||
final Map<String, TypeBinding> typeBindings = new HashMap<>();
|
||||
final List<MethodBinding> methodBindings = new ArrayList<>();
|
||||
Elements elements;
|
||||
Trees trees;
|
||||
Types types;
|
||||
|
||||
class Registry {
|
||||
|
||||
record Type(String type, Binding binding) {}
|
||||
record StaticMethod(String type, String name) {}
|
||||
record StaticDescriptor(StaticMethod method, String descriptor) {}
|
||||
|
||||
final Map<String, Type> types = new HashMap<>();
|
||||
final Map<StaticDescriptor, StaticMethod> methods = new HashMap<>();
|
||||
final Set<Object> internal = new HashSet<>();
|
||||
|
||||
void validateInternal(DiagnosticTree diagnostic, String currentType, Binding binding, TypeElement bindType) {
|
||||
if (bindType.getKind() != ElementKind.CLASS && bindType.getKind() != ElementKind.INTERFACE) {
|
||||
trees.printMessage(Diagnostic.Kind.ERROR, "Invalid JBR API binding:" + currentType + " -> " +
|
||||
bindType.getQualifiedName().toString() + " (not a class or interface)",
|
||||
diagnostic.tree, diagnostic.root);
|
||||
} else if (bindType.getModifiers().contains(Modifier.FINAL) || bindType.getModifiers().contains(Modifier.SEALED)) {
|
||||
trees.printMessage(Diagnostic.Kind.ERROR, "Invalid JBR API binding:" + currentType + " -> " +
|
||||
bindType.getQualifiedName().toString() + " (not inheritable)",
|
||||
diagnostic.tree, diagnostic.root);
|
||||
}
|
||||
if (binding != Binding.SERVICE) {
|
||||
trees.printMessage(Diagnostic.Kind.ERROR, "Invalid JBR API binding:" + currentType + " -> " +
|
||||
bindType.getQualifiedName().toString() + " (internal, non-service)",
|
||||
diagnostic.tree, diagnostic.root);
|
||||
}
|
||||
}
|
||||
|
||||
void validateInternalMethod(DiagnosticTree diagnostic, StaticDescriptor currentMethod, TypeElement bindType, String bindMethod) {
|
||||
boolean methodFound = false;
|
||||
for (Element m : bindType.getEnclosedElements()) {
|
||||
if (m.getKind() == ElementKind.METHOD &&
|
||||
!m.getModifiers().contains(Modifier.STATIC) &&
|
||||
!m.getModifiers().contains(Modifier.FINAL) &&
|
||||
m.getSimpleName().contentEquals(bindMethod) &&
|
||||
descriptor(m.asType()).equals(currentMethod.descriptor)) {
|
||||
methodFound = true;
|
||||
}
|
||||
}
|
||||
if (!methodFound) {
|
||||
trees.printMessage(Diagnostic.Kind.ERROR, "Invalid static binding: " +
|
||||
currentMethod.method.type + "#" + currentMethod.method.name + " -> " +
|
||||
bindType.getQualifiedName().toString() + "#" + bindMethod +
|
||||
" (no matching method found, type conversions are not allowed for internal bindings)",
|
||||
diagnostic.tree, diagnostic.root);
|
||||
}
|
||||
}
|
||||
|
||||
List<String> addBindings() {
|
||||
List<String> unresolvedErrors = new ArrayList<>();
|
||||
List<TypeBinding> addedTypes = new ArrayList<>();
|
||||
List<MethodBinding> addedMethods = new ArrayList<>();
|
||||
Set<Object> validated = new HashSet<>();
|
||||
// Remove changed bindings.
|
||||
for (TypeBinding type : typeBindings.values()) {
|
||||
if (type.bindType != null) addedTypes.add(type);
|
||||
types.remove(type.currentType);
|
||||
}
|
||||
for (MethodBinding method : methodBindings) {
|
||||
if (method.bindMethod != null) addedMethods.add(method);
|
||||
methods.remove(method.currentMethod);
|
||||
}
|
||||
methods.entrySet().removeIf(m -> typeBindings.containsKey(m.getKey().method.type));
|
||||
// Build inverse binding map.
|
||||
Map<String, String> inverseTypes = types.entrySet().stream().collect(Collectors.toMap(
|
||||
e -> e.getValue().type, Map.Entry::getKey, (a, b) -> {
|
||||
unresolvedErrors.add("Conflicting JBR API binding: " + a + " and "+ b + " binds to the same type");
|
||||
return a + "," + b;
|
||||
}));
|
||||
Map<StaticDescriptor, StaticMethod> inverseMethods = methods.entrySet().stream().collect(Collectors.toMap(
|
||||
e -> new StaticDescriptor(e.getValue(), e.getKey().descriptor), e -> e.getKey().method, (a, b) -> {
|
||||
unresolvedErrors.add("Conflicting JBR API binding: " +
|
||||
a.type + "#" + a.name + " and "+ b.type + "#" + b.name + " binds to the same method");
|
||||
return new StaticMethod(a.type + "," + b.type, a.name + "," + b.name);
|
||||
}));
|
||||
// Add new bindings.
|
||||
for (TypeBinding type : addedTypes) types.put(type.currentType, new Type(type.bindType, type.binding));
|
||||
for (MethodBinding method : addedMethods) methods.put(method.currentMethod, method.bindMethod);
|
||||
// Validate type bindings.
|
||||
for (TypeBinding type : addedTypes) {
|
||||
String inv = inverseTypes.get(type.bindType);
|
||||
if (inv != null) {
|
||||
trees.printMessage(Diagnostic.Kind.ERROR,
|
||||
"Conflicting JBR API binding: " + type.currentType + " -> " + type.bindType + " <- " + inv,
|
||||
type.diagnostic.tree, type.diagnostic.root);
|
||||
inverseTypes.put(type.bindType, inv + "," + type.currentType);
|
||||
} else inverseTypes.put(type.bindType, type.currentType);
|
||||
Type next = types.get(type.bindType);
|
||||
if (next != null) {
|
||||
trees.printMessage(Diagnostic.Kind.ERROR,
|
||||
"Conflicting JBR API binding: " + type.currentType + " -> " + type.bindType + " -> " + next,
|
||||
type.diagnostic.tree, type.diagnostic.root);
|
||||
}
|
||||
String prev = inverseTypes.get(type.currentType);
|
||||
if (prev != null) {
|
||||
trees.printMessage(Diagnostic.Kind.ERROR,
|
||||
"Conflicting JBR API binding: " + prev + " -> " + type.currentType + " -> " + type.bindType,
|
||||
type.diagnostic.tree, type.diagnostic.root);
|
||||
}
|
||||
if (validated.add(type.currentType)) {
|
||||
TypeElement bindElement = elements.getTypeElement(type.bindType);
|
||||
if (bindElement != null) {
|
||||
internal.add(type.currentType);
|
||||
validateInternal(type.diagnostic, type.currentType, type.binding, bindElement);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Validate method bindings.
|
||||
for (MethodBinding method : addedMethods) {
|
||||
StaticDescriptor invDescriptor = new StaticDescriptor(method.bindMethod, method.currentMethod.descriptor);
|
||||
StaticMethod inv = inverseMethods.get(invDescriptor);
|
||||
if (inv != null) {
|
||||
trees.printMessage(Diagnostic.Kind.ERROR, "Conflicting JBR API binding: " +
|
||||
method.currentMethod.method.type + "#" + method.currentMethod.method.name + " -> " +
|
||||
method.bindMethod.type + "#" + method.bindMethod.name + " <- " +
|
||||
inv.type + "#" + inv.name,
|
||||
method.diagnostic.tree, method.diagnostic.root);
|
||||
inverseMethods.put(invDescriptor, new StaticMethod(
|
||||
inv.type + "," + method.currentMethod.method.type, inv.name + "," + method.currentMethod.method.name));
|
||||
} else inverseMethods.put(invDescriptor, method.currentMethod.method);
|
||||
if (validated.add(method.currentMethod)) {
|
||||
TypeElement bindElement = elements.getTypeElement(method.bindMethod.type);
|
||||
if (bindElement != null) {
|
||||
internal.add(method.currentMethod);
|
||||
validateInternalMethod(method.diagnostic, method.currentMethod, bindElement, method.bindMethod.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
// [Re]validate remaining.
|
||||
types.forEach((k, v) -> {
|
||||
if (validated.add(k)) {
|
||||
TypeBinding type = typeBindings.get(v.type);
|
||||
if (type != null) {
|
||||
internal.add(k);
|
||||
validateInternal(type.diagnostic, k, v.binding, type.element);
|
||||
} else if (elements.getTypeElement(v.type) != null) {
|
||||
internal.add(k); // Couldn't validate, but at least found the type.
|
||||
if (v.binding != Binding.SERVICE) {
|
||||
unresolvedErrors.add("Invalid JBR API binding:" + k + " -> " + v.type + " (internal, non-service)");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
methods.forEach((k, v) -> {
|
||||
if (validated.add(k)) {
|
||||
TypeBinding type = typeBindings.get(v.type);
|
||||
if (type != null) {
|
||||
internal.add(k);
|
||||
validateInternalMethod(type.diagnostic, k, type.element, v.name);
|
||||
} else if (elements.getTypeElement(v.type) != null) {
|
||||
internal.add(k); // Couldn't validate, but at least found the type.
|
||||
}
|
||||
}
|
||||
});
|
||||
return unresolvedErrors;
|
||||
}
|
||||
|
||||
void read(RandomAccessFile file) throws IOException {
|
||||
String s;
|
||||
while ((s = file.readLine()) != null) {
|
||||
String[] tokens = s.split(" ");
|
||||
switch (tokens[0]) {
|
||||
case "TYPE" -> {
|
||||
types.put(tokens[1], new Type(tokens[2], Binding.valueOf(tokens[3])));
|
||||
if (tokens.length > 4 && tokens[4].equals("INTERNAL")) internal.add(tokens[1]);
|
||||
}
|
||||
case "STATIC" -> {
|
||||
StaticDescriptor descriptor = new StaticDescriptor(new StaticMethod(
|
||||
tokens[1], tokens[2]), tokens[3]);
|
||||
methods.put(descriptor, new StaticMethod(tokens[4], tokens[5]));
|
||||
if (tokens.length > 6 && tokens[6].equals("INTERNAL")) internal.add(descriptor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void write(RandomAccessFile file) throws IOException {
|
||||
for (var t : types.entrySet()) {
|
||||
file.writeBytes("TYPE " + t.getKey() + " " + t.getValue().type + " " + t.getValue().binding +
|
||||
(internal.contains(t.getKey()) ? " INTERNAL\n" : "\n"));
|
||||
}
|
||||
for (var t : methods.entrySet()) {
|
||||
file.writeBytes("STATIC " + t.getKey().method.type + " " + t.getKey().method.name + " " +
|
||||
t.getKey().descriptor + " " + t.getValue().type + " " + t.getValue().name +
|
||||
(internal.contains(t.getKey()) ? " INTERNAL\n" : "\n"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String descriptor(TypeMirror t) {
|
||||
return switch (t.getKind()) {
|
||||
case VOID -> "V";
|
||||
case BOOLEAN -> "Z";
|
||||
case BYTE -> "B";
|
||||
case CHAR -> "C";
|
||||
case SHORT -> "S";
|
||||
case INT -> "I";
|
||||
case LONG -> "J";
|
||||
case FLOAT -> "F";
|
||||
case DOUBLE -> "D";
|
||||
case ARRAY -> "[" + descriptor(((ArrayType) t).getComponentType());
|
||||
case DECLARED -> "L" + elements.getBinaryName((TypeElement) ((DeclaredType) t).asElement())
|
||||
.toString().replace('.', '/') + ";";
|
||||
case EXECUTABLE -> "(" + ((ExecutableType) t).getParameterTypes().stream().map(this::descriptor)
|
||||
.collect(Collectors.joining()) + ")" + descriptor(((ExecutableType) t).getReturnType());
|
||||
case TYPEVAR, WILDCARD, UNION, INTERSECTION -> descriptor(types.erasure(t));
|
||||
default -> throw new RuntimeException("Cannot generate descriptor for type: " + t);
|
||||
};
|
||||
}
|
||||
|
||||
Registry.StaticDescriptor staticDescriptor(String type, ExecutableElement e) {
|
||||
return new Registry.StaticDescriptor(new Registry.StaticMethod(type, e.getSimpleName().toString()), descriptor(e.asType()));
|
||||
}
|
||||
|
||||
AnnotationValue annotationValue(AnnotationMirror m) {
|
||||
if (m == null) return null;
|
||||
return m.getElementValues().entrySet().stream()
|
||||
.filter(t -> t.getKey().getSimpleName().contentEquals("value"))
|
||||
.map(Map.Entry::getValue).findFirst().orElseThrow();
|
||||
}
|
||||
|
||||
static boolean isJavaIdentifier(String name, int from, int to) {
|
||||
if (!Character.isJavaIdentifierStart(name.charAt(from))) return false;
|
||||
for (int i = from + 1; i < to; i++) {
|
||||
if (!Character.isJavaIdentifierPart(name.charAt(i))) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
static boolean isJavaIdentifier(String name) {
|
||||
if (name == null || name.isEmpty()) return false;
|
||||
return isJavaIdentifier(name, 0, name.length());
|
||||
}
|
||||
static boolean isJavaTypeIdentifier(String name) {
|
||||
if (name == null || name.isEmpty()) return false;
|
||||
for (int i = 0; i < name.length();) {
|
||||
int next = name.indexOf('.', i);
|
||||
if (next == -1) next = name.length();
|
||||
if (!isJavaIdentifier(name, i, next)) return false;
|
||||
i = next + 1;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void scan(CompilationUnitTree root, Element e) {
|
||||
// Get current type name.
|
||||
String currentType;
|
||||
if (e.getKind() == ElementKind.CLASS || e.getKind() == ElementKind.INTERFACE) {
|
||||
currentType = ((TypeElement) e).getQualifiedName().toString();
|
||||
} else if (e.getKind() == ElementKind.METHOD && e.getModifiers().contains(Modifier.STATIC)) {
|
||||
currentType = ((QualifiedNameable) e.getEnclosingElement()).getQualifiedName().toString();
|
||||
} else currentType = null;
|
||||
|
||||
// Find the annotation.
|
||||
AnnotationMirror providedMirror = null, providesMirror = null, serviceMirror = null;
|
||||
for (AnnotationMirror m : elements.getAllAnnotationMirrors(e)) {
|
||||
switch (m.getAnnotationType().toString()) {
|
||||
case "com.jetbrains.exported.JBRApi.Provided" -> providedMirror = m;
|
||||
case "com.jetbrains.exported.JBRApi.Provides" -> providesMirror = m;
|
||||
case "com.jetbrains.exported.JBRApi.Service" -> serviceMirror = m;
|
||||
}
|
||||
}
|
||||
|
||||
AnnotationMirror mirror = null;
|
||||
AnnotationValue value = null;
|
||||
Binding binding = null;
|
||||
if (serviceMirror != null) {
|
||||
if (providesMirror == null) {
|
||||
trees.printMessage(Diagnostic.Kind.ERROR,
|
||||
"@Service also requires @Provides", trees.getTree(e, serviceMirror), root);
|
||||
return;
|
||||
}
|
||||
if (providedMirror != null) {
|
||||
trees.printMessage(Diagnostic.Kind.ERROR,
|
||||
"@Service cannot be used with @Provided", trees.getTree(e, serviceMirror), root);
|
||||
return;
|
||||
}
|
||||
value = annotationValue(mirror = providesMirror);
|
||||
binding = Binding.SERVICE;
|
||||
} else if (providesMirror != null) {
|
||||
value = annotationValue(mirror = providesMirror);
|
||||
if (providedMirror != null) {
|
||||
AnnotationValue v = annotationValue(providedMirror);
|
||||
if (!value.getValue().toString().equals(v.getValue().toString())) {
|
||||
trees.printMessage(Diagnostic.Kind.ERROR,
|
||||
"@Provided and @Provides doesn't match", trees.getTree(e, mirror, value), root);
|
||||
return;
|
||||
}
|
||||
binding = Binding.TWO_WAY;
|
||||
} else binding = Binding.PROVIDES;
|
||||
} else if (providedMirror != null) {
|
||||
value = annotationValue(mirror = providedMirror);
|
||||
binding = Binding.PROVIDED;
|
||||
}
|
||||
|
||||
if (value != null && value.getValue().toString().isEmpty()) {
|
||||
trees.printMessage(Diagnostic.Kind.ERROR,
|
||||
"Empty JBR API binding",
|
||||
trees.getTree(e, mirror, value), root);
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentType == null) {
|
||||
if (value != null) {
|
||||
trees.printMessage(Diagnostic.Kind.ERROR,
|
||||
"JBR API annotations are only allowed on classes, interfaces and static methods",
|
||||
trees.getTree(e, mirror), root);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (value != null && e.getKind() == ElementKind.METHOD && binding != Binding.PROVIDES) {
|
||||
trees.printMessage(Diagnostic.Kind.ERROR,
|
||||
"Only @Provides is allowed for static methods",
|
||||
trees.getTree(e, mirror), root);
|
||||
return;
|
||||
}
|
||||
|
||||
// Determine class/method names.
|
||||
String bindType = null, bindMethod = null;
|
||||
if (value != null) {
|
||||
bindType = value.getValue().toString();
|
||||
if (e.getKind() == ElementKind.METHOD) {
|
||||
int splitIndex = bindType.indexOf('#');
|
||||
if (splitIndex != -1) {
|
||||
bindMethod = bindType.substring(splitIndex + 1);
|
||||
bindType = bindType.substring(0, splitIndex);
|
||||
if (!isJavaIdentifier(bindMethod)) {
|
||||
trees.printMessage(Diagnostic.Kind.ERROR, "Invalid method identifier: " + bindMethod,
|
||||
trees.getTree(e, mirror, value), root);
|
||||
return;
|
||||
}
|
||||
} else bindMethod = e.getSimpleName().toString();
|
||||
}
|
||||
if (!isJavaTypeIdentifier(bindType)) {
|
||||
trees.printMessage(Diagnostic.Kind.ERROR, "Invalid type identifier: " + bindType,
|
||||
trees.getTree(e, mirror, value), root);
|
||||
return;
|
||||
}
|
||||
if (Character.isUpperCase(bindType.charAt(0))) bindType = "com.jetbrains." + bindType; // Short form
|
||||
}
|
||||
|
||||
// Add entry.
|
||||
DiagnosticTree diagnostic = new DiagnosticTree(root, trees.getTree(e, mirror, value));
|
||||
if (e.getKind() == ElementKind.METHOD) {
|
||||
ExecutableElement m = (ExecutableElement) e;
|
||||
methodBindings.add(new MethodBinding(diagnostic, m, staticDescriptor(currentType, m),
|
||||
bindType == null ? null : new Registry.StaticMethod(bindType, bindMethod)));
|
||||
} else {
|
||||
typeBindings.put(currentType, new TypeBinding(diagnostic, (TypeElement) e, currentType, bindType, binding));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "jbr-api";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(JavacTask jt, String... args) {
|
||||
Path output = Path.of(args[0]);
|
||||
String implVersion;
|
||||
try {
|
||||
implVersion = Files.readString(Path.of(args[1])).strip();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
elements = jt.getElements();
|
||||
trees = Trees.instance(jt);
|
||||
types = jt.getTypes();
|
||||
jt.addTaskListener(new TaskListener() {
|
||||
@Override
|
||||
public void finished(TaskEvent te) {
|
||||
if (te.getKind() == TaskEvent.Kind.ANALYZE && te.getTypeElement() != null) {
|
||||
new ElementScanner14<Void, CompilationUnitTree>() {
|
||||
@Override
|
||||
public Void visitModule(ModuleElement e, CompilationUnitTree unused) { return null; }
|
||||
@Override
|
||||
public Void visitPackage(PackageElement e, CompilationUnitTree unused) { return null; }
|
||||
@Override
|
||||
public Void scan(Element e, CompilationUnitTree root) {
|
||||
JBRApiPlugin.this.scan(root, e);
|
||||
e.accept(this, root);
|
||||
return null;
|
||||
}
|
||||
}.scan(te.getTypeElement(), te.getCompilationUnit());
|
||||
} else if (te.getKind() == TaskEvent.Kind.COMPILATION) {
|
||||
try (RandomAccessFile file = new RandomAccessFile(output.toFile(), "rw");
|
||||
FileChannel channel = file.getChannel()) {
|
||||
for (;;) {
|
||||
try { if (channel.lock() != null) break; } catch (OverlappingFileLockException ignore) {}
|
||||
LockSupport.parkNanos(10_000000);
|
||||
}
|
||||
Registry r = new Registry();
|
||||
r.read(file);
|
||||
var unresolvedErrors = r.addBindings();
|
||||
file.setLength(0);
|
||||
file.writeBytes("VERSION " + implVersion + "\n");
|
||||
r.write(file);
|
||||
if (!unresolvedErrors.isEmpty()) {
|
||||
throw new RuntimeException(String.join("\n", unresolvedErrors));
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -51,9 +51,9 @@ import javacserver.util.Log;
|
||||
public class Client {
|
||||
private static final Log.Level LOG_LEVEL = Log.Level.INFO;
|
||||
|
||||
// Wait 4 seconds for response, before giving up on javac server.
|
||||
private static final int CONNECTION_TIMEOUT = 4000;
|
||||
private static final int MAX_CONNECT_ATTEMPTS = 10;
|
||||
// Wait 2 seconds for response, before giving up on javac server.
|
||||
private static final int CONNECTION_TIMEOUT = 2000;
|
||||
private static final int MAX_CONNECT_ATTEMPTS = 3;
|
||||
private static final int WAIT_BETWEEN_CONNECT_ATTEMPTS = 2000;
|
||||
|
||||
private final ClientConfiguration conf;
|
||||
@@ -130,7 +130,7 @@ public class Client {
|
||||
Log.error("Connection attempt failed: " + ex.getMessage());
|
||||
if (attempt >= MAX_CONNECT_ATTEMPTS) {
|
||||
Log.error("Giving up");
|
||||
throw new IOException("Could not connect to server after " + MAX_CONNECT_ATTEMPTS + " attempts with timeout " + CONNECTION_TIMEOUT, ex);
|
||||
throw new IOException("Could not connect to server", ex);
|
||||
}
|
||||
}
|
||||
Thread.sleep(WAIT_BETWEEN_CONNECT_ATTEMPTS);
|
||||
|
||||
@@ -78,8 +78,7 @@ ifeq ($(call isTargetOs, macosx aix linux), true)
|
||||
NAME := jspawnhelper, \
|
||||
SRC := $(TOPDIR)/src/$(MODULE)/unix/native/jspawnhelper, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKEXE) $(VERSION_CFLAGS) \
|
||||
-I$(TOPDIR)/src/$(MODULE)/unix/native/libjava, \
|
||||
CFLAGS := $(CFLAGS_JDKEXE) -I$(TOPDIR)/src/$(MODULE)/unix/native/libjava, \
|
||||
EXTRA_OBJECT_FILES := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc$(OBJ_SUFFIX), \
|
||||
LDFLAGS := $(LDFLAGS_JDKEXE), \
|
||||
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
|
||||
|
||||
@@ -52,7 +52,9 @@ $(eval $(call SetupTextFileProcessing, BUILD_VERSION_JAVA, \
|
||||
|
||||
|
||||
# Normalize OPENJDK_TARGET_CPU name to match jdk.internal.util.Architecture enum
|
||||
ifneq ($(filter $(OPENJDK_TARGET_CPU), s390x), )
|
||||
ifneq ($(filter $(OPENJDK_TARGET_CPU), ppc64le), )
|
||||
OPENJDK_TARGET_ARCH_CANONICAL = ppc64
|
||||
else ifneq ($(filter $(OPENJDK_TARGET_CPU), s390x), )
|
||||
OPENJDK_TARGET_ARCH_CANONICAL = s390
|
||||
else ifneq ($(filter $(OPENJDK_TARGET_CPU), x86_64 amd64), )
|
||||
OPENJDK_TARGET_ARCH_CANONICAL = x64
|
||||
|
||||
@@ -59,7 +59,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJAVA, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
$(LIBJAVA_CFLAGS), \
|
||||
jdk_util.c_CFLAGS := $(VERSION_CFLAGS), \
|
||||
ProcessImpl_md.c_CFLAGS := $(VERSION_CFLAGS), \
|
||||
WARNINGS_AS_ERRORS_xlc := false, \
|
||||
DISABLED_WARNINGS_gcc_ProcessImpl_md.c := unused-result, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, 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
|
||||
@@ -91,7 +91,6 @@ ifeq ($(call isTargetOs, macosx), true)
|
||||
CFLAGS := $(CFLAGS_JDKLIB), \
|
||||
DISABLED_WARNINGS_clang_NSApplicationAWT.m := deprecated-declarations format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_QueuingApplicationDelegate.m := objc-method-access, \
|
||||
DISABLED_WARNINGS_clang_ThreadUtilities.m := format-nonliteral, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LIBS := \
|
||||
|
||||
@@ -78,10 +78,6 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
#
|
||||
endif
|
||||
|
||||
ifeq ($(DBUS_FOUND), false)
|
||||
LIBAWT_EXFILES += dbus_interface.c dbus_interface.h
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, linux macosx aix), true)
|
||||
LIBAWT_EXFILES += awt_Font.c CUPSfuncs.c fontpath.c X11Color.c
|
||||
endif
|
||||
@@ -115,10 +111,6 @@ LIBAWT_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES $(X_CFLAGS)
|
||||
|
||||
LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH
|
||||
|
||||
ifeq ($(DBUS_FOUND), true)
|
||||
LIBAWT_CFLAGS += -DDBUS_FOUND
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE
|
||||
ifeq ($(call isTargetCpuBits, 64), true)
|
||||
@@ -170,7 +162,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
|
||||
EXCLUDES := $(LIBAWT_EXCLUDES), \
|
||||
EXCLUDE_FILES := $(LIBAWT_EXFILES), \
|
||||
OPTIMIZATION := HIGHEST, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS) $(DBUS_CFLAGS), \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \
|
||||
EXTRA_HEADER_DIRS := $(LIBAWT_EXTRA_HEADER_DIRS), \
|
||||
DISABLED_WARNINGS_gcc_awt_LoadLibrary.c := unused-result, \
|
||||
DISABLED_WARNINGS_gcc_debug_mem.c := format-nonliteral, \
|
||||
@@ -227,34 +219,6 @@ ifeq ($(call isTargetOs, windows)+$(ENABLE_HEADLESS_ONLY)+$(A11Y_NVDA_ANNOUNCING
|
||||
TARGETS += $(COPY_NVDA_DEPENDENCIES)
|
||||
endif
|
||||
|
||||
# Compile Vulkan shaders
|
||||
define compile-spirv
|
||||
$(call MakeTargetDir)
|
||||
$(VULKAN_SHADER_COMPILER) '$(call DecodeSpace, $@)' '$(call DecodeSpace, $<)'
|
||||
endef
|
||||
spirv-name = $(strip $1).h
|
||||
|
||||
ifeq ($(VULKAN_ENABLED), true)
|
||||
$(eval $(call SetupCopyFiles, COMPILE_VULKAN_SHADERS, \
|
||||
SRC := $(TOPDIR)/src/$(MODULE)/share/glsl/vulkan, \
|
||||
FILES := $(call FindFiles, $(TOPDIR)/src/$(MODULE)/share/glsl/vulkan), \
|
||||
DEST := $(SUPPORT_OUTPUTDIR)/headers/java.desktop/vulkan/spirv, \
|
||||
MACRO := compile-spirv, \
|
||||
NAME_MACRO := spirv-name, \
|
||||
))
|
||||
VULKAN_SHADER_LIST = $(SUPPORT_OUTPUTDIR)/headers/java.desktop/vulkan/shader_list.h
|
||||
$(VULKAN_SHADER_LIST): $(COMPILE_VULKAN_SHADERS)
|
||||
> $(VULKAN_SHADER_LIST) $(NEWLINE) \
|
||||
$(foreach f, $(patsubst $(TOPDIR)/src/$(MODULE)/share/glsl/vulkan/%,%,$(call FindFiles, $(TOPDIR)/src/$(MODULE)/share/glsl/vulkan)), \
|
||||
$(ECHO) SHADER_ENTRY\($(subst .,$(COMMA),$(subst /,_,$f))\) >> $(VULKAN_SHADER_LIST) $(NEWLINE) \
|
||||
$(ECHO) '#ifdef INCLUDE_BYTECODE' >> $(VULKAN_SHADER_LIST) $(NEWLINE) \
|
||||
$(ECHO) '#include "spirv/$f.h"' >> $(VULKAN_SHADER_LIST) $(NEWLINE) \
|
||||
$(ECHO) BYTECODE_END >> $(VULKAN_SHADER_LIST) $(NEWLINE) \
|
||||
$(ECHO) '#endif' >> $(VULKAN_SHADER_LIST) $(NEWLINE) \
|
||||
)
|
||||
$(BUILD_LIBAWT): $(VULKAN_SHADER_LIST)
|
||||
endif
|
||||
|
||||
TARGETS += $(BUILD_LIBAWT)
|
||||
|
||||
################################################################################
|
||||
@@ -321,7 +285,7 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
EXTRA_HEADER_DIRS := $(LIBAWT_XAWT_EXTRA_HEADER_DIRS), \
|
||||
EXCLUDES := $(LIBAWT_XAWT_EXCLUDES), \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) $(DBUS_CFLAGS) \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \
|
||||
$(X_CFLAGS), \
|
||||
WARNINGS_AS_ERRORS_xlc := false, \
|
||||
DISABLED_WARNINGS_gcc := int-to-pointer-cast, \
|
||||
@@ -331,8 +295,6 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
DISABLED_WARNINGS_gcc_gtk3_interface.c := parentheses type-limits unused-function, \
|
||||
DISABLED_WARNINGS_gcc_OGLBufImgOps.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_gcc_OGLPaints.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_gcc_screencast_pipewire.c := undef, \
|
||||
DISABLED_WARNINGS_gcc_screencast_portal.c := undef, \
|
||||
DISABLED_WARNINGS_gcc_sun_awt_X11_GtkFileDialogPeer.c := parentheses, \
|
||||
DISABLED_WARNINGS_gcc_X11SurfaceData.c := implicit-fallthrough pointer-to-int-cast, \
|
||||
DISABLED_WARNINGS_gcc_XlibWrapper.c := type-limits pointer-to-int-cast, \
|
||||
@@ -372,7 +334,6 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
common/awt \
|
||||
common/java2d \
|
||||
common/font \
|
||||
common/wayland \
|
||||
#
|
||||
|
||||
LIBAWT_WLAWT_EXCLUDES := medialib debug opengl x11
|
||||
@@ -393,8 +354,6 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
common/font \
|
||||
common/java2d/wl \
|
||||
common/java2d/vulkan \
|
||||
common/wayland \
|
||||
libvmahpp \
|
||||
#
|
||||
|
||||
# Enable 'wakefield' extension for java.awt.Robot support
|
||||
@@ -442,8 +401,6 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
DISABLED_WARNINGS_CXX_gcc := undef, \
|
||||
DISABLED_WARNINGS_clang := parentheses format undef \
|
||||
logical-op-parentheses format-nonliteral int-conversion, \
|
||||
DISABLED_WARNINGS_gcc_VKMemory.cpp := missing-field-initializers implicit-fallthrough parentheses, \
|
||||
DISABLED_WARNINGS_clang_VKMemory.cpp := missing-field-initializers implicit-fallthrough parentheses, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN) \
|
||||
-L$(INSTALL_LIBRARIES_HERE), \
|
||||
@@ -579,7 +536,7 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) \
|
||||
$(LIBAWT_HEADLESS_CFLAGS) $(DBUS_CFLAGS), \
|
||||
$(LIBAWT_HEADLESS_CFLAGS), \
|
||||
CXXFLAGS := $(CXXFLAGS_JDKLIB), \
|
||||
EXTRA_HEADER_DIRS := $(LIBAWT_HEADLESS_EXTRA_HEADER_DIRS), \
|
||||
DISABLED_WARNINGS_gcc_X11Renderer.c := unused-function, \
|
||||
@@ -661,20 +618,11 @@ else
|
||||
# hb-ft.cc is not presently needed, and requires freetype 2.4.2 or later.
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += libharfbuzz/hb-ft.cc
|
||||
|
||||
# list of disabled warnings and the compilers for which it was specifically added.
|
||||
# array-bounds -> GCC 12 on Alpine Linux
|
||||
# parentheses -> GCC 6
|
||||
# range-loop-analysis -> clang on Xcode12
|
||||
|
||||
HARFBUZZ_DISABLED_WARNINGS_gcc := missing-field-initializers strict-aliasing \
|
||||
unused-result array-bounds parentheses
|
||||
unused-result array-bounds
|
||||
# noexcept-type required for GCC 7 builds. Not required for GCC 8+.
|
||||
# expansion-to-defined required for GCC 9 builds. Not required for GCC 10+.
|
||||
# maybe-uninitialized required for GCC 8 builds. Not required for GCC 9+.
|
||||
# calloc-transposed-args required for GCC 14 builds. (fixed upstream in Harfbuzz 032c931e1c0cfb20f18e5acb8ba005775242bd92)
|
||||
HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := class-memaccess noexcept-type \
|
||||
expansion-to-defined dangling-reference maybe-uninitialized \
|
||||
calloc-transposed-args
|
||||
HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := class-memaccess noexcept-type expansion-to-defined dangling-reference
|
||||
HARFBUZZ_DISABLED_WARNINGS_clang := missing-field-initializers range-loop-analysis
|
||||
HARFBUZZ_DISABLED_WARNINGS_microsoft := 4267 4244
|
||||
|
||||
@@ -712,10 +660,12 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
else ifeq ($(call isTargetOs, macosx), true)
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
|
||||
X11TextRenderer.c \
|
||||
fontpath.c \
|
||||
lcdglyph.c \
|
||||
lcdglyphDW.cpp
|
||||
else
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += lcdglyph.c \
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
|
||||
lcdglyph.c \
|
||||
lcdglyphDW.cpp
|
||||
endif
|
||||
|
||||
@@ -915,7 +865,6 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
||||
#
|
||||
|
||||
LIBSPLASHSCREEN_HEADER_DIRS += common/awt/utility
|
||||
LIBSPLASHSCREEN_HEADER_DIRS += common/awt/systemscale
|
||||
|
||||
ifeq ($(USE_EXTERNAL_LIBGIF), false)
|
||||
LIBSPLASHSCREEN_HEADER_DIRS += libsplashscreen/giflib
|
||||
@@ -971,8 +920,6 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
||||
endif
|
||||
endif
|
||||
|
||||
LIBSPLASHSCREEN_CFLAGS += $(CFLAGS_JDKLIB) $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS)
|
||||
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
|
||||
|
||||
@@ -987,10 +934,11 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
||||
else ifeq ($(call isTargetOs, windows), true)
|
||||
LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
|
||||
else
|
||||
LIBWLSPLASHSCREEN_CFLAGS := -DWITH_WL $(LIBSPLASHSCREEN_CFLAGS) $(X_CFLAGS)
|
||||
LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
|
||||
endif
|
||||
|
||||
LIBSPLASHSCREEN_LIBS :=
|
||||
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
LIBSPLASHSCREEN_LIBS += \
|
||||
$(LIBM) -lpthread -liconv -losxapp \
|
||||
@@ -1006,59 +954,48 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
||||
endif
|
||||
|
||||
LIBSPLASHSCREEN_HEADER_DIRS += \
|
||||
libsplashscreen \
|
||||
libosxapp \
|
||||
java.base:libjava \
|
||||
#
|
||||
|
||||
LIBSPLASHSCREEN_EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c
|
||||
LIBSPLASHSCREEN_LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN)
|
||||
LIBSPLASHSCREEN_LIBS := $(JDKLIB_LIBS) $(LIBSPLASHSCREEN_LIBS) $(LIBZ_LIBS) $(GIFLIB_LIBS) $(LIBJPEG_LIBS) $(PNG_LIBS)
|
||||
LIBSPLASHSCREEN_DISABLED_WARNINGS_gcc := sign-compare implicit-fallthrough shift-negative-value maybe-uninitialized unused-function type-limits unused-result
|
||||
LIBSPLASHSCREEN_DISABLED_WARNINGS_clang := deprecated-non-prototype format-nonliteral sign-compare incompatible-pointer-types deprecated-declarations
|
||||
LIBSPLASHSCREEN_DISABLED_WARNINGS_microsoft := 4018 4267 4244
|
||||
LIBWLSPLASHSCREEN_HEADER_DIRS := common/wayland
|
||||
LIBWLSPLASHSCREEN_EXTRA_SRC := common/wayland
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBSPLASHSCREEN, \
|
||||
NAME := splashscreen, \
|
||||
EXTRA_SRC := $(LIBSPLASHSCREEN_EXTRA_SRC) libxsplashscreen libsplashscreen, \
|
||||
EXTRA_SRC := $(LIBSPLASHSCREEN_EXTRA_SRC), \
|
||||
EXCLUDE_SRC_PATTERNS := $(LIBSPLASHSCREEN_EXCLUDE_SRC_PATTERNS), \
|
||||
DISABLED_WARNINGS_gcc := $(LIBSPLASHSCREEN_DISABLED_WARNINGS_gcc), \
|
||||
DISABLED_WARNINGS_clang := $(LIBSPLASHSCREEN_DISABLED_WARNINGS_clang), \
|
||||
DISABLED_WARNINGS_microsoft := $(LIBSPLASHSCREEN_DISABLED_WARNINGS_microsoft), \
|
||||
EXCLUDE_FILES := $(LIBSPLASHSCREEN_EXCLUDE_FILES), \
|
||||
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
|
||||
EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS), \
|
||||
EXTRA_HEADER_DIRS := libxsplashscreen $(LIBSPLASHSCREEN_HEADER_DIRS), \
|
||||
LDFLAGS := $(LIBSPLASHSCREEN_LDFLAGS), \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBSPLASHSCREEN_CFLAGS) \
|
||||
$(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \
|
||||
EXTRA_HEADER_DIRS := $(LIBSPLASHSCREEN_HEADER_DIRS), \
|
||||
DISABLED_WARNINGS_gcc_dgif_lib.c := sign-compare, \
|
||||
DISABLED_WARNINGS_gcc_jcmaster.c := implicit-fallthrough, \
|
||||
DISABLED_WARNINGS_gcc_jdphuff.c := shift-negative-value, \
|
||||
DISABLED_WARNINGS_gcc_png.c := maybe-uninitialized, \
|
||||
DISABLED_WARNINGS_gcc_pngerror.c := maybe-uninitialized, \
|
||||
DISABLED_WARNINGS_gcc_splashscreen_gfx_impl.c := implicit-fallthrough maybe-uninitialized, \
|
||||
DISABLED_WARNINGS_gcc_splashscreen_impl.c := implicit-fallthrough sign-compare unused-function, \
|
||||
DISABLED_WARNINGS_gcc_splashscreen_sys.c := type-limits unused-result, \
|
||||
DISABLED_WARNINGS_clang := deprecated-non-prototype, \
|
||||
DISABLED_WARNINGS_clang_dgif_lib.c := sign-compare, \
|
||||
DISABLED_WARNINGS_clang_gzwrite.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_splashscreen_impl.c := sign-compare, \
|
||||
DISABLED_WARNINGS_clang_splashscreen_png.c := incompatible-pointer-types, \
|
||||
DISABLED_WARNINGS_clang_splashscreen_sys.m := deprecated-declarations, \
|
||||
DISABLED_WARNINGS_microsoft_dgif_lib.c := 4018 4267, \
|
||||
DISABLED_WARNINGS_microsoft_splashscreen_impl.c := 4018 4267 4244, \
|
||||
DISABLED_WARNINGS_microsoft_splashscreen_png.c := 4267, \
|
||||
DISABLED_WARNINGS_microsoft_splashscreen_sys.c := 4267 4244, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \
|
||||
LDFLAGS_windows := -delayload:user32.dll, \
|
||||
LIBS := $(LIBSPLASHSCREEN_LIBS), \
|
||||
LIBS_aix := -liconv, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBWLSPLASHSCREEN, \
|
||||
NAME := wlsplashscreen, \
|
||||
EXTRA_SRC := $(LIBSPLASHSCREEN_EXTRA_SRC) $(LIBWLSPLASHSCREEN_EXTRA_SRC) libwlsplashscreen libsplashscreen, \
|
||||
EXCLUDE_SRC_PATTERNS := $(LIBSPLASHSCREEN_EXCLUDE_SRC_PATTERNS), \
|
||||
DISABLED_WARNINGS_gcc := $(LIBSPLASHSCREEN_DISABLED_WARNINGS_gcc), \
|
||||
DISABLED_WARNINGS_clang := $(LIBSPLASHSCREEN_DISABLED_WARNINGS_clang), \
|
||||
EXCLUDE_FILES := $(LIBSPLASHSCREEN_EXCLUDE_FILES), \
|
||||
EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(LIBWLSPLASHSCREEN_CFLAGS), \
|
||||
EXTRA_HEADER_DIRS := $(LIBSPLASHSCREEN_HEADER_DIRS) $(LIBWLSPLASHSCREEN_HEADER_DIRS) libwlsplashscreen, \
|
||||
LDFLAGS := $(LIBSPLASHSCREEN_LDFLAGS) -lrt, \
|
||||
LIBS := -lwayland-client -lwayland-cursor $(LIBSPLASHSCREEN_LIBS) -lrt, \
|
||||
LIBS := $(JDKLIB_LIBS) $(LIBSPLASHSCREEN_LIBS) $(LIBZ_LIBS) \
|
||||
$(GIFLIB_LIBS) $(LIBJPEG_LIBS) $(PNG_LIBS), \
|
||||
LIBS_aix := -liconv, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBSPLASHSCREEN)
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
TARGETS += $(BUILD_LIBWLSPLASHSCREEN)
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
$(BUILD_LIBSPLASHSCREEN): $(call FindLib, $(MODULE), osxapp)
|
||||
@@ -1136,8 +1073,7 @@ ifeq ($(call isTargetOs, macosx), true)
|
||||
-framework ExceptionHandling \
|
||||
-framework JavaRuntimeSupport \
|
||||
-framework OpenGL \
|
||||
-framework QuartzCore \
|
||||
-framework UniformTypeIdentifiers -ljava, \
|
||||
-framework QuartzCore -ljava, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBAWT_LWAWT)
|
||||
|
||||
@@ -49,8 +49,8 @@ elif [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
SKIP_BIN_DIFF="true"
|
||||
SKIP_FULLDUMP_DIFF="true"
|
||||
ACCEPTED_JARZIP_CONTENTS="
|
||||
/modules_libs/java.security.jgss/w2k_lsa_auth.dll.pdb
|
||||
/modules_libs/java.security.jgss/w2k_lsa_auth.dll.map
|
||||
/modules_libs/java.security.jgss/w2k_lsa_auth.pdb
|
||||
/modules_libs/java.security.jgss/w2k_lsa_auth.map
|
||||
/modules_libs/java.security.jgss/w2k_lsa_auth.dll
|
||||
"
|
||||
elif [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
|
||||
|
||||
@@ -867,7 +867,7 @@ BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exesigtest := -ljvm
|
||||
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
BUILD_HOTSPOT_JTREG_EXECUTABLES_CFLAGS_exeFPRegs := -MT
|
||||
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c libTestJNI.c libCompleteExit.c libMonitorWithDeadObjectTest.c libTestPsig.c libnativeStack.c exeGetCreatedJavaVMs.c
|
||||
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c libTestJNI.c libCompleteExit.c libTestPsig.c libnativeStack.c exeGetCreatedJavaVMs.c
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libatExit := jvm.lib
|
||||
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exedaemonDestroy := jvm.lib
|
||||
else
|
||||
@@ -1508,11 +1508,8 @@ else
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libterminatedThread += -lpthread
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libatExit += -ljvm
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libCompleteExit += -lpthread
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMonitorWithDeadObjectTest += -lpthread
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libnativeStack += -lpthread
|
||||
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeGetCreatedJavaVMs := -ljvm -lpthread
|
||||
|
||||
BUILD_HOTSPOT_JTREG_EXCLUDE += libNativeException.c
|
||||
endif
|
||||
|
||||
ifeq ($(ASAN_ENABLED), true)
|
||||
|
||||
@@ -143,8 +143,6 @@ ifeq ($(call isTargetOs, linux), true)
|
||||
# stripping during the test libraries' build.
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libFib := -g
|
||||
BUILD_JDK_JTREG_LIBRARIES_STRIP_SYMBOLS_libFib := false
|
||||
# nio tests' libCreationTimeHelper native needs -ldl linker flag
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libCreationTimeHelper := -ldl
|
||||
endif
|
||||
|
||||
ifeq ($(ASAN_ENABLED), true)
|
||||
|
||||
@@ -29,23 +29,6 @@
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
|
||||
ifndef SOURCE
|
||||
export SOURCE := 7
|
||||
endif
|
||||
ifndef TARGET
|
||||
export TARGET := 7
|
||||
endif
|
||||
ifndef JAVAC
|
||||
export JAVAC := javac
|
||||
endif
|
||||
ifndef JAVA
|
||||
export JAVA := java
|
||||
endif
|
||||
ifndef JAR
|
||||
export JAR := jar
|
||||
endif
|
||||
|
||||
SOURCEPATH=src
|
||||
CLASSES=build
|
||||
DIST=dist
|
||||
@@ -97,18 +80,18 @@ SCM_DIRs = .hg .svn CVS RCS SCCS Codemgr_wsdata deleted_files
|
||||
all: mkdirs J2DBench.jar J2DAnalyzer.jar
|
||||
|
||||
run: mkdirs J2DBench.jar
|
||||
$(JAVA) -jar $(DIST)/J2DBench.jar
|
||||
java -jar $(DIST)/J2DBench.jar
|
||||
|
||||
analyze: mkdirs J2DAnalyzer.jar
|
||||
$(JAVA) -jar $(DIST)/J2DAnalyzer.jar
|
||||
java -jar $(DIST)/J2DAnalyzer.jar
|
||||
|
||||
J2DBench.jar: \
|
||||
$(J2DBENCH_CLASSES) $(J2DBENCH_RESOURCES) \
|
||||
$(CLASSES)/j2dbench.manifest
|
||||
$(JAR) cvmf $(CLASSES)/j2dbench.manifest $(DIST)/J2DBench.jar -C $(CLASSES) j2dbench
|
||||
jar cvmf $(CLASSES)/j2dbench.manifest $(DIST)/J2DBench.jar -C $(CLASSES) j2dbench
|
||||
|
||||
J2DAnalyzer.jar: $(J2DANALYZER_CLASSES) $(CLASSES)/j2danalyzer.manifest
|
||||
$(JAR) cvmf $(CLASSES)/j2danalyzer.manifest \
|
||||
jar cvmf $(CLASSES)/j2danalyzer.manifest \
|
||||
$(DIST)/J2DAnalyzer.jar -C $(CLASSES) j2dbench/report
|
||||
|
||||
$(CLASSES)/j2dbench/tests/iio/images: $(RESOURCES)/images
|
||||
@@ -137,7 +120,7 @@ $(CLASSES):
|
||||
mkdirs: $(DIST) $(CLASSES)
|
||||
|
||||
$(CLASSES)/j2dbench/%.class: $(SOURCEPATH)/j2dbench/%.java
|
||||
$(JAVAC) -g:none -source $(SOURCE) -target $(TARGET) -d $(CLASSES) -sourcepath $(SOURCEPATH) $<
|
||||
javac -g:none -source 1.7 -target 1.7 -d $(CLASSES) -sourcepath $(SOURCEPATH) $<
|
||||
|
||||
clean:
|
||||
rm -rf $(CLASSES)
|
||||
|
||||
@@ -23,9 +23,6 @@ The benchmark requires at least jdk1.4 to compile and run. Note that
|
||||
source/target is set to 1.7 in the makefile and build.xml, because of
|
||||
support in jdk 14 compiler. To check compatibility with jdk1.4 you can
|
||||
use "-source 1.4 -target 1.4" options and jdk1.7.
|
||||
Yo can use TARGET/SOURCE of makefile and -Dtarget/surce to set them up for your convinience.
|
||||
Similarly you can set JAVA/JAVAC/JAR and -Djava/javac to select diffferent java/javac then is on yoru PATH
|
||||
Unluckily in ant, you can not set jar, but ant should honor JAVA_HOME
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
How To Compile
|
||||
|
||||
@@ -39,27 +39,6 @@
|
||||
<property name="dist" location="dist"/>
|
||||
<property name="resources" location="resources"/>
|
||||
|
||||
<condition property="source" value="21">
|
||||
<not>
|
||||
<isset property="source"/>
|
||||
</not>
|
||||
</condition>
|
||||
<condition property="target" value="21">
|
||||
<not>
|
||||
<isset property="target"/>
|
||||
</not>
|
||||
</condition>
|
||||
<condition property="java" value="java">
|
||||
<not>
|
||||
<isset property="java"/>
|
||||
</not>
|
||||
</condition>
|
||||
<condition property="javac" value="javac">
|
||||
<not>
|
||||
<isset property="javac"/>
|
||||
</not>
|
||||
</condition>
|
||||
|
||||
<target name="init">
|
||||
<!-- Create the time stamp -->
|
||||
<tstamp/>
|
||||
@@ -70,14 +49,13 @@
|
||||
<target name="compile" depends="init"
|
||||
description="compile the source " >
|
||||
<!-- Compile the java code from ${src} into ${build} -->
|
||||
<javac debug="off" source="${source}" target="${target}" srcdir="${src}" destdir="${build}" fork="true"/>
|
||||
<javac debug="off" source="21" target="21" srcdir="${src}" destdir="${build}"/>
|
||||
</target>
|
||||
|
||||
<target name="run" depends="dist"
|
||||
description="run J2DBench" >
|
||||
<java jar="${dist}/J2DBench.jar"
|
||||
fork="true"
|
||||
jvm="${java}"
|
||||
>
|
||||
</java>
|
||||
</target>
|
||||
@@ -86,7 +64,6 @@
|
||||
description="run J2DAnalyzer" >
|
||||
<java jar="${dist}/J2DAnalyzer.jar"
|
||||
fork="true"
|
||||
jvm="${java}"
|
||||
>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
74
src/demo/share/java2d/RenderPerfTest/Makefile
Normal file
74
src/demo/share/java2d/RenderPerfTest/Makefile
Normal file
@@ -0,0 +1,74 @@
|
||||
#
|
||||
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# - Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# - Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# - Neither the name of Oracle nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
SOURCEPATH=src
|
||||
CLASSES=build
|
||||
DIST=dist
|
||||
RESOURCES=resources
|
||||
|
||||
RENDERPERF_CLASSES = $(CLASSES)/renderperf/RenderPerfTest.class
|
||||
RENDERPERF_SOURCES = $(SOURCEPATH)/renderperf/RenderPerfTest.java
|
||||
|
||||
RENDERPERF_RESOURCES = $(CLASSES)/renderperf/images/duke.png
|
||||
|
||||
all: mkdirs $(DIST)/RenderPerfTest.jar
|
||||
|
||||
run: mkdirs $(DIST)/RenderPerfTest.jar
|
||||
java -jar $(DIST)/RenderPerfTest.jar
|
||||
|
||||
$(DIST)/RenderPerfTest.jar: \
|
||||
$(RENDERPERF_CLASSES) $(RENDERPERF_RESOURCES) \
|
||||
$(CLASSES)/renderperf.manifest
|
||||
jar cvmf $(CLASSES)/renderperf.manifest $(DIST)/RenderPerfTest.jar -C $(CLASSES) .
|
||||
|
||||
|
||||
$(CLASSES)/renderperf/images/%: $(RESOURCES)/images/%
|
||||
cp -r $< $@
|
||||
|
||||
|
||||
$(CLASSES)/renderperf.manifest:
|
||||
echo "Main-Class: renderperf.RenderPerfTest" > $@
|
||||
|
||||
$(DIST):
|
||||
mkdir $(DIST)
|
||||
|
||||
$(CLASSES):
|
||||
mkdir $(CLASSES)
|
||||
mkdir -p $(CLASSES)/renderperf/images
|
||||
|
||||
mkdirs: $(DIST) $(CLASSES)
|
||||
|
||||
$(RENDERPERF_CLASSES): $(RENDERPERF_SOURCES)
|
||||
javac -g:none -d $(CLASSES) -sourcepath $(SOURCEPATH) $<
|
||||
|
||||
clean:
|
||||
rm -rf $(CLASSES)
|
||||
rm -rf $(DIST)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user