mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-13 21:09:41 +01:00
Compare commits
1 Commits
ngubarkov/
...
jdk-20-ga
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82749901b1 |
4
.github/actions/get-gtest/action.yml
vendored
4
.github/actions/get-gtest/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
|
||||
@@ -43,7 +43,7 @@ runs:
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: google/googletest
|
||||
ref: 'v${{ steps.version.outputs.value }}'
|
||||
ref: 'release-${{ steps.version.outputs.value }}'
|
||||
path: gtest
|
||||
|
||||
- name: 'Export path to where GTest is installed'
|
||||
|
||||
4
.github/actions/get-jtreg/action.yml
vendored
4
.github/actions/get-jtreg/action.yml
vendored
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 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
|
||||
@@ -57,7 +57,7 @@ runs:
|
||||
- name: 'Build JTReg'
|
||||
run: |
|
||||
# Build JTReg and move files to the proper locations
|
||||
bash make/build.sh --jdk "$JAVA_HOME_17_X64"
|
||||
bash make/build.sh --jdk "$JAVA_HOME_11_X64"
|
||||
mkdir ../installed
|
||||
mv build/images/jtreg/* ../installed
|
||||
working-directory: jtreg/src
|
||||
|
||||
7
.github/actions/get-msys2/action.yml
vendored
7
.github/actions/get-msys2/action.yml
vendored
@@ -30,16 +30,15 @@ runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Install MSYS2'
|
||||
# use a specific release of msys2/setup-msys2 to prevent jtreg build failures on newer release
|
||||
uses: msys2/setup-msys2@7efe20baefed56359985e327d329042cde2434ff
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
install: 'autoconf tar unzip zip make'
|
||||
path-type: minimal
|
||||
location: ${{ runner.tool_cache }}/msys2
|
||||
location: msys2
|
||||
|
||||
# We can't run bash until this is completed, so stick with pwsh
|
||||
- name: 'Set MSYS2 path'
|
||||
run: |
|
||||
# Prepend msys2/msys64/usr/bin to the PATH
|
||||
echo "$env:RUNNER_TOOL_CACHE/msys2/msys64/usr/bin" >> $env:GITHUB_PATH
|
||||
echo "$env:GITHUB_WORKSPACE/msys2/msys64/usr/bin" >> $env:GITHUB_PATH
|
||||
shell: pwsh
|
||||
|
||||
3
.github/workflows/build-linux.yml
vendored
3
.github/workflows/build-linux.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
|
||||
@@ -126,6 +126,7 @@ jobs:
|
||||
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||
--with-jtreg=${{ steps.jtreg.outputs.path }}
|
||||
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||
--enable-jtreg-failure-handler
|
||||
--with-zlib=system
|
||||
--with-jmod-compress=zip-1
|
||||
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
|
||||
|
||||
3
.github/workflows/build-macos.yml
vendored
3
.github/workflows/build-macos.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
|
||||
@@ -101,6 +101,7 @@ jobs:
|
||||
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||
--with-jtreg=${{ steps.jtreg.outputs.path }}
|
||||
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||
--enable-jtreg-failure-handler
|
||||
--with-zlib=system
|
||||
--with-jmod-compress=zip-1
|
||||
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
|
||||
|
||||
20
.github/workflows/build-windows.yml
vendored
20
.github/workflows/build-windows.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
|
||||
@@ -98,26 +98,12 @@ jobs:
|
||||
id: gtest
|
||||
uses: ./.github/actions/get-gtest
|
||||
|
||||
- name: 'Check toolchain installed'
|
||||
id: toolchain-check
|
||||
run: |
|
||||
set +e
|
||||
'/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/vc/auxiliary/build/vcvars64.bat' -vcvars_ver=${{ inputs.msvc-toolset-version }}
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Toolchain is already installed"
|
||||
echo "toolchain-installed=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Toolchain is not yet installed"
|
||||
echo "toolchain-installed=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: 'Install toolchain and dependencies'
|
||||
run: |
|
||||
# Run Visual Studio Installer
|
||||
'/c/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe' \
|
||||
modify --quiet --installPath 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise' \
|
||||
modify --quiet --installPath 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise' \
|
||||
--add Microsoft.VisualStudio.Component.VC.${{ inputs.msvc-toolset-version }}.${{ inputs.msvc-toolset-architecture }}
|
||||
if: steps.toolchain-check.outputs.toolchain-installed != 'true'
|
||||
|
||||
- name: 'Configure'
|
||||
run: >
|
||||
@@ -128,6 +114,7 @@ jobs:
|
||||
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||
--with-jtreg=${{ steps.jtreg.outputs.path }}
|
||||
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||
--enable-jtreg-failure-handler
|
||||
--with-msvc-toolset-version=${{ inputs.msvc-toolset-version }}
|
||||
--with-jmod-compress=zip-1
|
||||
${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
|
||||
@@ -138,7 +125,6 @@ jobs:
|
||||
# We need a minimal PATH on Windows
|
||||
# Set PATH to "", so just GITHUB_PATH is included
|
||||
PATH: ''
|
||||
shell: env /usr/bin/bash --login -eo pipefail {0}
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
|
||||
13
.github/workflows/main.yml
vendored
13
.github/workflows/main.yml
vendored
@@ -26,6 +26,10 @@
|
||||
name: 'OpenJDK GHA Sanity Checks'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- master
|
||||
- pr/*
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
platforms:
|
||||
@@ -55,8 +59,7 @@ jobs:
|
||||
outputs:
|
||||
linux-x64: ${{ steps.include.outputs.linux-x64 }}
|
||||
linux-x86: ${{ steps.include.outputs.linux-x86 }}
|
||||
# additional build options for linux-x64 are disabled
|
||||
# linux-x64-variants: ${{ steps.include.outputs.linux-x64-variants }}
|
||||
linux-x64-variants: ${{ steps.include.outputs.linux-x64-variants }}
|
||||
linux-cross-compile: ${{ steps.include.outputs.linux-cross-compile }}
|
||||
macos-x64: ${{ steps.include.outputs.macos-x64 }}
|
||||
macos-aarch64: ${{ steps.include.outputs.macos-aarch64 }}
|
||||
@@ -145,7 +148,7 @@ jobs:
|
||||
apt-architecture: 'i386'
|
||||
# Some multilib libraries do not have proper inter-dependencies, so we have to
|
||||
# install their dependencies manually.
|
||||
apt-extra-packages: 'libfreetype6-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'
|
||||
extra-conf-options: '--with-target-bits=32'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
@@ -232,7 +235,7 @@ jobs:
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
platform: macos-x64
|
||||
xcode-toolset-version: '12.5.1'
|
||||
xcode-toolset-version: '11.7'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.macos-x64 == 'true'
|
||||
@@ -243,7 +246,7 @@ jobs:
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
platform: macos-aarch64
|
||||
xcode-toolset-version: '12.5.1'
|
||||
xcode-toolset-version: '12.4'
|
||||
extra-conf-options: '--openjdk-target=aarch64-apple-darwin'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
|
||||
270
.github/workflows/pr.yml
vendored
270
.github/workflows/pr.yml
vendored
@@ -1,270 +0,0 @@
|
||||
#
|
||||
# Copyright 2000-2023 JetBrains s.r.o.
|
||||
# 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.
|
||||
#
|
||||
|
||||
name: 'Build OpenJDK on pull request'
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
###
|
||||
### Determine platforms to include
|
||||
###
|
||||
select:
|
||||
name: 'Select platforms'
|
||||
runs-on: ubuntu-22.04
|
||||
outputs:
|
||||
linux-x64: ${{ steps.include.outputs.linux-x64 }}
|
||||
linux-x86: ${{ steps.include.outputs.linux-x86 }}
|
||||
linux-cross-compile: ${{ steps.include.outputs.linux-cross-compile }}
|
||||
macos-x64: ${{ steps.include.outputs.macos-x64 }}
|
||||
macos-aarch64: ${{ steps.include.outputs.macos-aarch64 }}
|
||||
windows-x64: ${{ steps.include.outputs.windows-x64 }}
|
||||
windows-aarch64: ${{ steps.include.outputs.windows-aarch64 }}
|
||||
windows-x86: ${{ steps.include.outputs.windows-x86 }}
|
||||
|
||||
steps:
|
||||
# This function must be inlined in main.yml, or we'd be forced to checkout the repo
|
||||
- name: 'Check what jobs to run'
|
||||
id: include
|
||||
run: |
|
||||
# Determine which platform jobs to run
|
||||
|
||||
# Returns 'true' if the input platform list matches any of the platform monikers given as argument,
|
||||
# 'false' otherwise.
|
||||
# arg $1: platform name or names to look for
|
||||
function check_platform() {
|
||||
if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
|
||||
input='${{ github.event.inputs.platforms }}'
|
||||
elif [[ $GITHUB_EVENT_NAME == push ]]; then
|
||||
if [[ '${{ !secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then
|
||||
# If JDK_SUBMIT_FILTER is set, and this is not a "submit/" branch, don't run anything
|
||||
>&2 echo 'JDK_SUBMIT_FILTER is set and not a "submit/" branch'
|
||||
echo 'false'
|
||||
return
|
||||
else
|
||||
input='${{ secrets.JDK_SUBMIT_PLATFORMS }}'
|
||||
fi
|
||||
fi
|
||||
|
||||
normalized_input="$(echo ,$input, | tr -d ' ')"
|
||||
if [[ "$normalized_input" == ",," ]]; then
|
||||
# For an empty input, assume all platforms should run
|
||||
echo 'true'
|
||||
return
|
||||
else
|
||||
# Check for all acceptable platform names
|
||||
for part in $* ; do
|
||||
if echo "$normalized_input" | grep -q -e ",$part," ; then
|
||||
echo 'true'
|
||||
return
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
echo 'false'
|
||||
}
|
||||
|
||||
echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $GITHUB_OUTPUT
|
||||
echo "linux-x86=$(check_platform linux-x86 linux x86)" >> $GITHUB_OUTPUT
|
||||
echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
|
||||
echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
|
||||
echo "macos-x64=$(check_platform macos-x64 macos x64)" >> $GITHUB_OUTPUT
|
||||
echo "macos-aarch64=$(check_platform macos-aarch64 macos aarch64)" >> $GITHUB_OUTPUT
|
||||
echo "windows-x64=$(check_platform windows-x64 windows x64)" >> $GITHUB_OUTPUT
|
||||
echo "windows-x86=$(check_platform windows-x86 windows x86)" >> $GITHUB_OUTPUT
|
||||
echo "windows-aarch64=$(check_platform windows-aarch64 windows aarch64)" >> $GITHUB_OUTPUT
|
||||
echo "docs=$(check_platform docs)" >> $GITHUB_OUTPUT
|
||||
|
||||
###
|
||||
### Build jobs
|
||||
###
|
||||
|
||||
build-linux-x64:
|
||||
name: linux-x64
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
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 }}
|
||||
# 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
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
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: 'libfreetype6-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libc6-i386'
|
||||
extra-conf-options: '--with-target-bits=32'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.linux-x86 == 'true'
|
||||
|
||||
build-linux-cross-compile:
|
||||
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'
|
||||
|
||||
build-macos-x64:
|
||||
name: macos-x64
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
platform: macos-x64
|
||||
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'
|
||||
|
||||
build-macos-aarch64:
|
||||
name: macos-aarch64
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
platform: macos-aarch64
|
||||
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'
|
||||
|
||||
build-windows-x64:
|
||||
name: windows-x64
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
platform: windows-x64
|
||||
msvc-toolset-version: '14.29'
|
||||
msvc-toolset-architecture: 'x86.x64'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.windows-x64 == 'true'
|
||||
|
||||
build-windows-x86:
|
||||
name: windows-x86
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
platform: windows-x86
|
||||
msvc-toolset-version: '14.29'
|
||||
msvc-toolset-architecture: 'x86'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.windows-x86 == 'true'
|
||||
|
||||
build-windows-aarch64:
|
||||
name: windows-aarch64
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
platform: windows-aarch64
|
||||
msvc-toolset-version: '14.29'
|
||||
msvc-toolset-architecture: 'arm64'
|
||||
make-target: 'hotspot'
|
||||
extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.select.outputs.windows-aarch64 == 'true'
|
||||
|
||||
build-docs:
|
||||
name: docs
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
debug-levels: '[ "debug" ]'
|
||||
make-target: 'docs-jdk-bundles'
|
||||
# Make sure we never try to make full docs, since that would require a
|
||||
# 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'
|
||||
|
||||
# Remove bundles so they are not misconstrued as binary distributions from the JDK project
|
||||
remove-bundles:
|
||||
name: 'Remove bundle artifacts'
|
||||
runs-on: ubuntu-22.04
|
||||
if: always()
|
||||
needs:
|
||||
- build-linux-x64
|
||||
- build-linux-x86
|
||||
- build-linux-cross-compile
|
||||
- build-macos-x64
|
||||
- build-macos-aarch64
|
||||
- build-windows-x64
|
||||
- build-windows-aarch64
|
||||
- build-windows-x86
|
||||
|
||||
steps:
|
||||
# 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@v6
|
||||
with:
|
||||
script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }'
|
||||
|
||||
- name: 'Remove bundle artifacts'
|
||||
run: |
|
||||
# Find and remove all bundle artifacts
|
||||
ALL_ARTIFACT_URLS="$(curl -s \
|
||||
-H 'Accept: application/json;api-version=6.0-preview' \
|
||||
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
|
||||
'${{ fromJson(steps.api.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview')"
|
||||
BUNDLE_ARTIFACT_URLS="$(echo "$ALL_ARTIFACT_URLS" | jq -r -c '.value | map(select(.name|startswith("bundles-"))) | .[].url')"
|
||||
for url in $BUNDLE_ARTIFACT_URLS; do
|
||||
echo "Removing $url"
|
||||
curl -s \
|
||||
-H 'Accept: application/json;api-version=6.0-preview' \
|
||||
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
|
||||
-X DELETE "$url" \
|
||||
|| echo "Failed to remove bundle"
|
||||
done
|
||||
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
@@ -64,7 +64,6 @@ jobs:
|
||||
- 'hs/tier1 gc'
|
||||
- 'hs/tier1 runtime'
|
||||
- 'hs/tier1 serviceability'
|
||||
- 'lib-test/tier1'
|
||||
|
||||
include:
|
||||
- test-name: 'jdk/tier1 part 1'
|
||||
@@ -99,10 +98,6 @@ jobs:
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_serviceability'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'lib-test/tier1'
|
||||
test-suite: 'test/lib-test/:tier1'
|
||||
debug-suffix: -debug
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -18,8 +18,3 @@ NashornProfile.txt
|
||||
/src/utils/LogCompilation/target/
|
||||
/.project/
|
||||
/.settings/
|
||||
/.project
|
||||
/.classpath
|
||||
/.cproject
|
||||
/compile_commands.json
|
||||
/.cache
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[general]
|
||||
project=jdk
|
||||
jbs=JDK
|
||||
version=21
|
||||
version=20
|
||||
|
||||
[checks]
|
||||
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
|
||||
|
||||
222
README.md
222
README.md
@@ -1,216 +1,12 @@
|
||||
[](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
|
||||
# Welcome to the JDK!
|
||||
|
||||
# Welcome to JetBrains Runtime!
|
||||
For build instructions please see the
|
||||
[online documentation](https://openjdk.org/groups/build/doc/building.html),
|
||||
or either of these files:
|
||||
|
||||
JetBrains Runtime is a fork of [OpenJDK](https://github.com/openjdk/jdk) available for Windows, Mac OS X, and Linux.
|
||||
It supports enhanced class redefinition ([DCEVM](https://ssw.jku.at/dcevm/)),
|
||||
features optional [JCEF](https://github.com/JetBrains/jcef), a framework for embedding Chromium-based browsers,
|
||||
includes a number of improvements in font rendering, keyboards support,
|
||||
windowing/focus subsystems, HiDPI, accessibility, and performance, provides better desktop integration
|
||||
and bugfixes not yet present in OpenJDK.
|
||||
- [doc/building.html](doc/building.html) (html version)
|
||||
- [doc/building.md](doc/building.md) (markdown version)
|
||||
|
||||
> **_NOTE_**: This is a **development** branch that is periodically synchronized with
|
||||
> the [OpenJDK master](https://github.com/openjdk/jdk/tree/master) branch.
|
||||
>
|
||||
Release builds are based on these branches:
|
||||
* [jbr11](https://github.com/JetBrains/JetBrainsRuntime/tree/jbr11) (JDK 11)
|
||||
* [jbr17](https://github.com/JetBrains/JetBrainsRuntime/tree/jbr17) (JDK 17)
|
||||
|
||||
Download the latest releases of JetBrains Runtime to use with JetBrains IDEs. The full list
|
||||
can be found on the [releases page](https://github.com/JetBrains/JetBrainsRuntime/releases).
|
||||
|
||||
## Releases based on JDK 17
|
||||
|
||||
| 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
|
||||
|
||||
| IDE Version | Latest JBR | Date Released |
|
||||
|-------------|-------------------------------------------------------------------------------------------------------|---------------|
|
||||
| 2022.1 | [11_0_16-b2043.64](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr11_0_16b2043.64) | 10-Nov-2022 |
|
||||
| 2021.3 | [11_0_14_1-b1751.46](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr11_0_14_1b1751.46) | 21-Feb-2022 |
|
||||
| 2021.2 | [11_0_13-b1504.49](https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jb11_0_13-b1504.49) | 15-Nov-2021 |
|
||||
| 2021.1 | [11.0.11+9-b1341.60](https://github.com/JetBrains/JetBrainsRuntime/issues/171#issuecomment-1248891540)| 15-Jun-2021 |
|
||||
| 2020.3 | [11_0_10-b1145.115](https://github.com/JetBrains/JetBrainsRuntime/issues/171#issuecomment-1249243977) | 21-Jun-2021 |
|
||||
|
||||
## Contents
|
||||
- [Welcome to JetBrains Runtime](#welcome-to-jetbrains-runtime)
|
||||
- [Why Use JetBrains Runtime?](#why-use-jetbrains-runtime)
|
||||
- [Products Built on JetBrains Runtime](#products-built-on-jetbrains-runtime)
|
||||
- [Getting Sources](#getting-sources)
|
||||
- [macOS, Linux](#macos-linux)
|
||||
- [Windows](#sources-windows)
|
||||
- [Configuring the Build Environment](#configuring-the-build-environment)
|
||||
- [Linux (Docker)](#linux-docker)
|
||||
- [Ubuntu Linux](#ubuntu-linux)
|
||||
- [Windows](#build-windows)
|
||||
- [macOS](#macos)
|
||||
- [Developing](#developing)
|
||||
- [Contributing](#contributing)
|
||||
- [Resources](#resources)
|
||||
|
||||
## Why Use JetBrains Runtime?
|
||||
* **Embedded browser**: JetBrains Runtime includes the Java Chromium Embedded Framework ([JCEF](https://github.com/JetBrains/jcef)), which
|
||||
enables you to embed a Chromium-based browsers in your JVM-based application.
|
||||
To use it, [download a build with JCEF](https://github.com/JetBrains/JetBrainsRuntime/releases).
|
||||
* **Enhanced class re-definition** with the [DCEVM](https://ssw.jku.at/dcevm/) technology that makes it easier to reload
|
||||
changed code without restarting JVM; this feature needs to be explicitly enabled with `-XX:+AllowEnhancedClassRedefinition`.
|
||||
* **Better FPS performance** for graphics-intensive applications.
|
||||
* **Improved font rendering**, **keyboard input** (such as shortcuts and multinational keyboards),
|
||||
**HiDPI** and **accessibility** support.
|
||||
* **Robust desktop experience**: GUI-related fixes often reach JetBrains Runtime much earlier than the corresponding version of OpenJDK.
|
||||
|
||||
## Products Built on JetBrains Runtime
|
||||
* [Android Studio](https://developer.android.com/studio). The official IDE for Google's Android operating system.
|
||||
* [CLion](https://www.jetbrains.com/clion/). A cross-platform IDE for C and C++ from JetBrains.
|
||||
* [DataGrip](https://www.jetbrains.com/datagrip/). The IDE for Databases and SQL from JetBrains.
|
||||
* [GoLand](https://www.jetbrains.com/go/). The cross-platform Go IDE from JetBrains.
|
||||
* [IntelliJ IDEA](https://www.jetbrains.com/idea/). The IDE for JVM from JetBrains.
|
||||
* [JProfiler](https://www.ej-technologies.com/products/jprofiler/overview.html). The Java profiler.
|
||||
* [PhpStorm](https://www.jetbrains.com/phpstorm/). The PHP IDE from JetBrains.
|
||||
* [PyCharm](https://www.jetbrains.com/pycharm/). The Python IDE from JetBrains.
|
||||
* [Rider](https://www.jetbrains.com/rider/). The cross-platform .NET IDE from JetBrains.
|
||||
* [RubyMine](https://www.jetbrains.com/ruby/). The Ruby and Rails IDE from JetBrains.
|
||||
* [Toolbox App](https://www.jetbrains.com/toolbox-app/). JetBrains IDE manager.
|
||||
* [WebStorm](https://www.jetbrains.com/webstorm/). The JavaScript IDE from JetBrains.
|
||||
* [YourKit](https://www.yourkit.com/). Java and .NET profilers.
|
||||
|
||||
## Getting Sources
|
||||
### macOS, Linux
|
||||
```
|
||||
git config --global core.autocrlf input
|
||||
git clone git@github.com:JetBrains/JetBrainsRuntime.git
|
||||
cd JetBrainsRuntime
|
||||
git checkout jbr21
|
||||
```
|
||||
|
||||
### Windows
|
||||
<a name="sources-windows"></a>
|
||||
```
|
||||
git config --global core.autocrlf false
|
||||
git clone git@github.com:JetBrains/JetBrainsRuntime.git
|
||||
cd JetBrainsRuntime
|
||||
git checkout jbr21
|
||||
```
|
||||
|
||||
## Configuring the Build Environment
|
||||
Here are quick per-platform instructions for those who can't wait to get started.
|
||||
Please refer to [OpenJDK build docs](https://openjdk.java.net/groups/build/doc/building.html) for in-depth
|
||||
coverage of all the details.
|
||||
|
||||
> **_TIP:_** To get a preliminary report of what's missing, run `./configure` and check its output.
|
||||
> It would usually have meaningful advice on how to solve the problem.
|
||||
|
||||
### Linux (Docker)
|
||||
Create a container:
|
||||
```
|
||||
$ cd jb/project/docker
|
||||
$ docker build .
|
||||
...
|
||||
Successfully built 942ea9900054
|
||||
```
|
||||
Run these commands in the new container:
|
||||
```
|
||||
$ docker run -v `pwd`../../../../:/JetBrainsRuntime -it 942ea9900054
|
||||
# cd /JetBrainsRuntime
|
||||
# sh ./configure
|
||||
# make images CONF=linux-x86_64-normal-server-release
|
||||
```
|
||||
|
||||
### 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
|
||||
```
|
||||
Get Java 19 (for instance, [Azul Zulu Builds of OpenJDK 19](https://www.azul.com/downloads/?version=java-19-sts&os=linux&package=jdk)).
|
||||
|
||||
Then run the following:
|
||||
```
|
||||
$ cd JetBrainsRuntime
|
||||
$ git checkout main
|
||||
$ sh ./configure
|
||||
$ make images
|
||||
```
|
||||
This will build the release configuration under `./build/linux-x86_64-server-release/`.
|
||||
|
||||
### Windows
|
||||
<a name="build-windows"></a>
|
||||
Install the following:
|
||||
* [Cygwin x64](http://www.cygwin.com/).
|
||||
Required packages: `autoconf`, `binutils`, `cpio`, `diffutils`, `file`, `gawk`, `gcc-core`, `make`, `m4`, `unzip`, `zip`.
|
||||
Install those together with Cygwin.
|
||||
* [Visual Studio compiler toolset](https://visualstudio.microsoft.com/downloads/).
|
||||
Install with the desktop development kit, which includes Windows SDK and compilers.
|
||||
Visual Studio 2019 is supported by default.
|
||||
* Java 19 (for instance, [Azul Zulu Builds of OpenJDK 19](https://www.azul.com/downloads/?version=java-19-sts&os=windows&package=jdk)).
|
||||
If you have problems while configuring, read [Java tips on Cygwin](http://horstmann.com/articles/cygwin-tips.html).
|
||||
|
||||
From the command line:
|
||||
```
|
||||
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
|
||||
"c:\Program_Files\cygwin64\bin\mintty.exe" /bin/bash -l
|
||||
```
|
||||
The first command sets up environment variables, the second starts a Cygwin shell with the proper environment.
|
||||
|
||||
In the Cygwin shell:
|
||||
```
|
||||
$ cd JetBrainsRuntime
|
||||
$ git checkout main
|
||||
$ bash configure --with-toolchain-version=2019
|
||||
$ make images
|
||||
```
|
||||
This will build the release configuration under `./build/windows-x86_64-server-release/`.
|
||||
|
||||
### macOS
|
||||
Install the following:
|
||||
* Xcode command line developer tools and `autoconf` via [Homebrew](https://brew.sh/).
|
||||
* Java 19 (for instance, [Azul Zulu Builds of OpenJDK 19](https://www.azul.com/downloads/?version=java-19-sts&os=macos&package=jdk)).
|
||||
|
||||
From the command line:
|
||||
```
|
||||
$ cd JetBrainsRuntime
|
||||
$ git checkout main
|
||||
$ sh ./configure
|
||||
$ make images
|
||||
```
|
||||
This will build the release configuration under `./build/macosx-x86_64-server-release/`.
|
||||
|
||||
## Developing
|
||||
You can use [CLion](https://www.jetbrains.com/clion/) to develop native parts of the JetBrains Runtime and
|
||||
[IntelliJ IDEA](https://www.jetbrains.com/idea/) for the parts written in Java.
|
||||
Both require projects to be created.
|
||||
|
||||
### CLion
|
||||
Run
|
||||
```
|
||||
$ make compile-commands
|
||||
```
|
||||
in the git root and open the resulting `build/.../compile_commands.json` file as a project.
|
||||
Then use `Tools | Compilation Database | Change Project Root` to point to git root of this repository.
|
||||
|
||||
See also this detailed step-by-step tutorial for all platforms:
|
||||
[How to develop OpenJDK with CLion](https://blog.jetbrains.com/clion/2020/03/openjdk-with-clion/).
|
||||
|
||||
### IDEA
|
||||
Run
|
||||
```
|
||||
$ sh ./bin/idea.sh
|
||||
```
|
||||
in the git root to generate project files (add `--help` for options). If you have multiple
|
||||
configurations (for example, `release` and `fastdebug`), supply the `--conf <conf_name>` argument.
|
||||
Then open the git root directory as a project in IDEA.
|
||||
|
||||
## Contributing
|
||||
We are happy to receive your pull requests!
|
||||
Before you submit one, please sign our [Contributor License Agreement (CLA)](https://www.jetbrains.com/agreements/cla/).
|
||||
|
||||
## Resources
|
||||
* [JetBrains Runtime on GitHub](https://github.com/JetBrains/JetBrainsRuntime).
|
||||
* [OpenJDK build instructions](https://openjdk.java.net/groups/build/doc/building.html).
|
||||
* [OpenJDK test instructions](https://htmlpreview.github.io/?https://raw.githubusercontent.com/openjdk/jdk/master/doc/building.html#running-tests).
|
||||
* [How to develop OpenJDK with CLion](https://blog.jetbrains.com/clion/2020/03/openjdk-with-clion/).
|
||||
See <https://openjdk.org/> for more information about the OpenJDK
|
||||
Community and the JDK and see <https://bugs.openjdk.org> for JDK issue
|
||||
tracking.
|
||||
|
||||
304
bin/idea.sh
304
bin/idea.sh
@@ -25,26 +25,7 @@
|
||||
# Shell script for generating an IDEA project from a given list of modules
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [-h|--help] [-q|--quiet] [-a|--absolute-paths] [-r|--root <path>] [-o|--output <path>] [-c|--conf <conf_name>] [modules...]"
|
||||
echo " -h | --help"
|
||||
echo " -q | --quiet
|
||||
No stdout output"
|
||||
echo " -a | --absolute-paths
|
||||
Use absolute paths to this jdk, so that generated .idea
|
||||
project files can be moved independently of jdk sources"
|
||||
echo " -r | --root <path>
|
||||
Project content root
|
||||
Default: $TOPLEVEL_DIR"
|
||||
echo " -o | --output <path>
|
||||
Where .idea directory with project files will be generated
|
||||
(e.g. using '-o .' will place project files in './.idea')
|
||||
Default: same as --root"
|
||||
echo " -c | --conf <conf_name>
|
||||
make configuration (release, slowdebug etc)"
|
||||
echo " [modules...]
|
||||
Generate project modules for specific java modules
|
||||
(e.g. 'java.base java.desktop')
|
||||
Default: all existing modules (java.* and jdk.*)"
|
||||
echo "usage: $0 [-h|--help] [-v|--verbose] [-o|--output <path>] [-c|--conf <conf_name>] [modules]+"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -52,13 +33,10 @@ SCRIPT_DIR=`dirname $0`
|
||||
#assume TOP is the dir from which the script has been called
|
||||
TOP=`pwd`
|
||||
cd $SCRIPT_DIR; SCRIPT_DIR=`pwd`
|
||||
if [ "x$TOPLEVEL_DIR" = "x" ] ; then
|
||||
cd .. ; TOPLEVEL_DIR=`pwd`
|
||||
fi
|
||||
cd $TOP;
|
||||
|
||||
VERBOSE=true
|
||||
ABSOLUTE_PATHS=false
|
||||
IDEA_OUTPUT=$TOP/.idea
|
||||
VERBOSE="false"
|
||||
CONF_ARG=
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
@@ -67,24 +45,14 @@ do
|
||||
usage
|
||||
;;
|
||||
|
||||
-q | --quiet )
|
||||
VERBOSE=false
|
||||
;;
|
||||
|
||||
-a | --absolute-paths )
|
||||
ABSOLUTE_PATHS=true
|
||||
;;
|
||||
|
||||
-r | --root )
|
||||
TOPLEVEL_DIR="$2"
|
||||
shift
|
||||
-v | --vebose )
|
||||
VERBOSE="true"
|
||||
;;
|
||||
|
||||
-o | --output )
|
||||
IDEA_OUTPUT="$2/.idea"
|
||||
IDEA_OUTPUT=$2/.idea
|
||||
shift
|
||||
;;
|
||||
|
||||
-c | --conf )
|
||||
CONF_ARG="CONF_NAME=$2"
|
||||
shift
|
||||
@@ -101,17 +69,20 @@ do
|
||||
shift
|
||||
done
|
||||
|
||||
if [ "x$IDEA_OUTPUT" = "x" ] ; then
|
||||
IDEA_OUTPUT="$TOPLEVEL_DIR/.idea"
|
||||
if [ -e $IDEA_OUTPUT ] ; then
|
||||
rm -r $IDEA_OUTPUT
|
||||
fi
|
||||
mkdir -p $IDEA_OUTPUT || exit 1
|
||||
cd $IDEA_OUTPUT; IDEA_OUTPUT=`pwd`
|
||||
|
||||
if [ "x$TOPLEVEL_DIR" = "x" ] ; then
|
||||
cd $SCRIPT_DIR/..
|
||||
TOPLEVEL_DIR=`pwd`
|
||||
cd $IDEA_OUTPUT
|
||||
fi
|
||||
|
||||
mkdir -p $IDEA_OUTPUT || exit 1
|
||||
cd "$TOP" ; cd $TOPLEVEL_DIR; TOPLEVEL_DIR=`pwd`
|
||||
cd "$TOP" ; cd $IDEA_OUTPUT; IDEA_OUTPUT=`pwd`
|
||||
cd ..; IDEA_OUTPUT_PARENT=`pwd`
|
||||
cd "$SCRIPT_DIR/.." ; OPENJDK_DIR=`pwd`
|
||||
|
||||
IDEA_MAKE="$OPENJDK_DIR/make/ide/idea/jdk"
|
||||
MAKE_DIR="$SCRIPT_DIR/../make"
|
||||
IDEA_MAKE="$MAKE_DIR/ide/idea/jdk"
|
||||
IDEA_TEMPLATE="$IDEA_MAKE/template"
|
||||
|
||||
cp -r "$IDEA_TEMPLATE"/* "$IDEA_OUTPUT"
|
||||
@@ -123,31 +94,31 @@ if [ -d "$TEMPLATES_OVERRIDE" ] ; then
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$VERBOSE" = true ] ; then
|
||||
echo "Will generate IDEA project files in \"$IDEA_OUTPUT\" for project \"$TOPLEVEL_DIR\""
|
||||
if [ "$VERBOSE" = "true" ] ; then
|
||||
echo "output dir: $IDEA_OUTPUT"
|
||||
echo "idea template dir: $IDEA_TEMPLATE"
|
||||
fi
|
||||
|
||||
cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I "$OPENJDK_DIR" idea TOPLEVEL_DIR="$TOPLEVEL_DIR" \
|
||||
MAKEOVERRIDES= IDEA_OUTPUT_PARENT="$IDEA_OUTPUT_PARENT" OUT="$IDEA_OUTPUT/env.cfg" MODULES="$*" $CONF_ARG || exit 1
|
||||
cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I $MAKE_DIR/.. idea MAKEOVERRIDES= OUT=$IDEA_OUTPUT/env.cfg MODULES="$*" $CONF_ARG || exit 1
|
||||
cd $SCRIPT_DIR
|
||||
|
||||
. $IDEA_OUTPUT/env.cfg
|
||||
|
||||
# Expect MODULES, MODULE_NAMES, RELATIVE_PROJECT_DIR, RELATIVE_BUILD_DIR to be set
|
||||
if [ "xMODULES" = "x" ] ; then
|
||||
echo "FATAL: MODULES is empty" >&2; exit 1
|
||||
# Expect MODULE_ROOTS, MODULE_NAMES, BOOT_JDK & SPEC to be set
|
||||
if [ "x$MODULE_ROOTS" = "x" ] ; then
|
||||
echo "FATAL: MODULE_ROOTS is empty" >&2; exit 1
|
||||
fi
|
||||
|
||||
if [ "x$MODULE_NAMES" = "x" ] ; then
|
||||
echo "FATAL: MODULE_NAMES is empty" >&2; exit 1
|
||||
fi
|
||||
|
||||
if [ "x$RELATIVE_PROJECT_DIR" = "x" ] ; then
|
||||
echo "FATAL: RELATIVE_PROJECT_DIR is empty" >&2; exit 1
|
||||
if [ "x$BOOT_JDK" = "x" ] ; then
|
||||
echo "FATAL: BOOT_JDK is empty" >&2; exit 1
|
||||
fi
|
||||
|
||||
if [ "x$RELATIVE_BUILD_DIR" = "x" ] ; then
|
||||
echo "FATAL: RELATIVE_BUILD_DIR is empty" >&2; exit 1
|
||||
if [ "x$SPEC" = "x" ] ; then
|
||||
echo "FATAL: SPEC is empty" >&2; exit 1
|
||||
fi
|
||||
|
||||
if [ -d "$TOPLEVEL_DIR/.hg" ] ; then
|
||||
@@ -158,43 +129,6 @@ if [ -d "$TOPLEVEL_DIR/.git" ] ; then
|
||||
VCS_TYPE="Git"
|
||||
fi
|
||||
|
||||
if [ "$ABSOLUTE_PATHS" = true ] ; then
|
||||
if [ "x$PATHTOOL" != "x" ]; then
|
||||
PROJECT_DIR="`$PATHTOOL -am $OPENJDK_DIR`"
|
||||
TOPLEVEL_PROJECT_DIR="`$PATHTOOL -am $TOPLEVEL_DIR`"
|
||||
else
|
||||
PROJECT_DIR="$OPENJDK_DIR"
|
||||
TOPLEVEL_PROJECT_DIR="$TOPLEVEL_DIR"
|
||||
fi
|
||||
MODULE_DIR="$PROJECT_DIR"
|
||||
TOPLEVEL_MODULE_DIR="$TOPLEVEL_PROJECT_DIR"
|
||||
cd "$IDEA_OUTPUT_PARENT" && cd "$RELATIVE_BUILD_DIR" && BUILD_DIR="`pwd`"
|
||||
CLION_SCRIPT_TOPDIR="$OPENJDK_DIR"
|
||||
CLION_PROJECT_DIR="$PROJECT_DIR"
|
||||
else
|
||||
if [ "$RELATIVE_PROJECT_DIR" = "." ] ; then
|
||||
PROJECT_DIR=""
|
||||
else
|
||||
PROJECT_DIR="/$RELATIVE_PROJECT_DIR"
|
||||
fi
|
||||
if [ "$RELATIVE_TOPLEVEL_PROJECT_DIR" = "." ] ; then
|
||||
TOPLEVEL_PROJECT_DIR=""
|
||||
else
|
||||
TOPLEVEL_PROJECT_DIR="/$RELATIVE_TOPLEVEL_PROJECT_DIR"
|
||||
fi
|
||||
MODULE_DIR="\$MODULE_DIR\$$PROJECT_DIR"
|
||||
PROJECT_DIR="\$PROJECT_DIR\$$PROJECT_DIR"
|
||||
TOPLEVEL_MODULE_DIR="\$MODULE_DIR\$$TOPLEVEL_PROJECT_DIR"
|
||||
TOPLEVEL_PROJECT_DIR="\$PROJECT_DIR\$$TOPLEVEL_PROJECT_DIR"
|
||||
BUILD_DIR="\$PROJECT_DIR\$/$RELATIVE_BUILD_DIR"
|
||||
CLION_SCRIPT_TOPDIR="$CLION_RELATIVE_PROJECT_DIR"
|
||||
CLION_PROJECT_DIR="\$PROJECT_DIR\$/$CLION_SCRIPT_TOPDIR"
|
||||
fi
|
||||
if [ "$VERBOSE" = true ] ; then
|
||||
echo "Project root: $PROJECT_DIR"
|
||||
echo "Generating IDEA project files..."
|
||||
fi
|
||||
|
||||
### Replace template variables
|
||||
|
||||
NUM_REPLACEMENTS=0
|
||||
@@ -218,106 +152,126 @@ add_replacement() {
|
||||
eval TO$NUM_REPLACEMENTS='$2'
|
||||
}
|
||||
|
||||
add_replacement "###PATHTOOL###" "$PATHTOOL"
|
||||
add_replacement "###CLION_SCRIPT_TOPDIR###" "$CLION_SCRIPT_TOPDIR"
|
||||
add_replacement "###CLION_PROJECT_DIR###" "$CLION_PROJECT_DIR"
|
||||
add_replacement "###PROJECT_DIR###" "$PROJECT_DIR"
|
||||
add_replacement "###MODULE_DIR###" "$MODULE_DIR"
|
||||
add_replacement "###TOPLEVEL_PROJECT_DIR###" "$TOPLEVEL_PROJECT_DIR"
|
||||
add_replacement "###TOPLEVEL_MODULE_DIR###" "$TOPLEVEL_MODULE_DIR"
|
||||
add_replacement "###MODULE_NAMES###" "$MODULE_NAMES"
|
||||
add_replacement "###VCS_TYPE###" "$VCS_TYPE"
|
||||
add_replacement "###BUILD_DIR###" "$BUILD_DIR"
|
||||
add_replacement "###RELATIVE_BUILD_DIR###" "$RELATIVE_BUILD_DIR"
|
||||
if [ "x$PATHTOOL" != "x" ]; then
|
||||
add_replacement "###BASH_RUNNER_PREFIX###" "\$PROJECT_DIR\$/.idea/bash.bat"
|
||||
else
|
||||
add_replacement "###BASH_RUNNER_PREFIX###" ""
|
||||
fi
|
||||
if [ "x$PATHTOOL" != "x" ]; then
|
||||
SPEC_DIR=`dirname $SPEC`
|
||||
if [ "x$CYGPATH" != "x" ]; then
|
||||
add_replacement "###BUILD_DIR###" "`$CYGPATH -am $SPEC_DIR`"
|
||||
add_replacement "###IMAGES_DIR###" "`$CYGPATH -am $SPEC_DIR`/images/jdk"
|
||||
add_replacement "###ROOT_DIR###" "`$CYGPATH -am $TOPLEVEL_DIR`"
|
||||
add_replacement "###IDEA_DIR###" "`$CYGPATH -am $IDEA_OUTPUT`"
|
||||
if [ "x$JT_HOME" = "x" ]; then
|
||||
add_replacement "###JTREG_HOME###" ""
|
||||
else
|
||||
add_replacement "###JTREG_HOME###" "`$PATHTOOL -am $JT_HOME`"
|
||||
add_replacement "###JTREG_HOME###" "`$CYGPATH -am $JT_HOME`"
|
||||
fi
|
||||
elif [ "x$WSL_DISTRO_NAME" != "x" ]; then
|
||||
add_replacement "###BUILD_DIR###" "`wslpath -am $SPEC_DIR`"
|
||||
add_replacement "###IMAGES_DIR###" "`wslpath -am $SPEC_DIR`/images/jdk"
|
||||
add_replacement "###ROOT_DIR###" "`wslpath -am $TOPLEVEL_DIR`"
|
||||
add_replacement "###IDEA_DIR###" "`wslpath -am $IDEA_OUTPUT`"
|
||||
if [ "x$JT_HOME" = "x" ]; then
|
||||
add_replacement "###JTREG_HOME###" ""
|
||||
else
|
||||
add_replacement "###JTREG_HOME###" "`wslpath -am $JT_HOME`"
|
||||
fi
|
||||
else
|
||||
add_replacement "###BUILD_DIR###" "$SPEC_DIR"
|
||||
add_replacement "###JTREG_HOME###" "$JT_HOME"
|
||||
add_replacement "###IMAGES_DIR###" "$SPEC_DIR/images/jdk"
|
||||
add_replacement "###ROOT_DIR###" "$TOPLEVEL_DIR"
|
||||
add_replacement "###IDEA_DIR###" "$IDEA_OUTPUT"
|
||||
fi
|
||||
|
||||
MODULE_IMLS=""
|
||||
TEST_MODULE_DEPENDENCIES=""
|
||||
for module in $MODULE_NAMES; do
|
||||
MODULE_IMLS="$MODULE_IMLS<module fileurl=\"file://\$PROJECT_DIR$/.idea/$module.iml\" filepath=\"\$PROJECT_DIR$/.idea/$module.iml\" /> "
|
||||
TEST_MODULE_DEPENDENCIES="$TEST_MODULE_DEPENDENCIES<orderEntry type=\"module\" module-name=\"$module\" scope=\"TEST\" /> "
|
||||
SOURCE_PREFIX="<sourceFolder url=\"file://"
|
||||
SOURCE_POSTFIX="\" isTestSource=\"false\" />"
|
||||
|
||||
for root in $MODULE_ROOTS; do
|
||||
if [ "x$CYGPATH" != "x" ]; then
|
||||
root=`$CYGPATH -am $root`
|
||||
elif [ "x$WSL_DISTRO_NAME" != "x" ]; then
|
||||
root=`wslpath -am $root`
|
||||
fi
|
||||
|
||||
VM_CI="jdk.internal.vm.ci/share/classes"
|
||||
VM_COMPILER="src/jdk.internal.vm.compiler/share/classes"
|
||||
if test "${root#*$VM_CI}" != "$root" || test "${root#*$VM_COMPILER}" != "$root"; then
|
||||
for subdir in "$root"/*; do
|
||||
if [ -d "$subdir" ]; then
|
||||
SOURCES=$SOURCES" $SOURCE_PREFIX""$subdir"/src"$SOURCE_POSTFIX"
|
||||
fi
|
||||
done
|
||||
else
|
||||
SOURCES=$SOURCES" $SOURCE_PREFIX""$root""$SOURCE_POSTFIX"
|
||||
fi
|
||||
done
|
||||
add_replacement "###MODULE_IMLS###" "$MODULE_IMLS"
|
||||
add_replacement "###TEST_MODULE_DEPENDENCIES###" "$TEST_MODULE_DEPENDENCIES"
|
||||
|
||||
add_replacement "###SOURCE_ROOTS###" "$SOURCES"
|
||||
|
||||
replace_template_dir "$IDEA_OUTPUT"
|
||||
|
||||
### Generate module project files
|
||||
### Compile the custom Logger
|
||||
|
||||
if [ "$VERBOSE" = true ] ; then
|
||||
echo "Generating project modules:"
|
||||
fi
|
||||
(
|
||||
DEFAULT_IFS="$IFS"
|
||||
IFS='#'
|
||||
for value in $MODULES; do
|
||||
(
|
||||
eval "$value"
|
||||
if [ "$VERBOSE" = true ] ; then
|
||||
echo " $module"
|
||||
fi
|
||||
MAIN_SOURCE_DIRS=""
|
||||
CONTENT_ROOTS=""
|
||||
IFS=' '
|
||||
for dir in $moduleSrcDirs; do
|
||||
case $dir in
|
||||
"src/"*) MAIN_SOURCE_DIRS="$MAIN_SOURCE_DIRS <sourceFolder url=\"file://$MODULE_DIR/$dir\" isTestSource=\"false\" />" ;;
|
||||
*"/support/gensrc/$module") ;; # Exclude generated sources to avoid module-info conflicts, see https://youtrack.jetbrains.com/issue/IDEA-185108
|
||||
*) CONTENT_ROOTS="$CONTENT_ROOTS <content url=\"file://$MODULE_DIR/$dir\">\
|
||||
<sourceFolder url=\"file://$MODULE_DIR/$dir\" isTestSource=\"false\" generated=\"true\" /></content>" ;;
|
||||
esac
|
||||
done
|
||||
if [ "x$MAIN_SOURCE_DIRS" != "x" ] ; then
|
||||
CONTENT_ROOTS="<content url=\"file://$MODULE_DIR/src/$module\">$MAIN_SOURCE_DIRS</content>$CONTENT_ROOTS"
|
||||
fi
|
||||
add_replacement "###MODULE_CONTENT_ROOTS###" "$CONTENT_ROOTS"
|
||||
DEPENDENCIES=""
|
||||
for dep in $moduleDependencies; do
|
||||
case $MODULE_NAMES in # Exclude skipped modules from dependencies
|
||||
*"$dep"*) DEPENDENCIES="$DEPENDENCIES<orderEntry type=\"module\" module-name=\"$dep\" /> "
|
||||
esac
|
||||
done
|
||||
add_replacement "###DEPENDENCIES###" "$DEPENDENCIES"
|
||||
cp "$IDEA_OUTPUT/module.iml" "$IDEA_OUTPUT/$module.iml"
|
||||
IFS="$DEFAULT_IFS"
|
||||
replace_template_file "$IDEA_OUTPUT/$module.iml"
|
||||
)
|
||||
done
|
||||
)
|
||||
rm "$IDEA_OUTPUT/module.iml"
|
||||
CLASSES=$IDEA_OUTPUT/classes
|
||||
|
||||
### Create shell script runner for Windows
|
||||
|
||||
if [ "x$PATHTOOL" != "x" ]; then
|
||||
echo "@echo off" > "$IDEA_OUTPUT/bash.bat"
|
||||
if [ "x$WSL_DISTRO_NAME" != "x" ] ; then
|
||||
echo "wsl -d $WSL_DISTRO_NAME --cd \"%cd%\" -e %*" >> "$IDEA_OUTPUT/bash.bat"
|
||||
if [ "x$ANT_HOME" = "x" ] ; then
|
||||
# try some common locations
|
||||
if [ -f "/usr/share/ant/lib/ant.jar" ] ; then
|
||||
ANT_HOME="/usr/share/ant"
|
||||
else
|
||||
echo "$WINENV_ROOT\bin\bash.exe -l -c \"cd %CD:\=/%/ && %*\"" >> "$IDEA_OUTPUT/bash.bat"
|
||||
try_ant=$(ls /opt/homebrew/Cellar/ant/*/libexec/lib/ant.jar 2> /dev/null | sort -r | head -n 1)
|
||||
if [ "x$try_ant" != "x" ] ; then
|
||||
ANT_HOME=$(cd $(dirname $try_ant)/.. && pwd)
|
||||
else
|
||||
try_ant=$(ls /usr/local/Cellar/ant/*/libexec/lib/ant.jar 2> /dev/null | sort -r | head -n 1)
|
||||
if [ "x$try_ant" != "x" ] ; then
|
||||
ANT_HOME=$(cd $(dirname $try_ant)/.. && pwd)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [ ! -f "$ANT_HOME/lib/ant.jar" ] ; then
|
||||
echo "FATAL: ANT_HOME is incorrect. Try removing it and use autodetection, or fix the value" >&2; exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "x$ANT_HOME" = "x" ] ; then
|
||||
echo "FATAL: cannot find ant. Try setting ANT_HOME." >&2; exit 1
|
||||
fi
|
||||
CP=$ANT_HOME/lib/ant.jar
|
||||
rm -rf $CLASSES; mkdir $CLASSES
|
||||
|
||||
# If we have a Windows boot JDK, we need a .exe suffix
|
||||
if [ -e "$BOOT_JDK/bin/java.exe" ] ; then
|
||||
JAVAC=javac.exe
|
||||
else
|
||||
JAVAC=javac
|
||||
fi
|
||||
|
||||
if [ "$VERBOSE" = true ] ; then
|
||||
IDEA_PROJECT_DIR="`dirname $IDEA_OUTPUT`"
|
||||
if [ "x$PATHTOOL" != "x" ]; then
|
||||
IDEA_PROJECT_DIR="`$PATHTOOL -am $IDEA_PROJECT_DIR`"
|
||||
fi
|
||||
echo "
|
||||
Now you can open \"$IDEA_PROJECT_DIR\" as IDEA project
|
||||
You can also run 'bash \"$IDEA_OUTPUT/jdk-clion/update-project.sh\"' to generate Clion project"
|
||||
# If we are on WSL, the boot JDK might be either Windows or Linux,
|
||||
# and we need to use realpath instead of CYGPATH to make javac work on both.
|
||||
# We need to handle this case first since CYGPATH might be set on WSL.
|
||||
if [ "x$WSL_DISTRO_NAME" != "x" ]; then
|
||||
JAVAC_SOURCE_FILE=`realpath --relative-to=./ $IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java`
|
||||
JAVAC_SOURCE_PATH=`realpath --relative-to=./ $IDEA_OUTPUT/src`
|
||||
JAVAC_CLASSES=`realpath --relative-to=./ $CLASSES`
|
||||
ANT_TEMP=`mktemp -d -p ./`
|
||||
cp $ANT_HOME/lib/ant.jar $ANT_TEMP/ant.jar
|
||||
JAVAC_CP=$ANT_TEMP/ant.jar
|
||||
elif [ "x$CYGPATH" != "x" ] ; then ## CYGPATH may be set in env.cfg
|
||||
JAVAC_SOURCE_FILE=`$CYGPATH -am $IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java`
|
||||
JAVAC_SOURCE_PATH=`$CYGPATH -am $IDEA_OUTPUT/src`
|
||||
JAVAC_CLASSES=`$CYGPATH -am $CLASSES`
|
||||
JAVAC_CP=`$CYGPATH -am $CP`
|
||||
else
|
||||
JAVAC_SOURCE_FILE=$IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java
|
||||
JAVAC_SOURCE_PATH=$IDEA_OUTPUT/src
|
||||
JAVAC_CLASSES=$CLASSES
|
||||
JAVAC_CP=$CP
|
||||
fi
|
||||
|
||||
$BOOT_JDK/bin/$JAVAC -d $JAVAC_CLASSES -sourcepath $JAVAC_SOURCE_PATH -cp $JAVAC_CP $JAVAC_SOURCE_FILE
|
||||
|
||||
if [ "x$WSL_DISTRO_NAME" != "x" ]; then
|
||||
rm -rf $ANT_TEMP
|
||||
fi
|
||||
@@ -130,7 +130,7 @@ install_jib() {
|
||||
fi
|
||||
# Want to check the filetype using file, to see if we got served a HTML error page.
|
||||
# This is sensitive to the filename containing a specific string, but good enough.
|
||||
file "${installed_jib_script}.gz" | grep "gzip compressed data" > /dev/null
|
||||
file ${installed_jib_script}.gz | grep "gzip compressed data" > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Warning: ${installed_jib_script}.gz is not a gzip file."
|
||||
echo "If you are behind a proxy you may need to configure exceptions using no_proxy."
|
||||
|
||||
@@ -80,7 +80,6 @@ id="toc-getting-jdk-binaries">Getting JDK binaries</a></li>
|
||||
id="toc-external-library-requirements">External Library Requirements</a>
|
||||
<ul>
|
||||
<li><a href="#freetype" id="toc-freetype">FreeType</a></li>
|
||||
<li><a href="#fontconfig" id="toc-fontconfig">Fontconfig</a></li>
|
||||
<li><a href="#cups" id="toc-cups">CUPS</a></li>
|
||||
<li><a href="#x11" id="toc-x11">X11</a></li>
|
||||
<li><a href="#alsa" id="toc-alsa">ALSA</a></li>
|
||||
@@ -135,8 +134,6 @@ id="toc-cross-compiling-with-debian-sysroots">Cross compiling with
|
||||
Debian sysroots</a></li>
|
||||
<li><a href="#building-for-armaarch64"
|
||||
id="toc-building-for-armaarch64">Building for ARM/aarch64</a></li>
|
||||
<li><a href="#building-for-risc-v" id="toc-building-for-risc-v">Building
|
||||
for RISC-V</a></li>
|
||||
<li><a href="#building-for-musl" id="toc-building-for-musl">Building for
|
||||
musl</a></li>
|
||||
<li><a href="#verifying-the-build"
|
||||
@@ -324,7 +321,6 @@ GB of free disk space is required.</p>
|
||||
<p>Even for 32-bit builds, it is recommended to use a 64-bit build
|
||||
machine, and instead create a 32-bit target using
|
||||
<code>--with-target-bits=32</code>.</p>
|
||||
<p>Note: The Windows 32-bit x86 port is deprecated and may be removed in a future release.</p>
|
||||
<h3 id="building-on-aarch64">Building on aarch64</h3>
|
||||
<p>At a minimum, a machine with 8 cores is advisable, as well as 8 GB of
|
||||
RAM. (The more cores to use, the more memory you need.) At least 6 GB of
|
||||
@@ -355,22 +351,22 @@ to date at the time of writing.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th>Operating system</th>
|
||||
<th>Vendor/version used</th>
|
||||
<th style="text-align: left;">Operating system</th>
|
||||
<th style="text-align: left;">Vendor/version used</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td>Linux</td>
|
||||
<td>Oracle Enterprise Linux 6.4 / 7.6</td>
|
||||
<td style="text-align: left;">Linux</td>
|
||||
<td style="text-align: left;">Oracle Enterprise Linux 6.4 / 7.6</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>macOS</td>
|
||||
<td>Mac OS X 10.13 (High Sierra)</td>
|
||||
<td style="text-align: left;">macOS</td>
|
||||
<td style="text-align: left;">Mac OS X 10.13 (High Sierra)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>Windows</td>
|
||||
<td>Windows Server 2012 R2</td>
|
||||
<td style="text-align: left;">Windows</td>
|
||||
<td style="text-align: left;">Windows Server 2012 R2</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -401,7 +397,6 @@ to the build system, e.g. in arguments to <code>configure</code>. So,
|
||||
use <code>--with-msvcr-dll=/cygdrive/c/msvcr100.dll</code> rather than
|
||||
<code>--with-msvcr-dll=c:\msvcr100.dll</code>. For details on this
|
||||
conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
|
||||
<p>Note: The Windows 32-bit x86 port is deprecated and may be removed in a future release.</p>
|
||||
<h4 id="cygwin">Cygwin</h4>
|
||||
<p>A functioning <a href="http://www.cygwin.com/">Cygwin</a> environment
|
||||
is required for building the JDK on Windows. If you have a 64-bit OS, we
|
||||
@@ -680,19 +675,6 @@ copy.</p>
|
||||
<p>Use <code>--with-freetype-include=<path></code> and
|
||||
<code>--with-freetype-lib=<path></code> if <code>configure</code>
|
||||
does not automatically locate the platform FreeType files.</p>
|
||||
<h3 id="fontconfig">Fontconfig</h3>
|
||||
<p>Fontconfig from <a href="http://fontconfig.org">freedesktop.org
|
||||
Fontconfig</a> is required on all platforms except Windows and
|
||||
macOS.</p>
|
||||
<ul>
|
||||
<li>To install on an apt-based Linux, try running
|
||||
<code>sudo apt-get install libfontconfig-dev</code>.</li>
|
||||
<li>To install on an rpm-based Linux, try running
|
||||
<code>sudo yum install fontconfig-devel</code>.</li>
|
||||
</ul>
|
||||
<p>Use <code>--with-fontconfig-include=<path></code> and
|
||||
<code>--with-fontconfig=<path></code> if <code>configure</code>
|
||||
does not automatically locate the platform Fontconfig files.</p>
|
||||
<h3 id="cups">CUPS</h3>
|
||||
<p>CUPS, <a href="http://www.cups.org">Common UNIX Printing System</a>
|
||||
header files are required on all platforms, except Windows. Often these
|
||||
@@ -1105,21 +1087,21 @@ home, i.e. the top directory, containing <code>lib/jtreg.jar</code>
|
||||
etc.</p>
|
||||
<p>The <a href="https://wiki.openjdk.org/display/Adoption">Adoption
|
||||
Group</a> provides recent builds of jtreg <a
|
||||
href="https://ci.adoptium.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/">here</a>.
|
||||
href="https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/">here</a>.
|
||||
Download the latest <code>.tar.gz</code> file, unpack it, and point
|
||||
<code>--with-jtreg</code> to the <code>jtreg</code> directory that you
|
||||
just unpacked.</p>
|
||||
<p>Building of Hotspot Gtest suite requires the source code of Google
|
||||
Test framework. The top directory, which contains both
|
||||
<code>googletest</code> and <code>googlemock</code> directories, should
|
||||
be specified via <code>--with-gtest</code>. The minimum supported
|
||||
version of Google Test is 1.13.0, whose source code can be obtained:</p>
|
||||
be specified via <code>--with-gtest</code>. The supported version of
|
||||
Google Test is 1.8.1, whose source code can be obtained:</p>
|
||||
<ul>
|
||||
<li>by downloading and unpacking the source bundle from <a
|
||||
href="https://github.com/google/googletest/releases/tag/v1.13.0">here</a></li>
|
||||
<li>or by checking out <code>v1.13.0</code> tag of
|
||||
href="https://github.com/google/googletest/releases/tag/release-1.8.1">here</a></li>
|
||||
<li>or by checking out <code>release-1.8.1</code> tag of
|
||||
<code>googletest</code> project:
|
||||
<code>git clone -b v1.13.0 https://github.com/google/googletest</code></li>
|
||||
<code>git clone -b release-1.8.1 https://github.com/google/googletest</code></li>
|
||||
</ul>
|
||||
<p>To execute the most basic tests (tier 1), use:</p>
|
||||
<pre><code>make run-test-tier1</code></pre>
|
||||
@@ -1211,27 +1193,27 @@ following targets are known to work:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th>Supported devkit targets</th>
|
||||
<th style="text-align: left;">Supported devkit targets</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td>x86_64-linux-gnu</td>
|
||||
<td style="text-align: left;">x86_64-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>aarch64-linux-gnu</td>
|
||||
<td style="text-align: left;">aarch64-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>arm-linux-gnueabihf</td>
|
||||
<td style="text-align: left;">arm-linux-gnueabihf</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>ppc64-linux-gnu</td>
|
||||
<td style="text-align: left;">ppc64-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>ppc64le-linux-gnu</td>
|
||||
<td style="text-align: left;">ppc64le-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>s390x-linux-gnu</td>
|
||||
<td style="text-align: left;">s390x-linux-gnu</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1394,10 +1376,10 @@ No such file or directory cp: cannot stat
|
||||
Debian sysroots</h3>
|
||||
<p>Fortunately, you can create sysroots for foreign architectures with
|
||||
tools provided by your OS. On Debian/Ubuntu systems, one could use
|
||||
<code>debootstrap</code> to create the <em>target</em> system chroot,
|
||||
which would have the native libraries and headers specific to that
|
||||
<em>target</em> system. After that, we can use the cross-compiler on the
|
||||
<em>build</em> system, pointing into chroot to get the build
|
||||
<code>qemu-deboostrap</code> to create the <em>target</em> system
|
||||
chroot, which would have the native libraries and headers specific to
|
||||
that <em>target</em> system. After that, we can use the cross-compiler
|
||||
on the <em>build</em> system, pointing into chroot to get the build
|
||||
dependencies right. This allows building for foreign architectures with
|
||||
native compilation speed.</p>
|
||||
<p>For example, cross-compiling to AArch64 from x86_64 could be done
|
||||
@@ -1407,7 +1389,7 @@ like this:</p>
|
||||
<code>apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu</code></p></li>
|
||||
<li><p>Create chroot on the <em>build</em> system, configuring it for
|
||||
<em>target</em> system:
|
||||
<code>sudo debootstrap \ --arch=arm64 \ --verbose \ --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,libffi-dev \ --resolve-deps \ buster \ ~/sysroot-arm64 \ http://httpredir.debian.org/debian/ # If the target architecture is `riscv64`, # the path should be `debian-ports` instead of `debian`.</code></p></li>
|
||||
<code>sudo qemu-debootstrap \ --arch=arm64 \ --verbose \ --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,libffi-dev \ --resolve-deps \ buster \ ~/sysroot-arm64 \ http://httpredir.debian.org/debian/</code></p></li>
|
||||
<li><p>Make sure the symlinks inside the newly created chroot point to
|
||||
proper locations:
|
||||
<code>sudo chroot ~/sysroot-arm64 symlinks -cr .</code></p></li>
|
||||
@@ -1433,121 +1415,107 @@ example <code>${sysroot}/usr/lib/${target}/</code></p></li>
|
||||
<p>Architectures that are known to successfully cross-compile like this
|
||||
are:</p>
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width: 13%" />
|
||||
<col style="width: 13%" />
|
||||
<col style="width: 15%" />
|
||||
<col style="width: 27%" />
|
||||
<col style="width: 29%" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th>Target</th>
|
||||
<th>Debian tree</th>
|
||||
<th>Debian arch</th>
|
||||
<th><code>--openjdk-target=...</code></th>
|
||||
<th style="text-align: left;">Target</th>
|
||||
<th style="text-align: left;">Debian tree</th>
|
||||
<th style="text-align: left;">Debian arch</th>
|
||||
<th style="text-align: left;"><code>--openjdk-target=...</code></th>
|
||||
<th><code>--with-jvm-variants=...</code></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td>x86</td>
|
||||
<td>buster</td>
|
||||
<td>i386</td>
|
||||
<td>i386-linux-gnu</td>
|
||||
<td style="text-align: left;">x86</td>
|
||||
<td style="text-align: left;">buster</td>
|
||||
<td style="text-align: left;">i386</td>
|
||||
<td style="text-align: left;">i386-linux-gnu</td>
|
||||
<td>(all)</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>arm</td>
|
||||
<td>buster</td>
|
||||
<td>armhf</td>
|
||||
<td>arm-linux-gnueabihf</td>
|
||||
<td style="text-align: left;">arm</td>
|
||||
<td style="text-align: left;">buster</td>
|
||||
<td style="text-align: left;">armhf</td>
|
||||
<td style="text-align: left;">arm-linux-gnueabihf</td>
|
||||
<td>(all)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>aarch64</td>
|
||||
<td>buster</td>
|
||||
<td>arm64</td>
|
||||
<td>aarch64-linux-gnu</td>
|
||||
<td style="text-align: left;">aarch64</td>
|
||||
<td style="text-align: left;">buster</td>
|
||||
<td style="text-align: left;">arm64</td>
|
||||
<td style="text-align: left;">aarch64-linux-gnu</td>
|
||||
<td>(all)</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>ppc64le</td>
|
||||
<td>buster</td>
|
||||
<td>ppc64el</td>
|
||||
<td>powerpc64le-linux-gnu</td>
|
||||
<td style="text-align: left;">ppc64le</td>
|
||||
<td style="text-align: left;">buster</td>
|
||||
<td style="text-align: left;">ppc64el</td>
|
||||
<td style="text-align: left;">powerpc64le-linux-gnu</td>
|
||||
<td>(all)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>s390x</td>
|
||||
<td>buster</td>
|
||||
<td>s390x</td>
|
||||
<td>s390x-linux-gnu</td>
|
||||
<td style="text-align: left;">s390x</td>
|
||||
<td style="text-align: left;">buster</td>
|
||||
<td style="text-align: left;">s390x</td>
|
||||
<td style="text-align: left;">s390x-linux-gnu</td>
|
||||
<td>(all)</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>mipsle</td>
|
||||
<td>buster</td>
|
||||
<td>mipsel</td>
|
||||
<td>mipsel-linux-gnu</td>
|
||||
<td style="text-align: left;">mipsle</td>
|
||||
<td style="text-align: left;">buster</td>
|
||||
<td style="text-align: left;">mipsel</td>
|
||||
<td style="text-align: left;">mipsel-linux-gnu</td>
|
||||
<td>zero</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>mips64le</td>
|
||||
<td>buster</td>
|
||||
<td>mips64el</td>
|
||||
<td>mips64el-linux-gnueabi64</td>
|
||||
<td style="text-align: left;">mips64le</td>
|
||||
<td style="text-align: left;">buster</td>
|
||||
<td style="text-align: left;">mips64el</td>
|
||||
<td style="text-align: left;">mips64el-linux-gnueabi64</td>
|
||||
<td>zero</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>armel</td>
|
||||
<td>buster</td>
|
||||
<td>arm</td>
|
||||
<td>arm-linux-gnueabi</td>
|
||||
<td style="text-align: left;">armel</td>
|
||||
<td style="text-align: left;">buster</td>
|
||||
<td style="text-align: left;">arm</td>
|
||||
<td style="text-align: left;">arm-linux-gnueabi</td>
|
||||
<td>zero</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>ppc</td>
|
||||
<td>sid</td>
|
||||
<td>powerpc</td>
|
||||
<td>powerpc-linux-gnu</td>
|
||||
<td style="text-align: left;">ppc</td>
|
||||
<td style="text-align: left;">sid</td>
|
||||
<td style="text-align: left;">powerpc</td>
|
||||
<td style="text-align: left;">powerpc-linux-gnu</td>
|
||||
<td>zero</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>ppc64be</td>
|
||||
<td>sid</td>
|
||||
<td>ppc64</td>
|
||||
<td>powerpc64-linux-gnu</td>
|
||||
<td style="text-align: left;">ppc64be</td>
|
||||
<td style="text-align: left;">sid</td>
|
||||
<td style="text-align: left;">ppc64</td>
|
||||
<td style="text-align: left;">powerpc64-linux-gnu</td>
|
||||
<td>(all)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>m68k</td>
|
||||
<td>sid</td>
|
||||
<td>m68k</td>
|
||||
<td>m68k-linux-gnu</td>
|
||||
<td style="text-align: left;">m68k</td>
|
||||
<td style="text-align: left;">sid</td>
|
||||
<td style="text-align: left;">m68k</td>
|
||||
<td style="text-align: left;">m68k-linux-gnu</td>
|
||||
<td>zero</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>alpha</td>
|
||||
<td>sid</td>
|
||||
<td>alpha</td>
|
||||
<td>alpha-linux-gnu</td>
|
||||
<td style="text-align: left;">alpha</td>
|
||||
<td style="text-align: left;">sid</td>
|
||||
<td style="text-align: left;">alpha</td>
|
||||
<td style="text-align: left;">alpha-linux-gnu</td>
|
||||
<td>zero</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>sh4</td>
|
||||
<td>sid</td>
|
||||
<td>sh4</td>
|
||||
<td>sh4-linux-gnu</td>
|
||||
<td style="text-align: left;">sh4</td>
|
||||
<td style="text-align: left;">sid</td>
|
||||
<td style="text-align: left;">sh4</td>
|
||||
<td style="text-align: left;">sh4-linux-gnu</td>
|
||||
<td>zero</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>riscv64</td>
|
||||
<td>sid</td>
|
||||
<td>riscv64</td>
|
||||
<td>riscv64-linux-gnu</td>
|
||||
<td>(all)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 id="building-for-armaarch64">Building for ARM/aarch64</h3>
|
||||
@@ -1557,21 +1525,6 @@ profiles are available using <code>--with-abi-profile</code>:
|
||||
arm-vfp-sflt, arm-vfp-hflt, arm-sflt, armv5-vfp-sflt, armv6-vfp-hflt.
|
||||
Note that soft-float ABIs are no longer properly supported by the
|
||||
JDK.</p>
|
||||
<h3 id="building-for-risc-v">Building for RISC-V</h3>
|
||||
<p>The RISC-V community provides a basic <a
|
||||
href="https://github.com/riscv-collab/riscv-gnu-toolchain">GNU compiler
|
||||
toolchain</a>, but the <a href="#External-Library-Requirements">external
|
||||
libraries</a> required by OpenJDK complicate the building process. The
|
||||
placeholder <code><toolchain-installed-path></code> shown below is
|
||||
the path where you want to install the toolchain.</p>
|
||||
<ul>
|
||||
<li><p>Install the RISC-V GNU compiler toolchain:
|
||||
<code>git clone --recursive https://github.com/riscv-collab/riscv-gnu-toolchain cd riscv-gnu-toolchain ./configure --prefix=<toolchain-installed-path> make linux export PATH=<toolchain-installed-path>/bin:$PATH</code></p></li>
|
||||
<li><p>Cross-compile all the required libraries:
|
||||
<code># An example for libffi git clone https://github.com/libffi/libffi cd libffi ./configure --host=riscv64-unknown-linux-gnu --prefix=<toolchain-installed-path>/sysroot/usr make make install</code></p></li>
|
||||
<li><p>Configure and build OpenJDK:
|
||||
<code>bash configure \ --with-boot-jdk=$BOOT_JDK \ --openjdk-target=riscv64-linux-gnu \ --with-sysroot=<toolchain-installed-path>/sysroot \ --with-toolchain-path=<toolchain-installed-path>/bin \ --with-extra-path=<toolchain-installed-path>/bin make images</code></p></li>
|
||||
</ul>
|
||||
<h3 id="building-for-musl">Building for musl</h3>
|
||||
<p>Just like it's possible to cross-compile for a different CPU, it's
|
||||
possible to cross-compile for musl libc on a glibc-based <em>build</em>
|
||||
|
||||
133
doc/building.md
133
doc/building.md
@@ -126,8 +126,6 @@ space is required.
|
||||
Even for 32-bit builds, it is recommended to use a 64-bit build machine, and
|
||||
instead create a 32-bit target using `--with-target-bits=32`.
|
||||
|
||||
Note: The Windows 32-bit x86 port is deprecated and may be removed in a future release.
|
||||
|
||||
### Building on aarch64
|
||||
|
||||
At a minimum, a machine with 8 cores is advisable, as well as 8 GB of RAM.
|
||||
@@ -164,11 +162,11 @@ This table lists the OS versions used by Oracle when building the JDK. Such
|
||||
information is always subject to change, but this table is up to date at the
|
||||
time of writing.
|
||||
|
||||
| Operating system | Vendor/version used |
|
||||
| ----------------- | ---------------------------------- |
|
||||
| Linux | Oracle Enterprise Linux 6.4 / 7.6 |
|
||||
| macOS | Mac OS X 10.13 (High Sierra) |
|
||||
| Windows | Windows Server 2012 R2 |
|
||||
Operating system Vendor/version used
|
||||
----------------- -------------------------------------------------------
|
||||
Linux Oracle Enterprise Linux 6.4 / 7.6
|
||||
macOS Mac OS X 10.13 (High Sierra)
|
||||
Windows Windows Server 2012 R2
|
||||
|
||||
The double version numbers for Linux are due to the hybrid model
|
||||
used at Oracle, where header files and external libraries from an older version
|
||||
@@ -201,8 +199,6 @@ rule also applies to input to the build system, e.g. in arguments to
|
||||
`--with-msvcr-dll=c:\msvcr100.dll`. For details on this conversion, see the section
|
||||
on [Fixpath](#fixpath).
|
||||
|
||||
Note: The Windows 32-bit x86 port is deprecated and may be removed in a future release.
|
||||
|
||||
#### Cygwin
|
||||
|
||||
A functioning [Cygwin](http://www.cygwin.com/) environment is required for
|
||||
@@ -475,19 +471,6 @@ rather than bundling the JDK's own copy.
|
||||
Use `--with-freetype-include=<path>` and `--with-freetype-lib=<path>`
|
||||
if `configure` does not automatically locate the platform FreeType files.
|
||||
|
||||
### Fontconfig
|
||||
|
||||
Fontconfig from [freedesktop.org Fontconfig](http://fontconfig.org) is required
|
||||
on all platforms except Windows and macOS.
|
||||
|
||||
* To install on an apt-based Linux, try running `sudo apt-get install
|
||||
libfontconfig-dev`.
|
||||
* To install on an rpm-based Linux, try running `sudo yum install
|
||||
fontconfig-devel`.
|
||||
|
||||
Use `--with-fontconfig-include=<path>` and `--with-fontconfig=<path>`
|
||||
if `configure` does not automatically locate the platform Fontconfig files.
|
||||
|
||||
### CUPS
|
||||
|
||||
CUPS, [Common UNIX Printing System](http://www.cups.org) header files are
|
||||
@@ -877,18 +860,17 @@ containing `lib/jtreg.jar` etc.
|
||||
|
||||
The [Adoption Group](https://wiki.openjdk.org/display/Adoption) provides
|
||||
recent builds of jtreg [here](
|
||||
https://ci.adoptium.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/).
|
||||
https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/).
|
||||
Download the latest `.tar.gz` file, unpack it, and point `--with-jtreg` to the
|
||||
`jtreg` directory that you just unpacked.
|
||||
|
||||
Building of Hotspot Gtest suite requires the source code of Google
|
||||
Test framework. The top directory, which contains both `googletest`
|
||||
and `googlemock` directories, should be specified via `--with-gtest`.
|
||||
The minimum supported version of Google Test is 1.13.0, whose source
|
||||
code can be obtained:
|
||||
Building of Hotspot Gtest suite requires the source code of Google Test framework.
|
||||
The top directory, which contains both `googletest` and `googlemock`
|
||||
directories, should be specified via `--with-gtest`.
|
||||
The supported version of Google Test is 1.8.1, whose source code can be obtained:
|
||||
|
||||
* by downloading and unpacking the source bundle from [here](https://github.com/google/googletest/releases/tag/v1.13.0)
|
||||
* or by checking out `v1.13.0` tag of `googletest` project: `git clone -b v1.13.0 https://github.com/google/googletest`
|
||||
* by downloading and unpacking the source bundle from [here](https://github.com/google/googletest/releases/tag/release-1.8.1)
|
||||
* or by checking out `release-1.8.1` tag of `googletest` project: `git clone -b release-1.8.1 https://github.com/google/googletest`
|
||||
|
||||
To execute the most basic tests (tier 1), use:
|
||||
```
|
||||
@@ -987,14 +969,14 @@ https://sourceware.org/autobook/autobook/autobook_17.html). If no
|
||||
targets are given, a native toolchain for the current platform will be
|
||||
created. Currently, at least the following targets are known to work:
|
||||
|
||||
| Supported devkit targets |
|
||||
| ------------------------ |
|
||||
| x86_64-linux-gnu |
|
||||
| aarch64-linux-gnu |
|
||||
| arm-linux-gnueabihf |
|
||||
| ppc64-linux-gnu |
|
||||
| ppc64le-linux-gnu |
|
||||
| s390x-linux-gnu |
|
||||
Supported devkit targets
|
||||
-------------------------
|
||||
x86_64-linux-gnu
|
||||
aarch64-linux-gnu
|
||||
arm-linux-gnueabihf
|
||||
ppc64-linux-gnu
|
||||
ppc64le-linux-gnu
|
||||
s390x-linux-gnu
|
||||
|
||||
`BASE_OS` must be one of "OEL6" for Oracle Enterprise Linux 6 or
|
||||
"Fedora" (if not specified "OEL6" will be the default). If the base OS
|
||||
@@ -1164,7 +1146,7 @@ Note that X11 is needed even if you only want to build a headless JDK.
|
||||
### Cross compiling with Debian sysroots
|
||||
|
||||
Fortunately, you can create sysroots for foreign architectures with tools
|
||||
provided by your OS. On Debian/Ubuntu systems, one could use `debootstrap` to
|
||||
provided by your OS. On Debian/Ubuntu systems, one could use `qemu-deboostrap` to
|
||||
create the *target* system chroot, which would have the native libraries and headers
|
||||
specific to that *target* system. After that, we can use the cross-compiler on the *build*
|
||||
system, pointing into chroot to get the build dependencies right. This allows building
|
||||
@@ -1179,7 +1161,7 @@ For example, cross-compiling to AArch64 from x86_64 could be done like this:
|
||||
|
||||
* Create chroot on the *build* system, configuring it for *target* system:
|
||||
```
|
||||
sudo debootstrap \
|
||||
sudo qemu-debootstrap \
|
||||
--arch=arm64 \
|
||||
--verbose \
|
||||
--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,libffi-dev \
|
||||
@@ -1187,8 +1169,6 @@ For example, cross-compiling to AArch64 from x86_64 could be done like this:
|
||||
buster \
|
||||
~/sysroot-arm64 \
|
||||
http://httpredir.debian.org/debian/
|
||||
# If the target architecture is `riscv64`,
|
||||
# the path should be `debian-ports` instead of `debian`.
|
||||
```
|
||||
|
||||
* Make sure the symlinks inside the newly created chroot point to proper locations:
|
||||
@@ -1221,22 +1201,21 @@ it might require a little nudge with:
|
||||
|
||||
Architectures that are known to successfully cross-compile like this are:
|
||||
|
||||
| Target | Debian tree | Debian arch | `--openjdk-target=...` | `--with-jvm-variants=...` |
|
||||
| ------------ | ------------ | ------------- | ------------------------ | ------------------------- |
|
||||
| x86 | buster | i386 | i386-linux-gnu | (all) |
|
||||
| arm | buster | armhf | arm-linux-gnueabihf | (all) |
|
||||
| aarch64 | buster | arm64 | aarch64-linux-gnu | (all) |
|
||||
| ppc64le | buster | ppc64el | powerpc64le-linux-gnu | (all) |
|
||||
| s390x | buster | s390x | s390x-linux-gnu | (all) |
|
||||
| mipsle | buster | mipsel | mipsel-linux-gnu | zero |
|
||||
| mips64le | buster | mips64el | mips64el-linux-gnueabi64 | zero |
|
||||
| armel | buster | arm | arm-linux-gnueabi | zero |
|
||||
| ppc | sid | powerpc | powerpc-linux-gnu | zero |
|
||||
| ppc64be | sid | ppc64 | powerpc64-linux-gnu | (all) |
|
||||
| m68k | sid | m68k | m68k-linux-gnu | zero |
|
||||
| alpha | sid | alpha | alpha-linux-gnu | zero |
|
||||
| sh4 | sid | sh4 | sh4-linux-gnu | zero |
|
||||
| riscv64 | sid | riscv64 | riscv64-linux-gnu | (all) |
|
||||
Target Debian tree Debian arch `--openjdk-target=...` `--with-jvm-variants=...`
|
||||
------------ ------------ ------------- ------------------------ --------------
|
||||
x86 buster i386 i386-linux-gnu (all)
|
||||
arm buster armhf arm-linux-gnueabihf (all)
|
||||
aarch64 buster arm64 aarch64-linux-gnu (all)
|
||||
ppc64le buster ppc64el powerpc64le-linux-gnu (all)
|
||||
s390x buster s390x s390x-linux-gnu (all)
|
||||
mipsle buster mipsel mipsel-linux-gnu zero
|
||||
mips64le buster mips64el mips64el-linux-gnueabi64 zero
|
||||
armel buster arm arm-linux-gnueabi zero
|
||||
ppc sid powerpc powerpc-linux-gnu zero
|
||||
ppc64be sid ppc64 powerpc64-linux-gnu (all)
|
||||
m68k sid m68k m68k-linux-gnu zero
|
||||
alpha sid alpha alpha-linux-gnu zero
|
||||
sh4 sid sh4 sh4-linux-gnu zero
|
||||
|
||||
### Building for ARM/aarch64
|
||||
|
||||
@@ -1246,44 +1225,6 @@ available using `--with-abi-profile`: arm-vfp-sflt, arm-vfp-hflt, arm-sflt,
|
||||
armv5-vfp-sflt, armv6-vfp-hflt. Note that soft-float ABIs are no longer
|
||||
properly supported by the JDK.
|
||||
|
||||
### Building for RISC-V
|
||||
|
||||
The RISC-V community provides a basic
|
||||
[GNU compiler toolchain](https://github.com/riscv-collab/riscv-gnu-toolchain),
|
||||
but the [external libraries](#External-Library-Requirements) required by OpenJDK
|
||||
complicate the building process. The placeholder `<toolchain-installed-path>`
|
||||
shown below is the path where you want to install the toolchain.
|
||||
|
||||
* Install the RISC-V GNU compiler toolchain:
|
||||
```
|
||||
git clone --recursive https://github.com/riscv-collab/riscv-gnu-toolchain
|
||||
cd riscv-gnu-toolchain
|
||||
./configure --prefix=<toolchain-installed-path>
|
||||
make linux
|
||||
export PATH=<toolchain-installed-path>/bin:$PATH
|
||||
```
|
||||
|
||||
* Cross-compile all the required libraries:
|
||||
```
|
||||
# An example for libffi
|
||||
git clone https://github.com/libffi/libffi
|
||||
cd libffi
|
||||
./configure --host=riscv64-unknown-linux-gnu --prefix=<toolchain-installed-path>/sysroot/usr
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
* Configure and build OpenJDK:
|
||||
```
|
||||
bash configure \
|
||||
--with-boot-jdk=$BOOT_JDK \
|
||||
--openjdk-target=riscv64-linux-gnu \
|
||||
--with-sysroot=<toolchain-installed-path>/sysroot \
|
||||
--with-toolchain-path=<toolchain-installed-path>/bin \
|
||||
--with-extra-path=<toolchain-installed-path>/bin
|
||||
make images
|
||||
```
|
||||
|
||||
### Building for musl
|
||||
|
||||
Just like it's possible to cross-compile for a different CPU, it's possible to
|
||||
|
||||
@@ -72,7 +72,6 @@ Deduction</a></li>
|
||||
<li><a href="#expression-sfinae" id="toc-expression-sfinae">Expression
|
||||
SFINAE</a></li>
|
||||
<li><a href="#enum" id="toc-enum">enum</a></li>
|
||||
<li><a href="#alignas" id="toc-alignas">alignas</a></li>
|
||||
<li><a href="#thread_local" id="toc-thread_local">thread_local</a></li>
|
||||
<li><a href="#nullptr" id="toc-nullptr">nullptr</a></li>
|
||||
<li><a href="#atomic" id="toc-atomic"><atomic></a></li>
|
||||
@@ -82,7 +81,6 @@ id="toc-uniform-initialization">Uniform Initialization</a></li>
|
||||
id="toc-local-function-objects">Local Function Objects</a></li>
|
||||
<li><a href="#inheriting-constructors"
|
||||
id="toc-inheriting-constructors">Inheriting constructors</a></li>
|
||||
<li><a href="#attributes" id="toc-attributes">Attributes</a></li>
|
||||
<li><a href="#additional-permitted-features"
|
||||
id="toc-additional-permitted-features">Additional Permitted
|
||||
Features</a></li>
|
||||
@@ -598,16 +596,9 @@ conventions might appear jarring and reduce readability.</p></li>
|
||||
<code>std::nothrow</code>, and <code>std::nothrow_t</code>.</li>
|
||||
<li><code>#include <limits></code> to use
|
||||
<code>std::numeric_limits</code>.</li>
|
||||
<li><code>#include <type_traits></code> with some restrictions,
|
||||
listed below.</li>
|
||||
<li><code>#include <type_traits></code>.</li>
|
||||
<li><code>#include <cstddef></code> to use
|
||||
<code>std::nullptr_t</code> and <code>std::max_align_t</code>.</li>
|
||||
</ul>
|
||||
<p>Certain restrictions apply to the declarations provided by
|
||||
<code><type_traits></code>.</p>
|
||||
<ul>
|
||||
<li>The <code>alignof</code> operator should be used rather than
|
||||
<code>std::alignment_of<></code>.</li>
|
||||
<code>std::nullptr_t</code>.</li>
|
||||
</ul>
|
||||
<p>TODO: Rather than directly #including (permitted) Standard Library
|
||||
headers, use a convention of #including wrapper headers (in some
|
||||
@@ -679,53 +670,6 @@ of enums and avoidance of in-class initialization of static integral
|
||||
constant members. Compilers having such bugs are no longer supported.
|
||||
Except where an enum is semantically appropriate, new code should use
|
||||
integral constants.</p>
|
||||
<h3 id="alignas">alignas</h3>
|
||||
<p><em>Alignment-specifiers</em> (<code>alignas</code> <a
|
||||
href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf">n2341</a>)
|
||||
are permitted, with restrictions.</p>
|
||||
<p><em>Alignment-specifiers</em> are permitted when the requested
|
||||
alignment is a <em>fundamental alignment</em> (not greater than
|
||||
<code>alignof(std::max_align_t)</code> <a
|
||||
href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf">C++14
|
||||
3.11/2</a>).</p>
|
||||
<p><em>Alignment-specifiers</em> with an <em>extended alignment</em>
|
||||
(greater than <code>alignof(std::max_align_t)</code> <a
|
||||
href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf">C++14
|
||||
3.11/3</a>) may only be used to align variables with static or automatic
|
||||
storage duration (<a
|
||||
href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf">C++14
|
||||
3.7.1, 3.7.3</a>). As a consequence, <em>over-aligned types</em> are
|
||||
forbidden; this may change if HotSpot updates to using C++17 or later
|
||||
(<a
|
||||
href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0035r4.html">p0035r4</a>).</p>
|
||||
<p>Large <em>extended alignments</em> should be avoided, particularly
|
||||
for stack allocated objects. What is a large value may depend on the
|
||||
platform and configuration. There may also be hard limits for some
|
||||
platforms.</p>
|
||||
<p>An <em>alignment-specifier</em> must always be applied to a
|
||||
definition (<a
|
||||
href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf">C++14
|
||||
10.6.2/6</a>). (C++ allows an <em>alignment-specifier</em> to optionally
|
||||
also be applied to a declaration, so long as the definition has
|
||||
equivalent alignment. There isn't any known benefit from duplicating the
|
||||
alignment in a non-definition declaration, so such duplication should be
|
||||
avoided in HotSpot code.)</p>
|
||||
<p>Enumerations are forbidden from having <em>alignment-specifiers</em>.
|
||||
Aligned enumerations were originally permitted but insufficiently
|
||||
specified, and were later (C++20) removed (<a
|
||||
href="https://cplusplus.github.io/CWG/issues/2354.html">CWG 2354</a>).
|
||||
Permitting such usage in HotSpot now would just cause problems in the
|
||||
future.</p>
|
||||
<p><em>Alignment-specifiers</em> are forbidden in <code>typedef</code>
|
||||
and <em>alias-declarations</em>. This may work or may have worked in
|
||||
some versions of some compilers, but was later (C++14) explicitly
|
||||
disallowed (<a
|
||||
href="https://cplusplus.github.io/CWG/issues/1437.html">CWG
|
||||
1437</a>).</p>
|
||||
<p>The HotSpot macro <code>ATTRIBUTE_ALIGNED</code> provides similar
|
||||
capabilities for platforms that define it. This macro predates the use
|
||||
by HotSpot of C++ versions providing <code>alignas</code>. New code
|
||||
should use <code>alignas</code>.</p>
|
||||
<h3 id="thread_local">thread_local</h3>
|
||||
<p>Avoid use of <code>thread_local</code> (<a
|
||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm">n2659</a>);
|
||||
@@ -1065,36 +1009,9 @@ using C++17 or later. It is also enabled by default for
|
||||
C++11/14, as the change is considered a Defect Report that applies to
|
||||
those versions. Earlier versions of gcc don't have that option, and
|
||||
other supported compilers may not have anything similar.</p>
|
||||
<h3 id="attributes">Attributes</h3>
|
||||
<p>The use of some attributes (<a
|
||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf">n2761</a>)
|
||||
(listed below) is permitted. (Note that some of the attributes defined
|
||||
in that paper didn't make it into the final specification.)</p>
|
||||
<p>Attributes are syntactically permitted in a broad set of locations,
|
||||
but specific attributes are only permitted in a subset of those
|
||||
locations. In some cases an attribute that appertains to a given element
|
||||
may be placed in any of several locations with the same meaning. In
|
||||
those cases HotSpot has a preferred location.</p>
|
||||
<ul>
|
||||
<li>An attribute that appertains to a function is placed at the
|
||||
beginning of the function's declaration, rather than between the
|
||||
function name and the parameter list.</li>
|
||||
</ul>
|
||||
<p>Only the following attributes are permitted:</p>
|
||||
<ul>
|
||||
<li><code>[[noreturn]]</code></li>
|
||||
</ul>
|
||||
<p>The following attributes are expressly forbidden:</p>
|
||||
<ul>
|
||||
<li><code>[[carries_dependency]]</code> - Related to
|
||||
<code>memory_order_consume</code>.</li>
|
||||
<li><code>[[deprecated]]</code> - Not relevant in HotSpot code.</li>
|
||||
</ul>
|
||||
<h3 id="additional-permitted-features">Additional Permitted
|
||||
Features</h3>
|
||||
<ul>
|
||||
<li><p><code>alignof</code> (<a
|
||||
href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf">n2341</a>)</p></li>
|
||||
<li><p><code>constexpr</code> (<a
|
||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf">n2235</a>)
|
||||
(<a
|
||||
@@ -1184,6 +1101,9 @@ initialization or destruction. Initialization order problems can be
|
||||
difficult to deal with and lead to surprises, as can destruction
|
||||
ordering. HotSpot doesn't generally try to cleanup on exit, and running
|
||||
destructors at exit can also lead to problems.</p></li>
|
||||
<li><p><code>[[deprecated]]</code> attribute (<a
|
||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3760.html">n3760</a>)
|
||||
— Not relevant in HotSpot code.</p></li>
|
||||
<li><p>Avoid most operator overloading, preferring named functions. When
|
||||
operator overloading is used, ensure the semantics conform to the normal
|
||||
expected behavior of the operation.</p></li>
|
||||
@@ -1203,6 +1123,8 @@ href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm">n2541</
|
||||
href="https://isocpp.org/files/papers/N3651.pdf">n3651</a>)</p></li>
|
||||
<li><p>Member initializers and aggregates (<a
|
||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html">n3653</a>)</p></li>
|
||||
<li><p><code>[[noreturn]]</code> attribute (<a
|
||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf">n2761</a>)</p></li>
|
||||
<li><p>Rvalue references and move semantics</p></li>
|
||||
</ul>
|
||||
</body>
|
||||
|
||||
@@ -572,12 +572,8 @@ There are a few exceptions to this rule.
|
||||
|
||||
* `#include <new>` to use placement `new`, `std::nothrow`, and `std::nothrow_t`.
|
||||
* `#include <limits>` to use `std::numeric_limits`.
|
||||
* `#include <type_traits>` with some restrictions, listed below.
|
||||
* `#include <cstddef>` to use `std::nullptr_t` and `std::max_align_t`.
|
||||
|
||||
Certain restrictions apply to the declarations provided by `<type_traits>`.
|
||||
|
||||
* The `alignof` operator should be used rather than `std::alignment_of<>`.
|
||||
* `#include <type_traits>`.
|
||||
* `#include <cstddef>` to use `std::nullptr_t`.
|
||||
|
||||
TODO: Rather than directly \#including (permitted) Standard Library
|
||||
headers, use a convention of \#including wrapper headers (in some
|
||||
@@ -655,51 +651,6 @@ constant members. Compilers having such bugs are no longer supported.
|
||||
Except where an enum is semantically appropriate, new code should use
|
||||
integral constants.
|
||||
|
||||
### alignas
|
||||
|
||||
_Alignment-specifiers_ (`alignas`
|
||||
[n2341](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf))
|
||||
are permitted, with restrictions.
|
||||
|
||||
_Alignment-specifiers_ are permitted when the requested alignment is a
|
||||
_fundamental alignment_ (not greater than `alignof(std::max_align_t)`
|
||||
[C++14 3.11/2](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf)).
|
||||
|
||||
_Alignment-specifiers_ with an _extended alignment_ (greater than
|
||||
`alignof(std::max_align_t)`
|
||||
[C++14 3.11/3](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf))
|
||||
may only be used to align variables with static or automatic storage duration
|
||||
([C++14 3.7.1, 3.7.3](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf)).
|
||||
As a consequence, _over-aligned types_ are forbidden; this may change if
|
||||
HotSpot updates to using C++17 or later
|
||||
([p0035r4](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0035r4.html)).
|
||||
|
||||
Large _extended alignments_ should be avoided, particularly for stack
|
||||
allocated objects. What is a large value may depend on the platform and
|
||||
configuration. There may also be hard limits for some platforms.
|
||||
|
||||
An _alignment-specifier_ must always be applied to a definition
|
||||
([C++14 10.6.2/6](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf)).
|
||||
(C++ allows an _alignment-specifier_ to optionally also be applied to a
|
||||
declaration, so long as the definition has equivalent alignment. There isn't
|
||||
any known benefit from duplicating the alignment in a non-definition
|
||||
declaration, so such duplication should be avoided in HotSpot code.)
|
||||
|
||||
Enumerations are forbidden from having _alignment-specifiers_. Aligned
|
||||
enumerations were originally permitted but insufficiently specified, and were
|
||||
later (C++20) removed
|
||||
([CWG 2354](https://cplusplus.github.io/CWG/issues/2354.html)).
|
||||
Permitting such usage in HotSpot now would just cause problems in the future.
|
||||
|
||||
_Alignment-specifiers_ are forbidden in `typedef` and _alias-declarations_.
|
||||
This may work or may have worked in some versions of some compilers, but was
|
||||
later (C++14) explicitly disallowed
|
||||
([CWG 1437](https://cplusplus.github.io/CWG/issues/1437.html)).
|
||||
|
||||
The HotSpot macro `ATTRIBUTE_ALIGNED` provides similar capabilities for
|
||||
platforms that define it. This macro predates the use by HotSpot of C++
|
||||
versions providing `alignas`. New code should use `alignas`.
|
||||
|
||||
### thread_local
|
||||
|
||||
Avoid use of `thread_local`
|
||||
@@ -1058,37 +1009,8 @@ and other supported compilers may not have anything similar.
|
||||
[p0136r1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0136r1.html
|
||||
"p0136r1"
|
||||
|
||||
### Attributes
|
||||
|
||||
The use of some attributes
|
||||
([n2761](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf))
|
||||
(listed below) is permitted. (Note that some of the attributes defined in
|
||||
that paper didn't make it into the final specification.)
|
||||
|
||||
Attributes are syntactically permitted in a broad set of locations, but
|
||||
specific attributes are only permitted in a subset of those locations. In
|
||||
some cases an attribute that appertains to a given element may be placed in
|
||||
any of several locations with the same meaning. In those cases HotSpot has a
|
||||
preferred location.
|
||||
|
||||
* An attribute that appertains to a function is placed at the beginning of the
|
||||
function's declaration, rather than between the function name and the parameter
|
||||
list.
|
||||
|
||||
Only the following attributes are permitted:
|
||||
|
||||
* `[[noreturn]]`
|
||||
|
||||
The following attributes are expressly forbidden:
|
||||
|
||||
* `[[carries_dependency]]` - Related to `memory_order_consume`.
|
||||
* `[[deprecated]]` - Not relevant in HotSpot code.
|
||||
|
||||
### Additional Permitted Features
|
||||
|
||||
* `alignof`
|
||||
([n2341](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf))
|
||||
|
||||
* `constexpr`
|
||||
([n2235](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf))
|
||||
([n3652](https://isocpp.org/files/papers/N3652.html))
|
||||
@@ -1186,6 +1108,10 @@ difficult to deal with and lead to surprises, as can destruction
|
||||
ordering. HotSpot doesn't generally try to cleanup on exit, and
|
||||
running destructors at exit can also lead to problems.
|
||||
|
||||
* `[[deprecated]]` attribute
|
||||
([n3760](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3760.html)) —
|
||||
Not relevant in HotSpot code.
|
||||
|
||||
* Avoid most operator overloading, preferring named functions. When
|
||||
operator overloading is used, ensure the semantics conform to the
|
||||
normal expected behavior of the operation.
|
||||
@@ -1210,6 +1136,9 @@ features that have not yet been discussed.
|
||||
* Member initializers and aggregates
|
||||
([n3653](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html))
|
||||
|
||||
* `[[noreturn]]` attribute
|
||||
([n2761](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf))
|
||||
|
||||
* Rvalue references and move semantics
|
||||
|
||||
[ADL]: https://en.cppreference.com/w/cpp/language/adl
|
||||
|
||||
62
doc/ide.html
62
doc/ide.html
@@ -79,45 +79,6 @@ native source. After configuring, the project is generated using:</p>
|
||||
<code>ide\hotspot-visualstudio</code> subfolder of the build output
|
||||
folder. The file can be opened in Visual Studio via
|
||||
<code>File -> Open -> Project/Solution</code>.</p>
|
||||
<h4 id="eclipse-cdt">Eclipse CDT</h4>
|
||||
<p>The make system can generate an Eclipse CDT Workspace that enables
|
||||
Eclipse indexing for the C and C++ sources throughout the entire
|
||||
codebase, as well as registering all common make targets to be runnable
|
||||
from the Eclipse explorer. This can be done after configuring by
|
||||
running:</p>
|
||||
<pre><code>make eclipse-native-env</code></pre>
|
||||
<p>After this is run, simply open and import the workspace in Eclipse
|
||||
through
|
||||
<code>File -> Import -> Projects from Folder or Archive</code> and
|
||||
at <code>Import source</code> click on the directory
|
||||
<code>ide\eclipse</code>, which can be found in the build output
|
||||
folder.</p>
|
||||
<p>If this doesn't work, you can also try
|
||||
<code>File -> Import -> Existing Projects into Workspace</code>
|
||||
instead.</p>
|
||||
<p>Setting up an Eclipse Workspace is relatively lightweight compared to
|
||||
other supported IDEs, but requires that your CDT installation has Cross
|
||||
GCC support enabled at the moment, even if you aren't cross compiling.
|
||||
The Visual C++ compiler is, at present, not supported as an indexer.</p>
|
||||
<p>If desired, you can instead request make to only include indexing
|
||||
support for just the Java Virtual Machine instead of the entire native
|
||||
codebase, by running:</p>
|
||||
<pre><code>make eclipse-hotspot-env</code></pre>
|
||||
<p>If you think your particular Eclipse installation can handle the
|
||||
strain, the make system also supports generating a combined Java and
|
||||
C/C++ Workspace for Eclipse which can then conveniently switch between
|
||||
Java and C/C++ natures during development by running:</p>
|
||||
<pre><code>make eclipse-mixed-env</code></pre>
|
||||
<p>Do note that this generates all features that come with both Java and
|
||||
C/C++ natures.</p>
|
||||
<p>By default, the Eclipse Workspace is located in the ide subdirectory
|
||||
in the build output. To share the JDK's source directory with the
|
||||
Eclipse Workspace, you can instead run:</p>
|
||||
<pre><code>make eclipse-shared-<ENV>-env</code></pre>
|
||||
<p>Eclipse support in the JDK is relatively new, so do keep in mind that
|
||||
not everything may work at the moment. As such, the resulting Workspace
|
||||
also has compilation database parsing support enabled, so you can pass
|
||||
Eclipse the compile commands file (see below) if all else fails.</p>
|
||||
<h4 id="compilation-database">Compilation Database</h4>
|
||||
<p>The make system can generate generic native code indexing support in
|
||||
the form of a <a
|
||||
@@ -144,28 +105,5 @@ select the folder where you ran the above script.</p>
|
||||
<p>In order to run the tests from the IDE, you can use the JTReg plugin.
|
||||
Instructions for building and using the plugin can be found <a
|
||||
href="https://github.com/openjdk/jtreg/tree/master/plugins/idea">here</a>.</p>
|
||||
<h4 id="eclipse">Eclipse</h4>
|
||||
<p>Eclipse JDT is a widely used Java IDE and has been for a very long
|
||||
time, being a popular choice alongside IntelliJ IDEA for Java
|
||||
development. Likewise, the JDK now includes support for developing its
|
||||
Java sources with Eclipse, which can be achieved by setting up a Java
|
||||
Workspace by running:</p>
|
||||
<pre><code>make eclipse-java-env</code></pre>
|
||||
<p>After the workspace has been generated you can import it in the same
|
||||
way as you would with Eclipse CDT:</p>
|
||||
<p>Follow
|
||||
<code>File -> Import -> Projects from Folder or Archive</code> and
|
||||
select the <code>ide\eclipse</code> directory in the build output folder
|
||||
to import the newly created Java Workspace.</p>
|
||||
<p>If doing so results in an error, you can also import the JDK via
|
||||
<code>File -> Import -> Existing Projects into Workspace</code> as
|
||||
a last resort.</p>
|
||||
<p>Alternatively, if you want a Java Workspace inside the JDK's source
|
||||
directory, you can instead run:</p>
|
||||
<pre><code>make eclipse-shared-java-env</code></pre>
|
||||
<p>As mentioned above for Eclipse CDT, you can create a combined Java
|
||||
and C/C++ Workspace which can conveniently switch between Java and C/C++
|
||||
natures during development by running:</p>
|
||||
<pre><code>make eclipse-mixed-env</code></pre>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
94
doc/ide.md
94
doc/ide.md
@@ -56,63 +56,6 @@ This creates a file named `jvm.vcxproj` in `ide\hotspot-visualstudio`
|
||||
subfolder of the build output folder. The file can be opened in Visual Studio
|
||||
via `File -> Open -> Project/Solution`.
|
||||
|
||||
#### Eclipse CDT
|
||||
|
||||
The make system can generate an Eclipse CDT Workspace that enables Eclipse
|
||||
indexing for the C and C++ sources throughout the entire codebase, as well as
|
||||
registering all common make targets to be runnable from the Eclipse explorer.
|
||||
This can be done after configuring by running:
|
||||
|
||||
```
|
||||
make eclipse-native-env
|
||||
```
|
||||
|
||||
After this is run, simply open and import the workspace in Eclipse through
|
||||
`File -> Import -> Projects from Folder or Archive` and at
|
||||
`Import source` click on the directory `ide\eclipse`, which can be
|
||||
found in the build output folder.
|
||||
|
||||
If this doesn't work, you can also try
|
||||
`File -> Import -> Existing Projects into Workspace`
|
||||
instead.
|
||||
|
||||
Setting up an Eclipse Workspace is relatively lightweight compared to other
|
||||
supported IDEs, but requires that your CDT installation has Cross GCC support
|
||||
enabled at the moment, even if you aren't cross compiling. The Visual C++
|
||||
compiler is, at present, not supported as an indexer.
|
||||
|
||||
If desired, you can instead request make to only include indexing support for
|
||||
just the Java Virtual Machine instead of the entire native codebase, by running:
|
||||
|
||||
```
|
||||
make eclipse-hotspot-env
|
||||
```
|
||||
|
||||
If you think your particular Eclipse installation can handle the strain, the
|
||||
make system also supports generating a combined Java and C/C++ Workspace for
|
||||
Eclipse which can then conveniently switch between Java and C/C++ natures
|
||||
during development by running:
|
||||
|
||||
```
|
||||
make eclipse-mixed-env
|
||||
```
|
||||
|
||||
Do note that this generates all features that come with both Java and C/C++
|
||||
natures.
|
||||
|
||||
By default, the Eclipse Workspace is located in the ide subdirectory in the
|
||||
build output. To share the JDK's source directory with the Eclipse Workspace,
|
||||
you can instead run:
|
||||
|
||||
```
|
||||
make eclipse-shared-<ENV>-env
|
||||
```
|
||||
|
||||
Eclipse support in the JDK is relatively new, so do keep in mind that not
|
||||
everything may work at the moment. As such, the resulting Workspace also
|
||||
has compilation database parsing support enabled, so you can pass Eclipse
|
||||
the compile commands file (see below) if all else fails.
|
||||
|
||||
#### Compilation Database
|
||||
|
||||
The make system can generate generic native code indexing support in the form of
|
||||
@@ -153,40 +96,3 @@ as the SDK to use.
|
||||
In order to run the tests from the IDE, you can use the JTReg plugin.
|
||||
Instructions for building and using the plugin can be found
|
||||
[here](https://github.com/openjdk/jtreg/tree/master/plugins/idea).
|
||||
|
||||
#### Eclipse
|
||||
|
||||
Eclipse JDT is a widely used Java IDE and has been for a very long time, being
|
||||
a popular choice alongside IntelliJ IDEA for Java development. Likewise, the
|
||||
JDK now includes support for developing its Java sources with Eclipse, which
|
||||
can be achieved by setting up a Java Workspace by running:
|
||||
|
||||
```
|
||||
make eclipse-java-env
|
||||
```
|
||||
|
||||
After the workspace has been generated you can import it in the same way as
|
||||
you would with Eclipse CDT:
|
||||
|
||||
Follow `File -> Import -> Projects from Folder or Archive` and select the
|
||||
`ide\eclipse` directory in the build output folder to import the newly created
|
||||
Java Workspace.
|
||||
|
||||
If doing so results in an error, you can also import the JDK via
|
||||
`File -> Import -> Existing Projects into Workspace`
|
||||
as a last resort.
|
||||
|
||||
Alternatively, if you want a Java Workspace inside the JDK's source directory,
|
||||
you can instead run:
|
||||
|
||||
```
|
||||
make eclipse-shared-java-env
|
||||
```
|
||||
|
||||
As mentioned above for Eclipse CDT, you can create a combined Java and C/C++
|
||||
Workspace which can conveniently switch between Java and C/C++ natures during
|
||||
development by running:
|
||||
|
||||
```
|
||||
make eclipse-mixed-env
|
||||
```
|
||||
|
||||
@@ -426,14 +426,6 @@ GB/2</em>.</p>
|
||||
<p>Sets the argument <code>-timeoutHandlerTimeout</code> for JTReg. The
|
||||
default value is 0. This is only valid if the failure handler is
|
||||
built.</p>
|
||||
<h4 id="jtreg_test_thread_factory">JTREG_TEST_THREAD_FACTORY</h4>
|
||||
<p>Sets the <code>-testThreadFactory</code> for JTReg. It should be the
|
||||
fully qualified classname of a class which implements
|
||||
<code>java.util.concurrent.ThreadFactory</code>. One such implementation
|
||||
class, named Virtual, is currently part of the JDK build in the
|
||||
<code>test/jtreg_test_thread_factory/</code> directory. This class gets
|
||||
compiled during the test image build. The implementation of the Virtual
|
||||
class creates a new virtual thread for executing each test class.</p>
|
||||
<h4 id="test_mode">TEST_MODE</h4>
|
||||
<p>The test mode (<code>agentvm</code> or <code>othervm</code>).</p>
|
||||
<p>Defaults to <code>agentvm</code>.</p>
|
||||
@@ -502,9 +494,6 @@ allows to pass the tests with intermittent failures. Defaults to 0.</p>
|
||||
<p>Repeat the tests up to a set number of times, stopping at first
|
||||
failure. This helps to reproduce intermittent test failures. Defaults to
|
||||
0.</p>
|
||||
<h4 id="report">REPORT</h4>
|
||||
<p>Use this report style when reporting test results (sent to JTReg as
|
||||
<code>-report</code>). Defaults to <code>files</code>.</p>
|
||||
<h3 id="gtest-keywords">Gtest keywords</h3>
|
||||
<h4 id="repeat">REPEAT</h4>
|
||||
<p>The number of times to repeat the tests
|
||||
@@ -586,13 +575,12 @@ directories.</p>
|
||||
<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>
|
||||
<h4 id="system-key-shortcuts">System key shortcuts</h4>
|
||||
<p>Some Client UI tests use key sequences which may be reserved by the
|
||||
operating system. Usually that causes the test failure. So it is highly
|
||||
recommended to disable system key shortcuts prior testing. The steps to
|
||||
access and disable system key shortcuts for various platforms are
|
||||
provided below.</p>
|
||||
<h5 id="macos">macOS</h5>
|
||||
<h4 id="macos">MacOS</h4>
|
||||
<p>Choose Apple menu; System Preferences, click Keyboard, then click
|
||||
Shortcuts; select or deselect desired shortcut.</p>
|
||||
<p>For example,
|
||||
@@ -603,41 +591,17 @@ operating system. To run the test correctly the default global key
|
||||
shortcut should be disabled using the steps described above, and then
|
||||
deselect "Turn keyboard access on or off" option which is responsible
|
||||
for <code>CTRL + F1</code> combination.</p>
|
||||
<h5 id="linux">Linux</h5>
|
||||
<h4 id="linux">Linux</h4>
|
||||
<p>Open the Activities overview and start typing Settings; Choose
|
||||
Settings, click Devices, then click Keyboard; set or override desired
|
||||
shortcut.</p>
|
||||
<h5 id="windows">Windows</h5>
|
||||
<h4 id="windows">Windows</h4>
|
||||
<p>Type <code>gpedit</code> in the Search and then click Edit group
|
||||
policy; navigate to User Configuration -> Administrative Templates
|
||||
-> Windows Components -> File Explorer; in the right-side pane
|
||||
look for "Turn off Windows key hotkeys" and double click on it; enable
|
||||
or disable hotkeys.</p>
|
||||
<p>Note: restart is required to make the settings take effect.</p>
|
||||
<h4 id="robot-api">Robot API</h4>
|
||||
<p>Most automated Client UI tests use <code>Robot</code> API to control
|
||||
the UI. Usually, the default operating system settings need to be
|
||||
adjusted for Robot to work correctly. The detailed steps how to access
|
||||
and update these settings for different platforms are provided
|
||||
below.</p>
|
||||
<h5 id="macos-1">macOS</h5>
|
||||
<p><code>Robot</code> is not permitted to control your Mac by default
|
||||
since macOS 10.15. To allow it, choose Apple menu -> System Settings,
|
||||
click Privacy & Security; then click Accessibility and ensure the
|
||||
following apps are allowed to control your computer: <em>Java</em> and
|
||||
<em>Terminal</em>. If the tests are run from an IDE, the IDE should be
|
||||
granted this permission too.</p>
|
||||
<h5 id="windows-1">Windows</h5>
|
||||
<p>On Windows if Cygwin terminal is used to run the tests, there is a
|
||||
delay in focus transfer. Usually it causes automated UI test failure. To
|
||||
disable the delay, type <code>regedit</code> in the Search and then
|
||||
select Registry Editor; navigate to the following key:
|
||||
<code>HKEY_CURRENT_USER\Control Panel\Desktop</code>; make sure the
|
||||
<code>ForegroundLockTimeout</code> value is set to 0.</p>
|
||||
<p>Additional information about Client UI tests configuration for
|
||||
various operating systems can be obtained at <a
|
||||
href="https://wiki.openjdk.org/display/ClientLibs/Automated+client+GUI+testing+system+set+up+requirements">Automated
|
||||
client GUI testing system set up requirements</a></p>
|
||||
<h2 id="editing-this-document">Editing this document</h2>
|
||||
<p>If you want to contribute changes to this document, edit
|
||||
<code>doc/testing.md</code> and then run
|
||||
|
||||
@@ -378,15 +378,6 @@ Defaults to 4.
|
||||
Sets the argument `-timeoutHandlerTimeout` for JTReg. The default value is 0.
|
||||
This is only valid if the failure handler is built.
|
||||
|
||||
#### JTREG_TEST_THREAD_FACTORY
|
||||
|
||||
Sets the `-testThreadFactory` for JTReg. It should be the fully qualified classname
|
||||
of a class which implements `java.util.concurrent.ThreadFactory`.
|
||||
One such implementation class, named Virtual, is currently part of the JDK build
|
||||
in the `test/jtreg_test_thread_factory/` directory. This class gets compiled during
|
||||
the test image build. The implementation of the Virtual class creates a new virtual
|
||||
thread for executing each test class.
|
||||
|
||||
#### TEST_MODE
|
||||
|
||||
The test mode (`agentvm` or `othervm`).
|
||||
@@ -493,11 +484,6 @@ Repeat the tests up to a set number of times, stopping at first failure.
|
||||
This helps to reproduce intermittent test failures.
|
||||
Defaults to 0.
|
||||
|
||||
#### REPORT
|
||||
|
||||
Use this report style when reporting test results (sent to JTReg as `-report`).
|
||||
Defaults to `files`.
|
||||
|
||||
### Gtest keywords
|
||||
|
||||
#### REPEAT
|
||||
@@ -615,14 +601,12 @@ test/jdk/sun/security/pkcs11/README.
|
||||
|
||||
### Client UI Tests
|
||||
|
||||
#### System key shortcuts
|
||||
|
||||
Some Client UI tests use key sequences which may be reserved by the operating
|
||||
system. Usually that causes the test failure. So it is highly recommended to
|
||||
disable system key shortcuts prior testing. The steps to access and disable
|
||||
system key shortcuts for various platforms are provided below.
|
||||
|
||||
##### macOS
|
||||
#### MacOS
|
||||
|
||||
Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts;
|
||||
select or deselect desired shortcut.
|
||||
@@ -635,12 +619,12 @@ test correctly the default global key shortcut should be disabled using the
|
||||
steps described above, and then deselect "Turn keyboard access on or off"
|
||||
option which is responsible for `CTRL + F1` combination.
|
||||
|
||||
##### Linux
|
||||
#### Linux
|
||||
|
||||
Open the Activities overview and start typing Settings; Choose Settings, click
|
||||
Devices, then click Keyboard; set or override desired shortcut.
|
||||
|
||||
##### Windows
|
||||
#### Windows
|
||||
|
||||
Type `gpedit` in the Search and then click Edit group policy; navigate to User
|
||||
Configuration -> Administrative Templates -> Windows Components -> File
|
||||
@@ -649,33 +633,6 @@ double click on it; enable or disable hotkeys.
|
||||
|
||||
Note: restart is required to make the settings take effect.
|
||||
|
||||
#### Robot API
|
||||
|
||||
Most automated Client UI tests use `Robot` API to control the UI. Usually,
|
||||
the default operating system settings need to be adjusted for Robot
|
||||
to work correctly. The detailed steps how to access and update these settings
|
||||
for different platforms are provided below.
|
||||
|
||||
##### macOS
|
||||
|
||||
`Robot` is not permitted to control your Mac by default since
|
||||
macOS 10.15. To allow it, choose Apple menu -> System Settings, click
|
||||
Privacy & Security; then click Accessibility and ensure the following apps are
|
||||
allowed to control your computer: *Java* and *Terminal*. If the tests are run
|
||||
from an IDE, the IDE should be granted this permission too.
|
||||
|
||||
##### Windows
|
||||
|
||||
On Windows if Cygwin terminal is used to run the tests, there is a delay in
|
||||
focus transfer. Usually it causes automated UI test failure. To disable the
|
||||
delay, type `regedit` in the Search and then select Registry Editor; navigate
|
||||
to the following key: `HKEY_CURRENT_USER\Control Panel\Desktop`; make sure
|
||||
the `ForegroundLockTimeout` value is set to 0.
|
||||
|
||||
Additional information about Client UI tests configuration for various operating
|
||||
systems can be obtained at [Automated client GUI testing system set up
|
||||
requirements](https://wiki.openjdk.org/display/ClientLibs/Automated+client+GUI+testing+system+set+up+requirements)
|
||||
|
||||
## Editing this document
|
||||
|
||||
If you want to contribute changes to this document, edit `doc/testing.md` and
|
||||
|
||||
238
jb/branchdiff.py
238
jb/branchdiff.py
@@ -1,238 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import os.path
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
def fatal(msg):
|
||||
sys.stderr.write(f"[fatal] {msg}\n")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def verbose(options, *msg):
|
||||
if options.verbose:
|
||||
sys.stderr.write(f"[verbose] ")
|
||||
sys.stderr.write(*msg)
|
||||
sys.stderr.write('\n')
|
||||
|
||||
|
||||
def first_line(str):
|
||||
return "" if not str else str.splitlines()[0]
|
||||
|
||||
|
||||
class Options:
|
||||
def __init__(self):
|
||||
ap = argparse.ArgumentParser(description="Show commit differences between branches of JBR git repos",
|
||||
epilog="Example: %(prog)s --from origin/jbr17 --to jbr17.b469 --path "
|
||||
"src/hotspot --limit 200")
|
||||
ap.add_argument('--jbr', dest='jbrpath', help='path to JBR git root', required=True)
|
||||
ap.add_argument('--from', dest='frombranch', help='branch to take commits from', required=True)
|
||||
ap.add_argument('--to', dest='tobranch', help='branch to apply new commits to', required=True)
|
||||
ap.add_argument('--path', dest='path', help='limit to changes in this path (relative to git root)')
|
||||
ap.add_argument('--limit', dest='limit', help='limit to this many log entries in --jdk repo', type=int, default=-1)
|
||||
ap.add_argument('--html', dest="ishtml", help="print out HTML rather than plain text", action='store_true')
|
||||
ap.add_argument('-o', dest="output", help="print the list of missing commits to this file"
|
||||
" to be used as exclude list later")
|
||||
ap.add_argument('--exclude', dest='exclude', help='exclude commits listed in the given file '
|
||||
'(can use edited -o output file as input here)')
|
||||
ap.add_argument('-v', dest='verbose', help="verbose output", default=False, action='store_true')
|
||||
args = ap.parse_args()
|
||||
|
||||
if not os.path.isdir(args.jbrpath):
|
||||
fatal(f"{args.jbrpath} not a directory")
|
||||
|
||||
if not git_is_available():
|
||||
fatal("can't run git commands; make sure git is in PATH")
|
||||
|
||||
self.frombranch = args.frombranch
|
||||
self.tobranch = args.tobranch
|
||||
self.jbrpath = args.jbrpath
|
||||
self.path = args.path
|
||||
self.limit = args.limit
|
||||
self.exclude = args.exclude
|
||||
self.output = args.output
|
||||
self.ishtml = args.ishtml
|
||||
self.verbose = args.verbose
|
||||
|
||||
class GitRepo:
|
||||
def __init__(self, rootpath):
|
||||
self.rootpath = rootpath
|
||||
|
||||
def run_git_cmd(self, git_args):
|
||||
args = ["git", "-C", self.rootpath]
|
||||
args.extend(git_args)
|
||||
# print(f"Runnig git cmd '{' '.join(args)}'")
|
||||
p = subprocess.run(args, capture_output=True, text=True)
|
||||
if p.returncode != 0:
|
||||
fatal(f"git returned non-zero code in {self.rootpath} ({first_line(p.stderr)})")
|
||||
return p.stdout
|
||||
|
||||
def save_git_cmd(self, fname, git_args):
|
||||
args = ["git", "-C", self.rootpath]
|
||||
args.extend(git_args)
|
||||
# print(f"Runnig git cmd '{' '.join(args)}'")
|
||||
with open(fname, "w") as stdout_file:
|
||||
p = subprocess.run(args, stdout=stdout_file)
|
||||
if p.returncode != 0:
|
||||
fatal(f"git returned non-zero code in {self.rootpath} ({first_line(p.stderr)})")
|
||||
|
||||
def current_branch(self):
|
||||
branch_name = self.run_git_cmd(["branch", "--show-current"]).strip()
|
||||
return branch_name
|
||||
|
||||
def log(self, branch, path=None, limit=None):
|
||||
cmds = ["log", "--no-decorate", branch]
|
||||
if limit:
|
||||
cmds.extend(["-n", str(limit)])
|
||||
if path:
|
||||
cmds.append(path)
|
||||
full_log = self.run_git_cmd(cmds)
|
||||
return full_log
|
||||
|
||||
|
||||
class Commit:
|
||||
def __init__(self, lines):
|
||||
self.sha = lines[0].split()[1]
|
||||
self.message = ""
|
||||
self.bugid = ""
|
||||
|
||||
# Commit message starts after one blank line
|
||||
read_message = False
|
||||
for l in lines:
|
||||
if read_message:
|
||||
self.message = l.strip()
|
||||
t = self.message.split(' ')
|
||||
if len(t) > 1:
|
||||
bugid = t[0]
|
||||
if bugid.startswith("fixup"):
|
||||
bugid = t[1]
|
||||
bugid = bugid.strip(":")
|
||||
if bugid.startswith("JBR-") or bugid.isnumeric():
|
||||
self.bugid = bugid
|
||||
break
|
||||
if not read_message and l == "":
|
||||
read_message = True
|
||||
|
||||
|
||||
class History:
|
||||
def __init__(self, log):
|
||||
log_itr = iter(log.splitlines())
|
||||
self.commits = []
|
||||
commit_lines = []
|
||||
for line in log_itr:
|
||||
if line.startswith("commit ") and len(commit_lines) > 0:
|
||||
commit = Commit(commit_lines)
|
||||
self.commits.append(commit)
|
||||
commit_lines = []
|
||||
commit_lines.append(line)
|
||||
|
||||
if len(commit_lines) > 0:
|
||||
commit = Commit(commit_lines)
|
||||
self.commits.append(commit)
|
||||
|
||||
def contains(self, str):
|
||||
return any(str in commit.message for commit in self.commits)
|
||||
|
||||
def size(self):
|
||||
return len(self.commits)
|
||||
|
||||
|
||||
def print_explanation(options, jbr):
|
||||
verbose(options, f"Reading history from '{jbr.rootpath}'")
|
||||
if options.path:
|
||||
verbose(options, f"\t(only under '{options.path}')")
|
||||
if options.limit > 0:
|
||||
verbose(options, f"\t(up to '{options.limit}' commits)")
|
||||
verbose(options, f"Searching for missing fixes in '{options.tobranch}' compared with '{options.frombranch}'")
|
||||
|
||||
|
||||
def git_is_available():
|
||||
p = None
|
||||
try:
|
||||
p = subprocess.run(["git", "--help"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
except:
|
||||
pass
|
||||
return p is not None and p.returncode == 0
|
||||
|
||||
|
||||
def main():
|
||||
check_python_min_requirements()
|
||||
options = Options()
|
||||
jbr = GitRepo(options.jbrpath)
|
||||
print_explanation(options, jbr)
|
||||
|
||||
commits_to_save = []
|
||||
try:
|
||||
log_from = jbr.log(options.frombranch, options.path, options.limit)
|
||||
log_to = jbr.log(options.tobranch, options.path, options.limit)
|
||||
history_from = History(log_from)
|
||||
history_to = History(log_to)
|
||||
|
||||
verbose(options, f"Read {history_from.size()} commits from '{options.frombranch}', {history_to.size()} from {options.tobranch}")
|
||||
|
||||
exclude_list=[]
|
||||
if options.exclude:
|
||||
with open(options.exclude, "r") as exclude_file:
|
||||
l = exclude_file.read().split('\n')
|
||||
exclude_list = list(filter(lambda line: not line.startswith("#"), l))
|
||||
|
||||
for c in history_from.commits:
|
||||
if c.message:
|
||||
verbose(options, f"Looking for commit '{c.message}'")
|
||||
if c.message in exclude_list:
|
||||
verbose(options, "...nope, in exclude list")
|
||||
continue
|
||||
if not history_to.contains(c.message):
|
||||
commits_to_save.append(c)
|
||||
except KeyboardInterrupt:
|
||||
fatal("Interrupted")
|
||||
|
||||
print_out_commits(options, commits_to_save)
|
||||
save_commits_to_file(commits_to_save, options)
|
||||
|
||||
|
||||
def save_commits_to_file(commits_to_save, options):
|
||||
if len(commits_to_save) > 0 and options.output:
|
||||
print()
|
||||
with open(options.output, "w") as out:
|
||||
for i, c in enumerate(reversed(commits_to_save)):
|
||||
print(f"# {c.sha}", file=out)
|
||||
print(c.message, file=out)
|
||||
|
||||
|
||||
def print_out_commits(options, commits_to_save):
|
||||
if options.ishtml:
|
||||
print("<html><body>")
|
||||
print(f"<p><b>Commits on <code>{options.frombranch}</code>"
|
||||
f" missing from <code>{options.tobranch}</code></b></p></h1>")
|
||||
if len(commits_to_save) > 0:
|
||||
for c in sorted(commits_to_save, key=lambda commit: commit.bugid):
|
||||
if options.ishtml:
|
||||
msg = c.message
|
||||
bugurl = ""
|
||||
if c.bugid:
|
||||
if c.bugid.isnumeric():
|
||||
bugurl = f"https://bugs.openjdk.org/browse/JDK-{c.bugid}"
|
||||
elif c.bugid.startswith("JBR-"):
|
||||
bugurl = f"https://youtrack.jetbrains.com/issue/{c.bugid}"
|
||||
|
||||
if len(bugurl) > 0:
|
||||
msg = msg.replace(c.bugid, f"<a href='{bugurl}'>{c.bugid}</a>")
|
||||
|
||||
sha = f"<a href='https://jetbrains.team/p/jbre/repositories/jbr/commits?commits={c.sha}'>" \
|
||||
f"{c.sha[0:8]}</a>"
|
||||
print(f"<li>{msg} ({sha})</li>")
|
||||
else:
|
||||
print(f"{c.message} ({c.sha[0:8]})")
|
||||
if options.ishtml:
|
||||
print("</body></html>")
|
||||
|
||||
def check_python_min_requirements():
|
||||
if sys.version_info < (3, 6):
|
||||
fatal("Minimum version 3.6 is required to run this script")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -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
|
||||
230
jb/jdkdiff.py
230
jb/jdkdiff.py
@@ -1,230 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import math
|
||||
import os.path
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
|
||||
def fatal(msg):
|
||||
sys.stderr.write(f"[fatal] {msg}\n")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def verbose(options, *msg):
|
||||
if options.verbose:
|
||||
sys.stdout.write(f"[verbose] ")
|
||||
sys.stdout.write(*msg)
|
||||
sys.stdout.write('\n')
|
||||
|
||||
|
||||
def first_line(str):
|
||||
return "" if not str else str.splitlines()[0]
|
||||
|
||||
|
||||
class Options:
|
||||
def __init__(self):
|
||||
ap = argparse.ArgumentParser(description="Show bugfixes differences between JBR and OpenJDK git repos",
|
||||
epilog="Example: %(prog)s --jdk ./jdk11u/ --jbr ./JetBrainsRuntime/ --path src/hotspot --limit 200")
|
||||
ap.add_argument('--jdk', dest='jdkpath', help='path to OpenJDK git repo', required=True)
|
||||
ap.add_argument('--jbr', dest='jbrpath', help='path to JBR git repo', required=True)
|
||||
ap.add_argument('--path', dest='path', help='limit to changes in this path (relative to git root)')
|
||||
ap.add_argument('--limit', dest='limit', help='limit to this many log entries in --jdk repo', type=int, default=-1)
|
||||
ap.add_argument('-o', dest="output_dir", help="save patches to this directory (created if necessary)")
|
||||
ap.add_argument('-v', dest='verbose', help="verbose output", default=False, action='store_true')
|
||||
args = ap.parse_args()
|
||||
|
||||
if not os.path.isdir(args.jdkpath):
|
||||
fatal(f"{args.jdkpath} not a directory")
|
||||
|
||||
if not os.path.isdir(args.jbrpath):
|
||||
fatal(f"{args.jbrpath} not a directory")
|
||||
|
||||
if not git_is_available():
|
||||
fatal("can't run git commands; make sure git is in PATH")
|
||||
|
||||
self.jdkpath = args.jdkpath
|
||||
self.jbrpath = args.jbrpath
|
||||
self.path = args.path
|
||||
self.limit = args.limit
|
||||
self.output_dir = args.output_dir
|
||||
self.verbose = args.verbose
|
||||
|
||||
|
||||
class GitRepo:
|
||||
def __init__(self, rootpath):
|
||||
self.rootpath = rootpath
|
||||
|
||||
def run_git_cmd(self, git_args):
|
||||
args = ["git", "-C", self.rootpath]
|
||||
args.extend(git_args)
|
||||
# print(f"Runnig git cmd '{' '.join(args)}'")
|
||||
p = subprocess.run(args, capture_output=True, text=True)
|
||||
if p.returncode != 0:
|
||||
fatal(f"git returned non-zero code in {self.rootpath} ({first_line(p.stderr)})")
|
||||
return p.stdout
|
||||
|
||||
def save_git_cmd(self, fname, git_args):
|
||||
args = ["git", "-C", self.rootpath]
|
||||
args.extend(git_args)
|
||||
# print(f"Runnig git cmd '{' '.join(args)}'")
|
||||
with open(fname, "w") as stdout_file:
|
||||
p = subprocess.run(args, stdout=stdout_file)
|
||||
if p.returncode != 0:
|
||||
fatal(f"git returned non-zero code in {self.rootpath} ({first_line(p.stderr)})")
|
||||
|
||||
def current_branch(self):
|
||||
branch_name = self.run_git_cmd(["branch", "--show-current"]).strip()
|
||||
return branch_name
|
||||
|
||||
def log(self, path=None, limit=None):
|
||||
cmds = ["log", "--no-decorate"]
|
||||
if limit:
|
||||
cmds.extend(["-n", str(limit)])
|
||||
if path:
|
||||
cmds.append(path)
|
||||
full_log = self.run_git_cmd(cmds)
|
||||
return full_log
|
||||
|
||||
|
||||
class Commit:
|
||||
def __init__(self, lines):
|
||||
self.sha = lines[0].split()[1]
|
||||
self.message = ""
|
||||
self.bugid = None
|
||||
|
||||
# Commit message starts after one blank line
|
||||
read_message = False
|
||||
for l in lines:
|
||||
if read_message:
|
||||
self.message += l + "\n"
|
||||
if not read_message and l == "":
|
||||
read_message = True
|
||||
|
||||
if self.message and self.message != "" and ":" in self.message:
|
||||
maybe_bugid = self.message.split(":")[0].strip()
|
||||
if 10 >= len(maybe_bugid) >= 4:
|
||||
self.bugid = maybe_bugid
|
||||
|
||||
|
||||
class History:
|
||||
def __init__(self, log):
|
||||
log_itr = iter(log.splitlines())
|
||||
self.commits = []
|
||||
commit_lines = []
|
||||
for line in log_itr:
|
||||
if line.startswith("commit ") and len(commit_lines) > 0:
|
||||
commit = Commit(commit_lines)
|
||||
self.commits.append(commit)
|
||||
commit_lines = []
|
||||
commit_lines.append(line)
|
||||
|
||||
if len(commit_lines) > 0:
|
||||
commit = Commit(commit_lines)
|
||||
self.commits.append(commit)
|
||||
|
||||
def contains(self, str):
|
||||
return any(str in commit.message for commit in self.commits)
|
||||
|
||||
def size(self):
|
||||
return len(self.commits)
|
||||
|
||||
|
||||
def print_explanation(options, jdk, jbr):
|
||||
verbose(options, f"Reading history from '{jdk.rootpath}' on branch '{jdk.current_branch()}'")
|
||||
if options.path:
|
||||
verbose(options, f"\t(only under '{options.path}')")
|
||||
verbose(options, f"Searching for same fixes in '{jbr.rootpath}' on branch '{jbr.current_branch()}'")
|
||||
|
||||
|
||||
def git_is_available():
|
||||
p = None
|
||||
try:
|
||||
p = subprocess.run(["git", "--help"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
except:
|
||||
pass
|
||||
return p is not None and p.returncode == 0
|
||||
|
||||
|
||||
def main():
|
||||
check_python_min_requirements()
|
||||
|
||||
options = Options()
|
||||
|
||||
jdk = GitRepo(options.jdkpath)
|
||||
jbr = GitRepo(options.jbrpath)
|
||||
|
||||
print_explanation(options, jdk, jbr)
|
||||
|
||||
commits_to_save = []
|
||||
try:
|
||||
jdk_log = jdk.log(options.path, options.limit)
|
||||
jdk_history = History(jdk_log)
|
||||
|
||||
jbr_log = jbr.log(options.path)
|
||||
jbr_history = History(jbr_log)
|
||||
|
||||
verbose(options, f"Read {jdk_history.size()} commits in JDK, {jbr_history.size()} in JBR")
|
||||
|
||||
for c in jdk_history.commits:
|
||||
if c.bugid:
|
||||
verbose(options, f"Looking for bugfix for {c.bugid}")
|
||||
if not jbr_history.contains(c.bugid):
|
||||
commits_to_save.append(c)
|
||||
print(f"[note] Fix for {c.bugid} not found in JBR ({jbr.rootpath})")
|
||||
print(f" commit {c.sha}")
|
||||
print(f" {first_line(c.message).strip()}")
|
||||
except KeyboardInterrupt:
|
||||
fatal("Interrupted")
|
||||
|
||||
if len(commits_to_save) > 0 and options.output_dir:
|
||||
print()
|
||||
if not os.path.exists(options.output_dir):
|
||||
verbose(options, f"Creating output directory {options.output_dir}")
|
||||
os.makedirs(options.output_dir)
|
||||
nzeroes = len(str(len(commits_to_save)))
|
||||
for i, c in enumerate(reversed(commits_to_save)):
|
||||
fname = os.path.join(options.output_dir, f"{str(i).zfill(nzeroes)}-{c.bugid}.patch")
|
||||
print(f"[note] {c.bugid} saved as {fname}")
|
||||
fname = os.path.abspath(fname)
|
||||
jdk.save_git_cmd(fname, ["format-patch", "-1", c.sha, "--stdout"])
|
||||
|
||||
script_fname = os.path.join(options.output_dir, "apply.sh")
|
||||
with open(script_fname, "w") as script_file:
|
||||
print(apply_script_code.format(os.path.abspath(jbr.rootpath), os.path.abspath(options.output_dir)),
|
||||
file=script_file)
|
||||
print(f"[note] Execute 'bash {script_fname}' to apply patches to {jbr.rootpath}")
|
||||
|
||||
|
||||
def check_python_min_requirements():
|
||||
if sys.version_info < (3, 6):
|
||||
fatal("Minimum version 3.6 is required to run this script")
|
||||
|
||||
|
||||
apply_script_code = """
|
||||
#!/bin/bash
|
||||
|
||||
GITROOT={0}
|
||||
PATCHROOT={1}
|
||||
|
||||
cd $PATCHROOT || exit 1
|
||||
PATCHES=$(find $PATCHROOT -name '*.patch' | sort -n)
|
||||
|
||||
for P in $PATCHES; do
|
||||
git -C $GITROOT am $P
|
||||
if [ $? != 0 ]; then
|
||||
mv "$P" "$P.failed"
|
||||
echo "[ERROR] Patch $P did not apply cleanly. Try applying it manually."
|
||||
echo "[NOTE] Execute this script to apply the remaining patches."
|
||||
exit 1
|
||||
else
|
||||
mv "$P" "$P.done"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "[NOTE] Done applying patches; check $PATCHROOT for .patch and .patch.failed to see if all have been applied."
|
||||
"""
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -1,46 +0,0 @@
|
||||
# NOTE: This Dockerfile is meant to be used from the mkdocker_aarch64.sh script.
|
||||
|
||||
# Pull a concrete version of Linux that does NOT recieve updates after it's
|
||||
# been created. This is so that the image is as stable as possible to make
|
||||
# image creation reproducible.
|
||||
# NB: this also means there may be no security-related fixes there, need to
|
||||
# move the version to the next manually.
|
||||
|
||||
# jetbrains/runtime:jbr17env_aarch64
|
||||
FROM arm64v8/centos:7
|
||||
|
||||
# Install the necessary build tools
|
||||
RUN yum -y update; \
|
||||
yum -y install centos-release-scl; \
|
||||
yum -y install devtoolset-10-10.1-0.el7; \
|
||||
yum -y install \
|
||||
alsa-lib-devel-1.1.8-1.el7.aarch64 \
|
||||
autoconf-2.69-11.el7.noarch \
|
||||
automake-1.13.4-3.el7.noarch \
|
||||
bzip2-1.0.6-13.el7.aarch64 \
|
||||
cups-devel-1.6.3-51.el7.aarch64 \
|
||||
file-5.11-37.el7.aarch64 \
|
||||
fontconfig-devel-2.13.0-4.3.el7.aarch64 \
|
||||
freetype-devel-2.8-14.el7_9.1.aarch64 \
|
||||
giflib-devel-4.1.6-9.el7.aarch64 \
|
||||
git-1.8.3.1-24.el7_9.aarch64 \
|
||||
libtool-2.4.2-22.el7_3.aarch64 \
|
||||
libXi-devel-1.7.9-1.el7.aarch64 \
|
||||
libXrandr-devel-1.5.1-2.el7.aarch64 \
|
||||
libXrender-devel-0.9.10-1.el7.aarch64 \
|
||||
libXt-devel-1.1.5-3.el7.aarch64 \
|
||||
libXtst-devel-1.2.3-1.el7.aarch64 \
|
||||
make-3.82-24.el7.aarch64 \
|
||||
rsync-3.1.2-12.el7_9.aarch64 \
|
||||
tar-1.26-35.el7.aarch64 \
|
||||
unzip-6.0-24.el7_9.aarch64 \
|
||||
wayland-devel-1.15.0-1.el7 \
|
||||
zip-3.0-11.el7.aarch64; \
|
||||
yum -y clean all
|
||||
|
||||
ENV PATH="/opt/rh/devtoolset-10/root/usr/bin:${PATH}"
|
||||
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 PKG_CONFIG_PATH="/opt/rh/devtoolset-10/root/usr/lib64/pkgconfig"
|
||||
|
||||
RUN git config --global user.email "teamcity@jetbrains.com" && \
|
||||
git config --global user.name "builduser"
|
||||
@@ -1,22 +0,0 @@
|
||||
# NOTE: This Dockerfile is meant to be used from the mkdocker_musl_aarch64.sh script.
|
||||
|
||||
# Pull a concrete version of Linux that does NOT recieve updates after it's
|
||||
# been created. This is so that the image is as stable as possible to make
|
||||
# image creation reproducible.
|
||||
# NB: this also means there may be no security-related fixes there, need to
|
||||
# move the version to the next manually.
|
||||
FROM arm64v8/alpine:3.12
|
||||
|
||||
# Install the necessary build tools
|
||||
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 /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"
|
||||
@@ -1,22 +0,0 @@
|
||||
# NOTE: This Dockerfile is meant to be used from the mkdocker_musl_x64.sh script.
|
||||
|
||||
# Pull a concrete version of Linux that does NOT recieve updates after it's
|
||||
# been created. This is so that the image is as stable as possible to make
|
||||
# image creation reproducible.
|
||||
# NB: this also means there may be no security-related fixes there, need to
|
||||
# move the version to the next manually.
|
||||
FROM alpine:3.14
|
||||
|
||||
# Install the necessary build tools
|
||||
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 /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"
|
||||
@@ -1,55 +0,0 @@
|
||||
# NOTE: This Dockerfile is meant to be used from the mkdocker_x86.sh script.
|
||||
|
||||
# Pull a concrete version of Linux that does NOT receive updates after it's
|
||||
# been created. This is so that the image is as stable as possible to make
|
||||
# image creation reproducible.
|
||||
# NB: this also means there may be no security-related fixes there, need to
|
||||
# move the version to the next manually.
|
||||
#FROM i386/ubuntu:xenial
|
||||
#FROM i386/ubuntu:bionic
|
||||
FROM i386/ubuntu:focal
|
||||
|
||||
RUN linux32 \
|
||||
apt-get update && apt-get install -y --no-install-recommends apt-utils
|
||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||
export DEBCONF_NONINTERACTIVE_SEEN=true && \
|
||||
echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \
|
||||
echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections; \
|
||||
linux32 \
|
||||
apt-get -y install \
|
||||
autoconf \
|
||||
build-essential \
|
||||
curl \
|
||||
file \
|
||||
git \
|
||||
libx11-dev \
|
||||
libxext-dev \
|
||||
libxrender-dev \
|
||||
libxrandr-dev \
|
||||
libxtst-dev \
|
||||
libxt-dev \
|
||||
libcups2-dev \
|
||||
libasound2-data \
|
||||
# libpng12-0 \
|
||||
libasound2 \
|
||||
libfreetype6 \
|
||||
libfontconfig1-dev \
|
||||
libasound2-dev \
|
||||
rsync \
|
||||
unzip \
|
||||
zip
|
||||
RUN linux32 \
|
||||
apt-get -y install \
|
||||
g++-10 \
|
||||
gcc-10 && \
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 && \
|
||||
apt-get clean -qy && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Set up boot JDK for building
|
||||
COPY boot_jdk_x86.tar.gz /jdk17/
|
||||
RUN cd /jdk17 && tar --strip-components=1 -xzf boot_jdk_x86.tar.gz && rm /jdk17/boot_jdk_x86.tar.gz
|
||||
ENV BOOT_JDK=/jdk17
|
||||
|
||||
RUN git config --global user.email "teamcity@jetbrains.com" && \
|
||||
git config --global user.name "builduser"
|
||||
@@ -1,36 +0,0 @@
|
||||
# jetbrains/runtime:jbr17env_x86_64
|
||||
FROM centos:7
|
||||
RUN yum -y install centos-release-scl; \
|
||||
yum -y install devtoolset-10-10.1-0.el7; \
|
||||
yum -y install \
|
||||
alsa-lib-devel-1.1.8-1.el7 \
|
||||
autoconf-2.69-11.el7 \
|
||||
automake-1.13.4-3.el7 \
|
||||
bzip2-1.0.6-13.el7 \
|
||||
cups-devel-1.6.3-51.el7 \
|
||||
file-5.11-37.el7 \
|
||||
fontconfig-devel-2.13.0-4.3.el7 \
|
||||
freetype-devel-2.8-14.el7_9.1 \
|
||||
giflib-devel-4.1.6-9.el7 \
|
||||
git-1.8.3.1-24.el7_9 \
|
||||
libtool-2.4.2-22.el7_3 \
|
||||
libXi-devel-1.7.9-1.el7 \
|
||||
libXrandr-devel-1.5.1-2.el7 \
|
||||
libXrender-devel-0.9.10-1.el7 \
|
||||
libXt-devel-1.1.5-3.el7 \
|
||||
libXtst-devel-1.2.3-1.el7 \
|
||||
make-3.82-24.el7 \
|
||||
tar-1.26-35.el7 \
|
||||
unzip-6.0-24.el7_9 \
|
||||
wayland-devel-1.15.0-1.el7 \
|
||||
wget-1.14-18.el7_6.1 \
|
||||
which-2.20-7.el7 \
|
||||
zip-3.0-11.el7
|
||||
|
||||
RUN mkdir .git && \
|
||||
git config user.email "teamcity@jetbrains.com" && \
|
||||
git config user.name "builduser"
|
||||
|
||||
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"
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# This script creates a Docker image suitable for building AArch64 variant
|
||||
# of the JetBrains Runtime "dev" version.
|
||||
|
||||
BOOT_JDK_REMOTE_FILE=zulu17.30.15-ca-jdk17.0.1-linux_aarch64.tar.gz
|
||||
BOOT_JDK_SHA=4d9c9116eb0cdd2d7fb220d6d27059f4bf1b7e95cc93d5512bd8ce3791af86c7
|
||||
BOOT_JDK_LOCAL_FILE=boot_jdk.tar.gz
|
||||
|
||||
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
|
||||
# Obtain "boot JDK" from outside of the container.
|
||||
wget -nc https://cdn.azul.com/zulu/bin/${BOOT_JDK_REMOTE_FILE} -O $BOOT_JDK_LOCAL_FILE
|
||||
else
|
||||
echo "boot JDK \"$BOOT_JDK_LOCAL_FILE\" present, skipping download"
|
||||
fi
|
||||
|
||||
# Verify that what we've downloaded can be trusted.
|
||||
sha256sum -c - <<EOF
|
||||
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
|
||||
EOF
|
||||
|
||||
docker build -t jbrdevenv_arm64v8 -f Dockerfile.aarch64 .
|
||||
|
||||
# NB: the resulting container can (and should) be used without the network
|
||||
# connection (--network none) during build in order to reduce the chance
|
||||
# of build contamination.
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# This script creates a Docker image suitable for building musl AArch64 variant
|
||||
# of the JetBrains Runtime version 17.
|
||||
|
||||
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
|
||||
# Obtain "boot JDK" from outside of the container.
|
||||
wget -nc https://cdn.azul.com/zulu/bin/${BOOT_JDK_REMOTE_FILE} -O $BOOT_JDK_LOCAL_FILE
|
||||
else
|
||||
echo "boot JDK \"$BOOT_JDK_LOCAL_FILE\" present, skipping download"
|
||||
fi
|
||||
|
||||
# Verify that what we've downloaded can be trusted.
|
||||
sha256sum -c - <<EOF
|
||||
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
|
||||
EOF
|
||||
|
||||
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
|
||||
# of build contamination.
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# This script creates a Docker image suitable for building musl-x64 variant
|
||||
# of the JetBrains Runtime version 17.
|
||||
|
||||
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
|
||||
# Obtain "boot JDK" from outside of the container.
|
||||
wget -nc https://cdn.azul.com/zulu/bin/${BOOT_JDK_REMOTE_FILE} -O $BOOT_JDK_LOCAL_FILE
|
||||
else
|
||||
echo "boot JDK \"$BOOT_JDK_LOCAL_FILE\" present, skipping download"
|
||||
fi
|
||||
|
||||
# Verify that what we've downloaded can be trusted.
|
||||
sha256sum -c - <<EOF
|
||||
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
|
||||
EOF
|
||||
|
||||
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
|
||||
# of build contamination.
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# This script creates a Docker image suitable for building x86 variant
|
||||
# of the JetBrains Runtime version 17.
|
||||
|
||||
BOOT_JDK_REMOTE_FILE=zulu17.34.19-ca-jdk17.0.3-linux_i686.tar.gz
|
||||
BOOT_JDK_SHA=1c35c374ba0001e675d6e80819d5be900c4e141636d5e484992a8c550be14481
|
||||
BOOT_JDK_LOCAL_FILE=boot_jdk_x86.tar.gz
|
||||
|
||||
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
|
||||
# Obtain "boot JDK" from outside of the container.
|
||||
wget -nc https://cdn.azul.com/zulu/bin/${BOOT_JDK_REMOTE_FILE} -O $BOOT_JDK_LOCAL_FILE
|
||||
else
|
||||
echo "boot JDK \"$BOOT_JDK_LOCAL_FILE\" present, skipping download"
|
||||
fi
|
||||
|
||||
# Verify that what we've downloaded can be trusted.
|
||||
sha256sum -c - <<EOF
|
||||
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
|
||||
EOF
|
||||
|
||||
docker build -t jetbrains/runtime:jbr17env_x86 -f Dockerfile.x86 .
|
||||
|
||||
# NB: the resulting container can (and should) be used without the network
|
||||
# connection (--network none) during build in order to reduce the chance
|
||||
# of build contamination.
|
||||
@@ -1 +0,0 @@
|
||||
JetBrainsRuntime
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="IssueNavigationConfiguration">
|
||||
<option name="links">
|
||||
<list>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="(?:^|\s|\p{Punct})([A-Z]+\-\d+)(?=$|\s|\p{Punct})" />
|
||||
<option name="linkRegexp" value="https://youtrack.jetbrains.com/issue/$1" />
|
||||
</IssueNavigationLink>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="(?:^|\s|\p{Punct})(?:JDK-)?(\d{7})(?=$|\s|\p{Punct})" />
|
||||
<option name="linkRegexp" value="https://bugs.openjdk.java.net/browse/JDK-$1" />
|
||||
</IssueNavigationLink>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,13 +0,0 @@
|
||||
<?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>
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<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>
|
||||
</project>
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="IssueNavigationConfiguration">
|
||||
<option name="links">
|
||||
<list>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="(?:^|\s|\p{Punct})([A-Z]+\-\d+)(?=$|\s|\p{Punct})" />
|
||||
<option name="linkRegexp" value="https://youtrack.jetbrains.com/issue/$1" />
|
||||
</IssueNavigationLink>
|
||||
<IssueNavigationLink>
|
||||
<option name="issueRegexp" value="(?:^|\s|\p{Punct})(?:JDK-)?(\d{7})(?=$|\s|\p{Punct})" />
|
||||
<option name="linkRegexp" value="https://bugs.openjdk.java.net/browse/JDK-$1" />
|
||||
</IssueNavigationLink>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,135 +0,0 @@
|
||||
apply plugin: 'java'
|
||||
import org.gradle.internal.os.OperatingSystem
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
def test_jvm = {
|
||||
if (project.hasProperty('jbsdkhome')) {
|
||||
file(jbsdkhome + (OperatingSystem.current().isWindows()?"/bin/java.exe" : "/bin/java")).absolutePath
|
||||
} else {
|
||||
if (OperatingSystem.current().isMacOsX()) {
|
||||
file('../../../build/macosx-x86_64-normal-server-release/images/jdk-bundle/jdk-11.0.4.jdk/Contents/Home/bin/java').absolutePath
|
||||
} else if (OperatingSystem.current().isLinux()) {
|
||||
file('../../../build/linux-x86_64-normal-server-release/images/jdk/bin/java').absolutePath
|
||||
} else {
|
||||
file('../../../build/windows-x86_64-normal-server-release/images/jdk/bin/java.exe').absolutePath
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile('junit:junit:4.12'){
|
||||
exclude group: 'org.hamcrest'
|
||||
}
|
||||
testCompile 'org.hamcrest:hamcrest-library:1.3'
|
||||
testCompile 'net.java.dev.jna:jna:4.4.0'
|
||||
testCompile 'com.twelvemonkeys.imageio:imageio-tiff:3.3.2'
|
||||
testCompile 'org.apache.commons:commons-lang3:3.0'
|
||||
}
|
||||
|
||||
def jdk_modules = ["java.base", "java.logging", "java.prefs",
|
||||
"java.se.ee", "java.sql", "java.datatransfer",
|
||||
"java.management", "java.rmi", "java.security.jgss",
|
||||
"java.sql.rowset", "java.desktop", "java.management.rmi",
|
||||
"java.scripting", "java.security.sasl", "java.transaction",
|
||||
"java.instrument", "java.naming", "java.se",
|
||||
"java.smartcardio", "java.xml.crypto"]
|
||||
|
||||
def jdk_class_dirs = []
|
||||
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
new File("../../../src/" + it + "/share/classes")
|
||||
}
|
||||
|
||||
if (OperatingSystem.current().isMacOsX())
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
"../../../src/" + it + "/macosx/classes"
|
||||
}
|
||||
else if (OperatingSystem.current().isLinux()) {
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
"../../../src/" + it + "/solaris/classes"
|
||||
}
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
"../../../src/" + it + "/unix/classes"
|
||||
}
|
||||
} else
|
||||
jdk_modules.collect(jdk_class_dirs) {
|
||||
"../../../src/" + it + "/windows/classes"
|
||||
}
|
||||
|
||||
sourceSets.main.java.srcDirs = jdk_class_dirs
|
||||
|
||||
sourceSets {
|
||||
test {
|
||||
java {
|
||||
srcDir "../../../test/jdk/jbu"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
test.dependsOn.clear()
|
||||
|
||||
test.dependsOn tasks.compileTestJava
|
||||
|
||||
test {
|
||||
systemProperty "jb.java2d.metal", "true"
|
||||
systemProperty "testdata", file('../../../test/jdk/jbu/testdata').absolutePath
|
||||
|
||||
// Generate golden images for DroidFontTest and MixedTextTest
|
||||
// systemProperty "gentestdata", ""
|
||||
|
||||
// Enable Java2D logging (https://confluence.jetbrains.com/display/JRE/Java2D+Rendering+Logging)
|
||||
// systemProperty "sun.java2d.trace", "log"
|
||||
// systemProperty "sun.java2d.trace", "log,pimpl"
|
||||
|
||||
outputs.upToDateWhen { false }
|
||||
executable = test_jvm()
|
||||
|
||||
// Enable async/dtrace profiler
|
||||
jvmArgs "-XX:+PreserveFramePointer"
|
||||
// Enable native J2D logging (only in debug build)
|
||||
// Can be turned on for J2D by adding "#define DEBUG 1" into jdk/src/share/native/sun/java2d/Trace.h
|
||||
|
||||
// environment 'J2D_TRACE_LEVEL', '4'
|
||||
}
|
||||
|
||||
def buildDir = project.buildscript.sourceFile.parentFile.parentFile.parentFile.parentFile
|
||||
|
||||
def make_cmd = "make"
|
||||
if (OperatingSystem.current().isWindows()) {
|
||||
def cyg_make_cmd = new File("c:/cygwin64/bin/make.exe")
|
||||
if (cyg_make_cmd.exists()) make_cmd = cyg_make_cmd.absolutePath
|
||||
}
|
||||
def test_run = false
|
||||
task make_images {
|
||||
doLast {
|
||||
if (!test_run) {
|
||||
def pb = new ProcessBuilder().command(make_cmd.toString(), "-C", buildDir.absolutePath, "images")
|
||||
def proc = pb.redirectErrorStream(true).start()
|
||||
proc.inputStream.eachLine { println it }
|
||||
assert proc.waitFor() == 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task make_clean {
|
||||
doLast {
|
||||
def pb = new ProcessBuilder().command(make_cmd.toString(), "-C", buildDir.absolutePath, "clean")
|
||||
def proc = pb.redirectErrorStream(true).start()
|
||||
proc.inputStream.eachLine { println it }
|
||||
assert proc.waitFor() == 0
|
||||
}
|
||||
}
|
||||
|
||||
task run_test {
|
||||
doLast {
|
||||
test_run = true
|
||||
}
|
||||
}
|
||||
|
||||
tasks.cleanTest.dependsOn tasks.run_test
|
||||
classes.dependsOn.clear()
|
||||
classes.dependsOn tasks.make_images
|
||||
tasks.cleanClasses.dependsOn tasks.make_clean
|
||||
@@ -1,54 +0,0 @@
|
||||
java.base,
|
||||
java.compiler,
|
||||
java.datatransfer,
|
||||
java.desktop,
|
||||
java.instrument,
|
||||
java.logging,
|
||||
java.management,
|
||||
java.management.rmi,
|
||||
java.naming,
|
||||
java.net.http,
|
||||
java.prefs,
|
||||
java.rmi,
|
||||
java.scripting,
|
||||
java.se,
|
||||
java.security.jgss,
|
||||
java.security.sasl,
|
||||
java.smartcardio,
|
||||
java.sql,
|
||||
java.sql.rowset,
|
||||
java.transaction.xa,
|
||||
java.xml,
|
||||
java.xml.crypto,
|
||||
jdk.accessibility,
|
||||
jdk.attach,
|
||||
jdk.charsets,
|
||||
jdk.compiler,
|
||||
jdk.crypto.cryptoki,
|
||||
jdk.crypto.ec,
|
||||
jdk.dynalink,
|
||||
jdk.httpserver,
|
||||
jdk.internal.ed,
|
||||
jdk.internal.le,
|
||||
jdk.internal.vm.ci,
|
||||
jdk.javadoc,
|
||||
jdk.jdi,
|
||||
jdk.jdwp.agent,
|
||||
jdk.jfr,
|
||||
jdk.jsobject,
|
||||
jdk.localedata,
|
||||
jdk.management,
|
||||
jdk.management.agent,
|
||||
jdk.management.jfr,
|
||||
jdk.naming.dns,
|
||||
jdk.naming.rmi,
|
||||
jdk.net,
|
||||
jdk.sctp,
|
||||
jdk.security.auth,
|
||||
jdk.security.jgss,
|
||||
jdk.unsupported,
|
||||
jdk.unsupported.desktop,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
jdk.hotspot.agent,
|
||||
jdk.jcmd
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/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']"
|
||||
@@ -1,175 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
function check_bundle_type_maketest() {
|
||||
# check whether last char is 't', if so remove it
|
||||
if [ "${bundle_type: -1}" == "t" ]; then
|
||||
bundle_type="${bundle_type%?}"
|
||||
do_maketest=1
|
||||
else
|
||||
do_maketest=0
|
||||
fi
|
||||
}
|
||||
|
||||
function getVersionProp() {
|
||||
grep "^${1}" make/conf/version-numbers.conf | cut -d'=' -f2
|
||||
}
|
||||
|
||||
while getopts ":i?" o; do
|
||||
case "${o}" in
|
||||
i) INC_BUILD=1 ;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
if [[ $# -lt 2 ]]; then
|
||||
echo "Required at least two arguments: build_number bundle_type"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
build_number=$1
|
||||
bundle_type=$2
|
||||
# shellcheck disable=SC2034
|
||||
architecture=${3:-x64} # aarch64 or x64
|
||||
|
||||
check_bundle_type_maketest
|
||||
|
||||
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")
|
||||
VERSION_PATCH=$(getVersionProp "DEFAULT_VERSION_PATCH")
|
||||
[[ $VERSION_UPDATE = 0 ]] && JBSDK_VERSION="$VERSION_FEATURE" || JBSDK_VERSION="${VERSION_FEATURE}.${VERSION_INTERIM}.${VERSION_UPDATE}"
|
||||
[[ $VERSION_PATCH = 0 ]] || JBSDK_VERSION="${VERSION_FEATURE}.${VERSION_INTERIM}.${VERSION_UPDATE}.${VERSION_PATCH}"
|
||||
echo "##teamcity[setParameter name='env.JBSDK_VERSION' value='${JBSDK_VERSION}']"
|
||||
JDK_BUILD_NUMBER=${JDK_BUILD_NUMBER:=$(echo $OPENJDK_TAG | awk -F "-|[+]" '{print $3}')}
|
||||
[ -z $JDK_BUILD_NUMBER ] && JDK_BUILD_NUMBER=1
|
||||
echo "##teamcity[setParameter name='env.JDK_UPDATE_NUMBER' value='${JDK_BUILD_NUMBER}']"
|
||||
|
||||
VENDOR_NAME="JetBrains s.r.o."
|
||||
VENDOR_VERSION_STRING="JBR-${JBSDK_VERSION}+${JDK_BUILD_NUMBER}-${build_number}"
|
||||
[ -z "$bundle_type" ] || VENDOR_VERSION_STRING="${VENDOR_VERSION_STRING}-${bundle_type}"
|
||||
|
||||
do_reset_changes=0
|
||||
do_reset_dcevm=0
|
||||
HEAD_REVISION=0
|
||||
|
||||
STATIC_CONF_ARGS=""
|
||||
common_conf_props_file="jb/project/tools/common/static_conf_args.txt"
|
||||
if [[ -f "$common_conf_props_file" ]]; then
|
||||
STATIC_CONF_ARGS=$(<$common_conf_props_file)
|
||||
fi
|
||||
OS_NAME=$(uname -s)
|
||||
# Enable reproducible builds
|
||||
TZ=UTC
|
||||
export TZ
|
||||
SOURCE_DATE_EPOCH="$(git log -1 --pretty=%ct)"
|
||||
export SOURCE_DATE_EPOCH
|
||||
|
||||
COPYRIGHT_YEAR=""
|
||||
BUILD_TIME=""
|
||||
TOUCH_TIME=""
|
||||
REPRODUCIBLE_TAR_OPTS=""
|
||||
case "$OS_NAME" in
|
||||
Linux)
|
||||
COPYRIGHT_YEAR="$(date --utc --date=@$SOURCE_DATE_EPOCH +%Y)"
|
||||
BUILD_TIME="$(date --utc --date=@$SOURCE_DATE_EPOCH +%F)"
|
||||
REPRODUCIBLE_TAR_OPTS="--mtime=@$SOURCE_DATE_EPOCH --owner=0 --group=0 --numeric-owner --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime"
|
||||
;;
|
||||
CYGWIN*)
|
||||
COPYRIGHT_YEAR="$(date --utc --date=@$SOURCE_DATE_EPOCH +%Y)"
|
||||
BUILD_TIME="$(date --utc --date=@$SOURCE_DATE_EPOCH +%F)"
|
||||
REPRODUCIBLE_TAR_OPTS="--mtime=@$SOURCE_DATE_EPOCH --owner=0 --group=0 --numeric-owner --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime"
|
||||
;;
|
||||
Darwin)
|
||||
COPYRIGHT_YEAR="$(date -u -r $SOURCE_DATE_EPOCH +%Y)"
|
||||
BUILD_TIME="$(date -u -r $SOURCE_DATE_EPOCH +%F)"
|
||||
TOUCH_TIME="$(date -u -r $SOURCE_DATE_EPOCH +%Y%m%d%H%M.%S)"
|
||||
REPRODUCIBLE_TAR_OPTS="--uid 0 --gid 0 --numeric-owner"
|
||||
;;
|
||||
esac
|
||||
|
||||
WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS="--with-native-debug-symbols=zipped"
|
||||
|
||||
REPRODUCIBLE_BUILD_OPTS="--with-source-date=$SOURCE_DATE_EPOCH
|
||||
--with-hotspot-build-time=$BUILD_TIME
|
||||
--with-copyright-year=$COPYRIGHT_YEAR
|
||||
--disable-absolute-paths-in-output
|
||||
--with-build-user=builduser"
|
||||
|
||||
function zip_native_debug_symbols() {
|
||||
image_bundle_path=$(echo $1 | cut -d"/" -f-4)
|
||||
jdk_name=$(echo $1 | cut -d"/" -f5)
|
||||
jbr_diz_name=$2
|
||||
|
||||
[ -d "dizfiles" ] && rm -rf dizfiles
|
||||
mkdir dizfiles
|
||||
|
||||
rsync_target="../../../../dizfiles"
|
||||
[ -z "$jdk_name" ] && rsync_target=$rsync_target"/"$jbr_diz_name
|
||||
(cd $image_bundle_path && find . -name '*.diz' -exec rsync -R {} $rsync_target \;)
|
||||
[ ! -z "$jdk_name" ] && mv dizfiles/$jdk_name dizfiles/$jbr_diz_name
|
||||
|
||||
(cd dizfiles && find $jbr_diz_name -print0 | COPYFILE_DISABLE=1 \
|
||||
tar --no-recursion --null -T - -czf ../"$jbr_diz_name".tar.gz) || do_exit $?
|
||||
}
|
||||
|
||||
function do_exit() {
|
||||
exit_code=$1
|
||||
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
|
||||
if [ $do_reset_dcevm -eq 1 ]; then
|
||||
[ ! -z $HEAD_REVISION ] && git reset --hard $HEAD_REVISION
|
||||
fi
|
||||
exit "$exit_code"
|
||||
}
|
||||
|
||||
function update_jsdk_mods() {
|
||||
__jsdk=$1
|
||||
__jcef_mods=$2
|
||||
__orig_jsdk_mods=$3
|
||||
__updated_jsdk_mods=$4
|
||||
|
||||
# re-create java.desktop.jmod with updated module-info.class
|
||||
tmp=.java.desktop.$$.tmp
|
||||
mkdir "$tmp" || exit $?
|
||||
"$__jsdk"/bin/jmod extract --dir "$tmp" "$__orig_jsdk_mods"/java.desktop.jmod || exit $?
|
||||
"$__jsdk"/bin/javac \
|
||||
--patch-module java.desktop="$__orig_jsdk_mods"/java.desktop.jmod \
|
||||
--module-path "$__jcef_mods" -d "$tmp"/classes src/java.desktop/share/classes/module-info.java || exit $?
|
||||
"$__jsdk"/bin/jmod \
|
||||
create --class-path "$tmp"/classes --config "$tmp"/conf --header-files "$tmp"/include --legal-notice "$tmp"/legal --libs "$tmp"/lib \
|
||||
java.desktop.jmod || exit $?
|
||||
mv java.desktop.jmod "$__updated_jsdk_mods" || exit $?
|
||||
rm -rf "$tmp"
|
||||
|
||||
# re-create java.base.jmod with updated hashes
|
||||
tmp=.java.base.$$.tmp
|
||||
mkdir "$tmp" || exit $?
|
||||
hash_modules=$("$__jsdk"/bin/jmod describe "$__orig_jsdk_mods"/java.base.jmod | grep hashes | awk '{print $2}' | tr '\n' '|' | sed s/\|$//) || exit $?
|
||||
"$__jsdk"/bin/jmod extract --dir "$tmp" "$__orig_jsdk_mods"/java.base.jmod || exit $?
|
||||
rm "$__updated_jsdk_mods"/java.base.jmod || exit $? # temp exclude from path
|
||||
"$__jsdk"/bin/jmod \
|
||||
create --module-path "$__updated_jsdk_mods" --hash-modules "$hash_modules" \
|
||||
--class-path "$tmp"/classes --cmds "$tmp"/bin --config "$tmp"/conf --header-files "$tmp"/include --legal-notice "$tmp"/legal --libs "$tmp"/lib \
|
||||
java.base.jmod || exit $?
|
||||
mv java.base.jmod "$__updated_jsdk_mods" || exit $?
|
||||
rm -rf "$tmp"
|
||||
}
|
||||
|
||||
function get_mods_list() {
|
||||
__mods=$1
|
||||
echo $(ls $__mods) | sed s/\.jmod/,/g | sed s/,$//g | sed s/' '//g
|
||||
}
|
||||
|
||||
function copy_jmods() {
|
||||
__mods_list=$1
|
||||
__jmods_from=$2
|
||||
__jmods_to=$3
|
||||
|
||||
mkdir -p $__jmods_to
|
||||
|
||||
echo "${__mods_list}," | while read -d, mod; do cp $__jmods_from/$mod.jmod $__jmods_to/; done
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
--with-vendor-vm-bug-url=https://youtrack.jetbrains.com/issues/JBR
|
||||
@@ -1,165 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script makes test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
# Environment variables:
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument
|
||||
# to configure
|
||||
# By default JDK_BUILD_NUMBER is set zero
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_linux_aarch64
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_linux_aarch64}
|
||||
|
||||
function do_configure {
|
||||
sh configure \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build="$JDK_BUILD_NUMBER" \
|
||||
--with-version-opt=b"$build_number" \
|
||||
--with-boot-jdk="$BOOT_JDK" \
|
||||
--enable-cds=yes \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function is_musl {
|
||||
libc=$(ldd /bin/ls | grep 'musl' | head -1 | cut -d ' ' -f1)
|
||||
if [ -z $libc ]; then
|
||||
# This is not Musl, return 1 == false
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
libc_type_suffix=''
|
||||
fastdebug_infix=''
|
||||
|
||||
if is_musl; then libc_type_suffix='musl-' ; 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 \
|
||||
--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
|
||||
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__root_dir"/release > release
|
||||
mv release "$IMAGES_DIR"/"$__root_dir"/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
|
||||
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
|
||||
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
|
||||
fi
|
||||
|
||||
# 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
|
||||
|
||||
echo Creating "$JBR".tar.gz ...
|
||||
|
||||
(cd "$IMAGES_DIR" &&
|
||||
find "$__root_dir" -print0 | LC_ALL=C sort -z | \
|
||||
tar $REPRODUCIBLE_TAR_OPTS \
|
||||
--no-recursion --null -T - -cf "$JBR".tar) || do_exit $?
|
||||
mv "$IMAGES_DIR"/"$JBR".tar ./"$JBR".tar
|
||||
[ -f "$JBR".tar.gz ] && rm "$JBR.tar.gz"
|
||||
touch -c -d "@$SOURCE_DATE_EPOCH" "$JBR".tar
|
||||
gzip "$JBR".tar || do_exit $?
|
||||
rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=linux-aarch64-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=1
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=linux-aarch64-server-fastdebug
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "${INC_BUILD:-}" ]; then
|
||||
do_configure || do_exit $?
|
||||
make clean CONF=$RELEASE_NAME || do_exit $?
|
||||
fi
|
||||
make images CONF=$RELEASE_NAME || do_exit $?
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
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
|
||||
modules=$(xargs < jb/project/tools/common/modules.list | sed s/" "//g) || do_exit $?
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
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 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 $?
|
||||
fi
|
||||
|
||||
do_exit 0
|
||||
@@ -1,164 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script makes test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
# Environment variables:
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument
|
||||
# to configure
|
||||
# By default JDK_BUILD_NUMBER is set zero
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_linux_x64
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_linux_x64}
|
||||
|
||||
function do_configure {
|
||||
sh configure \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build="$JDK_BUILD_NUMBER" \
|
||||
--with-version-opt=b"$build_number" \
|
||||
--with-boot-jdk="$BOOT_JDK" \
|
||||
--enable-cds=yes \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function is_musl {
|
||||
libc=$(ldd /bin/ls | grep 'musl' | head -1 | cut -d ' ' -f1)
|
||||
if [ -z $libc ]; then
|
||||
# This is not Musl, return 1 == false
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
libc_type_suffix=''
|
||||
fastdebug_infix=''
|
||||
|
||||
if is_musl; then libc_type_suffix='musl-' ; 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}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x64-${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 \
|
||||
--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
|
||||
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__root_dir"/release > release
|
||||
mv release "$IMAGES_DIR"/"$__root_dir"/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
|
||||
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
|
||||
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
|
||||
fi
|
||||
|
||||
# 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
|
||||
|
||||
echo Creating "$JBR".tar.gz ...
|
||||
|
||||
(cd "$IMAGES_DIR" &&
|
||||
find "$__root_dir" -print0 | LC_ALL=C sort -z | \
|
||||
tar $REPRODUCIBLE_TAR_OPTS \
|
||||
--no-recursion --null -T - -cf "$JBR".tar) || do_exit $?
|
||||
mv "$IMAGES_DIR"/"$JBR".tar ./"$JBR".tar
|
||||
[ -f "$JBR".tar.gz ] && rm "$JBR.tar.gz"
|
||||
touch -c -d "@$SOURCE_DATE_EPOCH" "$JBR".tar
|
||||
gzip "$JBR".tar || do_exit $?
|
||||
#rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=linux-x86_64-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=1
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=linux-x86_64-server-fastdebug
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "${INC_BUILD:-}" ]; then
|
||||
do_configure || do_exit $?
|
||||
make clean CONF=$RELEASE_NAME || do_exit $?
|
||||
fi
|
||||
make images CONF=$RELEASE_NAME || do_exit $?
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
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
|
||||
modules=$(xargs < jb/project/tools/common/modules.list | sed s/" "//g) || do_exit $?
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
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 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 $?
|
||||
fi
|
||||
|
||||
do_exit 0
|
||||
@@ -1,144 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
function do_configure {
|
||||
linux32 bash configure \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build="$JDK_BUILD_NUMBER" \
|
||||
--with-version-opt=b"$build_number" \
|
||||
--with-boot-jdk="$BOOT_JDK" \
|
||||
$STATIC_CONF_ARGS \
|
||||
--enable-cds=yes \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function is_musl {
|
||||
libc=$(ldd /bin/ls | grep 'musl' | head -1 | cut -d ' ' -f1)
|
||||
if [ -z $libc ]; then
|
||||
# This is not Musl, return 1 == false
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
libc_type_suffix=''
|
||||
fastdebug_infix=''
|
||||
|
||||
if is_musl; then libc_type_suffix='musl-' ; 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}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}x86-${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 \
|
||||
--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
|
||||
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__root_dir"/release > release
|
||||
mv release "$IMAGES_DIR"/"$__root_dir"/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
|
||||
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
|
||||
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
|
||||
fi
|
||||
|
||||
# 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
|
||||
|
||||
echo Creating "$JBR".tar.gz ...
|
||||
|
||||
(cd "$IMAGES_DIR" &&
|
||||
find "$__root_dir" -print0 | LC_ALL=C sort -z | \
|
||||
tar $REPRODUCIBLE_TAR_OPTS \
|
||||
--no-recursion --null -T - -cf "$JBR".tar) || do_exit $?
|
||||
mv "$IMAGES_DIR"/"$JBR".tar ./"$JBR".tar
|
||||
[ -f "$JBR".tar.gz ] && rm "$JBR.tar.gz"
|
||||
touch -c -d "@$SOURCE_DATE_EPOCH" "$JBR".tar
|
||||
gzip "$JBR".tar || do_exit $?
|
||||
rm -rf "${IMAGES_DIR:?}"/"$__root_dir"
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=linux-x86-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
echo "not implemented" && do_exit 1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=linux-x86-server-fastdebug
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "${INC_BUILD:-}" ]; then
|
||||
do_configure || do_exit $?
|
||||
make clean CONF=$RELEASE_NAME || do_exit $?
|
||||
fi
|
||||
make images CONF=$RELEASE_NAME || do_exit $?
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(grep -v "jdk.internal.vm" jb/project/tools/common/modules.list | xargs | sed s/" "//g) || do_exit $?
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
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 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 $?
|
||||
fi
|
||||
|
||||
do_exit 0
|
||||
@@ -1,47 +0,0 @@
|
||||
#!/bin/bash
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
|
||||
|
||||
source "$SCRIPT_DIR/jetsign-common.sh" || exit 1
|
||||
|
||||
function isMacOsBinary() {
|
||||
file "$1" | grep -q 'Mach-O'
|
||||
}
|
||||
|
||||
function isSigned() {
|
||||
codesign --verify "$1" >/dev/null 2>&1 && ! grep -q Signature=adhoc < <(codesign --display --verbose "$1" 2>&1)
|
||||
}
|
||||
|
||||
# last argument is a path to be signed
|
||||
pathToBeSigned="$(pwd)/${*: -1}"
|
||||
jetSignArgs=("${@:1:$#-1}")
|
||||
if [[ ! -f "$pathToBeSigned" ]]; then
|
||||
echo "$pathToBeSigned is missing or not a file"
|
||||
exit 1
|
||||
elif isSigned "$pathToBeSigned" && ! isForced "${jetSignArgs[@]}" ; then
|
||||
echo "Already signed: $pathToBeSigned"
|
||||
elif [[ "$JETSIGN_CLIENT" == "null" ]]; then
|
||||
echo "JetSign client is missing, cannot proceed with signing"
|
||||
exit 1
|
||||
elif ! isMacOsBinary "$pathToBeSigned" && [[ "$pathToBeSigned" != *.sit ]] && [[ "$pathToBeSigned" != *.tar.gz ]]; then
|
||||
echo "$pathToBeSigned won't be signed, assumed not to be a macOS executable"
|
||||
else
|
||||
if isMacOsBinary "$pathToBeSigned" && ! isSigned "$pathToBeSigned" ; then
|
||||
echo "Unsigned macOS binary: $pathToBeSigned"
|
||||
fi
|
||||
workDir=$(dirname "$pathToBeSigned")
|
||||
pathSigned="$workDir/signed/${pathToBeSigned##*/}"
|
||||
jetSignExtensions=$(jetSignExtensions "${jetSignArgs[@]}")
|
||||
contentType=$(jetSignContentType "$pathToBeSigned")
|
||||
(
|
||||
cd "$workDir" || exit 1
|
||||
"$JETSIGN_CLIENT" -log-format text -denoted-content-type "$contentType" -extensions "$jetSignExtensions" "$pathToBeSigned"
|
||||
# SRE-1223 (Codesign removes execute bits in executable files) workaround
|
||||
chmod "$(stat -f %A "$pathToBeSigned")" "$pathSigned"
|
||||
if isMacOsBinary "$pathSigned"; then
|
||||
isSigned "$pathSigned"
|
||||
fi
|
||||
rm "$pathToBeSigned"
|
||||
mv "$pathSigned" "$pathToBeSigned"
|
||||
rm -rf "$workDir/signed"
|
||||
)
|
||||
fi
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,63 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
function isForced() {
|
||||
for arg in "$@"; do
|
||||
if [[ "$arg" == --force ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
function jetSignExtensions() {
|
||||
args=("$@")
|
||||
((lastElementIndex=${#args[@]}-1))
|
||||
for index in "${!args[@]}"; do
|
||||
arg=${args[$index]}
|
||||
case "$arg" in
|
||||
--sign | -s)
|
||||
echo -n 'mac_codesign_identity='
|
||||
continue
|
||||
;;
|
||||
--entitlements)
|
||||
echo -n 'mac_codesign_entitlements='
|
||||
continue
|
||||
;;
|
||||
--options=runtime)
|
||||
echo -n 'mac_codesign_options=runtime'
|
||||
;;
|
||||
--force)
|
||||
echo -n 'mac_codesign_force=true'
|
||||
;;
|
||||
--timestamp | --verbose | -v)
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
echo -n "$arg"
|
||||
;;
|
||||
esac
|
||||
if [[ $index != "$lastElementIndex" ]]; then
|
||||
echo -n ","
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# See jetbrains.sign.util.FileUtil.contentType
|
||||
function jetSignContentType() {
|
||||
case "${1##*/}" in
|
||||
*.sit)
|
||||
echo -n 'application/x-mac-app-zip'
|
||||
;;
|
||||
*.tar.gz)
|
||||
echo -n 'application/x-mac-app-targz'
|
||||
;;
|
||||
*.pkg)
|
||||
echo -n 'application/x-mac-pkg'
|
||||
;;
|
||||
*)
|
||||
echo -n 'application/x-mac-app-bin'
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -1,171 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script makes test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
# Environment variables:
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument
|
||||
# to configure
|
||||
# By default JDK_BUILD_NUMBER is set zero
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_mac
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
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" \
|
||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||
--with-macosx-bundle-name-base=${VENDOR_VERSION_STRING} \
|
||||
--with-macosx-bundle-id-base="com.jetbrains.jbr" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build="$JDK_BUILD_NUMBER" \
|
||||
--with-version-opt=b"$build_number" \
|
||||
--with-boot-jdk="$BOOT_JDK" \
|
||||
--enable-cds=yes \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
fastdebug_infix=''
|
||||
|
||||
tmp=.bundle.$$.tmp
|
||||
mkdir "$tmp" || do_exit $?
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-osx-${architecture}-${fastdebug_infix:-}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-osx-${architecture}-${fastdebug_infix:-}b${build_number}
|
||||
|
||||
JRE_CONTENTS=$tmp/$__root_dir/Contents
|
||||
mkdir -p "$JRE_CONTENTS" || do_exit $?
|
||||
|
||||
echo Running jlink...
|
||||
"$JSDK"/bin/jlink \
|
||||
--module-path "$__modules_path" --no-man-pages --compress=2 \
|
||||
--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
|
||||
sed 's/JBR/JBRSDK/g' $JRE_CONTENTS/Home/release > release
|
||||
mv release $JRE_CONTENTS/Home/release
|
||||
cp $IMAGES_DIR/jdk-bundle/jdk-$JBSDK_VERSION.jdk/Contents/Home/lib/src.zip $JRE_CONTENTS/Home/lib
|
||||
copy_jmods "$__modules" "$__modules_path" "$JRE_CONTENTS"/Home/jmods
|
||||
zip_native_debug_symbols $IMAGES_DIR/jdk-bundle/jdk-$JBSDK_VERSION.jdk "${JBR}_diz"
|
||||
fi
|
||||
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
cat $JCEF_PATH/jcef.version >> "$JRE_CONTENTS/Home/release"
|
||||
fi
|
||||
|
||||
cp -R "$JSDK"/../MacOS "$JRE_CONTENTS"
|
||||
cp "$JSDK"/../Info.plist "$JRE_CONTENTS"
|
||||
|
||||
[ -n "$bundle_type" ] && (cp -a $JCEF_PATH/Frameworks "$JRE_CONTENTS" || do_exit $?)
|
||||
|
||||
echo Creating "$JBR".tar.gz ...
|
||||
# Normalize timestamp
|
||||
find "$tmp"/"$__root_dir" -print0 | xargs -0 touch -c -h -t "$TOUCH_TIME"
|
||||
|
||||
(cd "$tmp" &&
|
||||
find "$__root_dir" -print0 | LC_ALL=C sort -z | \
|
||||
COPYFILE_DISABLE=1 tar $REPRODUCIBLE_TAR_OPTS --no-recursion --null -T - \
|
||||
-czf "$JBR".tar.gz --exclude='*.dSYM' --exclude='man') || do_exit $?
|
||||
mv "$tmp"/"$JBR".tar.gz "$JBR".tar.gz
|
||||
rm -rf "$tmp"
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
CONF_ARCHITECTURE=x86_64
|
||||
if [[ "${architecture}" == *aarch64* ]]; then
|
||||
CONF_ARCHITECTURE=aarch64
|
||||
fi
|
||||
RELEASE_NAME=macosx-${CONF_ARCHITECTURE}-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=1
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=1
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=macosx-${CONF_ARCHITECTURE}-server-fastdebug
|
||||
JBSDK=macosx-${architecture}-server-release
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "${INC_BUILD:-}" ]; then
|
||||
do_configure || do_exit $?
|
||||
make clean CONF=$RELEASE_NAME || do_exit $?
|
||||
fi
|
||||
make images CONF=$RELEASE_NAME || do_exit $?
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
|
||||
JSDK=$IMAGES_DIR/jdk-bundle/jdk-$JBSDK_VERSION.jdk/Contents/Home
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
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}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(xargs < jb/project/tools/common/modules.list | sed s/" "//g) || do_exit $?
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat "$JSDK"/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
|
||||
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 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
|
||||
|
||||
do_exit 0
|
||||
@@ -1,40 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
[[ "${SCRIPT_VERBOSE:-}" == "1" ]] && set -x
|
||||
|
||||
APP_PATH=$1
|
||||
|
||||
if [[ -z "$APP_PATH" ]]; then
|
||||
echo "Usage: $0 AppPath"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -f "$APP_PATH" ]]; then
|
||||
echo "AppName '$APP_PATH' does not exist or not a file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function log() {
|
||||
echo "$(date '+[%H:%M:%S]') $*"
|
||||
}
|
||||
|
||||
|
||||
# check required parameters
|
||||
: "${APPLE_ISSUER_ID}"
|
||||
: "${APPLE_KEY_ID}"
|
||||
: "${APPLE_PRIVATE_KEY}"
|
||||
|
||||
# shellcheck disable=SC2064
|
||||
trap "rm -f \"$PWD/tmp_key\"" INT EXIT RETURN
|
||||
echo -n "${APPLE_PRIVATE_KEY}" > tmp_key
|
||||
|
||||
log "Notarizing $APP_PATH..."
|
||||
xcrun notarytool submit --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" "$APP_PATH" 2>&1 | tee "notarytool.submit.out"
|
||||
REQUEST_ID="$(grep -e " id: " "notarytool.submit.out" | grep -oE '([0-9a-f-]{36})'| head -n1)"
|
||||
|
||||
xcrun notarytool wait "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" --timeout 6h ||:
|
||||
xcrun notarytool log "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" developer_log.json ||:
|
||||
xcrun notarytool info "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}"
|
||||
|
||||
log "Notarizing finished"
|
||||
@@ -1,41 +0,0 @@
|
||||
#!/bin/bash
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
|
||||
|
||||
source "$SCRIPT_DIR/jetsign-common.sh" || exit 1
|
||||
|
||||
function isSigned() {
|
||||
pkgutil --check-signature "$1" >/dev/null 2>&1 && grep -q "signed by a developer certificate" < <(pkgutil --check-signature "$1" 2>&1)
|
||||
}
|
||||
|
||||
# second last argument is a path to be signed
|
||||
pathToBeSigned="$(pwd)/${*:(-2):1}"
|
||||
# last argument is a path to signed file
|
||||
pathOut="$(pwd)/${*:(-1)}"
|
||||
jetSignArgs=("${@:1:$#-2}")
|
||||
if [[ ! -f "$pathToBeSigned" ]]; then
|
||||
echo "$pathToBeSigned is missing or not a file"
|
||||
exit 1
|
||||
elif isSigned "$pathToBeSigned" && ! isForced "${jetSignArgs[@]}" ; then
|
||||
echo "Already signed: $pathToBeSigned"
|
||||
elif [[ "$JETSIGN_CLIENT" == "null" ]]; then
|
||||
echo "JetSign client is missing, cannot proceed with signing"
|
||||
exit 1
|
||||
elif [[ "$pathToBeSigned" != *.pkg ]]; then
|
||||
echo "$pathToBeSigned won't be signed, assumed not to be a macOS package"
|
||||
else
|
||||
if ! isSigned "$pathToBeSigned" ; then
|
||||
echo "Unsigned macOS package: $pathToBeSigned"
|
||||
fi
|
||||
workDir=$(dirname "$pathToBeSigned")
|
||||
pathSigned="$workDir/signed/${pathToBeSigned##*/}"
|
||||
jetSignExtensions=$(jetSignExtensions "${jetSignArgs[@]}")
|
||||
contentType=$(jetSignContentType "$pathToBeSigned")
|
||||
(
|
||||
cd "$workDir" || exit 1
|
||||
"$JETSIGN_CLIENT" -log-format text -denoted-content-type "$contentType" -extensions "$jetSignExtensions" "$pathToBeSigned"
|
||||
isSigned "$pathSigned"
|
||||
rm -f "$pathOut"
|
||||
mv "$pathSigned" "$pathOut"
|
||||
rm -rf "$workDir/signed"
|
||||
)
|
||||
fi
|
||||
@@ -1,162 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
[[ "${SCRIPT_VERBOSE:-}" == "1" ]] && set -x
|
||||
|
||||
if [[ $# -lt 5 ]]; then
|
||||
echo "Usage: $0 AppDirectory AppName BundleId CertificateID InstallerCertificateID"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
APPLICATION_PATH=$1
|
||||
PKG_NAME=$2
|
||||
BUNDLE_ID=$3
|
||||
JB_DEVELOPER_CERT=$4
|
||||
JB_INSTALLER_CERT=$5
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
|
||||
|
||||
# Use JetBrains sign utility if it's available
|
||||
if [[ "${JETSIGN_CLIENT:=}" == "null" ]] || [[ "$JETSIGN_CLIENT" == "" ]]; then
|
||||
JB_SIGN=false
|
||||
SIGN_UTILITY="codesign"
|
||||
PRODUCTSIGN_UTILITY="productsign"
|
||||
else
|
||||
JB_SIGN=true
|
||||
SIGN_UTILITY="$SCRIPT_DIR/codesign.sh"
|
||||
PRODUCTSIGN_UTILITY="$SCRIPT_DIR/productsign.sh"
|
||||
fi
|
||||
|
||||
if [[ ! -d "$APPLICATION_PATH" ]]; then
|
||||
echo "AppDirectory '$APPLICATION_PATH' does not exist or not a directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function log() {
|
||||
echo "$(date '+[%H:%M:%S]') $*"
|
||||
}
|
||||
|
||||
# Cleanup files left from previous sign attempt (if any)
|
||||
find "$APPLICATION_PATH" -name '*.cstemp' -exec rm '{}' \;
|
||||
|
||||
log "Signing libraries and executables..."
|
||||
# -perm +111 searches for executables
|
||||
for f in \
|
||||
"Contents/Home/lib" "Contents/MacOS" \
|
||||
"Contents/Home/Frameworks" \
|
||||
"Contents/Frameworks"; do
|
||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
||||
find "$APPLICATION_PATH/$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -name "*.node" -o -perm +111 \) \
|
||||
-exec "$SIGN_UTILITY" --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime --force \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" {} \;
|
||||
fi
|
||||
done
|
||||
|
||||
log "Signing libraries in jars in $APPLICATION_PATH"
|
||||
|
||||
# todo: add set -euo pipefail; into the inner sh -c
|
||||
# `-e` prevents `grep -q && printf` loginc
|
||||
# with `-o pipefail` there's no input for 'while' loop
|
||||
find "$APPLICATION_PATH" -name '*.jar' \
|
||||
-exec sh -c "set -u; unzip -l \"\$0\" | grep -q -e '\.dylib\$' -e '\.jnilib\$' -e '\.so\$' -e '\.tbd\$' -e '^jattach\$' && printf \"\$0\0\" " {} \; |
|
||||
while IFS= read -r -d $'\0' file; do
|
||||
log "Processing libraries in $file"
|
||||
|
||||
rm -rf jarfolder jar.jar
|
||||
mkdir jarfolder
|
||||
filename="${file##*/}"
|
||||
log "Filename: $filename"
|
||||
cp "$file" jarfolder && (cd jarfolder && jar xf "$filename" && rm "$filename")
|
||||
|
||||
find jarfolder \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -name "jattach" \) \
|
||||
-exec "$SIGN_UTILITY" --timestamp \
|
||||
--force \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" {} \;
|
||||
|
||||
(cd jarfolder; zip -q -r -o -0 ../jar.jar .)
|
||||
mv jar.jar "$file"
|
||||
done
|
||||
|
||||
rm -rf jarfolder jar.jar
|
||||
|
||||
log "Signing other files..."
|
||||
# shellcheck disable=SC2043
|
||||
for f in \
|
||||
"Contents/Home/bin"; do
|
||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
||||
find "$APPLICATION_PATH/$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -perm +111 \) \
|
||||
-exec "$SIGN_UTILITY" --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime --force \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" {} \;
|
||||
fi
|
||||
done
|
||||
|
||||
log "Signing whole frameworks..."
|
||||
# shellcheck disable=SC2043
|
||||
if [ "$JB_SIGN" = true ]; then for f in \
|
||||
"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
|
||||
log "Signing '$line':"
|
||||
tar -pczf tmp-to-sign.tar.gz -C "$(dirname "$line")" "$(basename "$line")"
|
||||
"$SIGN_UTILITY" --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
--force \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" tmp-to-sign.tar.gz
|
||||
rm -rf "$line"
|
||||
tar -xzf tmp-to-sign.tar.gz --directory "$(dirname "$line")"
|
||||
rm -f tmp-to-sign.tar.gz
|
||||
done
|
||||
fi
|
||||
done; fi
|
||||
|
||||
log "Checking framework signatures..."
|
||||
for f in \
|
||||
"Contents/Home/Frameworks" "Contents/Frameworks"; do
|
||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
||||
find "$APPLICATION_PATH/$f" -name '*.framework' -maxdepth 1 | while read -r line
|
||||
do
|
||||
log "Checking '$line':"
|
||||
codesign --verify --deep --strict --verbose=4 "$line"
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
log "Signing whole app..."
|
||||
if [ "$JB_SIGN" = true ]; then
|
||||
tar -pczf tmp-to-sign.tar.gz --exclude='man' -C "$(dirname "$APPLICATION_PATH")" "$(basename "$APPLICATION_PATH")"
|
||||
"$SIGN_UTILITY" --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
--force \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" tmp-to-sign.tar.gz
|
||||
rm -rf "$APPLICATION_PATH"
|
||||
tar -xzf tmp-to-sign.tar.gz --directory "$(dirname "$APPLICATION_PATH")"
|
||||
rm -f tmp-to-sign.tar.gz
|
||||
else
|
||||
"$SIGN_UTILITY" --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
--force \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" "$APPLICATION_PATH"
|
||||
fi
|
||||
|
||||
BUILD_NAME="$(basename "$APPLICATION_PATH")"
|
||||
|
||||
log "Creating $PKG_NAME..."
|
||||
rm -rf "$PKG_NAME"
|
||||
|
||||
mkdir -p unsigned
|
||||
pkgbuild --identifier $BUNDLE_ID --root $APPLICATION_PATH \
|
||||
--install-location /Library/Java/JavaVirtualMachines/${BUILD_NAME} unsigned/${PKG_NAME}
|
||||
log "Signing $PKG_NAME..."
|
||||
"$PRODUCTSIGN_UTILITY" --timestamp --sign "$JB_INSTALLER_CERT" unsigned/${PKG_NAME} ${PKG_NAME}
|
||||
|
||||
log "Verifying java is not broken"
|
||||
find "$APPLICATION_PATH" \
|
||||
-type f -name 'java' -perm +111 -exec {} -version \;
|
||||
@@ -1,136 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
#immediately exit script with an error if a command fails
|
||||
set -euo pipefail
|
||||
[[ "${SCRIPT_VERBOSE:-}" == "1" ]] && set -x
|
||||
|
||||
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
|
||||
export COPYFILE_DISABLE=true
|
||||
|
||||
INPUT_FILE=$1
|
||||
EXPLODED=$2.exploded
|
||||
BACKUP_JMODS=$2.backup
|
||||
USERNAME=$3
|
||||
PASSWORD=$4
|
||||
CODESIGN_STRING=$5
|
||||
JB_INSTALLER_CERT=$6
|
||||
NOTARIZE=$7
|
||||
BUNDLE_ID=$8
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
|
||||
|
||||
function log() {
|
||||
echo "$(date '+[%H:%M:%S]') $*"
|
||||
}
|
||||
|
||||
log "Deleting $EXPLODED ..."
|
||||
if test -d "$EXPLODED"; then
|
||||
find "$EXPLODED" -mindepth 1 -maxdepth 1 -exec chmod -R u+wx '{}' \;
|
||||
fi
|
||||
rm -rf "$EXPLODED"
|
||||
mkdir "$EXPLODED"
|
||||
rm -rf "$BACKUP_JMODS"
|
||||
mkdir "$BACKUP_JMODS"
|
||||
|
||||
log "Unzipping $INPUT_FILE to $EXPLODED ..."
|
||||
tar -xzvf "$INPUT_FILE" --directory $EXPLODED
|
||||
BUILD_NAME="$(ls "$EXPLODED")"
|
||||
#sed -i '' s/BNDL/APPL/ $EXPLODED/$BUILD_NAME/Contents/Info.plist
|
||||
rm -f $EXPLODED/$BUILD_NAME/Contents/CodeResources
|
||||
rm "$INPUT_FILE"
|
||||
if test -d $EXPLODED/$BUILD_NAME/Contents/Home/jmods; then
|
||||
mv $EXPLODED/$BUILD_NAME/Contents/Home/jmods $BACKUP_JMODS
|
||||
fi
|
||||
|
||||
log "$INPUT_FILE extracted and removed"
|
||||
|
||||
APP_NAME=$(basename "$INPUT_FILE" | awk -F".tar" '{ print $1 }')
|
||||
PKG_NAME="$APP_NAME.pkg"
|
||||
APPLICATION_PATH=$EXPLODED/$(ls $EXPLODED)
|
||||
|
||||
find "$APPLICATION_PATH/Contents/Home/bin" \
|
||||
-maxdepth 1 -type f -name '*.jnilib' -print0 |
|
||||
while IFS= read -r -d $'\0' file; do
|
||||
if [ -f "$file" ]; then
|
||||
log "Linking $file"
|
||||
b="$(basename "$file" .jnilib)"
|
||||
ln -sf "$b.jnilib" "$(dirname "$file")/$b.dylib"
|
||||
fi
|
||||
done
|
||||
|
||||
find "$APPLICATION_PATH/Contents/" \
|
||||
-maxdepth 1 -type f -name '*.txt' -print0 |
|
||||
while IFS= read -r -d $'\0' file; do
|
||||
if [ -f "$file" ]; then
|
||||
log "Moving $file"
|
||||
mv "$file" "$APPLICATION_PATH/Contents/Resources"
|
||||
fi
|
||||
done
|
||||
|
||||
non_plist=$(find "$APPLICATION_PATH/Contents/" -maxdepth 1 -type f -and -not -name 'Info.plist' | wc -l)
|
||||
if [[ $non_plist -gt 0 ]]; then
|
||||
log "Only Info.plist file is allowed in Contents directory but found $non_plist file(s):"
|
||||
log "$(find "$APPLICATION_PATH/Contents/" -maxdepth 1 -type f -and -not -name 'Info.plist')"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${JETSIGN_CLIENT:=}" == "null" ]] || [[ "$JETSIGN_CLIENT" == "" ]]; then
|
||||
log "Unlocking keychain..."
|
||||
# Make sure *.p12 is imported into local KeyChain
|
||||
security unlock-keychain -p "$PASSWORD" "/Users/$USERNAME/Library/Keychains/login.keychain"
|
||||
fi
|
||||
|
||||
attempt=1
|
||||
limit=3
|
||||
set +e
|
||||
while [[ $attempt -le $limit ]]; do
|
||||
log "Signing (attempt $attempt) $APPLICATION_PATH ..."
|
||||
"$SCRIPT_DIR/sign.sh" "$APPLICATION_PATH" "$PKG_NAME" "$BUNDLE_ID" "$CODESIGN_STRING" "$JB_INSTALLER_CERT"
|
||||
ec=$?
|
||||
if [[ $ec -ne 0 ]]; then
|
||||
((attempt += 1))
|
||||
if [ $attempt -eq $limit ]; then
|
||||
set -e
|
||||
fi
|
||||
log "Signing failed, wait for 30 sec and try to sign again"
|
||||
sleep 30
|
||||
else
|
||||
log "Signing done"
|
||||
codesign -v "$APPLICATION_PATH" -vvvvv
|
||||
log "Check sign done"
|
||||
spctl -a -v $APPLICATION_PATH
|
||||
((attempt += limit))
|
||||
fi
|
||||
done
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$NOTARIZE" = "yes" ]; then
|
||||
log "Notarizing..."
|
||||
"$SCRIPT_DIR/notarize.sh" "$PKG_NAME"
|
||||
log "Stapling..."
|
||||
xcrun stapler staple "$APPLICATION_PATH" ||:
|
||||
xcrun stapler staple "$PKG_NAME" ||:
|
||||
else
|
||||
log "Notarization disabled"
|
||||
log "Stapling disabled"
|
||||
fi
|
||||
|
||||
log "Zipping $BUILD_NAME to $INPUT_FILE ..."
|
||||
(
|
||||
#cd "$EXPLODED"
|
||||
#ditto -c -k --sequesterRsrc --keepParent "$BUILD_NAME" "../$INPUT_FILE"
|
||||
if test -d $BACKUP_JMODS/jmods; then
|
||||
mv $BACKUP_JMODS/jmods $APPLICATION_PATH/Contents/Home
|
||||
fi
|
||||
if [[ "$APPLICATION_PATH" != "$EXPLODED/$BUILD_NAME" ]]; then
|
||||
mv $APPLICATION_PATH $EXPLODED/$BUILD_NAME
|
||||
else
|
||||
echo "No move, source == destination: $APPLICATION_PATH"
|
||||
fi
|
||||
|
||||
tar -pczvf $INPUT_FILE --exclude='man' -C $EXPLODED $BUILD_NAME
|
||||
log "Finished zipping"
|
||||
)
|
||||
rm -rf "$EXPLODED"
|
||||
log "Done"
|
||||
@@ -1,30 +0,0 @@
|
||||
diff --git jb/project/tools/common/modules.list jb/project/tools/common/modules.list
|
||||
index 522acb7cb43..c40e689d5de 100644
|
||||
--- jb/project/tools/common/modules.list
|
||||
+++ jb/project/tools/common/modules.list
|
||||
@@ -51,4 +51,7 @@ jdk.unsupported.desktop,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
jdk.hotspot.agent,
|
||||
-jdk.jcmd
|
||||
+jdk.jcmd,
|
||||
+jcef,
|
||||
+gluegen.rt,
|
||||
+jogl.all
|
||||
diff --git src/java.desktop/share/classes/module-info.java src/java.desktop/share/classes/module-info.java
|
||||
index 897647ee368..781d1809493 100644
|
||||
--- src/java.desktop/share/classes/module-info.java
|
||||
+++ src/java.desktop/share/classes/module-info.java
|
||||
@@ -116,7 +116,11 @@ module java.desktop {
|
||||
// see make/GensrcModuleInfo.gmk
|
||||
exports sun.awt to
|
||||
jdk.accessibility,
|
||||
- jdk.unsupported.desktop;
|
||||
+ jdk.unsupported.desktop,
|
||||
+ jcef,
|
||||
+ jogl.all;
|
||||
+
|
||||
+ exports java.awt.peer to jcef;
|
||||
|
||||
exports java.awt.dnd.peer to jdk.unsupported.desktop;
|
||||
exports sun.awt.dnd to jdk.unsupported.desktop;
|
||||
@@ -1,30 +0,0 @@
|
||||
diff --git jb/project/tools/common/modules.list jb/project/tools/common/modules.list
|
||||
index 522acb7..c40e689 100644
|
||||
--- jb/project/tools/common/modules.list
|
||||
+++ jb/project/tools/common/modules.list
|
||||
@@ -51,4 +51,7 @@ jdk.unsupported.desktop,
|
||||
jdk.xml.dom,
|
||||
jdk.zipfs,
|
||||
jdk.hotspot.agent,
|
||||
-jdk.jcmd
|
||||
+jdk.jcmd,
|
||||
+jcef,
|
||||
+gluegen.rt,
|
||||
+jogl.all
|
||||
diff --git src/java.desktop/share/classes/module-info.java src/java.desktop/share/classes/module-info.java
|
||||
index 897647e..781d180 100644
|
||||
--- src/java.desktop/share/classes/module-info.java
|
||||
+++ src/java.desktop/share/classes/module-info.java
|
||||
@@ -116,7 +116,11 @@ module java.desktop {
|
||||
// see make/GensrcModuleInfo.gmk
|
||||
exports sun.awt to
|
||||
jdk.accessibility,
|
||||
- jdk.unsupported.desktop;
|
||||
+ jdk.unsupported.desktop,
|
||||
+ jcef,
|
||||
+ jogl.all;
|
||||
+
|
||||
+ exports java.awt.peer to jcef;
|
||||
|
||||
exports java.awt.dnd.peer to jdk.unsupported.desktop;
|
||||
exports sun.awt.dnd to jdk.unsupported.desktop;
|
||||
@@ -1,162 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
TC_PRINT=0
|
||||
# Always print TeamCity service messages if running under TeamCity
|
||||
[[ -n "${TEAMCITY_VERSION:-}" ]] && TC_PRINT=1
|
||||
|
||||
while getopts ":t" o; do
|
||||
case "${o}" in
|
||||
t) TC_PRINT=1 ;;
|
||||
*);;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
NEWFILEPATH="$1"
|
||||
CONFIGID="$2"
|
||||
BUILDID="$3"
|
||||
TOKEN="$4"
|
||||
|
||||
if [ ! -f "$NEWFILEPATH" ]; then
|
||||
echo "File not found: $NEWFILEPATH"
|
||||
exit 1
|
||||
fi
|
||||
#
|
||||
# Get the size of new artifact
|
||||
#
|
||||
|
||||
unameOut="$(uname -s)"
|
||||
case "${unameOut}" in
|
||||
Linux*)
|
||||
NEWFILESIZE=$(stat -c%s "$NEWFILEPATH")
|
||||
;;
|
||||
Darwin*)
|
||||
NEWFILESIZE=$(stat -f%z "$NEWFILEPATH")
|
||||
;;
|
||||
CYGWIN*)
|
||||
NEWFILESIZE=$(stat -c%s "$NEWFILEPATH")
|
||||
;;
|
||||
MINGW*)
|
||||
NEWFILESIZE=$(stat -c%s "$NEWFILEPATH")
|
||||
;;
|
||||
*)
|
||||
echo "Unknown machine: ${unameOut}"
|
||||
exit 1
|
||||
esac
|
||||
FILENAME=$(basename "${NEWFILEPATH}")
|
||||
|
||||
#
|
||||
# Get pattern of artifact name
|
||||
# Base filename pattern: <BUNDLE_TYPE>-<JDK_VERSION>-<OS>-<ARCH>-b<BUILD>.tar.gz: jbr_dcevm-17.0.2-osx-x64-b1234.tar.gz
|
||||
# BUNDLE_TYPE: jbr, jbrsdk, jbr_dcevm, jbrsdk_jcef etc.
|
||||
# OS_ARCH_PATTERN - <os_architecture>: osx-x64, linux-aarch64, linux-musl-x64, windows-x64 etc.
|
||||
|
||||
BUNDLE_TYPE=jbrsdk
|
||||
OS_ARCH_PATTERN=""
|
||||
FILE_EXTENSION=tar.gz
|
||||
|
||||
re='(jbr[a-z_]*).*-[0-9_\.]+-(.+)-b[0-9]+(.+)'
|
||||
if [[ $FILENAME =~ $re ]]; then
|
||||
BUNDLE_TYPE=${BASH_REMATCH[1]}
|
||||
OS_ARCH_PATTERN=${BASH_REMATCH[2]}
|
||||
FILE_EXTENSION=${BASH_REMATCH[3]}
|
||||
else
|
||||
echo "File name $FILENAME does not match regex $re"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function test_started_msg() {
|
||||
if [ $TC_PRINT -eq 1 ]; then
|
||||
echo "##teamcity[testStarted name='$1']"
|
||||
fi
|
||||
}
|
||||
|
||||
function test_failed_msg() {
|
||||
if [ $TC_PRINT -eq 1 ]; then
|
||||
echo "##teamcity[testFailed name='$1' message='$2']"
|
||||
fi
|
||||
}
|
||||
|
||||
function test_finished_msg() {
|
||||
if [ $TC_PRINT -eq 1 ]; then
|
||||
echo "##teamcity[testFinished name='$1']"
|
||||
fi
|
||||
}
|
||||
|
||||
test_name="${BUNDLE_TYPE}_${OS_ARCH_PATTERN//\-/_}${FILE_EXTENSION//\./_}"
|
||||
test_started_msg "$test_name"
|
||||
|
||||
echo "BUNDLE_TYPE: $BUNDLE_TYPE"
|
||||
echo "OS_ARCH_PATTERN: $OS_ARCH_PATTERN"
|
||||
echo "FILE_EXTENSION: $FILE_EXTENSION"
|
||||
echo "Size of $FILENAME is $NEWFILESIZE bytes"
|
||||
|
||||
#
|
||||
# Get previous successful build ID
|
||||
# Example:
|
||||
# CONFIGID=IntellijCustomJdk_Jdk17_Master_LinuxX64jcef
|
||||
# BUILDID=12345678
|
||||
#
|
||||
# expected return value
|
||||
# id="123".number="567"
|
||||
#
|
||||
CURL_RESPONSE=$(curl -sSL --header "Authorization: Bearer $TOKEN" "https://buildserver.labs.intellij.net/app/rest/builds/?locator=buildType:(id:$CONFIGID),status:success,count:1,finishDate:(build:$BUILDID,condition:before)")
|
||||
re='id=\"([0-9]+)\".+number=\"([0-9\.]+)\"'
|
||||
|
||||
# ID: Previous successful build id
|
||||
ID=0
|
||||
if [[ $CURL_RESPONSE =~ $re ]]; then
|
||||
ID=${BASH_REMATCH[1]}
|
||||
echo "Previous build ID: $ID"
|
||||
echo "Previous build number: ${BASH_REMATCH[2]}"
|
||||
else
|
||||
msg="ERROR: cannot find previous build"
|
||||
echo "$msg"
|
||||
echo "$CURL_RESPONSE"
|
||||
test_failed_msg "$test_name" "$msg"
|
||||
test_finished_msg "$test_name"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Get artifacts from previous successful build
|
||||
#
|
||||
# expected return value
|
||||
# name="jbrsdk_jcef*.tar.gz size="123'
|
||||
#
|
||||
CURL_RESPONSE=$(curl -sSL --header "Authorization: Bearer $TOKEN" "https://buildserver.labs.intellij.net/app/rest/builds/$ID?fields=id,number,artifacts(file(name,size))")
|
||||
echo "Artifacts of the previous build:"
|
||||
echo "$CURL_RESPONSE"
|
||||
|
||||
# Find binary size (in response) with reg exp
|
||||
re="name=\"(${BUNDLE_TYPE}[^\"]+${OS_ARCH_PATTERN}[^\"]+${FILE_EXTENSION})\" size=\"([0-9]+)\""
|
||||
|
||||
if [[ $CURL_RESPONSE =~ $re ]]; then
|
||||
prevFileName=${BASH_REMATCH[1]}
|
||||
echo "Previous artifact name: $prevFileName"
|
||||
prevFileSize=${BASH_REMATCH[2]}
|
||||
echo "Previous artifact size: $prevFileSize"
|
||||
|
||||
((allowedSize=prevFileSize+prevFileSize/20)) # use 5% threshold
|
||||
echo "Allowed size: $allowedSize"
|
||||
if [[ "$NEWFILESIZE" -gt "$allowedSize" ]]; then
|
||||
msg="ERROR: new size is significantly greater than previous size (need to investigate)"
|
||||
echo "$msg"
|
||||
test_failed_msg "$test_name" "$msg"
|
||||
test_finished_msg "$test_name"
|
||||
exit 1
|
||||
else
|
||||
echo "PASSED"
|
||||
test_finished_msg "$test_name"
|
||||
fi
|
||||
else
|
||||
msg="ERROR: cannot find string with size in xml response:"
|
||||
echo "Regex: $re"
|
||||
echo "$msg"
|
||||
echo "$CURL_RESPONSE"
|
||||
test_failed_msg "$test_name" "$msg"
|
||||
test_finished_msg "$test_name"
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,93 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
usage ()
|
||||
{
|
||||
echo "Usage: perfcmp.sh [options] <test_results_cur> <test_results_ref> <results> <test_prefix> <noHeaders>"
|
||||
echo "Options:"
|
||||
echo -e " -h, --help\tdisplay this help"
|
||||
echo -e " -tc\tprint teacmity statistic"
|
||||
echo -e "test_results_cur - the file with metrics values for the current measuring"
|
||||
echo -e "test_results_ref - the file with metrics values for the reference measuring"
|
||||
echo -e "results - results of comaprison"
|
||||
echo -e "test_prefix - specifys measuring type, makes sense for enabled -tc, by default no prefixes"
|
||||
echo -e "noHeaders - by default 1-st line contains headers"
|
||||
echo -e ""
|
||||
echo -e "test_results_* files content should be in csv format with header and tab separator:"
|
||||
echo -e "The 1-st column is the test name"
|
||||
echo -e "The 2-st column is the test value"
|
||||
echo -e ""
|
||||
echo -e "Example:"
|
||||
echo -e "Test Value"
|
||||
echo -e "Testname 51.54"
|
||||
}
|
||||
|
||||
while [ -n "$1" ]
|
||||
do
|
||||
case "$1" in
|
||||
-h | --help) usage
|
||||
exit 1 ;;
|
||||
-tc) tc=1
|
||||
shift
|
||||
break ;;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ "$#" < "3" ]]; then
|
||||
echo "Error: Invalid arguments"
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
curFile=$1
|
||||
refFile=$2
|
||||
resFile=$3
|
||||
testNamePrefix=$4
|
||||
noHeaders=$5
|
||||
echo $curFile
|
||||
echo $refFile
|
||||
echo $resFile
|
||||
|
||||
curValues=`cat "$curFile" | cut -f 2 | tr -d '\t'`
|
||||
if [ -z $noHeaders ]; then
|
||||
curValuesHeader=`echo "$curValues" | head -n +1`_cur
|
||||
header=`cat "$refFile" | head -n +1 | awk -F'\t' -v x=$curValuesHeader '{print " "$1"\t"$2"_ref\t"x"\tratio"}'`
|
||||
testContent=`paste -d '\t' $refFile <(echo "$curValues") | tail -n +2`
|
||||
else
|
||||
testContent=`paste -d '\t' $refFile <(echo "$curValues") | tail -n +1`
|
||||
fi
|
||||
|
||||
testContent=`echo "$testContent" | tr "," "." | awk -F'\t' '{
|
||||
if ($3>$2+$2*0.1) {
|
||||
print "* "$1"\t"$2"\t"$3"\t"(($2>0)?$3/$2:"-")
|
||||
} else {
|
||||
print " "$1"\t"$2"\t"$3"\t"(($2>0)?$3/$2:"-")
|
||||
}
|
||||
}'`
|
||||
if [ -z $noHeaders ]; then
|
||||
echo "$header" > $resFile
|
||||
fi
|
||||
echo "$testContent" >> $resFile
|
||||
cat "$resFile" | tr '\t' ';' | column -t -s ';' | tee $resFile
|
||||
|
||||
if [ -z $tc ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
failed=0
|
||||
echo "$testContent" 2>&1 | (
|
||||
while read -r s; do
|
||||
testname=`echo "$s" | cut -f 1 | tr -d "[:space:]" | tr -d "*"`
|
||||
duration=`echo "$s" | cut -f 3`
|
||||
echo "$s" | cut -c1 | grep -c "*" && failed=1
|
||||
echo \#\#teamcity[testStarted name=\'$testNamePrefix$testname\']
|
||||
echo "===>$s"
|
||||
echo \#\#teamcity[buildStatisticValue key=\'$testNamePrefix$testname\' value=\'$duration\']
|
||||
[ $failed -eq 1 ] && echo \#\#teamcity[testFailed name=\'$testNamePrefix$testname\' message=\'$s\']
|
||||
echo \#\#teamcity[testFinished name=\'$testNamePrefix$testname\' duration=\'$duration\']
|
||||
failed=0
|
||||
done
|
||||
)
|
||||
@@ -1,151 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script makes test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
# Environment variables:
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument
|
||||
# to configure
|
||||
# By default JDK_BUILD_NUMBER is set zero
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_win_aarch64
|
||||
|
||||
if [ -z "$BUILD_JDK" ]; then
|
||||
echo "BUILD_JDK environment variable must be specified and point to a JDK built from the current sources" \
|
||||
" and is able to run on the build system. See OpenJDK documentation for --with-build-jdk for more info."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
WORK_DIR=$(pwd)
|
||||
JCEF_PATH=${JCEF_PATH:=$WORK_DIR/jcef_win_aarch64}
|
||||
NVDA_PATH=${NVDA_PATH:=$WORK_DIR/nvda_controllerClient}
|
||||
|
||||
function do_configure {
|
||||
sh ./configure \
|
||||
--enable-option-checking=fatal \
|
||||
--openjdk-target=aarch64-unknown-cygwin \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=$JDK_BUILD_NUMBER \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-toolchain-version=$TOOLCHAIN_VERSION \
|
||||
--with-boot-jdk=$BOOT_JDK \
|
||||
--with-build-jdk=$BUILD_JDK \
|
||||
--with-nvdacontrollerclient=$NVDA_PATH \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
fastdebug_infix=''
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-aarch64-${fastdebug_infix}b${build_number}
|
||||
|
||||
echo Running jlink ...
|
||||
${BUILD_JDK}/bin/jlink \
|
||||
--module-path $__modules_path --no-man-pages --compress=2 \
|
||||
--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
|
||||
sed 's/JBR/JBRSDK/g' $__root_dir/release > release
|
||||
mv release $__root_dir/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip $__root_dir/lib
|
||||
for dir in $(ls -d $IMAGES_DIR/jdk/*); do
|
||||
rsync -amv --include="*/" --include="*.pdb" --exclude="*" $dir $__root_dir
|
||||
done
|
||||
copy_jmods "$__modules" "$__modules_path" "$__root_dir"/jmods
|
||||
fi
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=windows-aarch64-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=0
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=0
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=windows-aarch64-server-fastdebug
|
||||
;;
|
||||
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_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_API_JBR_VERSION=TEST || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME images || do_exit $?
|
||||
fi
|
||||
fi
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
where cygpath
|
||||
if [ $? -eq 0 ]; then
|
||||
JCEF_PATH="$(cygpath -w $JCEF_PATH | sed 's/\\/\//g')"
|
||||
fi
|
||||
|
||||
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 "$BUILD_JDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not unchanged
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(xargs < jb/project/tools/common/modules.list | sed s/" "//g) || do_exit $?
|
||||
modules+=",jdk.crypto.mscapi"
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat ${JSDK}/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\r//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
|
||||
do_exit 0
|
||||
@@ -1,142 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script makes test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
# Environment variables:
|
||||
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument
|
||||
# to configure
|
||||
# By default JDK_BUILD_NUMBER is set zero
|
||||
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||
# By default JCEF binaries should be located in ./jcef_win_x64
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
WORK_DIR=$(pwd)
|
||||
JCEF_PATH=${JCEF_PATH:=$WORK_DIR/jcef_win_x64}
|
||||
NVDA_PATH=${NVDA_PATH:=$WORK_DIR/nvda_controllerClient}
|
||||
|
||||
function do_configure {
|
||||
sh ./configure \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=$JDK_BUILD_NUMBER \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-toolchain-version=$TOOLCHAIN_VERSION \
|
||||
--with-boot-jdk=$BOOT_JDK \
|
||||
--with-nvdacontrollerclient=$NVDA_PATH \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
fastdebug_infix=''
|
||||
|
||||
[ "$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}
|
||||
|
||||
echo Running jlink ...
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path $__modules_path --no-man-pages --compress=2 \
|
||||
--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
|
||||
sed 's/JBR/JBRSDK/g' $__root_dir/release > release
|
||||
mv release $__root_dir/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip $__root_dir/lib
|
||||
for dir in $(ls -d $IMAGES_DIR/jdk/*); do
|
||||
rsync -amv --include="*/" --include="*.pdb" --exclude="*" $dir $__root_dir
|
||||
done
|
||||
copy_jmods "$__modules" "$__modules_path" "$__root_dir"/jmods
|
||||
fi
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=windows-x86_64-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
do_reset_changes=0
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=0
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=windows-x86_64-server-fastdebug
|
||||
;;
|
||||
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_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_API_JBR_VERSION=TEST || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME images || do_exit $?
|
||||
fi
|
||||
fi
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
where cygpath
|
||||
if [ $? -eq 0 ]; then
|
||||
JCEF_PATH="$(cygpath -w $JCEF_PATH | sed 's/\\/\//g')"
|
||||
fi
|
||||
|
||||
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 unchanged
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(xargs < jb/project/tools/common/modules.list | sed s/" "//g) || do_exit $?
|
||||
modules+=",jdk.crypto.mscapi"
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat ${JSDK}/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\r//g | sed s/\\n//g)
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
|
||||
do_exit 0
|
||||
@@ -1,131 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# $ ./java --version
|
||||
# openjdk 11.0.6 2020-01-14
|
||||
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
|
||||
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
|
||||
#
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
WORK_DIR=$(pwd)
|
||||
NVDA_PATH=${NVDA_PATH:=$WORK_DIR/nvda_controllerClient}
|
||||
|
||||
|
||||
function do_configure {
|
||||
sh ./configure \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||
--with-jvm-features=shenandoahgc \
|
||||
--with-version-pre= \
|
||||
--with-version-build=$JDK_BUILD_NUMBER \
|
||||
--with-version-opt=b${build_number} \
|
||||
--with-toolchain-version=$TOOLCHAIN_VERSION \
|
||||
--with-boot-jdk=$BOOT_JDK \
|
||||
--with-nvdacontrollerclient=$NVDA_PATH \
|
||||
--disable-ccache \
|
||||
--enable-cds=yes \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
function create_image_bundle {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
__modules_path=$3
|
||||
__modules=$4
|
||||
|
||||
fastdebug_infix=''
|
||||
|
||||
[ "$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}
|
||||
|
||||
echo Running jlink ...
|
||||
${JSDK}/bin/jlink \
|
||||
--module-path $__modules_path --no-man-pages --compress=2 \
|
||||
--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
|
||||
sed 's/JBR/JBRSDK/g' $__root_dir/release > release
|
||||
mv release $__root_dir/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip $__root_dir/lib
|
||||
for dir in $(ls -d $IMAGES_DIR/jdk/*); do
|
||||
rsync -amv --include="*/" --include="*.pdb" --exclude="*" $dir $__root_dir
|
||||
done
|
||||
copy_jmods "$__modules" "$__modules_path" "$__root_dir"/jmods
|
||||
fi
|
||||
}
|
||||
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=windows-x86_64-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef")
|
||||
echo "not implemented" && do_exit 1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
"fd")
|
||||
do_reset_changes=0
|
||||
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||
RELEASE_NAME=windows-x86_64-server-fastdebug
|
||||
;;
|
||||
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_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_API_JBR_VERSION=TEST || do_exit $?
|
||||
else
|
||||
make LOG=info CONF=$RELEASE_NAME images || do_exit $?
|
||||
fi
|
||||
fi
|
||||
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
JSDK=$IMAGES_DIR/jdk
|
||||
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
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 unchanged
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
modules=$(grep -v "jdk.internal.vm" jb/project/tools/common/modules.list | xargs | sed s/" "//g) || do_exit $?
|
||||
modules+=",jdk.crypto.mscapi"
|
||||
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat ${JSDK}/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\r//g | sed s/\\n//g)
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
|
||||
do_exit 0
|
||||
@@ -1,57 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script packs test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
[ "$bundle_type" == "jcef" ] && do_maketest=1
|
||||
|
||||
function pack_jbr {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
|
||||
fastdebug_infix=''
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-windows-aarch64-${fastdebug_infix}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-aarch64-${fastdebug_infix}b${build_number}
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
|
||||
}
|
||||
|
||||
[ "$bundle_type" == "nomod" ] && bundle_type=""
|
||||
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
RELEASE_NAME=windows-aarch64-server-release
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
BASE_DIR=.
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
pack_jbr jbr${jbr_name_postfix} jbr
|
||||
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
|
||||
@@ -1,57 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# jcef - the release bundles with jcef
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
# This script packs test-image along with JDK images when bundle_type is set to "jcef".
|
||||
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||
#
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
[ "$bundle_type" == "jcef" ] && do_maketest=1
|
||||
|
||||
function pack_jbr {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
|
||||
fastdebug_infix=''
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-windows-x64-${fastdebug_infix}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-x64-${fastdebug_infix}b${build_number}
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
chmod -R ug+rwx,o+rx ${BASE_DIR}/$__root_dir
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
|
||||
}
|
||||
|
||||
[ "$bundle_type" == "nomod" ] && bundle_type=""
|
||||
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
RELEASE_NAME=windows-x86_64-server-release
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
BASE_DIR=.
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
pack_jbr jbr${jbr_name_postfix} jbr
|
||||
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
|
||||
@@ -1,53 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# The following parameters must be specified:
|
||||
# build_number - specifies the number of JetBrainsRuntime build
|
||||
# bundle_type - specifies bundle to be built;possible values:
|
||||
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||
# fd - the fastdebug bundles which also include the jcef module
|
||||
#
|
||||
|
||||
source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
[ "$bundle_type" == "jcef" ] && echo "not implemented" && do_exit 1
|
||||
|
||||
function pack_jbr {
|
||||
__bundle_name=$1
|
||||
__arch_name=$2
|
||||
|
||||
fastdebug_infix=''
|
||||
|
||||
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||
JBR=${__bundle_name}-${JBSDK_VERSION}-windows-x86-${fastdebug_infix}b${build_number}
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-x86-${fastdebug_infix}b${build_number}
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
chmod -R ug+rwx,o+rx ${BASE_DIR}/$__root_dir
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
|
||||
}
|
||||
|
||||
[ "$bundle_type" == "nomod" ] && bundle_type=""
|
||||
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
RELEASE_NAME=windows-x86_64-server-release
|
||||
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||
BASE_DIR=.
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
pack_jbr jbr${jbr_name_postfix} jbr
|
||||
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
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 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
|
||||
@@ -449,7 +449,7 @@ ifneq ($(filter jcov-bundles, $(MAKECMDGOALS)), )
|
||||
BUNDLE_NAME := $(JCOV_BUNDLE_NAME), \
|
||||
FILES := $(JCOV_BUNDLE_FILES), \
|
||||
BASE_DIRS := $(JCOV_IMAGE_DIR), \
|
||||
SUBDIR := jdk-$(VERSION_NUMBER), \
|
||||
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
JCOV_TARGETS += $(BUILD_JCOV_BUNDLE)
|
||||
|
||||
@@ -171,41 +171,41 @@ $(BUILD_DEMO_CodePointIM_JAR): $(CODEPOINT_METAINF_SERVICE_FILE)
|
||||
|
||||
$(eval $(call SetupBuildDemo, FileChooserDemo, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked this-escape, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, SwingSet2, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
EXTRA_COPY_TO_JAR := .java, \
|
||||
EXTRA_MANIFEST_ATTR := SplashScreen-Image: resources/images/splash.png, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked static serial cast this-escape, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked static serial cast, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, Font2DTest, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked serial cast this-escape, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked serial cast, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, J2Ddemo, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
MAIN_CLASS := java2d.J2Ddemo, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked cast lossy-conversions this-escape, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked cast lossy-conversions, \
|
||||
JAR_NAME := J2Ddemo, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, Metalworks, \
|
||||
DISABLED_WARNINGS := rawtypes unchecked this-escape, \
|
||||
DISABLED_WARNINGS := rawtypes unchecked, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, Notepad, \
|
||||
DISABLED_WARNINGS := rawtypes this-escape, \
|
||||
DISABLED_WARNINGS := rawtypes, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, Stylepad, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
DISABLED_WARNINGS := rawtypes unchecked this-escape, \
|
||||
DISABLED_WARNINGS := rawtypes unchecked, \
|
||||
EXTRA_SRC_DIR := $(DEMO_SHARE_SRC)/jfc/Notepad, \
|
||||
EXCLUDE_FILES := $(DEMO_SHARE_SRC)/jfc/Notepad/README.txt, \
|
||||
))
|
||||
@@ -215,12 +215,11 @@ $(eval $(call SetupBuildDemo, SampleTree, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, TableExample, \
|
||||
DISABLED_WARNINGS := rawtypes unchecked deprecation this-escape, \
|
||||
DISABLED_WARNINGS := rawtypes unchecked deprecation, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupBuildDemo, TransparentRuler, \
|
||||
DISABLED_WARNINGS := this-escape, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
MAIN_CLASS := transparentruler.Ruler, \
|
||||
))
|
||||
|
||||
@@ -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
|
||||
@@ -98,7 +98,6 @@ define SetupInterimModule
|
||||
EXCLUDES := sun javax/tools/snippet-files, \
|
||||
EXCLUDE_FILES := $(TOPDIR)/src/$1/share/classes/module-info.java \
|
||||
$(TOPDIR)/src/$1/share/classes/javax/tools/ToolProvider.java \
|
||||
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/Main.java \
|
||||
Standard.java, \
|
||||
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java \
|
||||
$($1.interim_EXTRA_FILES), \
|
||||
@@ -110,9 +109,7 @@ define SetupInterimModule
|
||||
$$(INTERIM_LANGTOOLS_ADD_EXPORTS) \
|
||||
--patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim \
|
||||
--add-exports java.base/jdk.internal.javac=java.compiler.interim \
|
||||
--add-exports java.base/jdk.internal.javac=jdk.compiler.interim \
|
||||
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.compiler.interim \
|
||||
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.javadoc.interim, \
|
||||
--add-exports java.base/jdk.internal.javac=jdk.compiler.interim, \
|
||||
))
|
||||
|
||||
$1_DEPS_INTERIM := $$(addsuffix .interim, $$(filter \
|
||||
|
||||
@@ -53,7 +53,7 @@ $(eval $(call SetupJavaCompilation, BUILD_JIGSAW_TOOLS, \
|
||||
build/tools/jigsaw, \
|
||||
COPY := .properties .html, \
|
||||
BIN := $(TOOLS_CLASSES_DIR), \
|
||||
DISABLED_WARNINGS := fallthrough this-escape, \
|
||||
DISABLED_WARNINGS := fallthrough, \
|
||||
JAVAC_FLAGS := \
|
||||
--add-modules jdk.jdeps \
|
||||
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \
|
||||
|
||||
@@ -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
|
||||
@@ -57,9 +57,7 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
|
||||
JAVAC_FLAGS := \
|
||||
--add-exports java.desktop/sun.awt=ALL-UNNAMED \
|
||||
--add-exports java.base/sun.text=ALL-UNNAMED \
|
||||
--add-exports java.base/sun.security.util=ALL-UNNAMED \
|
||||
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.compiler.interim \
|
||||
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.javadoc.interim, \
|
||||
--add-exports java.base/sun.security.util=ALL-UNNAMED, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_TOOLS_JDK)
|
||||
@@ -71,13 +69,6 @@ $(eval $(call SetupCopyFiles,COPY_NIMBUS_TEMPLATES, \
|
||||
|
||||
TARGETS += $(COPY_NIMBUS_TEMPLATES)
|
||||
|
||||
$(eval $(call SetupCopyFiles,COPY_CLDRCONVERTER_PROPERTIES, \
|
||||
SRC := $(TOPDIR)/make/jdk/src/classes/build/tools/cldrconverter, \
|
||||
DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/cldrconverter, \
|
||||
FILES := $(wildcard $(TOPDIR)/make/jdk/src/classes/build/tools/cldrconverter/*.properties)))
|
||||
|
||||
TARGETS += $(COPY_CLDRCONVERTER_PROPERTIES)
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call SetupJavaCompilation, COMPILE_DEPEND, \
|
||||
@@ -92,9 +83,7 @@ $(eval $(call SetupJavaCompilation, COMPILE_DEPEND, \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
|
||||
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.compiler.interim \
|
||||
--add-exports jdk.internal.opt/jdk.internal.opt=jdk.javadoc.interim, \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED, \
|
||||
))
|
||||
|
||||
DEPEND_SERVICE_PROVIDER := $(BUILDTOOLS_OUTPUTDIR)/depend/META-INF/services/com.sun.source.util.Plugin
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1997, 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
|
||||
@@ -110,15 +110,13 @@ JAVA_WARNINGS_ARE_ERRORS ?= -Werror
|
||||
JAVADOC_OPTIONS := -use -keywords -notimestamp \
|
||||
-encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
|
||||
-splitIndex --system none -javafx --expand-requires transitive \
|
||||
--override-methods=summary \
|
||||
--no-external-specs-page
|
||||
--override-methods=summary
|
||||
|
||||
# The reference options must stay stable to allow for comparisons across the
|
||||
# development cycle.
|
||||
REFERENCE_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \
|
||||
-encoding ISO-8859-1 -breakiterator -splitIndex --system none \
|
||||
-html5 -javafx --expand-requires transitive \
|
||||
--no-external-specs-page
|
||||
-html5 -javafx --expand-requires transitive
|
||||
|
||||
# Should we add DRAFT stamps to the generated javadoc?
|
||||
ifeq ($(VERSION_IS_GA), true)
|
||||
|
||||
@@ -125,11 +125,6 @@ test-prebuilt:
|
||||
$(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \
|
||||
test-prebuilt CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
|
||||
|
||||
test-prebuilt-with-exit-code:
|
||||
@( cd $(topdir) && \
|
||||
$(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \
|
||||
test-prebuilt-with-exit-code CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
|
||||
|
||||
# Alias for backwards compatibility
|
||||
run-test-prebuilt: test-prebuilt
|
||||
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
#
|
||||
# Copyright 2000-2023 JetBrains s.r.o.
|
||||
# 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.
|
||||
#
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
|
||||
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)
|
||||
|
||||
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
|
||||
.PHONY: $(JBR_API_VERSION_PROPERTIES)
|
||||
JBR_API_FAIL_ON_HASH_MISMATCH := true
|
||||
endif
|
||||
|
||||
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, \
|
||||
))
|
||||
|
||||
$(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) 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
|
||||
@@ -257,46 +257,6 @@ $(eval $(call SetupTarget, hotspot-ide-project, \
|
||||
ARGS := -I$(TOPDIR)/make/hotspot, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTarget, eclipse-java-env, \
|
||||
MAKEFILE := ide/eclipse/CreateWorkspace, \
|
||||
ARGS := --always-make WORKSPACE=java SHARED=false, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTarget, eclipse-hotspot-env, \
|
||||
MAKEFILE := ide/eclipse/CreateWorkspace, \
|
||||
ARGS := --always-make WORKSPACE=hotspot SHARED=false, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTarget, eclipse-native-env, \
|
||||
MAKEFILE := ide/eclipse/CreateWorkspace, \
|
||||
ARGS := --always-make WORKSPACE=native SHARED=false, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTarget, eclipse-mixed-env, \
|
||||
MAKEFILE := ide/eclipse/CreateWorkspace, \
|
||||
ARGS := --always-make SHARED=false, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTarget, eclipse-shared-java-env, \
|
||||
MAKEFILE := ide/eclipse/CreateWorkspace, \
|
||||
ARGS := --always-make WORKSPACE=java SHARED=true, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTarget, eclipse-shared-hotspot-env, \
|
||||
MAKEFILE := ide/eclipse/CreateWorkspace, \
|
||||
ARGS := --always-make WORKSPACE=hotspot SHARED=true, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTarget, eclipse-shared-native-env, \
|
||||
MAKEFILE := ide/eclipse/CreateWorkspace, \
|
||||
ARGS := --always-make WORKSPACE=native SHARED=true, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTarget, eclipse-shared-mixed-env, \
|
||||
MAKEFILE := ide/eclipse/CreateWorkspace, \
|
||||
ARGS := --always-make SHARED=true, \
|
||||
))
|
||||
|
||||
ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \
|
||||
$(HOTSPOT_VARIANT_LIBS_TARGETS)
|
||||
|
||||
@@ -747,22 +707,6 @@ ifeq ($(BUILD_FAILURE_HANDLER), true)
|
||||
))
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_JTREG_TEST_THREAD_FACTORY), true)
|
||||
# Builds the test thread factory jtreg extension
|
||||
$(eval $(call SetupTarget, build-test-test-thread-factory, \
|
||||
MAKEFILE := test/BuildJtregTestThreadFactory, \
|
||||
TARGET := build, \
|
||||
DEPS := interim-langtools exploded-image, \
|
||||
))
|
||||
|
||||
# Copies the jtreg test thread factory into the test image
|
||||
$(eval $(call SetupTarget, test-image-test-thread-factory, \
|
||||
MAKEFILE := test/BuildJtregTestThreadFactory, \
|
||||
TARGET := images, \
|
||||
DEPS := build-test-test-thread-factory, \
|
||||
))
|
||||
endif
|
||||
|
||||
$(eval $(call SetupTarget, build-microbenchmark, \
|
||||
MAKEFILE := test/BuildMicrobenchmark, \
|
||||
DEPS := interim-langtools exploded-image, \
|
||||
@@ -1243,10 +1187,6 @@ ifeq ($(BUILD_FAILURE_HANDLER), true)
|
||||
test-image: test-image-failure-handler
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_JTREG_TEST_THREAD_FACTORY), true)
|
||||
test-image: test-image-test-thread-factory
|
||||
endif
|
||||
|
||||
ifneq ($(JMH_CORE_JAR), )
|
||||
test-image: build-microbenchmark
|
||||
endif
|
||||
@@ -1414,14 +1354,6 @@ create-main-targets-include:
|
||||
@$(ECHO) ALL_MAIN_TARGETS := $(sort $(ALL_TARGETS)) > \
|
||||
$(MAKESUPPORT_OUTPUTDIR)/main-targets.gmk
|
||||
|
||||
################################################################################
|
||||
# JBR API
|
||||
|
||||
$(eval $(call SetupTarget, jbr-api, \
|
||||
MAKEFILE := JBRApi, \
|
||||
TARGET := jbr-api \
|
||||
))
|
||||
|
||||
################################################################################
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, Main-post.gmk))
|
||||
|
||||
@@ -51,7 +51,6 @@ define create-info-file
|
||||
$(if $(VENDOR_VERSION_STRING), \
|
||||
$(call info-file-item, "IMPLEMENTOR_VERSION", "$(VENDOR_VERSION_STRING)"))
|
||||
$(call info-file-item, "JAVA_VERSION_DATE", "$(VERSION_DATE)")
|
||||
$(call info-file-item, "JAVA_RUNTIME_VERSION", "$(VERSION_STRING)")
|
||||
$(call info-file-item, "OS_NAME", "$(RELEASE_FILE_OS_NAME)")
|
||||
$(call info-file-item, "OS_ARCH", "$(RELEASE_FILE_OS_ARCH)")
|
||||
$(call info-file-item, "LIBC", "$(RELEASE_FILE_LIBC)")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 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
|
||||
@@ -93,9 +93,6 @@ endif
|
||||
JTREG_FAILURE_HANDLER_DIR := $(TEST_IMAGE_DIR)/failure_handler
|
||||
JTREG_FAILURE_HANDLER := $(JTREG_FAILURE_HANDLER_DIR)/jtregFailureHandler.jar
|
||||
|
||||
JTREG_TEST_THREAD_FACTORY_DIR := $(TEST_IMAGE_DIR)/jtreg_test_thread_factory
|
||||
JTREG_TEST_THREAD_FACTORY_JAR := $(JTREG_TEST_THREAD_FACTORY_DIR)/jtregTestThreadFactory.jar
|
||||
|
||||
JTREG_FAILURE_HANDLER_TIMEOUT ?= 0
|
||||
|
||||
ifneq ($(wildcard $(JTREG_FAILURE_HANDLER)), )
|
||||
@@ -199,12 +196,11 @@ $(eval $(call SetTestOpt,JAVA_OPTIONS,JTREG))
|
||||
$(eval $(call SetTestOpt,JOBS,JTREG))
|
||||
$(eval $(call SetTestOpt,TIMEOUT_FACTOR,JTREG))
|
||||
$(eval $(call SetTestOpt,FAILURE_HANDLER_TIMEOUT,JTREG))
|
||||
$(eval $(call SetTestOpt,REPORT,JTREG))
|
||||
|
||||
$(eval $(call ParseKeywordVariable, JTREG, \
|
||||
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR FAILURE_HANDLER_TIMEOUT \
|
||||
TEST_MODE ASSERT VERBOSE RETAIN TEST_THREAD_FACTORY MAX_MEM RUN_PROBLEM_LISTS \
|
||||
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
|
||||
TEST_MODE ASSERT VERBOSE RETAIN MAX_MEM RUN_PROBLEM_LISTS \
|
||||
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
|
||||
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
|
||||
EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS \
|
||||
$(CUSTOM_JTREG_STRING_KEYWORDS), \
|
||||
@@ -746,11 +742,9 @@ define SetupRunJtregTestBody
|
||||
|
||||
JTREG_VERBOSE ?= fail,error,summary
|
||||
JTREG_RETAIN ?= fail,error
|
||||
JTREG_TEST_THREAD_FACTORY ?=
|
||||
JTREG_RUN_PROBLEM_LISTS ?= false
|
||||
JTREG_RETRY_COUNT ?= 0
|
||||
JTREG_REPEAT_COUNT ?= 0
|
||||
JTREG_REPORT ?= files
|
||||
|
||||
ifneq ($$(JTREG_RETRY_COUNT), 0)
|
||||
ifneq ($$(JTREG_REPEAT_COUNT), 0)
|
||||
@@ -760,14 +754,6 @@ define SetupRunJtregTestBody
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($$(JTREG_TEST_THREAD_FACTORY), )
|
||||
$1_JTREG_BASIC_OPTIONS += -testThreadFactoryPath:$$(JTREG_TEST_THREAD_FACTORY_JAR)
|
||||
$1_JTREG_BASIC_OPTIONS += -testThreadFactory:$$(JTREG_TEST_THREAD_FACTORY)
|
||||
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
|
||||
$$(addprefix $$($1_TEST_ROOT)/, ProblemList-$$(JTREG_TEST_THREAD_FACTORY).txt) \
|
||||
))
|
||||
endif
|
||||
|
||||
ifneq ($$(JTREG_LAUNCHER_OPTIONS), )
|
||||
$1_JTREG_LAUNCHER_OPTIONS += $$(JTREG_LAUNCHER_OPTIONS)
|
||||
endif
|
||||
@@ -871,7 +857,6 @@ define SetupRunJtregTestBody
|
||||
-dir:$$(JTREG_TOPDIR) \
|
||||
-reportDir:$$($1_TEST_RESULTS_DIR) \
|
||||
-workDir:$$($1_TEST_SUPPORT_DIR) \
|
||||
-report:$${JTREG_REPORT} \
|
||||
$$$${JTREG_STATUS} \
|
||||
$$(JTREG_OPTIONS) \
|
||||
$$(JTREG_FAILURE_HANDLER_OPTIONS) \
|
||||
|
||||
@@ -295,11 +295,6 @@ test-prebuilt:
|
||||
@cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -f make/RunTests.gmk run-test \
|
||||
TEST="$(TEST)"
|
||||
|
||||
test-prebuilt-with-exit-code: test-prebuilt
|
||||
@if test -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error ; then \
|
||||
exit 1 ; \
|
||||
fi
|
||||
|
||||
all: test-prebuilt
|
||||
|
||||
.PHONY: default all test-prebuilt
|
||||
|
||||
@@ -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
|
||||
@@ -60,7 +60,6 @@ AC_DEFUN([BASIC_CHECK_LEFTOVER_OVERRIDDEN],
|
||||
|
||||
###############################################################################
|
||||
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
|
||||
# Make sure to only use tools set up in BASIC_SETUP_FUNDAMENTAL_TOOLS.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
|
||||
[
|
||||
# Save the current directory this script was started from
|
||||
@@ -102,29 +101,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
|
||||
AUTOCONF_DIR=$TOPDIR/make/autoconf
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Setup what kind of build environment type we have (CI or local developer)
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_BUILD_ENV],
|
||||
[
|
||||
if test "x$CI" = "xtrue"; then
|
||||
DEFAULT_BUILD_ENV="ci"
|
||||
AC_MSG_NOTICE([CI environment variable set to $CI])
|
||||
else
|
||||
DEFAULT_BUILD_ENV="dev"
|
||||
fi
|
||||
|
||||
UTIL_ARG_WITH(NAME: build-env, TYPE: literal,
|
||||
RESULT: BUILD_ENV,
|
||||
VALID_VALUES: [auto dev ci], DEFAULT: auto,
|
||||
CHECKING_MSG: [for build environment type],
|
||||
DESC: [select build environment type (affects certain default values)],
|
||||
IF_AUTO: [
|
||||
RESULT=$DEFAULT_BUILD_ENV
|
||||
]
|
||||
)
|
||||
AC_SUBST(BUILD_ENV)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Evaluates platform specific overrides for devkit variables.
|
||||
# $1: Name of variable
|
||||
@@ -478,11 +454,7 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
|
||||
# df on AIX does not understand -l. On modern AIXes it understands "-T local" which
|
||||
# is the same. On older AIXes we just continue to live with a "not local build" warning.
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
if "$DF -T local > /dev/null 2>&1"; then
|
||||
DF_LOCAL_ONLY_OPTION='-T local'
|
||||
else # AIX may use GNU-utils instead
|
||||
DF_LOCAL_ONLY_OPTION='-l'
|
||||
fi
|
||||
DF_LOCAL_ONLY_OPTION='-T local'
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl1"; then
|
||||
# In WSL1, we can only build on a drvfs file system (that is, a mounted real Windows drive)
|
||||
DF_LOCAL_ONLY_OPTION='-t drvfs'
|
||||
|
||||
@@ -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
|
||||
@@ -29,8 +29,8 @@
|
||||
RECOMMENDED_PANDOC_VERSION=2.19.2
|
||||
|
||||
###############################################################################
|
||||
# Setup the most fundamental tools, used for setting up build platform and
|
||||
# path handling.
|
||||
# Setup the most fundamental tools that relies on not much else to set up,
|
||||
# but is used by much of the early bootstrap code.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
[
|
||||
# Bootstrapping: These tools are needed by UTIL_LOOKUP_PROGS
|
||||
@@ -42,28 +42,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
UTIL_CHECK_NONEMPTY(FILE)
|
||||
AC_PATH_PROGS(LDD, ldd)
|
||||
|
||||
# Required tools
|
||||
UTIL_REQUIRE_PROGS(ECHO, echo)
|
||||
UTIL_REQUIRE_PROGS(TR, tr)
|
||||
UTIL_REQUIRE_PROGS(UNAME, uname)
|
||||
UTIL_REQUIRE_PROGS(WC, wc)
|
||||
|
||||
# Required tools with some special treatment
|
||||
UTIL_REQUIRE_SPECIAL(GREP, [AC_PROG_GREP])
|
||||
UTIL_REQUIRE_SPECIAL(EGREP, [AC_PROG_EGREP])
|
||||
UTIL_REQUIRE_SPECIAL(SED, [AC_PROG_SED])
|
||||
|
||||
# Tools only needed on some platforms
|
||||
UTIL_LOOKUP_PROGS(PATHTOOL, cygpath wslpath)
|
||||
UTIL_LOOKUP_PROGS(CMD, cmd.exe, $PATH:/cygdrive/c/windows/system32:/mnt/c/windows/system32:/c/windows/system32)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Setup further tools that should be resolved early but after setting up
|
||||
# build platform and path handling.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
|
||||
[
|
||||
# Required tools
|
||||
# First are all the fundamental required tools.
|
||||
UTIL_REQUIRE_PROGS(BASH, bash)
|
||||
UTIL_REQUIRE_PROGS(CAT, cat)
|
||||
UTIL_REQUIRE_PROGS(CHMOD, chmod)
|
||||
@@ -71,6 +50,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
|
||||
UTIL_REQUIRE_PROGS(CUT, cut)
|
||||
UTIL_REQUIRE_PROGS(DATE, date)
|
||||
UTIL_REQUIRE_PROGS(DIFF, gdiff diff)
|
||||
UTIL_REQUIRE_PROGS(ECHO, echo)
|
||||
UTIL_REQUIRE_PROGS(EXPR, expr)
|
||||
UTIL_REQUIRE_PROGS(FIND, find)
|
||||
UTIL_REQUIRE_PROGS(GUNZIP, gunzip)
|
||||
@@ -92,20 +72,27 @@ AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
|
||||
UTIL_REQUIRE_PROGS(TAR, gtar tar)
|
||||
UTIL_REQUIRE_PROGS(TEE, tee)
|
||||
UTIL_REQUIRE_PROGS(TOUCH, touch)
|
||||
UTIL_REQUIRE_PROGS(TR, tr)
|
||||
UTIL_REQUIRE_PROGS(UNAME, uname)
|
||||
UTIL_REQUIRE_PROGS(WC, wc)
|
||||
UTIL_REQUIRE_PROGS(XARGS, xargs)
|
||||
|
||||
# Required tools with some special treatment
|
||||
# Then required tools that require some special treatment.
|
||||
UTIL_REQUIRE_SPECIAL(GREP, [AC_PROG_GREP])
|
||||
UTIL_REQUIRE_SPECIAL(EGREP, [AC_PROG_EGREP])
|
||||
UTIL_REQUIRE_SPECIAL(FGREP, [AC_PROG_FGREP])
|
||||
UTIL_REQUIRE_SPECIAL(SED, [AC_PROG_SED])
|
||||
|
||||
# Optional tools, we can do without them
|
||||
UTIL_LOOKUP_PROGS(DF, df)
|
||||
UTIL_LOOKUP_PROGS(GIT, git)
|
||||
UTIL_LOOKUP_PROGS(NICE, nice)
|
||||
UTIL_LOOKUP_PROGS(READLINK, greadlink readlink)
|
||||
UTIL_LOOKUP_PROGS(WHOAMI, whoami)
|
||||
|
||||
# Tools only needed on some platforms
|
||||
# These are only needed on some platforms
|
||||
UTIL_LOOKUP_PROGS(PATHTOOL, cygpath wslpath)
|
||||
UTIL_LOOKUP_PROGS(LSB_RELEASE, lsb_release)
|
||||
UTIL_LOOKUP_PROGS(CMD, cmd.exe, $PATH:/cygdrive/c/windows/system32:/mnt/c/windows/system32:/c/windows/system32)
|
||||
|
||||
# For compare.sh only
|
||||
UTIL_LOOKUP_PROGS(CMP, cmp)
|
||||
@@ -298,7 +285,7 @@ AC_DEFUN([BASIC_CHECK_TAR],
|
||||
if test "x$TAR_TYPE" = "xgnu"; then
|
||||
TAR_INCLUDE_PARAM="T"
|
||||
TAR_SUPPORTS_TRANSFORM="true"
|
||||
elif test "x$TAR_TYPE" = "xaix"; then
|
||||
elif test "x$TAR_TYPE" = "aix"; then
|
||||
# -L InputList of aix tar: name of file listing the files and directories
|
||||
# that need to be archived or extracted
|
||||
TAR_INCLUDE_PARAM="L"
|
||||
@@ -446,7 +433,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_PANDOC],
|
||||
|
||||
if test "x$PANDOC" != x; then
|
||||
AC_MSG_CHECKING([for pandoc version])
|
||||
PANDOC_VERSION=`$PANDOC --version 2>&1 | $TR -d '\r' | $HEAD -1 | $CUT -d " " -f 2`
|
||||
PANDOC_VERSION=`$PANDOC --version 2>&1 | $HEAD -1 | $CUT -d " " -f 2`
|
||||
AC_MSG_RESULT([$PANDOC_VERSION])
|
||||
|
||||
if test "x$PANDOC_VERSION" != x$RECOMMENDED_PANDOC_VERSION; then
|
||||
@@ -455,7 +442,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_PANDOC],
|
||||
|
||||
PANDOC_MARKDOWN_FLAG="markdown"
|
||||
AC_MSG_CHECKING([if the pandoc smart extension needs to be disabled for markdown])
|
||||
if $PANDOC --list-extensions | $GREP -q '+smart'; then
|
||||
if $PANDOC --list-extensions | $GREP -q '\+smart'; then
|
||||
AC_MSG_RESULT([yes])
|
||||
PANDOC_MARKDOWN_FLAG="markdown-smart"
|
||||
else
|
||||
|
||||
@@ -89,8 +89,8 @@ AC_DEFUN([BASIC_SETUP_PATHS_WINDOWS],
|
||||
WINENV_TEMP_DIR=$($PATHTOOL -u $($CMD /q /c echo %TEMP% 2> /dev/null) | $TR -d '\r\n')
|
||||
AC_MSG_RESULT([$WINENV_TEMP_DIR])
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl1" || test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl2"; then
|
||||
# Don't trust the current directory for WSL, but change to an OK temp dir
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl2"; then
|
||||
# Don't trust the current directory for WSL2, but change to an OK temp dir
|
||||
cd "$WINENV_TEMP_DIR"
|
||||
# Bring along confdefs.h or autoconf gets all confused
|
||||
cp "$CONFIGURE_START_DIR/confdefs.h" "$WINENV_TEMP_DIR"
|
||||
@@ -228,7 +228,7 @@ AC_DEFUN([BASIC_WINDOWS_FINALIZE_FIXPATH],
|
||||
# Platform-specific finalization
|
||||
AC_DEFUN([BASIC_WINDOWS_FINALIZE],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl1" || test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl2"; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl2"; then
|
||||
# Change back from temp dir
|
||||
cd $CONFIGURE_START_DIR
|
||||
fi
|
||||
|
||||
@@ -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
|
||||
@@ -382,7 +382,7 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
||||
# Finally, set some other options...
|
||||
|
||||
# Determine if the boot jdk jar supports the --date option
|
||||
if $JAR --help 2>&1 | $GREP -q -e "--date=TIMESTAMP"; then
|
||||
if $JAR --help 2>&1 | $GREP -q "\-\-date=TIMESTAMP"; then
|
||||
BOOT_JDK_JAR_SUPPORTS_DATE=true
|
||||
else
|
||||
BOOT_JDK_JAR_SUPPORTS_DATE=false
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
40
make/autoconf/build-aux/config.guess
vendored
40
make/autoconf/build-aux/config.guess
vendored
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2021, Azul Systems, Inc. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
@@ -37,6 +37,17 @@ if [ "x$OUT" = x ]; then
|
||||
# Test and fix little endian MIPS.
|
||||
if [ `uname -m` = mipsel ]; then
|
||||
OUT=mipsel-unknown-linux-gnu
|
||||
elif [ `uname -m` = mips64el ]; then
|
||||
OUT=mips64el-unknown-linux-gnu
|
||||
# Test and fix little endian PowerPC64.
|
||||
elif [ `uname -m` = ppc64le ]; then
|
||||
OUT=powerpc64le-unknown-linux-gnu
|
||||
# Test and fix LoongArch64.
|
||||
elif [ `uname -m` = loongarch64 ]; then
|
||||
OUT=loongarch64-unknown-linux-gnu
|
||||
# Test and fix RISC-V.
|
||||
elif [ `uname -m` = riscv64 ]; then
|
||||
OUT=riscv64-unknown-linux-gnu
|
||||
fi
|
||||
# Test and fix cygwin machine arch .x86_64
|
||||
elif [[ `uname -s` = CYGWIN* ]]; then
|
||||
@@ -53,6 +64,17 @@ if [ "x$OUT" = x ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Detect C library.
|
||||
# Use '-gnu' suffix on systems that use glibc.
|
||||
# Use '-musl' suffix on systems that use the musl libc.
|
||||
echo $OUT | grep -- -linux- > /dev/null 2> /dev/null
|
||||
if test $? = 0; then
|
||||
libc_vendor=`ldd --version 2>&1 | sed -n '1s/.*\(musl\).*/\1/p'`
|
||||
if [ x"${libc_vendor}" = x"musl" ]; then
|
||||
OUT=`echo $OUT | sed 's/-gnu/-musl/'`
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test and fix cygwin on x86_64
|
||||
echo $OUT | grep 86-pc-cygwin > /dev/null 2> /dev/null
|
||||
if test $? != 0; then
|
||||
@@ -68,11 +90,11 @@ if test $? = 0; then
|
||||
fi
|
||||
|
||||
# Test and fix wsl
|
||||
echo $OUT | grep '\(unknown\|pc\)-linux-gnu' > /dev/null 2> /dev/null
|
||||
echo $OUT | grep unknown-linux-gnu > /dev/null 2> /dev/null
|
||||
if test $? = 0; then
|
||||
uname -r | grep -i microsoft > /dev/null 2> /dev/null
|
||||
if test $? = 0; then
|
||||
OUT=`echo $OUT | sed -e 's/\(unknown\|pc\)-linux-gnu/pc-wsl/'`
|
||||
OUT=`echo $OUT | sed -e 's/unknown-linux-gnu/pc-wsl/'`
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -92,6 +114,18 @@ if test $? = 0; then
|
||||
OUT=powerpc$KERNEL_BITMODE`echo $OUT | sed -e 's/[^-]*//'`
|
||||
fi
|
||||
|
||||
# Test and fix cpu on macos-aarch64, uname -p reports arm, buildsys expects aarch64
|
||||
echo $OUT | grep arm-apple-darwin > /dev/null 2> /dev/null
|
||||
if test $? != 0; then
|
||||
# The GNU version of uname may be on the PATH which reports arm64 instead
|
||||
echo $OUT | grep arm64-apple-darwin > /dev/null 2> /dev/null
|
||||
fi
|
||||
if test $? = 0; then
|
||||
if [ `uname -m` = arm64 ]; then
|
||||
OUT=aarch64`echo $OUT | sed -e 's/[^-]*//'`
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test and fix cpu on Macosx when C preprocessor is not on the path
|
||||
echo $OUT | grep i386-apple-darwin > /dev/null 2> /dev/null
|
||||
if test $? = 0; then
|
||||
|
||||
34
make/autoconf/build-aux/config.sub
vendored
34
make/autoconf/build-aux/config.sub
vendored
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# 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
|
||||
@@ -29,16 +29,46 @@
|
||||
|
||||
DIR=`dirname $0`
|
||||
|
||||
if echo $* | grep linux-musl >/dev/null ; then
|
||||
echo $*
|
||||
exit
|
||||
fi
|
||||
|
||||
# Allow wsl
|
||||
if echo $* | grep pc-wsl >/dev/null ; then
|
||||
echo $*
|
||||
exit
|
||||
fi
|
||||
|
||||
# Allow msys2
|
||||
if echo $* | grep pc-msys >/dev/null ; then
|
||||
echo $*
|
||||
exit
|
||||
fi
|
||||
|
||||
# Canonicalize for riscv which autoconf-config.sub doesn't handle
|
||||
if echo $* | grep '^riscv\(32\|64\)-linux' >/dev/null ; then
|
||||
result=`echo $@ | sed 's/linux/unknown-linux/'`
|
||||
echo $result
|
||||
exit
|
||||
fi
|
||||
|
||||
# Filter out everything that doesn't begin with "aarch64-"
|
||||
if ! echo $* | grep '^aarch64-' >/dev/null ; then
|
||||
. $DIR/autoconf-config.sub "$@"
|
||||
# autoconf-config.sub exits, so we never reach here, but just in
|
||||
# case we do:
|
||||
exit
|
||||
fi
|
||||
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-- ) # Stop option processing
|
||||
shift; break ;;
|
||||
aarch64-* )
|
||||
config=`echo $1 | sed 's/^aarch64-/arm-/'`
|
||||
sub_args="$sub_args $config"
|
||||
shift; ;;
|
||||
- ) # Use stdin as input.
|
||||
sub_args="$sub_args $1"
|
||||
shift; break ;;
|
||||
@@ -51,5 +81,7 @@ done
|
||||
result=`. $DIR/autoconf-config.sub $sub_args "$@"`
|
||||
exitcode=$?
|
||||
|
||||
result=`echo $result | sed "s/^arm-/aarch64-/"`
|
||||
|
||||
echo $result
|
||||
exit $exitcode
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 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
|
||||
@@ -26,29 +26,39 @@
|
||||
AC_DEFUN([BPERF_CHECK_CORES],
|
||||
[
|
||||
AC_MSG_CHECKING([for number of cores])
|
||||
NUM_CORES=1
|
||||
FOUND_CORES=no
|
||||
|
||||
if test -f /proc/cpuinfo; then
|
||||
# Looks like a Linux (or cygwin) system
|
||||
NUM_CORES=`cat /proc/cpuinfo | grep -cw processor`
|
||||
NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
|
||||
if test "$NUM_CORES" -eq "0"; then
|
||||
NUM_CORES=`cat /proc/cpuinfo | grep -c ^CPU`
|
||||
fi
|
||||
if test "$NUM_CORES" -ne "0"; then
|
||||
FOUND_CORES=yes
|
||||
fi
|
||||
elif test -x /usr/sbin/sysctl; then
|
||||
# Looks like a MacOSX system
|
||||
NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
|
||||
FOUND_CORES=yes
|
||||
elif test "x$OPENJDK_BUILD_OS" = xaix ; then
|
||||
NUM_CORES=`lparstat -m 2> /dev/null | $GREP -o "lcpu=[[0-9]]*" | $CUT -d "=" -f 2`
|
||||
NUM_LCPU=`lparstat -m 2> /dev/null | $GREP -o "lcpu=[[0-9]]*" | $CUT -d "=" -f 2`
|
||||
if test -n "$NUM_LCPU"; then
|
||||
NUM_CORES=$NUM_LCPU
|
||||
FOUND_CORES=yes
|
||||
fi
|
||||
elif test -n "$NUMBER_OF_PROCESSORS"; then
|
||||
# On windows, look in the env
|
||||
NUM_CORES=$NUMBER_OF_PROCESSORS
|
||||
FOUND_CORES=yes
|
||||
fi
|
||||
|
||||
if test "$NUM_CORES" -eq "0"; then
|
||||
NUM_CORES=1
|
||||
if test "x$FOUND_CORES" = xyes; then
|
||||
AC_MSG_RESULT([$NUM_CORES])
|
||||
else
|
||||
AC_MSG_RESULT([could not detect number of cores, defaulting to 1])
|
||||
AC_MSG_WARN([This will disable all parallelism from build!])
|
||||
else
|
||||
AC_MSG_RESULT([$NUM_CORES])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
@@ -103,7 +103,3 @@ JVM_FEATURES_server := cds compiler1 compiler2 g1gc serialgc
|
||||
override EXTRA_CFLAGS :=
|
||||
override EXTRA_CXXFLAGS :=
|
||||
override EXTRA_LDFLAGS :=
|
||||
|
||||
# hsdis is not needed
|
||||
HSDIS_BACKEND := none
|
||||
ENABLE_HSDIS_BUNDLING := false
|
||||
|
||||
@@ -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
|
||||
@@ -86,8 +86,6 @@ PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET
|
||||
|
||||
# Continue setting up basic stuff. Most remaining code require fundamental tools.
|
||||
BASIC_SETUP_PATHS
|
||||
BASIC_SETUP_TOOLS
|
||||
BASIC_SETUP_BUILD_ENV
|
||||
|
||||
# Check if it's a pure open build or if custom sources are to be used.
|
||||
JDKOPT_SETUP_OPEN_OR_CUSTOM
|
||||
@@ -217,16 +215,6 @@ JDKOPT_SETUP_CODE_COVERAGE
|
||||
# AddressSanitizer
|
||||
JDKOPT_SETUP_ADDRESS_SANITIZER
|
||||
|
||||
# UndefinedBehaviorSanitizer
|
||||
JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER
|
||||
|
||||
# LeakSanitizer
|
||||
JDKOPT_SETUP_LEAK_SANITIZER
|
||||
|
||||
# Fallback linker
|
||||
# This needs to go before 'LIB_DETERMINE_DEPENDENCIES'
|
||||
JDKOPT_SETUP_FALLBACK_LINKER
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check dependencies for external and internal libraries.
|
||||
@@ -254,7 +242,6 @@ HOTSPOT_SETUP_MISC
|
||||
###############################################################################
|
||||
|
||||
LIB_TESTS_ENABLE_DISABLE_FAILURE_HANDLER
|
||||
LIB_TESTS_ENABLE_DISABLE_JTREG_TEST_THREAD_FACTORY
|
||||
|
||||
JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
|
||||
JDKOPT_EXCLUDE_TRANSLATIONS
|
||||
|
||||
@@ -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
|
||||
@@ -51,14 +51,6 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
||||
SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
|
||||
SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1'
|
||||
|
||||
elif test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
# Linking is different on aix
|
||||
SHARED_LIBRARY_FLAGS="-shared -Wl,-bM:SRE -Wl,-bnoentry"
|
||||
SET_EXECUTABLE_ORIGIN=""
|
||||
SET_SHARED_LIBRARY_ORIGIN=''
|
||||
SET_SHARED_LIBRARY_NAME=''
|
||||
SET_SHARED_LIBRARY_MAPFILE=''
|
||||
|
||||
else
|
||||
# Default works for linux, might work on other platforms as well.
|
||||
SHARED_LIBRARY_FLAGS='-shared'
|
||||
@@ -197,10 +189,6 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
|
||||
WARNINGS_ENABLE_ALL_CXXFLAGS="$WARNINGS_ENABLE_ALL_CFLAGS $WARNINGS_ENABLE_ADDITIONAL_CXX"
|
||||
|
||||
DISABLED_WARNINGS="unused-parameter unused"
|
||||
# gcc10/11 on ppc generate lots of abi warnings about layout of aggregates containing vectors
|
||||
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xppc"; then
|
||||
DISABLED_WARNINGS="$DISABLED_WARNINGS psabi"
|
||||
fi
|
||||
;;
|
||||
|
||||
clang)
|
||||
@@ -214,6 +202,7 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
|
||||
WARNINGS_ENABLE_ALL="-Wall -Wextra -Wformat=2 $WARNINGS_ENABLE_ADDITIONAL"
|
||||
|
||||
DISABLED_WARNINGS="unknown-warning-option unused-parameter unused"
|
||||
|
||||
;;
|
||||
|
||||
xlc)
|
||||
@@ -291,15 +280,9 @@ AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
|
||||
C_O_FLAG_NONE="${C_O_FLAG_NONE} ${DISABLE_FORTIFY_CFLAGS}"
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
C_O_FLAG_HIGHEST_JVM="-O3 -finline-functions"
|
||||
C_O_FLAG_HIGHEST="-O3 -finline-functions"
|
||||
C_O_FLAG_HI="-O3 -finline-functions"
|
||||
else
|
||||
C_O_FLAG_HIGHEST_JVM="-O3"
|
||||
C_O_FLAG_HIGHEST="-O3"
|
||||
C_O_FLAG_HI="-O3"
|
||||
fi
|
||||
C_O_FLAG_HIGHEST_JVM="-O3"
|
||||
C_O_FLAG_HIGHEST="-O3"
|
||||
C_O_FLAG_HI="-O3"
|
||||
C_O_FLAG_NORM="-O2"
|
||||
C_O_FLAG_DEBUG_JVM="-O0"
|
||||
C_O_FLAG_SIZE="-Os"
|
||||
@@ -471,9 +454,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
# so for debug we build with '-qpic=large -bbigtoc'.
|
||||
DEBUG_CFLAGS_JVM="-qpic=large"
|
||||
fi
|
||||
if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
DEBUG_CFLAGS_JVM="-fpic -mcmodel=large"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$DEBUG_LEVEL" != xrelease; then
|
||||
@@ -496,7 +476,8 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
ALWAYS_DEFINES_JDK="-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0602 \
|
||||
-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -DIAL"
|
||||
ALWAYS_DEFINES_JVM="-DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0602 \
|
||||
-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE"
|
||||
-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE \
|
||||
-D_WINSOCK_DEPRECATED_NO_WARNINGS"
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
@@ -509,14 +490,8 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
-fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
# clang compiler on aix needs -ffunction-sections
|
||||
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -ffunction-sections -ftls-model -fno-math-errno -fstack-protector"
|
||||
TOOLCHAIN_CFLAGS_JDK="-ffunction-sections -fsigned-char -fstack-protector"
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fstack-protector"
|
||||
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fcheck-new -fstack-protector"
|
||||
TOOLCHAIN_CFLAGS_JDK="-pipe -fstack-protector"
|
||||
# reduce lib size on linux in link step, this needs also special compile flags
|
||||
# do this on s390x also for libjvm (where serviceability agent is not supported)
|
||||
@@ -623,9 +598,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
PICFLAG="-fPIC"
|
||||
PIEFLAG="-fPIE"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
JVM_PICFLAG="-fpic -mcmodel=large -Wl,-bbigtoc
|
||||
JDK_PICFLAG="-fpic
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
# '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
|
||||
# one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
|
||||
@@ -662,7 +634,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
STATIC_LIBS_CFLAGS="-DSTATIC_BUILD=1"
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
STATIC_LIBS_CFLAGS="$STATIC_LIBS_CFLAGS -ffunction-sections -fdata-sections \
|
||||
-DJNIEXPORT='__attribute__((visibility(\"default\")))'"
|
||||
-DJNIEXPORT='__attribute__((visibility(\"hidden\")))'"
|
||||
else
|
||||
STATIC_LIBS_CFLAGS="$STATIC_LIBS_CFLAGS -DJNIEXPORT="
|
||||
fi
|
||||
@@ -771,9 +743,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
$1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
|
||||
fi
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
$1_CFLAGS_CPU="-mcpu=pwr8"
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
if test "x$FLAGS_CPU" = xppc64; then
|
||||
|
||||
@@ -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
|
||||
@@ -70,16 +70,12 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
fi
|
||||
fi
|
||||
|
||||
BASIC_LDFLAGS_JVM_ONLY=""
|
||||
BASIC_LDFLAGS_JVM_ONLY="-Wl,-O1"
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
BASIC_LDFLAGS_JVM_ONLY="-mno-omit-leaf-frame-pointer -mstack-alignment=16 \
|
||||
-fPIC"
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-bnolibpath -Wl,-bnoexpall \
|
||||
-Wl,-bernotok -Wl,-bdatapsize:64k -Wl,-btextpsize:64k -Wl,-bstackpsize:64k"
|
||||
BASIC_LDFLAGS_JVM_ONLY="$BASIC_LDFLAGS_JVM_ONLY -Wl,-lC_r -Wl,-bbigtoc"
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
BASIC_LDFLAGS="-b64 -brtl -bnorwexec -bnolibpath -bnoexpall -bernotok -btextpsize:64K \
|
||||
-bdatapsize:64K -bstackpsize:64K"
|
||||
@@ -92,8 +88,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
BASIC_LDFLAGS_JVM_ONLY="-opt:icf,8 -subsystem:windows"
|
||||
fi
|
||||
|
||||
if (test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang) \
|
||||
&& test "x$OPENJDK_TARGET_OS" != xaix; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
if test -n "$HAS_NOEXECSTACK"; then
|
||||
BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,-z,noexecstack"
|
||||
fi
|
||||
@@ -121,14 +116,6 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
if test "x$DEBUG_LEVEL" != xrelease; then
|
||||
DEBUGLEVEL_LDFLAGS_JVM_ONLY="$DEBUGLEVEL_LDFLAGS_JVM_ONLY -bbigtoc"
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
# We need '-fpic' or '-fpic -mcmodel=large -Wl,-bbigtoc' if the TOC overflows.
|
||||
# Hotspot now overflows its 64K TOC (currently only for debug),
|
||||
# so we build with '-fpic -mcmodel=large -Wl,-bbigtoc'.
|
||||
if test "x$DEBUG_LEVEL" != xrelease; then
|
||||
DEBUGLEVEL_LDFLAGS_JVM_ONLY="$DEBUGLEVEL_LDFLAGS_JVM_ONLY -Wl,-bbigtoc"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Setup LDFLAGS for linking executables
|
||||
|
||||
@@ -234,31 +234,6 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
fi
|
||||
AC_SUBST(HOTSPOT_OVERRIDE_LIBPATH)
|
||||
|
||||
# Should we build the client for the JAWS screen reader?
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
AC_MSG_CHECKING([if JAWS client support is enabled])
|
||||
|
||||
A11Y_JAWS_ANNOUNCING_ENABLED=true
|
||||
AC_ARG_ENABLE(
|
||||
[jaws-client],
|
||||
[AS_HELP_STRING([--disable-jaws-client], [Set to disable to exclude the client for the JAWS screen reader from the build])],
|
||||
[
|
||||
if test "x$ENABLE_HEADLESS_ONLY" = xtrue; then
|
||||
AC_MSG_WARN([--[enable|disable]-jaws-client[=*] flags are ignored for headless builds])
|
||||
elif test "x$enableval" != xyes; then
|
||||
A11Y_JAWS_ANNOUNCING_ENABLED=false
|
||||
fi
|
||||
]
|
||||
)
|
||||
if test "x$ENABLE_HEADLESS_ONLY" = xtrue; then
|
||||
A11Y_JAWS_ANNOUNCING_ENABLED=false
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$A11Y_JAWS_ANNOUNCING_ENABLED])
|
||||
else
|
||||
A11Y_JAWS_ANNOUNCING_ENABLED=false
|
||||
fi
|
||||
AC_SUBST(A11Y_JAWS_ANNOUNCING_ENABLED)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
@@ -435,13 +410,12 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
|
||||
[
|
||||
UTIL_ARG_ENABLE(NAME: asan, DEFAULT: false, RESULT: ASAN_ENABLED,
|
||||
UTIL_ARG_ENABLE(NAME: asan, DEFAULT: false,
|
||||
DESC: [enable AddressSanitizer],
|
||||
CHECK_AVAILABLE: [
|
||||
AC_MSG_CHECKING([if AddressSanitizer (asan) is available])
|
||||
if test "x$TOOLCHAIN_TYPE" = "xgcc" ||
|
||||
test "x$TOOLCHAIN_TYPE" = "xclang" ||
|
||||
test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
|
||||
test "x$TOOLCHAIN_TYPE" = "xclang"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
@@ -449,20 +423,11 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
|
||||
fi
|
||||
],
|
||||
IF_ENABLED: [
|
||||
if test "x$TOOLCHAIN_TYPE" = "xgcc" ||
|
||||
test "x$TOOLCHAIN_TYPE" = "xclang"; then
|
||||
# ASan is simply incompatible with gcc -Wstringop-truncation. See
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85650
|
||||
# It's harmless to be suppressed in clang as well.
|
||||
ASAN_CFLAGS="-fsanitize=address -Wno-stringop-truncation -fno-omit-frame-pointer -fno-common -DADDRESS_SANITIZER"
|
||||
ASAN_LDFLAGS="-fsanitize=address"
|
||||
elif test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
|
||||
# -Oy- is equivalent to -fno-omit-frame-pointer in GCC/Clang.
|
||||
ASAN_CFLAGS="-fsanitize=address -Oy- -DADDRESS_SANITIZER"
|
||||
# MSVC produces a warning if you pass -fsanitize=address to the linker. It also complains
|
||||
$ if -DEBUG is not passed to the linker when building with ASan.
|
||||
ASAN_LDFLAGS="-debug"
|
||||
fi
|
||||
# ASan is simply incompatible with gcc -Wstringop-truncation. See
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85650
|
||||
# It's harmless to be suppressed in clang as well.
|
||||
ASAN_CFLAGS="-fsanitize=address -Wno-stringop-truncation -fno-omit-frame-pointer"
|
||||
ASAN_LDFLAGS="-fsanitize=address"
|
||||
JVM_CFLAGS="$JVM_CFLAGS $ASAN_CFLAGS"
|
||||
JVM_LDFLAGS="$JVM_LDFLAGS $ASAN_LDFLAGS"
|
||||
CFLAGS_JDKLIB="$CFLAGS_JDKLIB $ASAN_CFLAGS"
|
||||
@@ -471,85 +436,15 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
|
||||
CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $ASAN_CFLAGS"
|
||||
LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $ASAN_LDFLAGS"
|
||||
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $ASAN_LDFLAGS"
|
||||
ASAN_ENABLED="yes"
|
||||
],
|
||||
IF_DISABLED: [
|
||||
ASAN_ENABLED="no"
|
||||
])
|
||||
|
||||
AC_SUBST(ASAN_ENABLED)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# LeakSanitizer
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_LEAK_SANITIZER],
|
||||
[
|
||||
UTIL_ARG_ENABLE(NAME: lsan, DEFAULT: false, RESULT: LSAN_ENABLED,
|
||||
DESC: [enable LeakSanitizer],
|
||||
CHECK_AVAILABLE: [
|
||||
AC_MSG_CHECKING([if LeakSanitizer (lsan) is available])
|
||||
if test "x$TOOLCHAIN_TYPE" = "xgcc" ||
|
||||
test "x$TOOLCHAIN_TYPE" = "xclang"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AVAILABLE=false
|
||||
fi
|
||||
],
|
||||
IF_ENABLED: [
|
||||
LSAN_CFLAGS="-fsanitize=leak -fno-omit-frame-pointer -DLEAK_SANITIZER"
|
||||
LSAN_LDFLAGS="-fsanitize=leak"
|
||||
JVM_CFLAGS="$JVM_CFLAGS $LSAN_CFLAGS"
|
||||
JVM_LDFLAGS="$JVM_LDFLAGS $LSAN_LDFLAGS"
|
||||
CFLAGS_JDKLIB="$CFLAGS_JDKLIB $LSAN_CFLAGS"
|
||||
CFLAGS_JDKEXE="$CFLAGS_JDKEXE $LSAN_CFLAGS"
|
||||
CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $LSAN_CFLAGS"
|
||||
CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $LSAN_CFLAGS"
|
||||
LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $LSAN_LDFLAGS"
|
||||
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $LSAN_LDFLAGS"
|
||||
])
|
||||
AC_SUBST(LSAN_ENABLED)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# UndefinedBehaviorSanitizer
|
||||
#
|
||||
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"
|
||||
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,
|
||||
DESC: [enable UndefinedBehaviorSanitizer],
|
||||
CHECK_AVAILABLE: [
|
||||
AC_MSG_CHECKING([if UndefinedBehaviorSanitizer (ubsan) is available])
|
||||
if test "x$TOOLCHAIN_TYPE" = "xgcc" ||
|
||||
test "x$TOOLCHAIN_TYPE" = "xclang"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AVAILABLE=false
|
||||
fi
|
||||
],
|
||||
IF_ENABLED: [
|
||||
JVM_CFLAGS="$JVM_CFLAGS $UBSAN_CFLAGS"
|
||||
JVM_LDFLAGS="$JVM_LDFLAGS $UBSAN_LDFLAGS"
|
||||
CFLAGS_JDKLIB="$CFLAGS_JDKLIB $UBSAN_CFLAGS"
|
||||
CFLAGS_JDKEXE="$CFLAGS_JDKEXE $UBSAN_CFLAGS"
|
||||
CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $UBSAN_CFLAGS"
|
||||
CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $UBSAN_CFLAGS"
|
||||
LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $UBSAN_LDFLAGS"
|
||||
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $UBSAN_LDFLAGS"
|
||||
])
|
||||
if test "x$UBSAN_ENABLED" = xfalse; then
|
||||
UBSAN_CFLAGS=""
|
||||
UBSAN_LDFLAGS=""
|
||||
fi
|
||||
AC_SUBST(UBSAN_CFLAGS)
|
||||
AC_SUBST(UBSAN_LDFLAGS)
|
||||
AC_SUBST(UBSAN_ENABLED)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Static build support. When enabled will generate static
|
||||
@@ -886,7 +781,7 @@ AC_DEFUN([JDKOPT_SETUP_MACOSX_SIGNING],
|
||||
|
||||
# Check for user provided code signing identity.
|
||||
UTIL_ARG_WITH(NAME: macosx-codesign-identity, TYPE: string,
|
||||
DEFAULT: openjdk_codesign, CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY],
|
||||
DEFAULT: openjdk_codesign, CHECK_VALUE: UTIL_CHECK_STRING_NON_EMPTY,
|
||||
DESC: [specify the macosx code signing identity],
|
||||
CHECKING_MSG: [for macosx code signing identity]
|
||||
)
|
||||
@@ -928,22 +823,3 @@ AC_DEFUN([JDKOPT_SETUP_MACOSX_SIGNING],
|
||||
AC_SUBST(MACOSX_CODESIGN_MODE)
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# fallback linker
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_FALLBACK_LINKER],
|
||||
[
|
||||
FALLBACK_LINKER_DEFAULT=false
|
||||
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(zero); then
|
||||
FALLBACK_LINKER_DEFAULT=true
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: fallback-linker, DEFAULT: $FALLBACK_LINKER_DEFAULT,
|
||||
RESULT: ENABLE_FALLBACK_LINKER,
|
||||
DESC: [enable libffi-based fallback implementation of java.lang.foreign.Linker],
|
||||
CHECKING_MSG: [if fallback linker enabled])
|
||||
AC_SUBST(ENABLE_FALLBACK_LINKER)
|
||||
])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -69,137 +69,149 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
AC_SUBST(JDK_RC_PLATFORM_NAME)
|
||||
AC_SUBST(HOTSPOT_VM_DISTRO)
|
||||
|
||||
# Note: UTIL_ARG_WITH treats empty strings as valid values when OPTIONAL is false!
|
||||
|
||||
# Outer [ ] to quote m4.
|
||||
[ USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'` ]
|
||||
|
||||
# $USER may be not defined in dockers, so try to check with $WHOAMI
|
||||
if test "x$USERNAME" = x && test "x$WHOAMI" != x; then
|
||||
[ USERNAME=`$WHOAMI | $TR -d -c '[a-z][A-Z][0-9]'` ]
|
||||
fi
|
||||
|
||||
# Setup username (for use in adhoc version strings etc)
|
||||
UTIL_ARG_WITH(NAME: build-user, TYPE: string,
|
||||
RESULT: USERNAME,
|
||||
DEFAULT: $USERNAME,
|
||||
DESC: [build username to use in version strings],
|
||||
DEFAULT_DESC: [current username, sanitized],
|
||||
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY])
|
||||
AC_ARG_WITH([build-user], [AS_HELP_STRING([--with-build-user],
|
||||
[build username to use in version strings])])
|
||||
if test "x$with_build_user" = xyes || test "x$with_build_user" = xno; then
|
||||
AC_MSG_ERROR([--with-build-user must have a value])
|
||||
elif test "x$with_build_user" != x; then
|
||||
USERNAME="$with_build_user"
|
||||
else
|
||||
# Outer [ ] to quote m4.
|
||||
[ USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'` ]
|
||||
fi
|
||||
AC_SUBST(USERNAME)
|
||||
|
||||
# Set the JDK RC name
|
||||
# Otherwise calculate from "branding.conf" included above.
|
||||
UTIL_ARG_WITH(NAME: jdk-rc-name, TYPE: string,
|
||||
DEFAULT: $PRODUCT_NAME $JDK_RC_PLATFORM_NAME,
|
||||
DESC: [Set JDK RC name. This is used for FileDescription and ProductName
|
||||
properties of MS Windows binaries.],
|
||||
DEFAULT_DESC: [from branding.conf],
|
||||
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY_PRINTABLE])
|
||||
AC_ARG_WITH(jdk-rc-name, [AS_HELP_STRING([--with-jdk-rc-name],
|
||||
[Set JDK RC name. This is used for FileDescription and ProductName properties
|
||||
of MS Windows binaries. @<:@not specified@:>@])])
|
||||
if test "x$with_jdk_rc_name" = xyes || test "x$with_jdk_rc_name" = xno; then
|
||||
AC_MSG_ERROR([--with-jdk-rc-name must have a value])
|
||||
elif [ ! [[ $with_jdk_rc_name =~ ^[[:print:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-jdk-rc-name contains non-printing characters: $with_jdk_rc_name])
|
||||
elif test "x$with_jdk_rc_name" != x; then
|
||||
# Set JDK_RC_NAME to a custom value if '--with-jdk-rc-name' was used and is not empty.
|
||||
JDK_RC_NAME="$with_jdk_rc_name"
|
||||
else
|
||||
# Otherwise calculate from "branding.conf" included above.
|
||||
JDK_RC_NAME="$PRODUCT_NAME $JDK_RC_PLATFORM_NAME"
|
||||
fi
|
||||
AC_SUBST(JDK_RC_NAME)
|
||||
|
||||
# The vendor name, if any
|
||||
# Only set COMPANY_NAME if '--with-vendor-name' was used and is not empty.
|
||||
# Otherwise we will use the value from "branding.conf" included above.
|
||||
UTIL_ARG_WITH(NAME: vendor-name, TYPE: string,
|
||||
RESULT: COMPANY_NAME,
|
||||
DEFAULT: $COMPANY_NAME,
|
||||
DESC: [Set vendor name. Among others, used to set the 'java.vendor'
|
||||
and 'java.vm.vendor' system properties.],
|
||||
DEFAULT_DESC: [from branding.conf],
|
||||
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY_PRINTABLE])
|
||||
AC_ARG_WITH(vendor-name, [AS_HELP_STRING([--with-vendor-name],
|
||||
[Set vendor name. Among others, used to set the 'java.vendor'
|
||||
and 'java.vm.vendor' system properties. @<:@not specified@:>@])])
|
||||
if test "x$with_vendor_name" = xyes || test "x$with_vendor_name" = xno; then
|
||||
AC_MSG_ERROR([--with-vendor-name must have a value])
|
||||
elif [ ! [[ $with_vendor_name =~ ^[[:print:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-vendor-name contains non-printing characters: $with_vendor_name])
|
||||
elif test "x$with_vendor_name" != x; then
|
||||
# Only set COMPANY_NAME if '--with-vendor-name' was used and is not empty.
|
||||
# Otherwise we will use the value from "branding.conf" included above.
|
||||
COMPANY_NAME="$with_vendor_name"
|
||||
fi
|
||||
AC_SUBST(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.
|
||||
UTIL_ARG_WITH(NAME: vendor-url, TYPE: string,
|
||||
DEFAULT: $VENDOR_URL,
|
||||
DESC: [Set the 'java.vendor.url' system property],
|
||||
DEFAULT_DESC: [from branding.conf],
|
||||
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY_PRINTABLE])
|
||||
AC_ARG_WITH(vendor-url, [AS_HELP_STRING([--with-vendor-url],
|
||||
[Set the 'java.vendor.url' system property @<:@not specified@:>@])])
|
||||
if test "x$with_vendor_url" = xyes || test "x$with_vendor_url" = xno; then
|
||||
AC_MSG_ERROR([--with-vendor-url must have a value])
|
||||
elif [ ! [[ $with_vendor_url =~ ^[[:print:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-vendor-url contains non-printing characters: $with_vendor_url])
|
||||
elif test "x$with_vendor_url" != x; then
|
||||
# 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.
|
||||
VENDOR_URL="$with_vendor_url"
|
||||
fi
|
||||
AC_SUBST(VENDOR_URL)
|
||||
|
||||
# The vendor bug URL, if any
|
||||
# Only set VENDOR_URL_BUG if '--with-vendor-bug-url' was used and is not empty.
|
||||
# Otherwise we will use the value from "branding.conf" included above.
|
||||
UTIL_ARG_WITH(NAME: vendor-bug-url, TYPE: string,
|
||||
RESULT: VENDOR_URL_BUG,
|
||||
DEFAULT: $VENDOR_URL_BUG,
|
||||
DESC: [Set the 'java.vendor.url.bug' system property],
|
||||
DEFAULT_DESC: [from branding.conf],
|
||||
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY_PRINTABLE])
|
||||
AC_ARG_WITH(vendor-bug-url, [AS_HELP_STRING([--with-vendor-bug-url],
|
||||
[Set the 'java.vendor.url.bug' system property @<:@not specified@:>@])])
|
||||
if test "x$with_vendor_bug_url" = xyes || test "x$with_vendor_bug_url" = xno; then
|
||||
AC_MSG_ERROR([--with-vendor-bug-url must have a value])
|
||||
elif [ ! [[ $with_vendor_bug_url =~ ^[[:print:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-vendor-bug-url contains non-printing characters: $with_vendor_bug_url])
|
||||
elif test "x$with_vendor_bug_url" != x; then
|
||||
# Only set VENDOR_URL_BUG if '--with-vendor-bug-url' was used and is not empty.
|
||||
# Otherwise we will use the value from "branding.conf" included above.
|
||||
VENDOR_URL_BUG="$with_vendor_bug_url"
|
||||
fi
|
||||
AC_SUBST(VENDOR_URL_BUG)
|
||||
|
||||
# The vendor VM bug URL, if any
|
||||
# Only set VENDOR_URL_VM_BUG if '--with-vendor-vm-bug-url' was used and is not empty.
|
||||
# Otherwise we will use the value from "branding.conf" included above.
|
||||
UTIL_ARG_WITH(NAME: vendor-vm-bug-url, TYPE: string,
|
||||
RESULT: VENDOR_URL_VM_BUG,
|
||||
DEFAULT: $VENDOR_URL_VM_BUG,
|
||||
DESC: [Sets the bug URL which will be displayed when the VM crashes],
|
||||
DEFAULT_DESC: [from branding.conf],
|
||||
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY_PRINTABLE])
|
||||
AC_ARG_WITH(vendor-vm-bug-url, [AS_HELP_STRING([--with-vendor-vm-bug-url],
|
||||
[Sets the bug URL which will be displayed when the VM crashes @<:@not specified@:>@])])
|
||||
if test "x$with_vendor_vm_bug_url" = xyes || test "x$with_vendor_vm_bug_url" = xno; then
|
||||
AC_MSG_ERROR([--with-vendor-vm-bug-url must have a value])
|
||||
elif [ ! [[ $with_vendor_vm_bug_url =~ ^[[:print:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-vendor-vm-bug-url contains non-printing characters: $with_vendor_vm_bug_url])
|
||||
elif test "x$with_vendor_vm_bug_url" != x; then
|
||||
# Only set VENDOR_URL_VM_BUG if '--with-vendor-vm-bug-url' was used and is not empty.
|
||||
# Otherwise we will use the value from "branding.conf" included above.
|
||||
VENDOR_URL_VM_BUG="$with_vendor_vm_bug_url"
|
||||
fi
|
||||
AC_SUBST(VENDOR_URL_VM_BUG)
|
||||
|
||||
# Override version from arguments
|
||||
|
||||
# If --with-version-string is set, process it first. It is possible to
|
||||
# override parts with more specific flags, since these are processed later.
|
||||
UTIL_ARG_WITH(NAME: version-string, TYPE: string,
|
||||
DEFAULT: [],
|
||||
DESC: [Set version string],
|
||||
DEFAULT_DESC: [calculated],
|
||||
CHECK_VALUE: [
|
||||
if test "x$RESULT" != x; then
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
if [ [[ $RESULT =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z0-9]+))?(((\+)([0-9]*))?(-([-a-zA-Z0-9.]+))?)?$ ]] ]; then
|
||||
VERSION_FEATURE=${BASH_REMATCH[[1]]}
|
||||
VERSION_INTERIM=${BASH_REMATCH[[3]]}
|
||||
VERSION_UPDATE=${BASH_REMATCH[[5]]}
|
||||
VERSION_PATCH=${BASH_REMATCH[[7]]}
|
||||
VERSION_EXTRA1=${BASH_REMATCH[[9]]}
|
||||
VERSION_EXTRA2=${BASH_REMATCH[[11]]}
|
||||
VERSION_EXTRA3=${BASH_REMATCH[[13]]}
|
||||
VERSION_PRE=${BASH_REMATCH[[15]]}
|
||||
version_plus_separator=${BASH_REMATCH[[18]]}
|
||||
VERSION_BUILD=${BASH_REMATCH[[19]]}
|
||||
VERSION_OPT=${BASH_REMATCH[[21]]}
|
||||
# Unspecified numerical fields are interpreted as 0.
|
||||
if test "x$VERSION_INTERIM" = x; then
|
||||
VERSION_INTERIM=0
|
||||
fi
|
||||
if test "x$VERSION_UPDATE" = x; then
|
||||
VERSION_UPDATE=0
|
||||
fi
|
||||
if test "x$VERSION_PATCH" = x; then
|
||||
VERSION_PATCH=0
|
||||
fi
|
||||
if test "x$VERSION_EXTRA1" = x; then
|
||||
VERSION_EXTRA1=0
|
||||
fi
|
||||
if test "x$VERSION_EXTRA2" = x; then
|
||||
VERSION_EXTRA2=0
|
||||
fi
|
||||
if test "x$VERSION_EXTRA3" = x; then
|
||||
VERSION_EXTRA3=0
|
||||
fi
|
||||
if test "x$version_plus_separator" != x \
|
||||
&& test "x$VERSION_BUILD$VERSION_OPT" = x; then
|
||||
AC_MSG_ERROR([Version string contains + but both 'BUILD' and 'OPT' are missing])
|
||||
fi
|
||||
if test "x$VERSION_BUILD" = x0; then
|
||||
AC_MSG_WARN([Version build 0 is interpreted as no build number])
|
||||
VERSION_BUILD=
|
||||
fi
|
||||
# Stop the version part process from setting default values.
|
||||
# We still allow them to explicitly override though.
|
||||
NO_DEFAULT_VERSION_PARTS=true
|
||||
else
|
||||
FAILURE="--with-version-string fails to parse as a valid version string: $RESULT"
|
||||
fi
|
||||
AC_ARG_WITH(version-string, [AS_HELP_STRING([--with-version-string],
|
||||
[Set version string @<:@calculated@:>@])])
|
||||
if test "x$with_version_string" = xyes || test "x$with_version_string" = xno; then
|
||||
AC_MSG_ERROR([--with-version-string must have a value])
|
||||
elif test "x$with_version_string" != x; then
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
if [ [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z0-9]+))?(((\+)([0-9]*))?(-([-a-zA-Z0-9.]+))?)?$ ]] ]; then
|
||||
VERSION_FEATURE=${BASH_REMATCH[[1]]}
|
||||
VERSION_INTERIM=${BASH_REMATCH[[3]]}
|
||||
VERSION_UPDATE=${BASH_REMATCH[[5]]}
|
||||
VERSION_PATCH=${BASH_REMATCH[[7]]}
|
||||
VERSION_EXTRA1=${BASH_REMATCH[[9]]}
|
||||
VERSION_EXTRA2=${BASH_REMATCH[[11]]}
|
||||
VERSION_EXTRA3=${BASH_REMATCH[[13]]}
|
||||
VERSION_PRE=${BASH_REMATCH[[15]]}
|
||||
version_plus_separator=${BASH_REMATCH[[18]]}
|
||||
VERSION_BUILD=${BASH_REMATCH[[19]]}
|
||||
VERSION_OPT=${BASH_REMATCH[[21]]}
|
||||
# Unspecified numerical fields are interpreted as 0.
|
||||
if test "x$VERSION_INTERIM" = x; then
|
||||
VERSION_INTERIM=0
|
||||
fi
|
||||
])
|
||||
if test "x$VERSION_UPDATE" = x; then
|
||||
VERSION_UPDATE=0
|
||||
fi
|
||||
if test "x$VERSION_PATCH" = x; then
|
||||
VERSION_PATCH=0
|
||||
fi
|
||||
if test "x$VERSION_EXTRA1" = x; then
|
||||
VERSION_EXTRA1=0
|
||||
fi
|
||||
if test "x$VERSION_EXTRA2" = x; then
|
||||
VERSION_EXTRA2=0
|
||||
fi
|
||||
if test "x$VERSION_EXTRA3" = x; then
|
||||
VERSION_EXTRA3=0
|
||||
fi
|
||||
if test "x$version_plus_separator" != x \
|
||||
&& test "x$VERSION_BUILD$VERSION_OPT" = x; then
|
||||
AC_MSG_ERROR([Version string contains + but both 'BUILD' and 'OPT' are missing])
|
||||
fi
|
||||
if test "x$VERSION_BUILD" = x0; then
|
||||
AC_MSG_WARN([Version build 0 is interpreted as no build number])
|
||||
VERSION_BUILD=
|
||||
fi
|
||||
# Stop the version part process from setting default values.
|
||||
# We still allow them to explicitly override though.
|
||||
NO_DEFAULT_VERSION_PARTS=true
|
||||
else
|
||||
AC_MSG_ERROR([--with-version-string fails to parse as a valid version string: $with_version_string])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(version-pre, [AS_HELP_STRING([--with-version-pre],
|
||||
[Set the base part of the version 'PRE' field (pre-release identifier) @<:@'internal'@:>@])],
|
||||
@@ -278,18 +290,22 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
fi
|
||||
fi
|
||||
|
||||
# Default is to get value from version-numbers.conf
|
||||
if test "x$NO_DEFAULT_VERSION_PARTS" = xtrue; then
|
||||
DEFAULT_VERSION_FEATURE="$VERSION_FEATURE"
|
||||
fi
|
||||
AC_ARG_WITH(version-feature, [AS_HELP_STRING([--with-version-feature],
|
||||
[Set version 'FEATURE' field (first number) @<:@current source value@:>@])],
|
||||
[with_version_feature_present=true], [with_version_feature_present=false])
|
||||
|
||||
UTIL_ARG_WITH(NAME: version-feature, TYPE: string,
|
||||
DEFAULT: $DEFAULT_VERSION_FEATURE,
|
||||
DESC: [Set version 'FEATURE' field (first number)],
|
||||
DEFAULT_DESC: [current source value],
|
||||
CHECK_VALUE: [
|
||||
JDKVER_CHECK_AND_SET_NUMBER(VERSION_FEATURE, $RESULT)
|
||||
])
|
||||
if test "x$with_version_feature_present" = xtrue; then
|
||||
if test "x$with_version_feature" = xyes || test "x$with_version_feature" = xno; then
|
||||
AC_MSG_ERROR([--with-version-feature must have a value])
|
||||
else
|
||||
JDKVER_CHECK_AND_SET_NUMBER(VERSION_FEATURE, $with_version_feature)
|
||||
fi
|
||||
else
|
||||
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
|
||||
# Default is to get value from version-numbers.conf
|
||||
VERSION_FEATURE="$DEFAULT_VERSION_FEATURE"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(version-interim, [AS_HELP_STRING([--with-version-interim],
|
||||
[Set version 'INTERIM' field (second number) @<:@current source value@:>@])],
|
||||
@@ -464,81 +480,91 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
|
||||
|
||||
# The version date
|
||||
UTIL_ARG_WITH(NAME: version-date, TYPE: string,
|
||||
DEFAULT: $DEFAULT_VERSION_DATE,
|
||||
DESC: [Set version date],
|
||||
DEFAULT_DESC: [current source value],
|
||||
CHECK_VALUE: [
|
||||
if test "x$RESULT" = x; then
|
||||
FAILURE="--with-version-date cannot be empty"
|
||||
elif [ ! [[ $RESULT =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]] ]; then
|
||||
FAILURE="\"$RESULT\" is not a valid version date"
|
||||
fi
|
||||
])
|
||||
AC_ARG_WITH(version-date, [AS_HELP_STRING([--with-version-date],
|
||||
[Set version date @<:@current source value@:>@])])
|
||||
if test "x$with_version_date" = xyes || test "x$with_version_date" = xno; then
|
||||
AC_MSG_ERROR([--with-version-date must have a value])
|
||||
elif test "x$with_version_date" != x; then
|
||||
if [ ! [[ $with_version_date =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]] ]; then
|
||||
AC_MSG_ERROR(["$with_version_date" is not a valid version date])
|
||||
else
|
||||
VERSION_DATE="$with_version_date"
|
||||
fi
|
||||
else
|
||||
VERSION_DATE="$DEFAULT_VERSION_DATE"
|
||||
fi
|
||||
|
||||
# The vendor version string, if any
|
||||
# DEFAULT is set to an empty string in the case of --with-vendor-version-string without
|
||||
# any value, which would set VENDOR_VERSION_STRING_ENABLED to true and ultimately also
|
||||
# cause VENDOR_VERSION_STRING to fall back to the value in DEFAULT
|
||||
UTIL_ARG_WITH(NAME: vendor-version-string, TYPE: string,
|
||||
DEFAULT: [],
|
||||
OPTIONAL: true,
|
||||
DESC: [Set vendor version string],
|
||||
DEFAULT_DESC: [not specified])
|
||||
|
||||
if test "x$VENDOR_VERSION_STRING_ENABLED" = xtrue; then
|
||||
if [ ! [[ $VENDOR_VERSION_STRING =~ ^[[:graph:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with--vendor-version-string contains non-graphical characters: $VENDOR_VERSION_STRING])
|
||||
fi
|
||||
AC_ARG_WITH(vendor-version-string, [AS_HELP_STRING([--with-vendor-version-string],
|
||||
[Set vendor version string @<:@not specified@:>@])])
|
||||
if test "x$with_vendor_version_string" = xyes; then
|
||||
AC_MSG_ERROR([--with-vendor-version-string must have a value])
|
||||
elif [ ! [[ $with_vendor_version_string =~ ^[[:graph:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with--vendor-version-string contains non-graphical characters: $with_vendor_version_string])
|
||||
elif test "x$with_vendor_version_string" != xno; then
|
||||
# Set vendor version string if --without is not passed
|
||||
# Check not required if an empty value is passed, since VENDOR_VERSION_STRING
|
||||
# would then be set to ""
|
||||
VENDOR_VERSION_STRING="$with_vendor_version_string"
|
||||
fi
|
||||
|
||||
# Set the MACOSX Bundle Name base
|
||||
UTIL_ARG_WITH(NAME: macosx-bundle-name-base, TYPE: string,
|
||||
DEFAULT: $MACOSX_BUNDLE_NAME_BASE,
|
||||
DESC: [Set the MacOSX Bundle Name base. This is the base name for calculating MacOSX Bundle Names.],
|
||||
DEFAULT_DESC: [from branding.conf],
|
||||
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY_PRINTABLE])
|
||||
AC_ARG_WITH(macosx-bundle-name-base, [AS_HELP_STRING([--with-macosx-bundle-name-base],
|
||||
[Set the MacOSX Bundle Name base. This is the base name for calculating MacOSX Bundle Names.
|
||||
@<:@not specified@:>@])])
|
||||
if test "x$with_macosx_bundle_name_base" = xyes || test "x$with_macosx_bundle_name_base" = xno; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-name-base must have a value])
|
||||
elif [ ! [[ $with_macosx_bundle_name_base =~ ^[[:print:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-name-base contains non-printing characters: $with_macosx_bundle_name_base])
|
||||
elif test "x$with_macosx_bundle_name_base" != x; then
|
||||
# Set MACOSX_BUNDLE_NAME_BASE to the configured value.
|
||||
MACOSX_BUNDLE_NAME_BASE="$with_macosx_bundle_name_base"
|
||||
fi
|
||||
AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
|
||||
|
||||
# If using the default value, append the VERSION_PRE if there is one
|
||||
# to make it possible to tell official builds apart from developer builds
|
||||
if test "x$VERSION_PRE" != x; then
|
||||
MACOSX_BUNDLE_ID_BASE="$MACOSX_BUNDLE_ID_BASE-$VERSION_PRE"
|
||||
fi
|
||||
|
||||
# Set the MACOSX Bundle ID base
|
||||
UTIL_ARG_WITH(NAME: macosx-bundle-id-base, TYPE: string,
|
||||
DEFAULT: $MACOSX_BUNDLE_ID_BASE,
|
||||
DESC: [Set the MacOSX Bundle ID base. This is the base ID for calculating MacOSX Bundle IDs.],
|
||||
DEFAULT_DESC: [based on branding.conf and VERSION_PRE],
|
||||
CHECK_VALUE: [UTIL_CHECK_STRING_NON_EMPTY_PRINTABLE])
|
||||
AC_ARG_WITH(macosx-bundle-id-base, [AS_HELP_STRING([--with-macosx-bundle-id-base],
|
||||
[Set the MacOSX Bundle ID base. This is the base ID for calculating MacOSX Bundle IDs.
|
||||
@<:@not specified@:>@])])
|
||||
if test "x$with_macosx_bundle_id_base" = xyes || test "x$with_macosx_bundle_id_base" = xno; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-id-base must have a value])
|
||||
elif [ ! [[ $with_macosx_bundle_id_base =~ ^[[:print:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-id-base contains non-printing characters: $with_macosx_bundle_id_base])
|
||||
elif test "x$with_macosx_bundle_id_base" != x; then
|
||||
# Set MACOSX_BUNDLE_ID_BASE to the configured value.
|
||||
MACOSX_BUNDLE_ID_BASE="$with_macosx_bundle_id_base"
|
||||
else
|
||||
# If using the default value, append the VERSION_PRE if there is one
|
||||
# to make it possible to tell official builds apart from developer builds
|
||||
if test "x$VERSION_PRE" != x; then
|
||||
MACOSX_BUNDLE_ID_BASE="$MACOSX_BUNDLE_ID_BASE-$VERSION_PRE"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(MACOSX_BUNDLE_ID_BASE)
|
||||
|
||||
if test "x$VERSION_BUILD" != x; then
|
||||
MACOSX_BUNDLE_BUILD_VERSION="$VERSION_BUILD"
|
||||
else
|
||||
MACOSX_BUNDLE_BUILD_VERSION=0
|
||||
fi
|
||||
|
||||
# If VERSION_OPT consists of only numbers and periods, add it.
|
||||
if [ [[ $VERSION_OPT =~ ^[0-9\.]+$ ]] ]; then
|
||||
MACOSX_BUNDLE_BUILD_VERSION="$MACOSX_BUNDLE_BUILD_VERSION.$VERSION_OPT"
|
||||
fi
|
||||
|
||||
# Set the MACOSX CFBundleVersion field
|
||||
UTIL_ARG_WITH(NAME: macosx-bundle-build-version, TYPE: string,
|
||||
DEFAULT: $MACOSX_BUNDLE_BUILD_VERSION,
|
||||
DESC: [Set the MacOSX Bundle CFBundleVersion field. This key is a machine-readable
|
||||
AC_ARG_WITH(macosx-bundle-build-version, [AS_HELP_STRING([--with-macosx-bundle-build-version],
|
||||
[Set the MacOSX Bundle CFBundleVersion field. This key is a machine-readable
|
||||
string composed of one to three period-separated integers and should represent the
|
||||
build version.],
|
||||
DEFAULT_DESC: [the build number],
|
||||
CHECK_VALUE: [
|
||||
if test "x$RESULT" = x; then
|
||||
FAILURE="--with-macosx-bundle-build-version must have a value"
|
||||
elif [ ! [[ $RESULT =~ ^[0-9\.]*$ ]] ]; then
|
||||
FAILURE="--with-macosx-bundle-build-version contains non numbers and periods: $RESULT"
|
||||
fi
|
||||
])
|
||||
build version. Defaults to the build number.])])
|
||||
if test "x$with_macosx_bundle_build_version" = xyes || test "x$with_macosx_bundle_build_version" = xno; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-build-version must have a value])
|
||||
elif [ ! [[ $with_macosx_bundle_build_version =~ ^[0-9\.]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-build-version contains non numbers and periods: $with_macosx_bundle_build_version])
|
||||
elif test "x$with_macosx_bundle_build_version" != x; then
|
||||
MACOSX_BUNDLE_BUILD_VERSION="$with_macosx_bundle_build_version"
|
||||
else
|
||||
if test "x$VERSION_BUILD" != x; then
|
||||
MACOSX_BUNDLE_BUILD_VERSION="$VERSION_BUILD"
|
||||
else
|
||||
MACOSX_BUNDLE_BUILD_VERSION=0
|
||||
fi
|
||||
|
||||
# If VERSION_OPT consists of only numbers and periods, add it.
|
||||
if [ [[ $VERSION_OPT =~ ^[0-9\.]+$ ]] ]; then
|
||||
MACOSX_BUNDLE_BUILD_VERSION="$MACOSX_BUNDLE_BUILD_VERSION.$VERSION_OPT"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(MACOSX_BUNDLE_BUILD_VERSION)
|
||||
|
||||
# We could define --with flags for these, if really needed
|
||||
|
||||
@@ -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
|
||||
@@ -247,14 +247,8 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_CDS],
|
||||
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_DTRACE],
|
||||
[
|
||||
JVM_FEATURES_CHECK_AVAILABILITY(dtrace, [
|
||||
AC_MSG_CHECKING([for dtrace tool and platform support])
|
||||
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xppc"; then
|
||||
AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU_ARCH])
|
||||
AVAILABLE=false
|
||||
elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xs390"; then
|
||||
AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU_ARCH])
|
||||
AVAILABLE=false
|
||||
elif test "x$DTRACE" != "x" && test -x "$DTRACE"; then
|
||||
AC_MSG_CHECKING([for dtrace tool])
|
||||
if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
|
||||
AC_MSG_RESULT([$DTRACE])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, 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.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Setup nvdacontrollerclient (The library for communication with
|
||||
# NVDA - a screen reader for Microsoft Windows)
|
||||
################################################################################
|
||||
AC_DEFUN_ONCE([LIB_SETUP_NVDACONTROLLERCLIENT], [
|
||||
# To enable NVDA, user specifies neither --with-nvdacontrollerclient or
|
||||
# a pair (--with-nvdacontrollerclient-include, --with-nvdacontrollerclient-lib)
|
||||
AC_ARG_WITH(nvdacontrollerclient, [AS_HELP_STRING([--with-nvdacontrollerclient],
|
||||
[specify prefix directory for the NVDA Controller Client library package
|
||||
(expecting headers and libs under PATH/<target-arch>/)])])
|
||||
AC_ARG_WITH(nvdacontrollerclient-include, [AS_HELP_STRING([--with-nvdacontrollerclient-include],
|
||||
[specify directory for the NVDA Controller Client include files])])
|
||||
AC_ARG_WITH(nvdacontrollerclient-lib, [AS_HELP_STRING([--with-nvdacontrollerclient-lib],
|
||||
[specify directory for the NVDA Controller Client library])])
|
||||
|
||||
NVDACONTROLLERCLIENT_FOUND=no
|
||||
NVDACONTROLLERCLIENT_LIB=
|
||||
NVDACONTROLLERCLIENT_DLL=
|
||||
NVDACONTROLLERCLIENT_CFLAGS=
|
||||
|
||||
if test "x${NEEDS_LIB_NVDACONTROLLERCLIENT}" = "xtrue" ; then
|
||||
if (test "x${with_nvdacontrollerclient_include}" = "x" && test "x${with_nvdacontrollerclient_lib}" != "x") || \
|
||||
(test "x${with_nvdacontrollerclient_include}" != "x" && test "x${with_nvdacontrollerclient_lib}" = "x") ; then
|
||||
AC_MSG_ERROR([Must specify both or neither of --with-nvdacontrollerclient-include and --with-nvdacontrollerclient-lib])
|
||||
elif (test "x${with_nvdacontrollerclient}" != "x" && test "x${with_nvdacontrollerclient_include}" != "x") ; then
|
||||
AC_MSG_ERROR([Must specify either --with-nvdacontrollerclient or a pair (--with-nvdacontrollerclient-include, --with-nvdacontrollerclient-lib)])
|
||||
fi
|
||||
|
||||
if (test "x${with_nvdacontrollerclient}" != "x") || \
|
||||
(test "x${with_nvdacontrollerclient_include}" != "x" && test "x${with_nvdacontrollerclient_lib}" != "x") ; then
|
||||
|
||||
AC_MSG_CHECKING([for nvdacontrollerclient])
|
||||
|
||||
if test "x${OPENJDK_TARGET_OS}" != "xwindows" ; then
|
||||
AC_MSG_ERROR([--with-nvdacontrollerclient[-*] flags are applicable only to Windows builds])
|
||||
fi
|
||||
|
||||
if test "x${OPENJDK_TARGET_CPU_ARCH}" = "xaarch64" ; then
|
||||
NVDACONTROLLERCLIENT_BIN_BASENAME="nvdaControllerClient32"
|
||||
NVDACONTROLLERCLIENT_ARCHDIR="arm64"
|
||||
elif test "x${OPENJDK_TARGET_CPU_ARCH}" = "xx86" && test "x${OPENJDK_TARGET_CPU_BITS}" = "x64" ; then
|
||||
NVDACONTROLLERCLIENT_BIN_BASENAME="nvdaControllerClient64"
|
||||
NVDACONTROLLERCLIENT_ARCHDIR="x64"
|
||||
elif test "x${OPENJDK_TARGET_CPU_ARCH}" = "xx86" && test "x${OPENJDK_TARGET_CPU_BITS}" = "x32" ; then
|
||||
NVDACONTROLLERCLIENT_BIN_BASENAME="nvdaControllerClient32"
|
||||
NVDACONTROLLERCLIENT_ARCHDIR="x86"
|
||||
else
|
||||
AC_MSG_ERROR([The nvdacontrollerclient library exists only for x86_32, x86_64, AArch64 architectures])
|
||||
fi
|
||||
|
||||
if test "x${with_nvdacontrollerclient}" != "x" ; then
|
||||
# NVDACONTROLLERCLIENT_ARCHDIR is used only here
|
||||
NVDACONTROLLERCLIENT_INC_PATH="${with_nvdacontrollerclient}/${NVDACONTROLLERCLIENT_ARCHDIR}"
|
||||
NVDACONTROLLERCLIENT_BIN_PATH="${with_nvdacontrollerclient}/${NVDACONTROLLERCLIENT_ARCHDIR}"
|
||||
else
|
||||
NVDACONTROLLERCLIENT_INC_PATH="${with_nvdacontrollerclient_include}"
|
||||
NVDACONTROLLERCLIENT_BIN_PATH="${with_nvdacontrollerclient_lib}"
|
||||
fi
|
||||
|
||||
POTENTIAL_NVDACONTROLLERCLIENT_DLL="${NVDACONTROLLERCLIENT_BIN_PATH}/${NVDACONTROLLERCLIENT_BIN_BASENAME}.dll"
|
||||
POTENTIAL_NVDACONTROLLERCLIENT_LIB="${NVDACONTROLLERCLIENT_BIN_PATH}/${NVDACONTROLLERCLIENT_BIN_BASENAME}.lib"
|
||||
POTENTIAL_NVDACONTROLLERCLIENT_EXP="${NVDACONTROLLERCLIENT_BIN_PATH}/${NVDACONTROLLERCLIENT_BIN_BASENAME}.exp"
|
||||
|
||||
if ! test -s "${POTENTIAL_NVDACONTROLLERCLIENT_DLL}" || \
|
||||
! test -s "${POTENTIAL_NVDACONTROLLERCLIENT_LIB}" || \
|
||||
! test -s "${POTENTIAL_NVDACONTROLLERCLIENT_EXP}" ; then
|
||||
AC_MSG_ERROR([Could not find ${NVDACONTROLLERCLIENT_BIN_BASENAME}.dll and/or ${NVDACONTROLLERCLIENT_BIN_BASENAME}.lib and/or ${NVDACONTROLLERCLIENT_BIN_BASENAME}.exp inside ${NVDACONTROLLERCLIENT_BIN_PATH}])
|
||||
fi
|
||||
if ! test -s "${NVDACONTROLLERCLIENT_INC_PATH}/nvdaController.h" ; then
|
||||
AC_MSG_ERROR([Could not find the header file nvdaController.h inside ${NVDACONTROLLERCLIENT_INC_PATH}])
|
||||
fi
|
||||
|
||||
NVDACONTROLLERCLIENT_CFLAGS="-I${NVDACONTROLLERCLIENT_INC_PATH}"
|
||||
NVDACONTROLLERCLIENT_DLL="${POTENTIAL_NVDACONTROLLERCLIENT_DLL}"
|
||||
NVDACONTROLLERCLIENT_LIB="${POTENTIAL_NVDACONTROLLERCLIENT_LIB}"
|
||||
NVDACONTROLLERCLIENT_FOUND=yes
|
||||
|
||||
AC_MSG_RESULT([includes at ${NVDACONTROLLERCLIENT_INC_PATH} ; binaries at ${NVDACONTROLLERCLIENT_BIN_PATH}])
|
||||
fi
|
||||
elif test "x${with_nvdacontrollerclient}" != "x" || \
|
||||
test "x${with_nvdacontrollerclient_include}" != "x" || test "x${with_nvdacontrollerclient_lib}" != "x" ; then
|
||||
AC_MSG_WARN([[nvdacontrollerclient is not used, so --with-nvdacontrollerclient[-*] is ignored]])
|
||||
fi
|
||||
|
||||
if test "x${NVDACONTROLLERCLIENT_FOUND}" = "xyes" ; then
|
||||
A11Y_NVDA_ANNOUNCING_ENABLED=true
|
||||
else
|
||||
A11Y_NVDA_ANNOUNCING_ENABLED=false
|
||||
fi
|
||||
|
||||
AC_SUBST(A11Y_NVDA_ANNOUNCING_ENABLED)
|
||||
AC_SUBST(NVDACONTROLLERCLIENT_CFLAGS)
|
||||
AC_SUBST(NVDACONTROLLERCLIENT_DLL)
|
||||
AC_SUBST(NVDACONTROLLERCLIENT_LIB)
|
||||
])
|
||||
@@ -1,92 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, 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.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Setup speechd
|
||||
################################################################################
|
||||
AC_DEFUN_ONCE([LIB_SETUP_SPEECHD],
|
||||
[
|
||||
AC_ARG_WITH(speechd, [AS_HELP_STRING([--with-speechd],
|
||||
[specify prefix directory for the libspeechd package
|
||||
(expecting the headers under PATH/include); required for AccessibleAnnouncer to work])])
|
||||
AC_ARG_WITH(speechd-include, [AS_HELP_STRING([--with-speechd-include],
|
||||
[specify directory for the speechd include files])])
|
||||
|
||||
if test "x$NEEDS_LIB_SPEECHD" = xfalse || test "x${with_speechd}" = xno || \
|
||||
test "x${with_speechd_include}" = xno; then
|
||||
if (test "x${with_speechd}" != x && test "x${with_speechd}" != xno) || \
|
||||
(test "x${with_speechd_include}" != x && test "x${with_speechd_include}" != xno); then
|
||||
AC_MSG_WARN([[speechd not used, so --with-speechd[-*] is ignored]])
|
||||
fi
|
||||
A11Y_SPEECHD_ANNOUNCING_ENABLED=false
|
||||
SPEECHD_CFLAGS=
|
||||
SPEECHD_LIBS=
|
||||
else
|
||||
SPEECHD_FOUND=no
|
||||
|
||||
if test "x${with_speechd}" != x && test "x${with_speechd}" != xyes; then
|
||||
AC_MSG_CHECKING([for speechd header and library])
|
||||
if test -s "${with_speechd}/include/libspeechd.h"; then
|
||||
SPEECHD_CFLAGS="-I${with_speechd}/include"
|
||||
SPEECHD_LIBS="-L${with_speechd}/lib -lspeechd"
|
||||
SPEECHD_FOUND=yes
|
||||
AC_MSG_RESULT([$SPEECHD_FOUND])
|
||||
else
|
||||
AC_MSG_ERROR([Can't find 'include/libspeechd.h' under ${with_speechd} given with the --with-speechd option.])
|
||||
fi
|
||||
fi
|
||||
if test "x${with_speechd_include}" != x; then
|
||||
AC_MSG_CHECKING([for speechd headers])
|
||||
if test -s "${with_speechd_include}/libspeechd.h"; then
|
||||
SPEECHD_CFLAGS="-I${with_speechd_include}"
|
||||
SPEECHD_FOUND=yes
|
||||
AC_MSG_RESULT([$SPEECHD_FOUND])
|
||||
else
|
||||
AC_MSG_ERROR([Can't find 'include/libspeechd.h' under ${with_speechd} given with the --with-speechd-include option.])
|
||||
fi
|
||||
fi
|
||||
if test "x$SPEECHD_FOUND" = xno; then
|
||||
# Are the libspeechd headers installed in the default /usr/include location?
|
||||
AC_CHECK_HEADERS([libspeechd.h],
|
||||
[ SPEECHD_FOUND=yes ],
|
||||
[ SPEECHD_FOUND=no; break ]
|
||||
)
|
||||
if test "x$SPEECHD_FOUND" = xyes; then
|
||||
SPEECHD_CFLAGS=
|
||||
SPEECHD_LIBS="-lspeechd"
|
||||
fi
|
||||
fi
|
||||
if test "x$SPEECHD_FOUND" = xno; then
|
||||
A11Y_SPEECHD_ANNOUNCING_ENABLED=false
|
||||
else
|
||||
A11Y_SPEECHD_ANNOUNCING_ENABLED=true
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(A11Y_SPEECHD_ANNOUNCING_ENABLED)
|
||||
AC_SUBST(SPEECHD_CFLAGS)
|
||||
AC_SUBST(SPEECHD_LIBS)
|
||||
])
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2018, 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
|
||||
@@ -27,9 +27,8 @@
|
||||
# Setup libraries and functionalities needed to test the JDK.
|
||||
################################################################################
|
||||
|
||||
# Minimum supported versions
|
||||
JTREG_MINIMUM_VERSION=7.2
|
||||
GTEST_MINIMUM_VERSION=1.13.0
|
||||
# Minimum supported version
|
||||
JTREG_MINIMUM_VERSION=7.1.1
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@@ -59,13 +58,20 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_GTEST],
|
||||
AC_MSG_RESULT([$GTEST_FRAMEWORK_SRC])
|
||||
UTIL_FIXUP_PATH([GTEST_FRAMEWORK_SRC])
|
||||
|
||||
# Verify that the version is the required one.
|
||||
# This is a simplified version of TOOLCHAIN_CHECK_COMPILER_VERSION
|
||||
gtest_version="`$GREP GOOGLETEST_VERSION $GTEST_FRAMEWORK_SRC/CMakeLists.txt | $SED -e 's/set(GOOGLETEST_VERSION \(.*\))/\1/'`"
|
||||
comparable_actual_version=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", [$]1, [$]2, [$]3, [$]4) }' <<< "$gtest_version"`
|
||||
comparable_minimum_version=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", [$]1, [$]2, [$]3, [$]4) }' <<< "$GTEST_MINIMUM_VERSION"`
|
||||
if test $comparable_actual_version -lt $comparable_minimum_version ; then
|
||||
AC_MSG_ERROR([gtest version is too old, at least version $GTEST_MINIMUM_VERSION is required])
|
||||
# Try to verify version. We require 1.8.1, but this can not be directly
|
||||
# determined. :-( Instead, there are different, incorrect version
|
||||
# numbers we can look for.
|
||||
GTEST_VERSION_1="`$GREP GOOGLETEST_VERSION $GTEST_FRAMEWORK_SRC/CMakeLists.txt | $SED -E -e 's/set\(GOOGLETEST_VERSION (.*)\)/\1/'`"
|
||||
if test "x$GTEST_VERSION_1" != "x1.9.0"; then
|
||||
AC_MSG_ERROR([gtest at $GTEST_FRAMEWORK_SRC does not seem to be version 1.8.1])
|
||||
fi
|
||||
|
||||
# We cannot grep for "AC_IN*T" as a literal since then m4 will treat it as a macro
|
||||
# and expand it.
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
[ GTEST_VERSION_2="`$GREP -A1 ^.C_INIT $GTEST_FRAMEWORK_SRC/configure.ac | $TAIL -n 1 | $SED -E -e 's/ +\[(.*)],/\1/'`" ]
|
||||
if test "x$GTEST_VERSION_2" != "x1.8.0"; then
|
||||
AC_MSG_ERROR([gtest at $GTEST_FRAMEWORK_SRC does not seem to be version 1.8.1 B])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -279,16 +285,10 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_JIB],
|
||||
#
|
||||
AC_DEFUN_ONCE([LIB_TESTS_ENABLE_DISABLE_FAILURE_HANDLER],
|
||||
[
|
||||
if test "x$BUILD_ENV" = "xci"; then
|
||||
BUILD_FAILURE_HANDLER_DEFAULT=auto
|
||||
else
|
||||
BUILD_FAILURE_HANDLER_DEFAULT=false
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: jtreg-failure-handler, DEFAULT: $BUILD_FAILURE_HANDLER_DEFAULT,
|
||||
UTIL_ARG_ENABLE(NAME: jtreg-failure-handler, DEFAULT: auto,
|
||||
RESULT: BUILD_FAILURE_HANDLER,
|
||||
DESC: [enable building of the jtreg failure handler],
|
||||
DEFAULT_DESC: [enabled if jtreg is present and build env is CI],
|
||||
DEFAULT_DESC: [enabled if jtreg is present],
|
||||
CHECKING_MSG: [if the jtreg failure handler should be built],
|
||||
CHECK_AVAILABLE: [
|
||||
AC_MSG_CHECKING([if the jtreg failure handler is available])
|
||||
@@ -301,22 +301,3 @@ AC_DEFUN_ONCE([LIB_TESTS_ENABLE_DISABLE_FAILURE_HANDLER],
|
||||
])
|
||||
AC_SUBST(BUILD_FAILURE_HANDLER)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([LIB_TESTS_ENABLE_DISABLE_JTREG_TEST_THREAD_FACTORY],
|
||||
[
|
||||
UTIL_ARG_ENABLE(NAME: jtreg-test-thread-factory, DEFAULT: auto,
|
||||
RESULT: BUILD_JTREG_TEST_THREAD_FACTORY,
|
||||
DESC: [enable building of the jtreg test thread factory],
|
||||
DEFAULT_DESC: [enabled if jtreg is present],
|
||||
CHECKING_MSG: [if the jtreg test thread factory should be built],
|
||||
CHECK_AVAILABLE: [
|
||||
AC_MSG_CHECKING([if the jtreg test thread factory is available])
|
||||
if test "x$JT_HOME" != "x"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AVAILABLE=false
|
||||
AC_MSG_RESULT([no (jtreg not present)])
|
||||
fi
|
||||
])
|
||||
AC_SUBST(BUILD_JTREG_TEST_THREAD_FACTORY)
|
||||
])
|
||||
|
||||
@@ -1,183 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2023, 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.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Setup wayland
|
||||
################################################################################
|
||||
AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
||||
[
|
||||
AC_ARG_WITH(wayland, [AS_HELP_STRING([--with-wayland],
|
||||
[specify prefix directory for the wayland package
|
||||
(expecting the headers under PATH/include)])])
|
||||
AC_ARG_WITH(wayland-include, [AS_HELP_STRING([--with-wayland-include],
|
||||
[specify directory for the wayland include files])])
|
||||
|
||||
if test "x$NEEDS_LIB_WAYLAND" = xfalse; then
|
||||
if (test "x${with_wayland}" != x && test "x${with_wayland}" != xno) || \
|
||||
(test "x${with_wayland_include}" != x && test "x${with_wayland_include}" != xno); then
|
||||
AC_MSG_WARN([[wayland not used, so --with-wayland[-*] is ignored]])
|
||||
fi
|
||||
WAYLAND_CFLAGS=
|
||||
WAYLAND_LIBS=
|
||||
VULKAN_FLAGS=
|
||||
VULKAN_ENABLED=false
|
||||
else
|
||||
WAYLAND_FOUND=no
|
||||
|
||||
if test "x${with_wayland}" = xno || test "x${with_wayland_include}" = xno; then
|
||||
AC_MSG_ERROR([It is not possible to disable the use of wayland. Remove the --without-wayland option.])
|
||||
fi
|
||||
|
||||
if test "x${with_wayland}" != x; then
|
||||
AC_MSG_CHECKING([for wayland headers])
|
||||
if test -s "${with_wayland}/include/wayland-client.h" && test -s "${with_wayland}/include/wayland-cursor.h"; then
|
||||
WAYLAND_CFLAGS="-I${with_wayland}/include"
|
||||
WAYLAND_LIBS="-L${with_wayland}/lib -lwayland-client -lwayland-cursor"
|
||||
|
||||
WAYLAND_FOUND=yes
|
||||
AC_MSG_RESULT([$WAYLAND_FOUND])
|
||||
else
|
||||
AC_MSG_ERROR([Can't find 'include/wayland-client.h' and 'include/wayland-cursor.h' under ${with_wayland} given with the --with-wayland option.])
|
||||
fi
|
||||
fi
|
||||
if test "x${with_wayland_include}" != x; then
|
||||
AC_MSG_CHECKING([for wayland headers])
|
||||
if test -s "${with_wayland_include}/wayland-client.h" && test -s "${with_wayland_include}/wayland-cursor.h"; then
|
||||
WAYLAND_CFLAGS="-I${with_wayland_include}"
|
||||
WAYLAND_FOUND=yes
|
||||
AC_MSG_RESULT([$WAYLAND_FOUND])
|
||||
else
|
||||
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$WAYLAND_FOUND" = xno; then
|
||||
# Are the wayland headers installed in the default /usr/include location?
|
||||
AC_CHECK_HEADERS([wayland-client.h wayland-cursor.h],
|
||||
[ WAYLAND_FOUND=yes ],
|
||||
[ WAYLAND_FOUND=no; break ]
|
||||
)
|
||||
if test "x$WAYLAND_FOUND" = xyes; then
|
||||
WAYLAND_CFLAGS=
|
||||
WAYLAND_LIBS="-lwayland-client -lwayland-cursor"
|
||||
DEFAULT_WAYLAND=yes
|
||||
fi
|
||||
fi
|
||||
if test "x$WAYLAND_FOUND" = xno; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([wayland])
|
||||
AC_MSG_ERROR([Could not find wayland! $HELP_MSG ])
|
||||
fi
|
||||
|
||||
|
||||
# Checking for vulkan sdk
|
||||
|
||||
AC_ARG_WITH(vulkan, [AS_HELP_STRING([--with-vulkan],
|
||||
[specify whether we use vulkan])])
|
||||
|
||||
AC_ARG_WITH(vulkan-include, [AS_HELP_STRING([--with-vulkan-include],
|
||||
[specify directory for the vulkan include files])])
|
||||
|
||||
AC_ARG_WITH(vulkan-shader-compiler, [AS_HELP_STRING([--with-vulkan-shader-compiler],
|
||||
[specify which shader compiler to use: glslc/glslangValidator])])
|
||||
|
||||
if test "x$SUPPORTS_LIB_VULKAN" = xfalse; then
|
||||
|
||||
if (test "x${with_vulkan}" != x && test "x${with_vulkan}" != xno) || \
|
||||
(test "x${with_vulkan_include}" != x && test "x${with_vulkan_include}" != xno); then
|
||||
AC_MSG_WARN([[vulkan not used, so --with-vulkan-include is ignored]])
|
||||
fi
|
||||
VULKAN_FLAGS=
|
||||
VULKAN_ENABLED=false
|
||||
else
|
||||
# Do not build vulkan rendering pipeline by default
|
||||
if (test "x${with_vulkan}" = x && test "x${with_vulkan_include}" = x) || \
|
||||
test "x${with_vulkan}" = xno || test "x${with_vulkan_include}" = xno ; then
|
||||
VULKAN_FLAGS=
|
||||
VULKAN_ENABLED=false
|
||||
else
|
||||
VULKAN_FOUND=no
|
||||
|
||||
if test "x${with_vulkan_include}" != x; then
|
||||
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"
|
||||
],
|
||||
[ AC_MSG_ERROR([Can't find 'vulkan/vulkan.h' under '${with_vulkan_include}']) ]
|
||||
)
|
||||
fi
|
||||
|
||||
if test "x$VULKAN_FOUND" = xno; then
|
||||
# Check vulkan sdk location
|
||||
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_FOUND=no; break ]
|
||||
)
|
||||
fi
|
||||
|
||||
if test "x$VULKAN_FOUND" = xno; then
|
||||
# Check default /usr/include location
|
||||
AC_CHECK_HEADERS([vulkan/vulkan.h],
|
||||
[ VULKAN_FOUND=yes
|
||||
VULKAN_FLAGS="-DVK_USE_PLATFORM_WAYLAND_KHR -DVULKAN_ENABLED"
|
||||
],
|
||||
[ VULKAN_FOUND=no; break ]
|
||||
)
|
||||
fi
|
||||
|
||||
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
|
||||
@@ -33,10 +33,6 @@ m4_include([lib-freetype.m4])
|
||||
m4_include([lib-hsdis.m4])
|
||||
m4_include([lib-std.m4])
|
||||
m4_include([lib-x11.m4])
|
||||
m4_include([lib-fontconfig.m4])
|
||||
m4_include([lib-speechd.m4])
|
||||
m4_include([lib-nvdacontrollerclient.m4])
|
||||
m4_include([lib-wayland.m4])
|
||||
|
||||
m4_include([lib-tests.m4])
|
||||
|
||||
@@ -45,26 +41,14 @@ m4_include([lib-tests.m4])
|
||||
################################################################################
|
||||
AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
|
||||
[
|
||||
# Check if X11, wayland and vulkan is needed
|
||||
# Check if X11 is needed
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# No X11 and wayland support on windows or macosx
|
||||
# No X11 support on windows or macosx
|
||||
NEEDS_LIB_X11=false
|
||||
NEEDS_LIB_SPEECHD=false
|
||||
NEEDS_LIB_WAYLAND=false
|
||||
SUPPORTS_LIB_VULKAN=false
|
||||
elif test "x$ENABLE_HEADLESS_ONLY" = xtrue; then
|
||||
# No X11 support needed when building headless only
|
||||
NEEDS_LIB_X11=false
|
||||
NEEDS_LIB_SPEECHD=false
|
||||
NEEDS_LIB_WAYLAND=false
|
||||
SUPPORTS_LIB_VULKAN=false
|
||||
else
|
||||
# All other instances need X11 and wayland, even if building headless only, libawt still
|
||||
# All other instances need X11, even if building headless only, libawt still
|
||||
# needs X11 headers.
|
||||
NEEDS_LIB_X11=true
|
||||
NEEDS_LIB_SPEECHD=true
|
||||
NEEDS_LIB_WAYLAND=true
|
||||
SUPPORTS_LIB_VULKAN=true
|
||||
fi
|
||||
|
||||
# Check if fontconfig is needed
|
||||
@@ -98,45 +82,11 @@ AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
|
||||
fi
|
||||
|
||||
# Check if ffi is needed
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(zero) || test "x$ENABLE_FALLBACK_LINKER" = "xtrue"; then
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(zero); then
|
||||
NEEDS_LIB_FFI=true
|
||||
else
|
||||
NEEDS_LIB_FFI=false
|
||||
fi
|
||||
|
||||
# Check if nvdacontrollerclient is needed
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows && test "x$ENABLE_HEADLESS_ONLY" != xtrue; then
|
||||
NEEDS_LIB_NVDACONTROLLERCLIENT=true
|
||||
else
|
||||
NEEDS_LIB_NVDACONTROLLERCLIENT=false
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# Setup BASIC_JVM_LIBS that can be different depending on build/target platform
|
||||
################################################################################
|
||||
AC_DEFUN([LIB_SETUP_JVM_LIBS],
|
||||
[
|
||||
# Atomic library
|
||||
# 32-bit platforms needs fallback library for 8-byte atomic ops on Zero
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(zero); then
|
||||
if test "x$OPENJDK_$1_OS" = xlinux &&
|
||||
(test "x$OPENJDK_$1_CPU" = xarm ||
|
||||
test "x$OPENJDK_$1_CPU" = xm68k ||
|
||||
test "x$OPENJDK_$1_CPU" = xmips ||
|
||||
test "x$OPENJDK_$1_CPU" = xmipsel ||
|
||||
test "x$OPENJDK_$1_CPU" = xppc ||
|
||||
test "x$OPENJDK_$1_CPU" = xsh ||
|
||||
test "x$OPENJDK_$1_CPU" = xriscv32); then
|
||||
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
|
||||
])
|
||||
|
||||
################################################################################
|
||||
@@ -155,14 +105,10 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
|
||||
LIB_SETUP_LIBFFI
|
||||
LIB_SETUP_MISC_LIBS
|
||||
LIB_SETUP_X11
|
||||
LIB_SETUP_SPEECHD
|
||||
LIB_SETUP_NVDACONTROLLERCLIENT
|
||||
LIB_SETUP_WAYLAND
|
||||
|
||||
LIB_TESTS_SETUP_GTEST
|
||||
|
||||
BASIC_JDKLIB_LIBS=""
|
||||
BASIC_JDKLIB_LIBS_TARGET=""
|
||||
if test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
|
||||
BASIC_JDKLIB_LIBS="-ljava -ljvm"
|
||||
fi
|
||||
@@ -189,6 +135,27 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lrt"
|
||||
fi
|
||||
|
||||
# Atomic library
|
||||
# 32-bit platforms needs fallback library for 8-byte atomic ops on Zero
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(zero); then
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux &&
|
||||
(test "x$OPENJDK_TARGET_CPU" = xarm ||
|
||||
test "x$OPENJDK_TARGET_CPU" = xm68k ||
|
||||
test "x$OPENJDK_TARGET_CPU" = xmips ||
|
||||
test "x$OPENJDK_TARGET_CPU" = xmipsel ||
|
||||
test "x$OPENJDK_TARGET_CPU" = xppc ||
|
||||
test "x$OPENJDK_TARGET_CPU" = xsh ||
|
||||
test "x$OPENJDK_TARGET_CPU" = xriscv32); then
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -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_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xriscv64; then
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -latomic"
|
||||
fi
|
||||
|
||||
# perfstat lib
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lperfstat"
|
||||
@@ -196,17 +163,15 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
|
||||
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib powrprof.lib uuid.lib \
|
||||
ws2_32.lib winmm.lib version.lib psapi.lib"
|
||||
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
|
||||
wsock32.lib winmm.lib version.lib psapi.lib"
|
||||
fi
|
||||
LIB_SETUP_JVM_LIBS(BUILD)
|
||||
LIB_SETUP_JVM_LIBS(TARGET)
|
||||
|
||||
JDKLIB_LIBS="$BASIC_JDKLIB_LIBS"
|
||||
JDKEXE_LIBS=""
|
||||
JVM_LIBS="$BASIC_JVM_LIBS $BASIC_JVM_LIBS_TARGET"
|
||||
JVM_LIBS="$BASIC_JVM_LIBS"
|
||||
OPENJDK_BUILD_JDKLIB_LIBS="$BASIC_JDKLIB_LIBS"
|
||||
OPENJDK_BUILD_JVM_LIBS="$BASIC_JVM_LIBS $BASIC_JVM_LIBS_BUILD"
|
||||
OPENJDK_BUILD_JVM_LIBS="$BASIC_JVM_LIBS"
|
||||
|
||||
AC_SUBST(JDKLIB_LIBS)
|
||||
AC_SUBST(JDKEXE_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
|
||||
@@ -640,7 +640,6 @@ AC_DEFUN([PLATFORM_SET_MODULE_TARGET_OS_VALUES],
|
||||
])
|
||||
|
||||
#%%% Build and target systems %%%
|
||||
# Make sure to only use tools set up in BASIC_SETUP_FUNDAMENTAL_TOOLS.
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
|
||||
[
|
||||
# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
|
||||
@@ -657,21 +656,6 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
|
||||
PLATFORM_SET_MODULE_TARGET_OS_VALUES
|
||||
PLATFORM_SET_RELEASE_FILE_OS_VALUES
|
||||
PLATFORM_SETUP_LEGACY_VARS
|
||||
PLATFORM_CHECK_DEPRECATION
|
||||
])
|
||||
|
||||
AC_DEFUN([PLATFORM_CHECK_DEPRECATION],
|
||||
[
|
||||
AC_ARG_ENABLE(deprecated-ports, [AS_HELP_STRING([--enable-deprecated-ports@<:@=yes/no@:>@],
|
||||
[Suppress the error when configuring for a deprecated port @<:@no@:>@])])
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows && test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
if test "x$enable_deprecated_ports" = "xyes"; then
|
||||
AC_MSG_WARN([The Windows 32-bit x86 port is deprecated and may be removed in a future release.])
|
||||
else
|
||||
AC_MSG_ERROR(m4_normalize([The Windows 32-bit x86 port is deprecated and may be removed in a future release.
|
||||
Use --enable-deprecated-ports=yes to suppress this error.]))
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
|
||||
@@ -739,7 +723,7 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# Is the target little or big endian?
|
||||
# Is the target little of big endian?
|
||||
#
|
||||
AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal_endianness"])
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user