mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
Merge branch 'master' into hotspot
This commit is contained in:
commit
b93febb368
14
.editorconfig
Normal file
14
.editorconfig
Normal file
@ -0,0 +1,14 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
|
||||
[*.{cpp,hpp,c,h,java,cc,hh,m,mm,S,md,properties,gmk,m4,ac}]
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[Makefile]
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[src/hotspot/**.{cpp,hpp,h}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1,4 +1,5 @@
|
||||
* -text
|
||||
* encoding=utf-8
|
||||
*.java diff=java
|
||||
*.c diff=cpp
|
||||
*.h diff=cpp
|
||||
|
||||
2
.github/actions/build-jtreg/action.yml
vendored
2
.github/actions/build-jtreg/action.yml
vendored
@ -65,4 +65,4 @@ runs:
|
||||
with:
|
||||
name: bundles-jtreg-${{ steps.version.outputs.value }}
|
||||
path: jtreg/installed
|
||||
retention-days: 1
|
||||
retention-days: 5
|
||||
|
||||
4
.github/actions/do-build/action.yml
vendored
4
.github/actions/do-build/action.yml
vendored
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, 2025, 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
|
||||
@ -42,7 +42,7 @@ runs:
|
||||
- name: 'Build'
|
||||
id: build
|
||||
run: >
|
||||
make LOG=info ${{ inputs.make-target }}
|
||||
make -k LOG=info ${{ inputs.make-target }}
|
||||
|| bash ./.github/scripts/gen-build-failure-report.sh "$GITHUB_STEP_SUMMARY"
|
||||
shell: bash
|
||||
|
||||
|
||||
37
.github/actions/get-bundles/action.yml
vendored
37
.github/actions/get-bundles/action.yml
vendored
@ -32,10 +32,16 @@ inputs:
|
||||
debug-suffix:
|
||||
description: 'File name suffix denoting debug level, possibly empty'
|
||||
required: false
|
||||
static-suffix:
|
||||
description: 'Static bundle file name suffix'
|
||||
required: false
|
||||
outputs:
|
||||
jdk-path:
|
||||
description: 'Path to the installed JDK bundle'
|
||||
value: ${{ steps.path-name.outputs.jdk }}
|
||||
static-jdk-path:
|
||||
description: 'Path to the installed static JDK bundle'
|
||||
value: ${{ steps.path-name.outputs.static_jdk }}
|
||||
symbols-path:
|
||||
description: 'Path to the installed symbols bundle'
|
||||
value: ${{ steps.path-name.outputs.symbols }}
|
||||
@ -61,6 +67,15 @@ runs:
|
||||
path: bundles
|
||||
if: steps.download-bundles.outcome == 'failure'
|
||||
|
||||
- name: 'Download static bundles artifact'
|
||||
id: download-static-bundles
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}
|
||||
path: bundles
|
||||
continue-on-error: true
|
||||
if: ${{ inputs.static-suffix == '-static' }}
|
||||
|
||||
- name: 'Unpack bundles'
|
||||
run: |
|
||||
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip ]]; then
|
||||
@ -75,6 +90,20 @@ runs:
|
||||
tar -xf bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/jdk
|
||||
fi
|
||||
|
||||
if [[ '${{ inputs.static-suffix }}' == '-static' ]]; then
|
||||
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.zip ]]; then
|
||||
echo 'Unpacking static jdk bundle...'
|
||||
mkdir -p bundles/static-jdk
|
||||
unzip -q bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.zip -d bundles/static-jdk
|
||||
fi
|
||||
|
||||
if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.tar.gz ]]; then
|
||||
echo 'Unpacking static jdk bundle...'
|
||||
mkdir -p bundles/static-jdk
|
||||
tar -xf bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.tar.gz -C bundles/static-jdk
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -e bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
|
||||
echo 'Unpacking symbols bundle...'
|
||||
mkdir -p bundles/symbols
|
||||
@ -106,4 +135,12 @@ runs:
|
||||
echo "jdk=$jdk_dir" >> $GITHUB_OUTPUT
|
||||
echo "symbols=$symbols_dir" >> $GITHUB_OUTPUT
|
||||
echo "tests=$tests_dir" >> $GITHUB_OUTPUT
|
||||
|
||||
if [[ '${{ inputs.static-suffix }}' == '-static' ]]; then
|
||||
static_jdk_dir="$GITHUB_WORKSPACE/$(dirname $(find bundles/static-jdk -name bin -type d))"
|
||||
if [[ '${{ runner.os }}' == 'Windows' ]]; then
|
||||
static_jdk_dir="$(cygpath $static_jdk_dir)"
|
||||
fi
|
||||
echo "static_jdk=$static_jdk_dir" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
8
.github/actions/get-msys2/action.yml
vendored
8
.github/actions/get-msys2/action.yml
vendored
@ -30,15 +30,15 @@ runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Install MSYS2'
|
||||
uses: msys2/setup-msys2@v2.22.0
|
||||
id: msys2
|
||||
uses: msys2/setup-msys2@v2.28.0
|
||||
with:
|
||||
install: 'autoconf tar unzip zip make'
|
||||
path-type: minimal
|
||||
location: ${{ runner.tool_cache }}/msys2
|
||||
release: false
|
||||
|
||||
# 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 "${{ steps.msys2.outputs.msys2-location }}/usr/bin" >> $env:GITHUB_PATH
|
||||
shell: pwsh
|
||||
|
||||
20
.github/actions/upload-bundles/action.yml
vendored
20
.github/actions/upload-bundles/action.yml
vendored
@ -32,6 +32,12 @@ inputs:
|
||||
debug-suffix:
|
||||
description: 'File name suffix denoting debug level, possibly empty'
|
||||
required: false
|
||||
bundle-suffix:
|
||||
description: 'Bundle name suffix, possibly empty'
|
||||
required: false
|
||||
static-suffix:
|
||||
description: 'Static JDK bundle name suffix, possibly empty'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
@ -43,6 +49,8 @@ runs:
|
||||
# Rename bundles to consistent names
|
||||
jdk_bundle_zip="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
|
||||
jdk_bundle_tar_gz="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||
static_jdk_bundle_zip="$(ls build/*/bundles/static-jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
|
||||
static_jdk_bundle_tar_gz="$(ls build/*/bundles/static-jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||
symbols_bundle="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}-symbols.tar.gz 2> /dev/null || true)"
|
||||
tests_bundle="$(ls build/*/bundles/jdk-*_bin-tests${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||
static_libs_bundle="$(ls build/*/bundles/jdk-*_bin-static-libs${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
|
||||
@ -55,6 +63,12 @@ runs:
|
||||
if [[ "$jdk_bundle_tar_gz" != "" ]]; then
|
||||
mv "$jdk_bundle_tar_gz" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||
fi
|
||||
if [[ "$static_jdk_bundle_zip" != "" ]]; then
|
||||
mv "$static_jdk_bundle_zip" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.zip"
|
||||
fi
|
||||
if [[ "$static_jdk_bundle_tar_gz" != "" ]]; then
|
||||
mv "$static_jdk_bundle_tar_gz" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}.tar.gz"
|
||||
fi
|
||||
if [[ "$symbols_bundle" != "" ]]; then
|
||||
mv "$symbols_bundle" "bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||
fi
|
||||
@ -65,7 +79,7 @@ runs:
|
||||
mv "$static_libs_bundle" "bundles/static-libs-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
|
||||
fi
|
||||
|
||||
if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$symbols_bundle$tests_bundle$static_libs_bundle" != "" ]]; then
|
||||
if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$static_jdk_bundle_zip$static_jdk_bundle_tar_gz$symbols_bundle$tests_bundle$static_libs_bundle" != "" ]]; then
|
||||
echo 'bundles-found=true' >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo 'bundles-found=false' >> $GITHUB_OUTPUT
|
||||
@ -75,7 +89,7 @@ runs:
|
||||
- name: 'Upload bundles artifact'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}${{ inputs.bundle-suffix }}
|
||||
path: bundles
|
||||
retention-days: 1
|
||||
retention-days: 5
|
||||
if: steps.bundles.outputs.bundles-found == 'true'
|
||||
|
||||
6
.github/workflows/build-alpine-linux.yml
vendored
6
.github/workflows/build-alpine-linux.yml
vendored
@ -51,6 +51,10 @@ on:
|
||||
make-arguments:
|
||||
required: false
|
||||
type: string
|
||||
dry-run:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
@ -104,9 +108,11 @@ jobs:
|
||||
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
- name: 'Upload bundles'
|
||||
uses: ./.github/actions/upload-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
18
.github/workflows/build-cross-compile.yml
vendored
18
.github/workflows/build-cross-compile.yml
vendored
@ -40,6 +40,10 @@ on:
|
||||
make-arguments:
|
||||
required: false
|
||||
type: string
|
||||
dry-run:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build-cross-compile:
|
||||
@ -60,33 +64,33 @@ jobs:
|
||||
gnu-arch: aarch64
|
||||
debian-arch: arm64
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
debian-version: trixie
|
||||
tolerate-sysroot-errors: false
|
||||
- target-cpu: arm
|
||||
gnu-arch: arm
|
||||
debian-arch: armhf
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
debian-version: trixie
|
||||
tolerate-sysroot-errors: false
|
||||
gnu-abi: eabihf
|
||||
- target-cpu: s390x
|
||||
gnu-arch: s390x
|
||||
debian-arch: s390x
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
debian-version: trixie
|
||||
tolerate-sysroot-errors: false
|
||||
- target-cpu: ppc64le
|
||||
gnu-arch: powerpc64le
|
||||
debian-arch: ppc64el
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
debian-version: trixie
|
||||
tolerate-sysroot-errors: false
|
||||
- target-cpu: riscv64
|
||||
gnu-arch: riscv64
|
||||
debian-arch: riscv64
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: sid
|
||||
tolerate-sysroot-errors: true
|
||||
debian-version: trixie
|
||||
tolerate-sysroot-errors: false
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
@ -189,4 +193,4 @@ jobs:
|
||||
with:
|
||||
make-target: 'hotspot ${{ inputs.make-arguments }}'
|
||||
platform: linux-${{ matrix.target-cpu }}
|
||||
if: steps.create-sysroot.outcome == 'success' || steps.get-cached-sysroot.outputs.cache-hit == 'true'
|
||||
if: ((steps.create-sysroot.outcome == 'success' || steps.get-cached-sysroot.outputs.cache-hit == 'true') && inputs.dry-run == false)
|
||||
|
||||
30
.github/workflows/build-linux.yml
vendored
30
.github/workflows/build-linux.yml
vendored
@ -61,6 +61,16 @@ on:
|
||||
make-arguments:
|
||||
required: false
|
||||
type: string
|
||||
dry-run:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
bundle-suffix:
|
||||
required: false
|
||||
type: string
|
||||
static-suffix:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
@ -71,10 +81,6 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
debug-level: ${{ fromJSON(inputs.debug-levels) }}
|
||||
include:
|
||||
- debug-level: debug
|
||||
flags: --with-debug-level=fastdebug
|
||||
suffix: -debug
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
@ -118,7 +124,7 @@ jobs:
|
||||
run: >
|
||||
bash configure
|
||||
--with-conf-name=${{ inputs.platform }}
|
||||
${{ matrix.flags }}
|
||||
${{ matrix.debug-level == 'debug' && '--with-debug-level=fastdebug' || '' }}
|
||||
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||
--with-jtreg=${{ steps.jtreg.outputs.path }}
|
||||
@ -133,17 +139,17 @@ jobs:
|
||||
- name: 'Build'
|
||||
id: build
|
||||
uses: ./.github/actions/do-build
|
||||
env:
|
||||
# Only build static-libs-bundles for release builds.
|
||||
# For debug builds, building static-libs often exceeds disk space.
|
||||
STATIC_LIBS: ${{ matrix.debug-level == 'release' && 'static-libs-bundles' }}
|
||||
with:
|
||||
make-target: '${{ inputs.make-target }} ${STATIC_LIBS} ${{ inputs.make-arguments }}'
|
||||
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
- name: 'Upload bundles'
|
||||
uses: ./.github/actions/upload-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
|
||||
bundle-suffix: ${{ inputs.bundle-suffix }}
|
||||
static-suffix: ${{ inputs.static-suffix }}
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
6
.github/workflows/build-macos.yml
vendored
6
.github/workflows/build-macos.yml
vendored
@ -54,6 +54,10 @@ on:
|
||||
make-arguments:
|
||||
required: false
|
||||
type: string
|
||||
dry-run:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build-macos:
|
||||
@ -118,9 +122,11 @@ jobs:
|
||||
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
- name: 'Upload bundles'
|
||||
uses: ./.github/actions/upload-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
13
.github/workflows/build-windows.yml
vendored
13
.github/workflows/build-windows.yml
vendored
@ -54,6 +54,10 @@ on:
|
||||
make-arguments:
|
||||
required: false
|
||||
type: string
|
||||
dry-run:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
env:
|
||||
# These are needed to make the MSYS2 bash work properly
|
||||
@ -63,7 +67,7 @@ env:
|
||||
jobs:
|
||||
build-windows:
|
||||
name: build
|
||||
runs-on: windows-2019
|
||||
runs-on: windows-2025
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
@ -102,7 +106,7 @@ jobs:
|
||||
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 }}
|
||||
'/c/Program Files/Microsoft Visual Studio/2022/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
|
||||
@ -115,7 +119,7 @@ jobs:
|
||||
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\Microsoft Visual Studio\2022\Enterprise' \
|
||||
--add Microsoft.VisualStudio.Component.VC.${{ inputs.msvc-toolset-version }}.${{ inputs.msvc-toolset-architecture }}
|
||||
if: steps.toolchain-check.outputs.toolchain-installed != 'true'
|
||||
|
||||
@ -139,6 +143,7 @@ jobs:
|
||||
# Set PATH to "", so just GITHUB_PATH is included
|
||||
PATH: ''
|
||||
shell: env /usr/bin/bash --login -eo pipefail {0}
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
@ -147,9 +152,11 @@ jobs:
|
||||
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
- name: 'Upload bundles'
|
||||
uses: ./.github/actions/upload-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
126
.github/workflows/main.yml
vendored
126
.github/workflows/main.yml
vendored
@ -28,9 +28,7 @@ name: 'OpenJDK GHA Sanity Checks'
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- master
|
||||
- pr/*
|
||||
- jdk*
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
platforms:
|
||||
@ -43,6 +41,9 @@ on:
|
||||
make-arguments:
|
||||
description: 'Additional make arguments'
|
||||
required: false
|
||||
dry-run:
|
||||
description: 'Dry run: skip actual builds and tests'
|
||||
required: false
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@ -70,6 +71,7 @@ jobs:
|
||||
windows-x64: ${{ steps.include.outputs.windows-x64 }}
|
||||
windows-aarch64: ${{ steps.include.outputs.windows-aarch64 }}
|
||||
docs: ${{ steps.include.outputs.docs }}
|
||||
dry-run: ${{ steps.include.outputs.dry-run }}
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the scripts'
|
||||
@ -143,6 +145,35 @@ jobs:
|
||||
echo 'false'
|
||||
}
|
||||
|
||||
function check_dry_run() {
|
||||
if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
|
||||
# Take the user-specified one.
|
||||
echo '${{ github.event.inputs.dry-run }}'
|
||||
return
|
||||
elif [[ $GITHUB_EVENT_NAME == push ]]; then
|
||||
# Cut out the real branch name
|
||||
BRANCH=${GITHUB_REF##*/}
|
||||
|
||||
# Dry run rebuilds the caches in current branch, so they can be reused
|
||||
# for any child PR branches. Because of this, we want to trigger this
|
||||
# workflow in master branch, so that actual PR branches can use the cache.
|
||||
# This workflow would trigger every time contributors sync their master
|
||||
# branches in their personal forks.
|
||||
if [[ $BRANCH == "master" ]]; then
|
||||
echo 'true'
|
||||
return
|
||||
fi
|
||||
|
||||
# ...same for stabilization branches
|
||||
if [[ $BRANCH =~ "jdk(.*)" ]]; then
|
||||
echo 'true'
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
echo 'false'
|
||||
}
|
||||
|
||||
echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $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
|
||||
@ -152,6 +183,7 @@ jobs:
|
||||
echo "windows-x64=$(check_platform windows-x64 windows x64)" >> $GITHUB_OUTPUT
|
||||
echo "windows-aarch64=$(check_platform windows-aarch64 windows aarch64)" >> $GITHUB_OUTPUT
|
||||
echo "docs=$(check_platform docs)" >> $GITHUB_OUTPUT
|
||||
echo "dry-run=$(check_dry_run)" >> $GITHUB_OUTPUT
|
||||
|
||||
###
|
||||
### Build jobs
|
||||
@ -166,6 +198,7 @@ jobs:
|
||||
gcc-major-version: '10'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.linux-x64 == 'true'
|
||||
|
||||
build-linux-x64-hs-nopch:
|
||||
@ -180,6 +213,7 @@ jobs:
|
||||
extra-conf-options: '--disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-x64-hs-zero:
|
||||
@ -194,6 +228,7 @@ jobs:
|
||||
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-x64-hs-minimal:
|
||||
@ -208,6 +243,7 @@ jobs:
|
||||
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-x64-hs-optimized:
|
||||
@ -223,6 +259,44 @@ jobs:
|
||||
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-x64-static:
|
||||
name: linux-x64-static
|
||||
needs: prepare
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
make-target: 'static-jdk-bundles'
|
||||
# There are issues with fastdebug static build in GHA due to space limit.
|
||||
# Only do release build for now.
|
||||
debug-levels: '[ "release" ]'
|
||||
gcc-major-version: '10'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
static-suffix: "-static"
|
||||
if: needs.prepare.outputs.linux-x64 == 'true'
|
||||
|
||||
build-linux-x64-static-libs:
|
||||
name: linux-x64-static-libs
|
||||
needs: prepare
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
make-target: 'static-libs-bundles'
|
||||
# Only build static-libs-bundles for release builds.
|
||||
# For debug builds, building static-libs often exceeds disk space.
|
||||
debug-levels: '[ "release" ]'
|
||||
gcc-major-version: '10'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
# Upload static libs bundles separately to avoid interference with normal linux-x64 bundle.
|
||||
# This bundle is not used by testing jobs, but downstreams use it to check that
|
||||
# dependent projects, e.g. libgraal, builds fine.
|
||||
bundle-suffix: "-static-libs"
|
||||
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-cross-compile:
|
||||
@ -233,6 +307,7 @@ jobs:
|
||||
gcc-major-version: '10'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.linux-cross-compile == 'true'
|
||||
|
||||
build-alpine-linux-x64:
|
||||
@ -243,6 +318,7 @@ jobs:
|
||||
platform: alpine-linux-x64
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.alpine-linux-x64 == 'true'
|
||||
|
||||
build-macos-x64:
|
||||
@ -251,10 +327,11 @@ jobs:
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
platform: macos-x64
|
||||
runs-on: 'macos-13'
|
||||
xcode-toolset-version: '14.3.1'
|
||||
runs-on: 'macos-15-intel'
|
||||
xcode-toolset-version: '16.4'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.macos-x64 == 'true'
|
||||
|
||||
build-macos-aarch64:
|
||||
@ -263,10 +340,11 @@ jobs:
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
platform: macos-aarch64
|
||||
runs-on: 'macos-14'
|
||||
xcode-toolset-version: '15.4'
|
||||
runs-on: 'macos-15'
|
||||
xcode-toolset-version: '16.4'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.macos-aarch64 == 'true'
|
||||
|
||||
build-windows-x64:
|
||||
@ -275,10 +353,11 @@ jobs:
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
platform: windows-x64
|
||||
msvc-toolset-version: '14.29'
|
||||
msvc-toolset-version: '14.44'
|
||||
msvc-toolset-architecture: 'x86.x64'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.windows-x64 == 'true'
|
||||
|
||||
build-windows-aarch64:
|
||||
@ -287,12 +366,13 @@ jobs:
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
platform: windows-aarch64
|
||||
msvc-toolset-version: '14.29'
|
||||
msvc-toolset-version: '14.44'
|
||||
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 }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.windows-aarch64 == 'true'
|
||||
|
||||
build-docs:
|
||||
@ -309,6 +389,7 @@ jobs:
|
||||
gcc-major-version: '10'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.docs == 'true'
|
||||
|
||||
###
|
||||
@ -318,30 +399,53 @@ jobs:
|
||||
test-linux-x64:
|
||||
name: linux-x64
|
||||
needs:
|
||||
- prepare
|
||||
- build-linux-x64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
bootjdk-platform: linux-x64
|
||||
runs-on: ubuntu-22.04
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
debug-suffix: -debug
|
||||
|
||||
test-linux-x64-static:
|
||||
name: linux-x64-static
|
||||
needs:
|
||||
- prepare
|
||||
- build-linux-x64
|
||||
- build-linux-x64-static
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
bootjdk-platform: linux-x64
|
||||
runs-on: ubuntu-22.04
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
static-suffix: "-static"
|
||||
|
||||
test-macos-aarch64:
|
||||
name: macos-aarch64
|
||||
needs:
|
||||
- prepare
|
||||
- build-macos-aarch64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: macos-aarch64
|
||||
bootjdk-platform: macos-aarch64
|
||||
runs-on: macos-14
|
||||
xcode-toolset-version: '15.4'
|
||||
runs-on: macos-15
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
xcode-toolset-version: '16.4'
|
||||
debug-suffix: -debug
|
||||
|
||||
test-windows-x64:
|
||||
name: windows-x64
|
||||
needs:
|
||||
- prepare
|
||||
- build-windows-x64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: windows-x64
|
||||
bootjdk-platform: windows-x64
|
||||
runs-on: windows-2019
|
||||
runs-on: windows-2025
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
debug-suffix: -debug
|
||||
|
||||
50
.github/workflows/test.yml
vendored
50
.github/workflows/test.yml
vendored
@ -40,6 +40,16 @@ on:
|
||||
xcode-toolset-version:
|
||||
required: false
|
||||
type: string
|
||||
dry-run:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
debug-suffix:
|
||||
required: false
|
||||
type: string
|
||||
static-suffix:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
env:
|
||||
# These are needed to make the MSYS2 bash work properly
|
||||
@ -86,35 +96,35 @@ jobs:
|
||||
|
||||
- test-name: 'hs/tier1 common'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_common'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'hs/tier1 compiler part 1'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_1'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'hs/tier1 compiler part 2'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_2'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'hs/tier1 compiler part 3'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_3'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'hs/tier1 gc'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_gc'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'hs/tier1 runtime'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_runtime'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'hs/tier1 serviceability'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_serviceability'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
- test-name: 'lib-test/tier1'
|
||||
test-suite: 'test/lib-test/:tier1'
|
||||
debug-suffix: -debug
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
@ -140,6 +150,8 @@ jobs:
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: ${{ matrix.debug-suffix }}
|
||||
static-suffix: ${{ inputs.static-suffix }}
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
- name: 'Install dependencies'
|
||||
run: |
|
||||
@ -160,6 +172,21 @@ jobs:
|
||||
else
|
||||
echo "value=$PATH" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
if [[ '${{ inputs.static-suffix }}' == '-static' ]]; then
|
||||
echo "static-hotspot-problemlist-path=`pwd`/test/hotspot/jtreg/ProblemList-StaticJdk.txt" >> $GITHUB_OUTPUT
|
||||
echo "static-jdk-problemlist-path=`pwd`/test/jdk/ProblemList-StaticJdk.txt" >> $GITHUB_OUTPUT
|
||||
echo "static-langtools-problemlist-path=`pwd`/test/langtools/ProblemList-StaticJdk.txt" >> $GITHUB_OUTPUT
|
||||
echo "static-lib-test-problemlist-path=`pwd`/test/lib-test/ProblemList-StaticJdk.txt" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: 'Set Extra Options'
|
||||
id: extra-options
|
||||
run: |
|
||||
if [[ '${{ inputs.static-suffix }}' == '-static' ]]; then
|
||||
echo "test-jdk=JDK_UNDER_TEST=${{ steps.bundles.outputs.static-jdk-path }}" >> $GITHUB_OUTPUT
|
||||
echo "compile-jdk=JDK_FOR_COMPILE=${{ steps.bundles.outputs.jdk-path }}" >> $GITHUB_OUTPUT
|
||||
echo "extra-problem-lists=EXTRA_PROBLEM_LISTS=${{ steps.path.outputs.static-hotspot-problemlist-path }}%20${{ steps.path.outputs.static-jdk-problemlist-path }}%20${{ steps.path.outputs.static-langtools-problemlist-path }}%20${{ steps.path.outputs.static-lib-test-problemlist-path }}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: 'Run tests'
|
||||
id: run-tests
|
||||
@ -171,10 +198,13 @@ jobs:
|
||||
JDK_IMAGE_DIR=${{ steps.bundles.outputs.jdk-path }}
|
||||
SYMBOLS_IMAGE_DIR=${{ steps.bundles.outputs.symbols-path }}
|
||||
TEST_IMAGE_DIR=${{ steps.bundles.outputs.tests-path }}
|
||||
JTREG='JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash;VERBOSE=fail,error,time;KEYWORDS=!headful'
|
||||
${{ steps.extra-options.outputs.test-jdk }}
|
||||
${{ steps.extra-options.outputs.compile-jdk }}
|
||||
JTREG='JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash;VERBOSE=fail,error,time;KEYWORDS=!headful;${{ steps.extra-options.outputs.extra-problem-lists }}'
|
||||
&& bash ./.github/scripts/gen-test-summary.sh "$GITHUB_STEP_SUMMARY" "$GITHUB_OUTPUT"
|
||||
env:
|
||||
PATH: ${{ steps.path.outputs.value }}
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
# This is a separate step, since if the markdown from a step gets bigger than
|
||||
# 1024 kB it is skipped, but then the short summary above is still generated
|
||||
@ -204,7 +234,7 @@ jobs:
|
||||
echo '::warning ::Missing test-support directory'
|
||||
fi
|
||||
|
||||
artifact_name="results-${{ inputs.platform }}-$(echo ${{ matrix.test-name }} | tr '/ ' '__')"
|
||||
artifact_name="results-${{ inputs.platform }}-$(echo ${{ matrix.test-name }}${{ inputs.static-suffix }} | tr '/ ' '__')"
|
||||
echo "artifact-name=$artifact_name" >> $GITHUB_OUTPUT
|
||||
if: always()
|
||||
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@ -22,3 +22,7 @@ NashornProfile.txt
|
||||
/.cache
|
||||
/.gdbinit
|
||||
/.lldbinit
|
||||
**/core.[0-9]*
|
||||
*.rej
|
||||
*.orig
|
||||
test/benchmarks/**/target
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
[general]
|
||||
project=jdk
|
||||
jbs=JDK
|
||||
version=25
|
||||
version=26
|
||||
|
||||
[checks]
|
||||
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists,copyright
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
# Contributing to the JDK
|
||||
|
||||
Please see the [OpenJDK Developers’ Guide](https://openjdk.org/guide/).
|
||||
Please see the [OpenJDK Developers' Guide](https://openjdk.org/guide/).
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2019, 2025, 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
|
||||
@ -52,12 +52,39 @@
|
||||
# include the SCM state that was used to build it, which can be found in ${JDK_N_INSTALL}/release,
|
||||
# in property "SOURCE".
|
||||
|
||||
source_path="$(dirname ${0})"
|
||||
this_script_dir="$(cd -- "${source_path}" > /dev/null && pwd)"
|
||||
if test -z "${this_script_dir}"; then
|
||||
echo "Error: Could not determine location of this script"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
symbols_dir="$(dirname $this_script_dir)/src/jdk.compiler/share/data/symbols"
|
||||
if [ ! -d $symbols_dir ] ; then
|
||||
echo "Cannot locate symbols directory: $symbols_dir" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
generator_dir="$(dirname $this_script_dir)/make/langtools/src/classes/build/tools/symbolgenerator"
|
||||
|
||||
if [ "$1x" = "x" ] ; then
|
||||
echo "Must provide the target JDK as a parameter:" >&2
|
||||
echo "$0 <target-jdk>" >&2
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
if [ ! -d $1 ] ; then
|
||||
echo "Target JDK argument is not a directory:" $1 >&2
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
if [ ! -x $1/bin/java ] ; then
|
||||
echo "Target JDK argument is not a valid JDK: $1" >&2
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
cd $symbols_dir
|
||||
|
||||
if [ ! -f symbols ] ; then
|
||||
echo "Must run inside the src/jdk.compiler/share/data/symbols directory" >&2
|
||||
exit 1
|
||||
@ -68,10 +95,9 @@ if [ "`git status --porcelain=v1 .`x" != "x" ] ; then
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
$1/bin/java --add-exports jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
|
||||
$1/bin/java --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
|
||||
--add-modules jdk.jdeps \
|
||||
../../../../../make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java \
|
||||
$generator_dir/CreateSymbols.java \
|
||||
build-description-incremental symbols include.list
|
||||
@ -125,7 +125,8 @@ if [ -d "$TOPLEVEL_DIR/.hg" ] ; then
|
||||
VCS_TYPE="hg4idea"
|
||||
fi
|
||||
|
||||
if [ -d "$TOPLEVEL_DIR/.git" ] ; then
|
||||
# Git worktrees use a '.git' file rather than directory, so test both.
|
||||
if [ -d "$TOPLEVEL_DIR/.git" -o -f "$TOPLEVEL_DIR/.git" ] ; then
|
||||
VCS_TYPE="Git"
|
||||
fi
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#! /bin/sh -f
|
||||
#
|
||||
# Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2025, 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
|
||||
@ -62,7 +62,7 @@ B=`basename "${script_directory}"`
|
||||
script_dir="`cd \"${D}\" 2>/dev/null && pwd || echo \"${D}\"`/${B}"
|
||||
|
||||
# set up a variable for the template directory
|
||||
template_dir=${script_dir}/../data/license-templates
|
||||
template_dir=${script_dir}/../make/data/license-templates
|
||||
|
||||
# Check existence of the template directory.
|
||||
if [ ! -d ${template_dir} ] ; then
|
||||
@ -1,192 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2014, 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
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
src/bsd : jdk/src/bsd
|
||||
src/demo : jdk/src/demo
|
||||
src/java.activation : jaxws/src/java.activation
|
||||
src/java.base : jdk/src/java.base
|
||||
src/java.compiler : langtools/src/java.compiler
|
||||
src/java.corba : corba/src/java.corba
|
||||
src/java.datatransfer : jdk/src/java.datatransfer
|
||||
src/java.desktop : jdk/src/java.desktop
|
||||
src/java.instrument : jdk/src/java.instrument
|
||||
src/java.logging : jdk/src/java.logging
|
||||
src/java.management : jdk/src/java.management
|
||||
src/java.management.rmi : jdk/src/java.management.rmi
|
||||
src/java.naming : jdk/src/java.naming
|
||||
src/java.prefs : jdk/src/java.prefs
|
||||
src/java.rmi : jdk/src/java.rmi
|
||||
src/java.scripting : jdk/src/java.scripting
|
||||
src/java.se : jdk/src/java.se
|
||||
src/java.security.jgss : jdk/src/java.security.jgss
|
||||
src/java.security.sasl : jdk/src/java.security.sasl
|
||||
src/java.se.ee : jdk/src/java.se.ee
|
||||
src/java.smartcardio : jdk/src/java.smartcardio
|
||||
src/java.sql : jdk/src/java.sql
|
||||
src/java.sql.rowset : jdk/src/java.sql.rowset
|
||||
src/java.transaction : jdk/src/java.transaction
|
||||
src/java.xml : jaxp/src/java.xml
|
||||
src/java.xml.bind : jaxws/src/java.xml.bind
|
||||
src/java.xml.crypto : jdk/src/java.xml.crypto
|
||||
src/java.xml.ws : jaxws/src/java.xml.ws
|
||||
src/java.xml.ws.annotation : jaxws/src/java.xml.ws.annotation
|
||||
src/jdk.accessibility : jdk/src/jdk.accessibility
|
||||
src/jdk.aot : hotspot/src/jdk.aot
|
||||
src/jdk.attach : jdk/src/jdk.attach
|
||||
src/jdk.charsets : jdk/src/jdk.charsets
|
||||
src/jdk.compiler : jdk/src/jdk.compiler langtools/src/jdk.compiler
|
||||
src/jdk.crypto.cryptoki : jdk/src/jdk.crypto.cryptoki
|
||||
src/jdk.crypto.ec : jdk/src/jdk.crypto.ec
|
||||
src/jdk.crypto.mscapi : jdk/src/jdk.crypto.mscapi
|
||||
src/jdk.dynalink : nashorn/src/jdk.dynalink
|
||||
src/jdk.editpad : jdk/src/jdk.editpad
|
||||
src/jdk.hotspot.agent : hotspot/src/jdk.hotspot.agent
|
||||
src/jdk.httpserver : jdk/src/jdk.httpserver
|
||||
src/jdk.incubator.httpclient : jdk/src/jdk.incubator.httpclient
|
||||
src/jdk.internal.ed : jdk/src/jdk.internal.ed
|
||||
src/jdk.internal.jvmstat : jdk/src/jdk.internal.jvmstat
|
||||
src/jdk.internal.le : jdk/src/jdk.internal.le
|
||||
src/jdk.internal.opt : jdk/src/jdk.internal.opt
|
||||
src/jdk.internal.vm.ci : hotspot/src/jdk.internal.vm.ci
|
||||
src/jdk.internal.vm.compiler : hotspot/src/jdk.internal.vm.compiler
|
||||
src/jdk.jartool : jdk/src/jdk.jartool
|
||||
src/jdk.javadoc : langtools/src/jdk.javadoc
|
||||
src/jdk.jcmd : jdk/src/jdk.jcmd
|
||||
src/jdk.jconsole : jdk/src/jdk.jconsole
|
||||
src/jdk.jdeps : langtools/src/jdk.jdeps
|
||||
src/jdk.jdi : jdk/src/jdk.jdi
|
||||
src/jdk.jdwp.agent : jdk/src/jdk.jdwp.agent
|
||||
src/jdk.jlink : jdk/src/jdk.jlink
|
||||
src/jdk.jshell : langtools/src/jdk.jshell
|
||||
src/jdk.jsobject : jdk/src/jdk.jsobject
|
||||
src/jdk.jstatd : jdk/src/jdk.jstatd
|
||||
src/jdk.localedata : jdk/src/jdk.localedata
|
||||
src/jdk.management : jdk/src/jdk.management
|
||||
src/jdk.management.agent : jdk/src/jdk.management.agent
|
||||
src/jdk.naming.dns : jdk/src/jdk.naming.dns
|
||||
src/jdk.naming.rmi : jdk/src/jdk.naming.rmi
|
||||
src/jdk.net : jdk/src/jdk.net
|
||||
src/jdk.pack : jdk/src/jdk.pack
|
||||
src/jdk.scripting.nashorn : nashorn/src/jdk.scripting.nashorn
|
||||
src/jdk.scripting.nashorn.shell : nashorn/src/jdk.scripting.nashorn.shell
|
||||
src/jdk.sctp : jdk/src/jdk.sctp
|
||||
src/jdk.security.auth : jdk/src/jdk.security.auth
|
||||
src/jdk.security.jgss : jdk/src/jdk.security.jgss
|
||||
src/jdk.unsupported : jdk/src/jdk.unsupported
|
||||
src/jdk.xml.bind : jaxws/src/jdk.xml.bind
|
||||
src/jdk.xml.dom : jaxp/src/jdk.xml.dom
|
||||
src/jdk.xml.ws : jaxws/src/jdk.xml.ws
|
||||
src/jdk.zipfs : jdk/src/jdk.zipfs
|
||||
src/langtools/sample : langtools/src/sample
|
||||
src/linux : jdk/src/linux
|
||||
src/sample : jdk/src/sample
|
||||
src/hotspot/share : hotspot/src/share/vm
|
||||
src/hotspot/cpu/aarch64 : hotspot/src/cpu/aarch64/vm
|
||||
src/hotspot/cpu/arm : hotspot/src/cpu/arm/vm
|
||||
src/hotspot/cpu/ppc : hotspot/src/cpu/ppc/vm
|
||||
src/hotspot/cpu/s390 : hotspot/src/cpu/s390/vm
|
||||
src/hotspot/cpu/x86 : hotspot/src/cpu/x86/vm
|
||||
src/hotspot/cpu/zero : hotspot/src/cpu/zero/vm
|
||||
src/hotspot/os/aix : hotspot/src/os/aix/vm
|
||||
src/hotspot/os/bsd : hotspot/src/os/bsd/vm
|
||||
src/hotspot/os/linux : hotspot/src/os/linux/vm
|
||||
src/hotspot/os/posix/dtrace : hotspot/src/os/posix/dtrace
|
||||
src/hotspot/os/posix : hotspot/src/os/posix/vm
|
||||
src/hotspot/os/windows : hotspot/src/os/windows/vm
|
||||
src/hotspot/os_cpu/aix_ppc : hotspot/src/os_cpu/aix_ppc/vm
|
||||
src/hotspot/os_cpu/bsd_x86 : hotspot/src/os_cpu/bsd_x86/vm
|
||||
src/hotspot/os_cpu/bsd_zero : hotspot/src/os_cpu/bsd_zero/vm
|
||||
src/hotspot/os_cpu/linux_aarch64 : hotspot/src/os_cpu/linux_aarch64/vm
|
||||
src/hotspot/os_cpu/linux_arm : hotspot/src/os_cpu/linux_arm/vm
|
||||
src/hotspot/os_cpu/linux_ppc : hotspot/src/os_cpu/linux_ppc/vm
|
||||
src/hotspot/os_cpu/linux_s390 : hotspot/src/os_cpu/linux_s390/vm
|
||||
src/hotspot/os_cpu/linux_x86 : hotspot/src/os_cpu/linux_x86/vm
|
||||
src/hotspot/os_cpu/linux_zero : hotspot/src/os_cpu/linux_zero/vm
|
||||
src/hotspot/os_cpu/windows_x86 : hotspot/src/os_cpu/windows_x86/vm
|
||||
src/hotspot : hotspot/src
|
||||
src/utils/IdealGraphVisualizer : hotspot/src/share/tools/IdealGraphVisualizer
|
||||
src/utils/LogCompilation : hotspot/src/share/tools/LogCompilation
|
||||
src/utils/hsdis : hotspot/src/share/tools/hsdis
|
||||
src/utils/reorder : jdk/make/non-build-utils/reorder
|
||||
src/utils/src/build : jdk/make/non-build-utils/src/build
|
||||
make/BuildNashorn.gmk : nashorn/make/BuildNashorn.gmk
|
||||
make/CompileDemos.gmk : jdk/make/CompileDemos.gmk
|
||||
make/CompileInterimLangtools.gmk : langtools/make/CompileInterim.gmk
|
||||
make/CompileModuleTools.gmk : jdk/make/CompileModuleTools.gmk
|
||||
make/CompileToolsHotspot.gmk : hotspot/make/CompileTools.gmk
|
||||
make/CompileToolsJdk.gmk : jdk/make/CompileTools.gmk
|
||||
make/CopyInterimCLDRConverter.gmk : jdk/make/CopyInterimCLDRConverter.gmk
|
||||
make/GenerateModuleSummary.gmk : jdk/make/GenerateModuleSummary.gmk
|
||||
make/ModuleTools.gmk : jdk/make/ModuleTools.gmk
|
||||
make/ToolsJdk.gmk : jdk/make/Tools.gmk
|
||||
make/ToolsLangtools.gmk : langtools/make/Tools.gmk
|
||||
make/UnpackSecurity.gmk : jdk/make/UnpackSecurity.gmk
|
||||
make/autoconf : common/autoconf
|
||||
make/conf : common/conf
|
||||
make/copy : jdk/make/copy
|
||||
make/copy/Copy-java.corba.gmk : corba/make/copy/Copy-java.corba.gmk
|
||||
make/corba : corba/make
|
||||
make/data : jdk/make/data
|
||||
make/gendata : jdk/make/gendata
|
||||
make/gendata/Gendata-jdk.compiler.gmk : langtools/make/gendata/Gendata-jdk.compiler.gmk
|
||||
make/gensrc : jdk/make/gensrc
|
||||
make/gensrc/Gensrc-java.corba.gmk : corba/make/gensrc/Gensrc-java.corba.gmk
|
||||
make/gensrc/Gensrc-jdk.compiler.gmk : langtools/make/gensrc/Gensrc-jdk.compiler.gmk
|
||||
make/gensrc/Gensrc-jdk.hotspot.agent.gmk : hotspot/make/gensrc/Gensrc-jdk.hotspot.agent.gmk
|
||||
make/gensrc/Gensrc-jdk.internal.vm.compiler.gmk : hotspot/make/gensrc/Gensrc-jdk.internal.vm.compiler.gmk
|
||||
make/gensrc/Gensrc-jdk.javadoc.gmk : langtools/make/gensrc/Gensrc-jdk.javadoc.gmk
|
||||
make/gensrc/Gensrc-jdk.jdeps.gmk : langtools/make/gensrc/Gensrc-jdk.jdeps.gmk
|
||||
make/gensrc/Gensrc-jdk.jshell.gmk : langtools/make/gensrc/Gensrc-jdk.jshell.gmk
|
||||
make/gensrc/GensrcCommonLangtools.gmk : langtools/make/gensrc/GensrcCommon.gmk
|
||||
make/hotspot : hotspot/make
|
||||
make/jdk : jdk/make
|
||||
make/langtools : langtools/make
|
||||
make/launcher : jdk/make/launcher
|
||||
make/lib : jdk/make/lib
|
||||
make/lib/Lib-jdk.hotspot.agent.gmk : hotspot/make/lib/Lib-jdk.hotspot.agent.gmk
|
||||
make/mapfiles : jdk/make/mapfiles
|
||||
make/mapfiles/libjsig : hotspot/make/mapfiles/libjsig
|
||||
make/mapfiles/libjvm_db : hotspot/make/mapfiles/libjvm_db
|
||||
make/mapfiles/libjvm_dtrace : hotspot/make/mapfiles/libjvm_dtrace
|
||||
make/mapfiles/libsaproc : hotspot/make/mapfiles/libsaproc
|
||||
make/nashorn : nashorn/make
|
||||
make/nb_native : common/nb_native
|
||||
make/scripts/addNotices.sh : jdk/make/scripts/addNotices.sh
|
||||
make/scripts/compare.sh : common/bin/compare.sh
|
||||
make/scripts/compare_exceptions.sh.incl : common/bin/compare_exceptions.sh.incl
|
||||
make/scripts/genExceptions.sh : jdk/make/scripts/genExceptions.sh
|
||||
make/scripts/hide_important_warnings_from_javac.sh : common/bin/hide_important_warnings_from_javac.sh
|
||||
make/scripts/logger.sh : common/bin/logger.sh
|
||||
make/src/native/fixpath.c : common/src/fixpath.c
|
||||
make/test/JtregNativeHotspot.gmk : hotspot/make/test/JtregNative.gmk
|
||||
make/test/JtregNativeJdk.gmk : jdk/make/test/JtregNative.gmk
|
||||
test/jdk : jdk/test
|
||||
test/langtools : langtools/test
|
||||
test/nashorn : nashorn/test
|
||||
test/jaxp : jaxp/test
|
||||
test/hotspot/gtest : hotspot/test/native
|
||||
test/hotspot/jtreg : hotspot/test
|
||||
bin : common/bin
|
||||
bin/nashorn : nashorn/bin
|
||||
doc : common/doc
|
||||
doc/nashorn : nashorn/docs
|
||||
@ -1,237 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2014, 2017, 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
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Script for updating a patch file as per the shuffled/unshuffled source location.
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [-h|--help] [-v|--verbose] [-to9|-to10] [-r <repo>] <input_patch> <output_patch>"
|
||||
echo "where:"
|
||||
echo " -to9 create patches appropriate for a JDK 9 source tree"
|
||||
echo " When going to 9, the output patches will be suffixed with the"
|
||||
echo " repo name"
|
||||
echo " -to10 create patches appropriate for a JDK 10 source tree"
|
||||
echo " -r <repo> specify repo for source patch, set to 'top' for top repo"
|
||||
echo " <input_patch> is the input patch file, that needs shuffling/unshuffling"
|
||||
echo " <output_patch> is the updated patch file "
|
||||
echo " "
|
||||
exit 1
|
||||
}
|
||||
|
||||
SCRIPT_DIR=`dirname $0`
|
||||
UNSHUFFLE_LIST=$SCRIPT_DIR"/unshuffle_list.txt"
|
||||
|
||||
if [ ! -f "$UNSHUFFLE_LIST" ] ; then
|
||||
echo "FATAL: cannot find $UNSHUFFLE_LIST" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
vflag="false"
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case $1 in
|
||||
-h | --help )
|
||||
usage
|
||||
;;
|
||||
|
||||
-v | --verbose )
|
||||
vflag="true"
|
||||
;;
|
||||
|
||||
-r)
|
||||
repo="$2"
|
||||
shift
|
||||
;;
|
||||
|
||||
-to9)
|
||||
shuffle_to=9
|
||||
;;
|
||||
|
||||
-to10)
|
||||
shuffle_to=10
|
||||
;;
|
||||
|
||||
-*) # bad option
|
||||
usage
|
||||
;;
|
||||
|
||||
* ) # non option
|
||||
break
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# Make sure we have the right number of arguments
|
||||
if [ ! $# -eq 2 ] ; then
|
||||
echo "ERROR: Invalid number of arguments." >&2
|
||||
usage
|
||||
fi
|
||||
|
||||
# Check the given repo
|
||||
repos="top corba jaxp jaxws jdk langtools nashorn hotspot"
|
||||
found="false"
|
||||
if [ -n "$repo" ]; then
|
||||
for r in $repos ; do
|
||||
if [ $repo = "$r" ] ; then
|
||||
found="true"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if [ $found = "false" ] ; then
|
||||
echo "ERROR: Unknown repo: $repo. Should be one of [$repos]." >&2
|
||||
usage
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$shuffle_to" != "9" -a "$shuffle_to" != "10" ]; then
|
||||
echo "ERROR: Must pick either -to9 or -to10"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# When going to 10, a repo must be specified for the source patch
|
||||
if [ "$shuffle_to" = "10" -a -z "$repo" ]; then
|
||||
echo "ERROR: Must specify src repo for JDK 9 patch"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check given input/output files
|
||||
input="$1"
|
||||
if [ "x$input" = "x-" ] ; then
|
||||
input="/dev/stdin"
|
||||
fi
|
||||
|
||||
if [ ! -f $input -a "x$input" != "x/dev/stdin" ] ; then
|
||||
echo "ERROR: Cannot find input patch file: $input" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
output="$2"
|
||||
if [ "x$output" = "x-" ] ; then
|
||||
output="/dev/stdout"
|
||||
fi
|
||||
base_output="$output"
|
||||
|
||||
if [ "$shuffle_to" = "10" ]; then
|
||||
if [ -f $output -a "x$output" != "x/dev/stdout" ] ; then
|
||||
echo "ERROR: Output patch already exists: $output" >&2
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
for r in $repos; do
|
||||
if [ -f "$output.$r" ]; then
|
||||
echo "ERROR: Output patch already exists: $output.$r" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
verbose() {
|
||||
if [ ${vflag} = "true" ] ; then
|
||||
echo "$@" >&2
|
||||
fi
|
||||
}
|
||||
|
||||
unshuffle() {
|
||||
line=$@
|
||||
verbose "Attempting to rewrite: \"$line\""
|
||||
|
||||
# Retrieve the file name
|
||||
path=
|
||||
if echo "$line" | egrep '^diff' > /dev/null ; then
|
||||
if ! echo "$line" | egrep '\-\-git' > /dev/null ; then
|
||||
echo "ERROR: Only git patches supported. Please use 'hg export --git ...'." >&2
|
||||
exit 1
|
||||
fi
|
||||
path="`echo "$line" | sed -e s@'diff --git a/'@@ -e s@' b/.*$'@@`"
|
||||
elif echo "$line" | egrep '^\-\-\-' > /dev/null ; then
|
||||
path="`echo "$line" | sed -e s@'--- a/'@@`"
|
||||
elif echo "$line" | egrep '^\+\+\+' > /dev/null ; then
|
||||
path="`echo "$line" | sed s@'+++ b/'@@`"
|
||||
fi
|
||||
verbose "Extracted path: \"$path\""
|
||||
|
||||
# Find the most specific matches in the shuffle list
|
||||
matches=
|
||||
if [ -n "$repo" -a "$repo" != "top" ]; then
|
||||
matchpath="$repo"/"$path"/x
|
||||
else
|
||||
matchpath="$path"/x
|
||||
fi
|
||||
while [ "$matchpath" != "" ] ; do
|
||||
matchpath="`echo $matchpath | sed s@'\(.*\)/.*$'@'\1'@`"
|
||||
|
||||
if [ "$shuffle_to" = "10" ] ; then
|
||||
pattern=": $matchpath$"
|
||||
else
|
||||
pattern="^$matchpath :"
|
||||
fi
|
||||
verbose "Attempting to find \"$matchpath\""
|
||||
matches=`egrep "$pattern" "$UNSHUFFLE_LIST"`
|
||||
if ! [ "x${matches}" = "x" ] ; then
|
||||
verbose "Got matches: [$matches]"
|
||||
break;
|
||||
fi
|
||||
|
||||
if ! echo "$matchpath" | egrep '.*/.*' > /dev/null ; then
|
||||
break;
|
||||
fi
|
||||
done
|
||||
|
||||
# Rewrite the line, if we have a match
|
||||
if ! [ "x${matches}" = "x" ] ; then
|
||||
shuffled="${matches%% : *}"
|
||||
unshuffled="${matches#* : }"
|
||||
patch_suffix_9=""
|
||||
for r in $repos; do
|
||||
if [ "$unshuffled" != "${unshuffled#$r}" ]; then
|
||||
unshuffled="${unshuffled#$r\/}"
|
||||
patch_suffix_9=".$r"
|
||||
fi
|
||||
done
|
||||
verbose "shuffled: $shuffled"
|
||||
verbose "unshuffled: $unshuffled"
|
||||
verbose "patch_suffix_9: $patch_suffix_9"
|
||||
if [ "$shuffle_to" = "10" ] ; then
|
||||
newline="`echo "$line" | sed -e s@"$unshuffled"@"$shuffled"@g`"
|
||||
else
|
||||
newline="`echo "$line" | sed -e s@"$shuffled"@"$unshuffled"@g`"
|
||||
output=$base_output$patch_suffix_9
|
||||
verbose "Writing to $output"
|
||||
fi
|
||||
verbose "Rewriting to \"$newline\""
|
||||
echo "$newline" >> $output
|
||||
else
|
||||
echo "WARNING: no match found for $path"
|
||||
echo "$line" >> $output
|
||||
fi
|
||||
}
|
||||
|
||||
while IFS= read -r line
|
||||
do
|
||||
if echo "$line" | egrep '^diff|^\-\-\-|^\+\+\+' > /dev/null ; then
|
||||
unshuffle "$line"
|
||||
else
|
||||
printf "%s\n" "$line" >> $output
|
||||
fi
|
||||
done < "$input"
|
||||
@ -1,7 +1,7 @@
|
||||
#!/bin/bash -f
|
||||
|
||||
#
|
||||
# Copyright (c) 2010, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2010, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -41,10 +41,6 @@ set -e
|
||||
# To allow total changes counting
|
||||
shopt -s lastpipe
|
||||
|
||||
# Get an absolute path to this script, since that determines the top-level directory.
|
||||
this_script_dir=`dirname $0`
|
||||
this_script_dir=`cd $this_script_dir > /dev/null && pwd`
|
||||
|
||||
# Temp area
|
||||
tmp=/tmp/`basename $0`.${USER}.$$
|
||||
rm -f -r ${tmp}
|
||||
@ -66,17 +62,22 @@ Help()
|
||||
echo "options:"
|
||||
echo "-c Specifies the company. Set to Oracle by default."
|
||||
echo "-y Specifies the copyright year. Set to current year by default."
|
||||
echo "-b Specifies the base reference for change set lookup."
|
||||
echo "-f Updates the copyright for all change sets in a given year,"
|
||||
echo " as specified by -y."
|
||||
echo " as specified by -y. Overrides -b flag."
|
||||
echo "-h Print this help."
|
||||
echo
|
||||
}
|
||||
|
||||
full_year=false
|
||||
base_reference=master
|
||||
|
||||
# Process options
|
||||
while getopts "c:fhy:" option; do
|
||||
while getopts "b:c:fhy:" option; do
|
||||
case $option in
|
||||
b) # supplied base reference
|
||||
base_reference=${OPTARG}
|
||||
;;
|
||||
c) # supplied company year
|
||||
company=${OPTARG}
|
||||
;;
|
||||
@ -98,10 +99,16 @@ while getopts "c:fhy:" option; do
|
||||
done
|
||||
|
||||
# VCS check
|
||||
git_installed=false
|
||||
which git > /dev/null && git_installed=true
|
||||
if [ "$git_installed" != "true" ]; then
|
||||
echo "Error: This script requires git. Please install it."
|
||||
exit 1
|
||||
fi
|
||||
git_found=false
|
||||
[ -d "${this_script_dir}/../../.git" ] && git_found=true
|
||||
git status &> /dev/null && git_found=true
|
||||
if [ "$git_found" != "true" ]; then
|
||||
echo "Error: Please execute script from within make/scripts."
|
||||
echo "Error: Please execute script from within a JDK git repository."
|
||||
exit 1
|
||||
else
|
||||
echo "Using Git version control system"
|
||||
@ -109,7 +116,7 @@ else
|
||||
if [ "$full_year" = "true" ]; then
|
||||
vcs_list_changesets=(git log --no-merges --since="${year}-01-01T00:00:00Z" --until="${year}-12-31T23:59:59Z" --pretty=tformat:"%H")
|
||||
else
|
||||
vcs_list_changesets=(git log --no-merges 'master..HEAD' --since="${year}-01-01T00:00:00Z" --until="${year}-12-31T23:59:59Z" --pretty=tformat:"%H")
|
||||
vcs_list_changesets=(git log --no-merges "${base_reference}..HEAD" --since="${year}-01-01T00:00:00Z" --until="${year}-12-31T23:59:59Z" --pretty=tformat:"%H")
|
||||
fi
|
||||
vcs_changeset_message=(git log -1 --pretty=tformat:"%B") # followed by ${changeset}
|
||||
vcs_changeset_files=(git diff-tree --no-commit-id --name-only -r) # followed by ${changeset}
|
||||
111
bin/update_pch.sh
Normal file
111
bin/update_pch.sh
Normal file
@ -0,0 +1,111 @@
|
||||
#!/bin/sh
|
||||
# Copyright (c) 2025, 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
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# 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.
|
||||
|
||||
# The output of this script may require some degree of human curation:
|
||||
# - Redundant headers, e.g. both x.hpp, x.inline.hpp are included;
|
||||
# - Headers relative to a non-default feature should be protected by an
|
||||
# appropriate 'if' clause to make sure all variants can build without
|
||||
# errors.
|
||||
|
||||
source_path="$(dirname ${0})"
|
||||
this_script_dir="$(cd -- "${source_path}" > /dev/null && pwd)"
|
||||
if test -z "${this_script_dir}"; then
|
||||
echo "Error: Could not determine location of this script"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Work in top directory
|
||||
cd $this_script_dir/..
|
||||
|
||||
# Time threshold for header compilation, if the time exceeds the
|
||||
# threshold the header will be precompiled.
|
||||
if [ -z "$MIN_MS" ]; then
|
||||
MIN_MS=100000
|
||||
fi
|
||||
|
||||
if [ -z "$CLEAN" ]; then
|
||||
CLEAN=true
|
||||
elif [ "$CLEAN" != "true" ] && [ "$CLEAN" != "false" ]; then
|
||||
echo "Expected either 'true' or 'false' for CLEAN"
|
||||
fi
|
||||
|
||||
# CBA_PATH should point to a valid ClangBuildAnalyzer executable.
|
||||
# Build steps:
|
||||
# git clone --depth 1 git@github.com:aras-p/ClangBuildAnalyzer.git
|
||||
# cd ClangBuildAnalyzer
|
||||
# make -f projects/make/Makefile
|
||||
if [ -z "$CBA_PATH" ]; then
|
||||
CBA_PATH="./ClangBuildAnalyzer/build/ClangBuildAnalyzer"
|
||||
fi
|
||||
|
||||
set -eux
|
||||
|
||||
PRECOMPILED_HPP="src/hotspot/share/precompiled/precompiled.hpp"
|
||||
CBA_CONFIG="ClangBuildAnalyzer.ini"
|
||||
TIMESTAMP="$(date +%Y%m%d-%H%M)"
|
||||
RUN_NAME="pch_update_$TIMESTAMP"
|
||||
CBA_OUTPUT="cba_out_$TIMESTAMP"
|
||||
|
||||
if [ "$CLEAN" = "true" ]; then
|
||||
trap 'rm -rf "build/'"$RUN_NAME"'" "$CBA_OUTPUT" "$CBA_CONFIG"' EXIT
|
||||
fi
|
||||
|
||||
sh configure --with-toolchain-type=clang \
|
||||
--with-conf-name="$RUN_NAME" \
|
||||
--disable-precompiled-headers \
|
||||
--with-extra-cxxflags="-ftime-trace" \
|
||||
--with-extra-cflags="-ftime-trace"
|
||||
|
||||
make clean CONF_NAME="$RUN_NAME"
|
||||
make hotspot CONF_NAME="$RUN_NAME"
|
||||
"$CBA_PATH" --all "./build/$RUN_NAME/hotspot/variant-server/libjvm/objs" \
|
||||
"$CBA_OUTPUT"
|
||||
|
||||
# Preserve license and comments on top
|
||||
cat "$PRECOMPILED_HPP" | awk '/^#include/ {exit} {print}' > "$PRECOMPILED_HPP.tmp"
|
||||
|
||||
if [ ! -f "$CBA_CONFIG" ]; then
|
||||
cat <<EOF > "$CBA_CONFIG"
|
||||
[counts]
|
||||
header=100
|
||||
headerChain=0
|
||||
template=0
|
||||
function=0
|
||||
fileCodegen=0
|
||||
fileParse=0
|
||||
|
||||
[misc]
|
||||
onlyRootHeaders=true
|
||||
EOF
|
||||
fi
|
||||
|
||||
"$CBA_PATH" --analyze "$CBA_OUTPUT" | \
|
||||
grep " ms: " | \
|
||||
# Keep the headers more expensive than ${1}ms
|
||||
awk -v x="$MIN_MS" '$1 < x { exit } { print $3 }' | \
|
||||
# Filter away non-hotspot headers
|
||||
grep hotspot/share | \
|
||||
awk -F "hotspot/share/" '{ printf "#include \"%s\"\n", $2 }' \
|
||||
>> "$PRECOMPILED_HPP.tmp"
|
||||
mv "$PRECOMPILED_HPP.tmp" "$PRECOMPILED_HPP"
|
||||
|
||||
java test/hotspot/jtreg/sources/SortIncludes.java --update "$PRECOMPILED_HPP"
|
||||
@ -282,9 +282,34 @@ possible, use an SSD. The build process is very disk intensive, and
|
||||
having slow disk access will significantly increase build times. If you
|
||||
need to use a network share for the source code, see below for
|
||||
suggestions on how to keep the build artifacts on a local disk.</p></li>
|
||||
<li><p>On Windows, if using <a href="#cygwin">Cygwin</a>, extra care
|
||||
must be taken to make sure the environment is consistent. It is
|
||||
recommended that you follow this procedure:</p>
|
||||
<li><p>UTF-8 support is needed to compile the JDK. On Unix systems, this
|
||||
typically means that the <code>C.UTF-8</code> or
|
||||
<code>en_US.UTF-8</code> locale needs to be available. For Windows
|
||||
users, please see the section on <a href="#locale-requirements">Locale
|
||||
Requirements</a> below.</p></li>
|
||||
<li><p>On Windows, extra care must be taken to have a smooth building
|
||||
experience:</p>
|
||||
<ul>
|
||||
<li><p>Make sure that all relevant paths have short names. Short names
|
||||
are used by the build system to create space-free alternative paths.
|
||||
Short name creation is enabled per volume. The default setting can be
|
||||
checked with the command: <code>fsutil 8dot3name query</code>. If short
|
||||
name creation was turned off when a directory was created, it will not
|
||||
have a short name. Whether a short name exists can be checked by running
|
||||
<code>dir /X</code> in the containing directory (in cmd.exe). If a short
|
||||
path is present you should see something like 'ASDF~1' being displayed
|
||||
in one of the columns of the ouput. If a directory is missing a short
|
||||
name, the safest way to get one is to enable short names for that
|
||||
particular volume with
|
||||
<code>fsutil 8dot3name set <drive letter>: 0</code> (note that
|
||||
you need to run as administrator for this), and then re-create the
|
||||
particular directory. A short name should be generated automatically
|
||||
then. Another option is to manually assign a short name to the directory
|
||||
using
|
||||
<code>fsutil file setShortName <path> <short name></code>.</p></li>
|
||||
<li><p>If using <a href="#cygwin">Cygwin</a>, you must make sure the
|
||||
file permissions and attributes between Windows and Cygwin are
|
||||
consistent. It is recommended that you follow this procedure:</p>
|
||||
<ul>
|
||||
<li><p>Create the directory that is going to contain the top directory
|
||||
of the JDK clone by using the <code>mkdir</code> command in the Cygwin
|
||||
@ -294,6 +319,9 @@ it's children will inherit those attributes.</p></li>
|
||||
<li><p>Do not put the JDK clone in a path under your Cygwin home
|
||||
directory. This is especially important if your user name contains
|
||||
spaces and/or mixed upper and lower case letters.</p></li>
|
||||
</ul>
|
||||
<p>Failure to follow these procedures might result in hard-to-debug
|
||||
build problems.</p></li>
|
||||
<li><p>You need to install a git client. You have two choices, Cygwin
|
||||
git or Git for Windows. Unfortunately there are pros and cons with each
|
||||
choice.</p>
|
||||
@ -311,9 +339,7 @@ It does work well with the Skara CLI tooling, however. To alleviate the
|
||||
line ending problems, make sure you set <code>core.autocrlf</code> to
|
||||
<code>false</code> (this is asked during installation).</p></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<p>Failure to follow this procedure might result in hard-to-debug build
|
||||
problems.</p></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<h2 id="build-hardware-requirements">Build Hardware Requirements</h2>
|
||||
<p>The JDK is a massive project, and require machines ranging from
|
||||
@ -376,7 +402,7 @@ to date at the time of writing.</p>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>macOS</td>
|
||||
<td>macOS 13.x (Ventura)</td>
|
||||
<td>macOS 14.x</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>Windows</td>
|
||||
@ -513,8 +539,8 @@ this makes it difficult for a project such as the JDK to keep pace with
|
||||
a continuously updated machine running macOS. See the section on <a
|
||||
href="#apple-xcode">Apple Xcode</a> on some strategies to deal with
|
||||
this.</p>
|
||||
<p>It is recommended that you use at least macOS 13 (Ventura) and Xcode
|
||||
14, but earlier versions may also work.</p>
|
||||
<p>It is recommended that you use at least macOS 14 and Xcode 15.4, but
|
||||
earlier versions may also work.</p>
|
||||
<p>The standard macOS environment contains the basic tooling needed to
|
||||
build, but for external libraries a package manager is recommended. The
|
||||
JDK uses <a href="https://brew.sh/">homebrew</a> in the examples, but
|
||||
@ -586,15 +612,15 @@ to compile successfully without issues.</p>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td>Linux</td>
|
||||
<td>gcc 13.2.0</td>
|
||||
<td>gcc 14.2.0</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>macOS</td>
|
||||
<td>Apple Xcode 14.3.1 (using clang 14.0.3)</td>
|
||||
<td>Apple Xcode 15.4 (using clang 15.0.0)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>Windows</td>
|
||||
<td>Microsoft Visual Studio 2022 version 17.6.5</td>
|
||||
<td>Microsoft Visual Studio 2022 version 17.13.2</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -604,7 +630,7 @@ standard for C, and C++14 for C++.</p>
|
||||
<p>The minimum accepted version of gcc is 10.0. Older versions will not
|
||||
be accepted by <code>configure</code>.</p>
|
||||
<p>The JDK is currently known to compile successfully with gcc version
|
||||
13.2 or newer.</p>
|
||||
14.2 or newer.</p>
|
||||
<p>In general, any version between these two should be usable.</p>
|
||||
<h3 id="clang">clang</h3>
|
||||
<p>The minimum accepted version of clang is 13. Older versions will not
|
||||
@ -1425,10 +1451,10 @@ of a cross-compiling toolchain and a sysroot environment which can
|
||||
easily be used together with the <code>--with-devkit</code> configure
|
||||
option to cross compile the JDK. On Linux/x86_64, the following
|
||||
command:</p>
|
||||
<pre><code>bash configure --with-devkit=<devkit-path> --openjdk-target=ppc64-linux-gnu && make</code></pre>
|
||||
<p>will configure and build the JDK for Linux/ppc64 assuming that
|
||||
<code><devkit-path></code> points to a Linux/x86_64 to Linux/ppc64
|
||||
devkit.</p>
|
||||
<pre><code>bash configure --with-devkit=<devkit-path> --openjdk-target=ppc64le-linux-gnu && make</code></pre>
|
||||
<p>will configure and build the JDK for Linux/ppc64le assuming that
|
||||
<code><devkit-path></code> points to a Linux/x86_64 to
|
||||
Linux/ppc64le devkit.</p>
|
||||
<p>Devkits can be created from the <code>make/devkit</code> directory by
|
||||
executing:</p>
|
||||
<pre><code>make [ TARGETS="<TARGET_TRIPLET>+" ] [ BASE_OS=<OS> ] [ BASE_OS_VERSION=<VER> ]</code></pre>
|
||||
@ -1455,22 +1481,22 @@ following targets are known to work:</p>
|
||||
<td>arm-linux-gnueabihf</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>ppc64-linux-gnu</td>
|
||||
<td>ppc64le-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>ppc64le-linux-gnu</td>
|
||||
<td>riscv64-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>s390x-linux-gnu</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><code>BASE_OS</code> must be one of "OEL6" for Oracle Enterprise
|
||||
Linux 6 or "Fedora" (if not specified "OEL6" will be the default). If
|
||||
the base OS is "Fedora" the corresponding Fedora release can be
|
||||
specified with the help of the <code>BASE_OS_VERSION</code> option (with
|
||||
"27" as default version). If the build is successful, the new devkits
|
||||
can be found in the <code>build/devkit/result</code> subdirectory:</p>
|
||||
<p><code>BASE_OS</code> must be one of <code>OL</code> for Oracle
|
||||
Enterprise Linux or <code>Fedora</code>. If the base OS is
|
||||
<code>Fedora</code> the corresponding Fedora release can be specified
|
||||
with the help of the <code>BASE_OS_VERSION</code> option. If the build
|
||||
is successful, the new devkits can be found in the
|
||||
<code>build/devkit/result</code> subdirectory:</p>
|
||||
<pre><code>cd make/devkit
|
||||
make TARGETS="ppc64le-linux-gnu aarch64-linux-gnu" BASE_OS=Fedora BASE_OS_VERSION=21
|
||||
ls -1 ../../build/devkit/result/
|
||||
@ -1722,6 +1748,20 @@ packages in the sysroot, configure the build with
|
||||
--with-devkit=$DEVKIT \
|
||||
--with-sysroot=$SYSROOT</code></pre>
|
||||
<p>and run <code>make</code> normally.</p>
|
||||
<h4 id="building-for-windows-aarch64">Building for Windows AArch64</h4>
|
||||
<p>The Visual Studio Build Tools can be used for building the JDK
|
||||
without a full Visual Studio installation. To set up the Visual Studio
|
||||
2022 Build Tools on a Windows AArch64 machine for a native build, launch
|
||||
the installer as follows in a Windows command prompt:</p>
|
||||
<pre><code>vs_buildtools.exe --quiet --wait --norestart --nocache ^
|
||||
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" ^
|
||||
--add Microsoft.VisualStudio.Component.VC.CoreBuildTools ^
|
||||
--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 ^
|
||||
--add Microsoft.VisualStudio.Component.Windows11SDK.22621</code></pre>
|
||||
<p>To generate Windows AArch64 builds using Cygwin on a Windows x64
|
||||
machine, you must set the proper target platform by adding
|
||||
<code>--openjdk-target=aarch64-unknown-cygwin</code> to your configure
|
||||
command line.</p>
|
||||
<h2 id="build-performance">Build Performance</h2>
|
||||
<p>Building the JDK requires a lot of horsepower. Some of the build
|
||||
tools can be adjusted to utilize more or less of resources such as
|
||||
|
||||
102
doc/building.md
102
doc/building.md
@ -83,19 +83,44 @@ on where and how to check out the source code.
|
||||
for the source code, see below for suggestions on how to keep the build
|
||||
artifacts on a local disk.
|
||||
|
||||
* On Windows, if using [Cygwin](#cygwin), extra care must be taken to make sure
|
||||
the environment is consistent. It is recommended that you follow this
|
||||
procedure:
|
||||
* UTF-8 support is needed to compile the JDK. On Unix systems, this typically
|
||||
means that the `C.UTF-8` or `en_US.UTF-8` locale needs to be available. For
|
||||
Windows users, please see the section on [Locale
|
||||
Requirements](#locale-requirements) below.
|
||||
|
||||
* Create the directory that is going to contain the top directory of the JDK
|
||||
clone by using the `mkdir` command in the Cygwin bash shell. That is, do
|
||||
*not* create it using Windows Explorer. This will ensure that it will have
|
||||
proper Cygwin attributes, and that it's children will inherit those
|
||||
attributes.
|
||||
* On Windows, extra care must be taken to have a smooth building experience:
|
||||
|
||||
* Do not put the JDK clone in a path under your Cygwin home directory. This
|
||||
is especially important if your user name contains spaces and/or mixed
|
||||
upper and lower case letters.
|
||||
* Make sure that all relevant paths have short names. Short names are used by
|
||||
the build system to create space-free alternative paths. Short name
|
||||
creation is enabled per volume. The default setting can be checked with the
|
||||
command: `fsutil 8dot3name query`. If short name creation was turned off
|
||||
when a directory was created, it will not have a short name. Whether a
|
||||
short name exists can be checked by running `dir /X` in the containing
|
||||
directory (in cmd.exe). If a short path is present you should see something
|
||||
like 'ASDF~1' being displayed in one of the columns of the ouput. If a
|
||||
directory is missing a short name, the safest way to get one is to enable
|
||||
short names for that particular volume with `fsutil 8dot3name set <drive
|
||||
letter>: 0` (note that you need to run as administrator for this), and then
|
||||
re-create the particular directory. A short name should be generated
|
||||
automatically then. Another option is to manually assign a short name to
|
||||
the directory using `fsutil file setShortName <path> <short name>`.
|
||||
|
||||
* If using [Cygwin](#cygwin), you must make sure the file permissions and
|
||||
attributes between Windows and Cygwin are consistent. It is recommended
|
||||
that you follow this procedure:
|
||||
|
||||
* Create the directory that is going to contain the top directory of the
|
||||
JDK clone by using the `mkdir` command in the Cygwin bash shell. That is,
|
||||
do *not* create it using Windows Explorer. This will ensure that it will
|
||||
have proper Cygwin attributes, and that it's children will inherit those
|
||||
attributes.
|
||||
|
||||
* Do not put the JDK clone in a path under your Cygwin home directory. This
|
||||
is especially important if your user name contains spaces and/or mixed
|
||||
upper and lower case letters.
|
||||
|
||||
Failure to follow these procedures might result in hard-to-debug build
|
||||
problems.
|
||||
|
||||
* You need to install a git client. You have two choices, Cygwin git or Git
|
||||
for Windows. Unfortunately there are pros and cons with each choice.
|
||||
@ -113,9 +138,6 @@ on where and how to check out the source code.
|
||||
make sure you set `core.autocrlf` to `false` (this is asked during
|
||||
installation).
|
||||
|
||||
Failure to follow this procedure might result in hard-to-debug build
|
||||
problems.
|
||||
|
||||
## Build Hardware Requirements
|
||||
|
||||
The JDK is a massive project, and require machines ranging from decent to
|
||||
@ -175,7 +197,7 @@ time of writing.
|
||||
| ----------------- | ---------------------------------- |
|
||||
| Linux/x64 | Oracle Enterprise Linux 6.4 / 8.x |
|
||||
| Linux/aarch64 | Oracle Enterprise Linux 7.6 / 8.x |
|
||||
| macOS | macOS 13.x (Ventura) |
|
||||
| macOS | macOS 14.x |
|
||||
| Windows | Windows Server 2016 |
|
||||
|
||||
The double version numbers for Linux are due to the hybrid model used at
|
||||
@ -327,7 +349,7 @@ difficult for a project such as the JDK to keep pace with a continuously
|
||||
updated machine running macOS. See the section on [Apple Xcode](#apple-xcode)
|
||||
on some strategies to deal with this.
|
||||
|
||||
It is recommended that you use at least macOS 13 (Ventura) and Xcode 14, but
|
||||
It is recommended that you use at least macOS 14 and Xcode 15.4, but
|
||||
earlier versions may also work.
|
||||
|
||||
The standard macOS environment contains the basic tooling needed to build, but
|
||||
@ -390,11 +412,11 @@ possible to compile the JDK with both older and newer versions, but the closer
|
||||
you stay to this list, the more likely you are to compile successfully without
|
||||
issues.
|
||||
|
||||
| Operating system | Toolchain version |
|
||||
| ------------------ | ------------------------------------------- |
|
||||
| Linux | gcc 13.2.0 |
|
||||
| macOS | Apple Xcode 14.3.1 (using clang 14.0.3) |
|
||||
| Windows | Microsoft Visual Studio 2022 version 17.6.5 |
|
||||
| Operating system | Toolchain version |
|
||||
| ------------------ | -------------------------------------------- |
|
||||
| Linux | gcc 14.2.0 |
|
||||
| macOS | Apple Xcode 15.4 (using clang 15.0.0) |
|
||||
| Windows | Microsoft Visual Studio 2022 version 17.13.2 |
|
||||
|
||||
All compilers are expected to be able to handle the C11 language standard for
|
||||
C, and C++14 for C++.
|
||||
@ -404,7 +426,7 @@ C, and C++14 for C++.
|
||||
The minimum accepted version of gcc is 10.0. Older versions will not be accepted
|
||||
by `configure`.
|
||||
|
||||
The JDK is currently known to compile successfully with gcc version 13.2 or
|
||||
The JDK is currently known to compile successfully with gcc version 14.2 or
|
||||
newer.
|
||||
|
||||
In general, any version between these two should be usable.
|
||||
@ -1236,11 +1258,11 @@ toolchain and a sysroot environment which can easily be used together with the
|
||||
following command:
|
||||
|
||||
```
|
||||
bash configure --with-devkit=<devkit-path> --openjdk-target=ppc64-linux-gnu && make
|
||||
bash configure --with-devkit=<devkit-path> --openjdk-target=ppc64le-linux-gnu && make
|
||||
```
|
||||
|
||||
will configure and build the JDK for Linux/ppc64 assuming that `<devkit-path>`
|
||||
points to a Linux/x86_64 to Linux/ppc64 devkit.
|
||||
will configure and build the JDK for Linux/ppc64le assuming that `<devkit-path>`
|
||||
points to a Linux/x86_64 to Linux/ppc64le devkit.
|
||||
|
||||
Devkits can be created from the `make/devkit` directory by executing:
|
||||
|
||||
@ -1259,16 +1281,14 @@ at least the following targets are known to work:
|
||||
| x86_64-linux-gnu |
|
||||
| aarch64-linux-gnu |
|
||||
| arm-linux-gnueabihf |
|
||||
| ppc64-linux-gnu |
|
||||
| ppc64le-linux-gnu |
|
||||
| riscv64-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 is "Fedora" the
|
||||
corresponding Fedora release can be specified with the help of the
|
||||
`BASE_OS_VERSION` option (with "27" as default version). If the build is
|
||||
successful, the new devkits can be found in the `build/devkit/result`
|
||||
subdirectory:
|
||||
`BASE_OS` must be one of `OL` for Oracle Enterprise Linux or `Fedora`. If the
|
||||
base OS is `Fedora` the corresponding Fedora release can be specified with the
|
||||
help of the `BASE_OS_VERSION` option. If the build is successful, the new
|
||||
devkits can be found in the `build/devkit/result` subdirectory:
|
||||
|
||||
```
|
||||
cd make/devkit
|
||||
@ -1457,6 +1477,24 @@ sh ./configure --with-jvm-variants=server \
|
||||
|
||||
and run `make` normally.
|
||||
|
||||
#### Building for Windows AArch64
|
||||
The Visual Studio Build Tools can be used for building the JDK without a full
|
||||
Visual Studio installation. To set up the Visual Studio 2022 Build Tools on a
|
||||
Windows AArch64 machine for a native build, launch the installer as follows
|
||||
in a Windows command prompt:
|
||||
|
||||
```
|
||||
vs_buildtools.exe --quiet --wait --norestart --nocache ^
|
||||
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" ^
|
||||
--add Microsoft.VisualStudio.Component.VC.CoreBuildTools ^
|
||||
--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 ^
|
||||
--add Microsoft.VisualStudio.Component.Windows11SDK.22621
|
||||
```
|
||||
|
||||
To generate Windows AArch64 builds using Cygwin on a Windows x64 machine,
|
||||
you must set the proper target platform by adding
|
||||
`--openjdk-target=aarch64-unknown-cygwin` to your configure command line.
|
||||
|
||||
## Build Performance
|
||||
|
||||
Building the JDK requires a lot of horsepower. Some of the build tools can be
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -189,7 +189,7 @@ wants to find) and design tests using those models.</p>
|
||||
<p>Prefer having checks inside test code.</p>
|
||||
<p>Not only does having test logic outside, e.g. verification method,
|
||||
depending on asserts in product code contradict with several items above
|
||||
but also decreases test’s readability and stability. It is much easier
|
||||
but also decreases test's readability and stability. It is much easier
|
||||
to understand that a test is testing when all testing logic is located
|
||||
inside a test or nearby in shared test libraries. As a rule of thumb,
|
||||
the closer a check to a test, the better.</p>
|
||||
@ -198,7 +198,7 @@ the closer a check to a test, the better.</p>
|
||||
<p>Prefer <code>EXPECT</code> over <code>ASSERT</code> if possible.</p>
|
||||
<p>This is related to the <a href="#informativeness">informativeness</a>
|
||||
property of tests, information for other checks can help to better
|
||||
localize a defect’s root-cause. One should use <code>ASSERT</code> if it
|
||||
localize a defect's root-cause. One should use <code>ASSERT</code> if it
|
||||
is impossible to continue test execution or if it does not make much
|
||||
sense. Later in the text, <code>EXPECT</code> forms will be used to
|
||||
refer to both <code>ASSERT/EXPECT</code>.</p>
|
||||
@ -235,7 +235,7 @@ which checks that the absolute value of the difference between
|
||||
<code>eps</code>.</p>
|
||||
<h3 id="c-string-comparison">C string comparison</h3>
|
||||
<p>Use string special macros for C strings comparisons.</p>
|
||||
<p><code>EXPECT_EQ</code> just compares pointers’ values, which is
|
||||
<p><code>EXPECT_EQ</code> just compares pointers' values, which is
|
||||
hardly what one wants comparing C strings. GoogleTest provides
|
||||
<code>EXPECT_STREQ</code> and <code>EXPECT_STRNE</code> macros to
|
||||
compare C string contents. There are also case-insensitive versions
|
||||
@ -293,7 +293,7 @@ subsystem, etc.</p>
|
||||
<p>This naming scheme helps to find tests, filter them and simplifies
|
||||
test failure analysis. For example, class <code>Foo</code> - test group
|
||||
<code>Foo</code>, compiler logging subsystem - test group
|
||||
<code>CompilerLogging</code>, G1 GC — test group <code>G1GC</code>, and
|
||||
<code>CompilerLogging</code>, G1 GC - test group <code>G1GC</code>, and
|
||||
so forth.</p>
|
||||
<h3 id="filename">Filename</h3>
|
||||
<p>A test file must have <code>test_</code> prefix and <code>.cpp</code>
|
||||
@ -345,7 +345,7 @@ name starts or ends with an underscore are enough to be safe.</p>
|
||||
<h3 id="friend-classes">Friend classes</h3>
|
||||
<p>All test purpose friends should have either <code>Test</code> or
|
||||
<code>Testable</code> suffix.</p>
|
||||
<p>It greatly simplifies understanding of friendship’s purpose and
|
||||
<p>It greatly simplifies understanding of friendship's purpose and
|
||||
allows statically check that private members are not exposed
|
||||
unexpectedly. Having <code>FooTest</code> as a friend of
|
||||
<code>Foo</code> without any comments will be understood as a necessary
|
||||
@ -435,7 +435,7 @@ inapplicable tests.</p>
|
||||
<h3 id="flag-restoring">Flag restoring</h3>
|
||||
<p>Restore changed flags.</p>
|
||||
<p>It is quite common for tests to configure JVM in a certain way
|
||||
changing flags’ values. GoogleTest provides two ways to set up
|
||||
changing flags' values. GoogleTest provides two ways to set up
|
||||
environment before a test and restore it afterward: using either
|
||||
constructor and destructor or <code>SetUp</code> and
|
||||
<code>TearDown</code> functions. Both ways require to use a test fixture
|
||||
@ -444,7 +444,7 @@ class, which sometimes is too wordy. The simpler facilities like
|
||||
be used in such cases to restore/set values.</p>
|
||||
<p>Caveats:</p>
|
||||
<ul>
|
||||
<li><p>Changing a flag’s value could break the invariants between flags'
|
||||
<li><p>Changing a flag's value could break the invariants between flags'
|
||||
values and hence could lead to unexpected/unsupported JVM
|
||||
state.</p></li>
|
||||
<li><p><code>FLAG_SET_*</code> macros can change more than one flag (in
|
||||
|
||||
@ -106,7 +106,7 @@ Prefer having checks inside test code.
|
||||
|
||||
Not only does having test logic outside, e.g. verification method,
|
||||
depending on asserts in product code contradict with several items
|
||||
above but also decreases test’s readability and stability. It is much
|
||||
above but also decreases test's readability and stability. It is much
|
||||
easier to understand that a test is testing when all testing logic is
|
||||
located inside a test or nearby in shared test libraries. As a rule of
|
||||
thumb, the closer a check to a test, the better.
|
||||
@ -119,7 +119,7 @@ Prefer `EXPECT` over `ASSERT` if possible.
|
||||
|
||||
This is related to the [informativeness](#informativeness) property of
|
||||
tests, information for other checks can help to better localize a
|
||||
defect’s root-cause. One should use `ASSERT` if it is impossible to
|
||||
defect's root-cause. One should use `ASSERT` if it is impossible to
|
||||
continue test execution or if it does not make much sense. Later in
|
||||
the text, `EXPECT` forms will be used to refer to both
|
||||
`ASSERT/EXPECT`.
|
||||
@ -160,7 +160,7 @@ value of the difference between `v1` and `v2` is not greater than `eps`.
|
||||
|
||||
Use string special macros for C strings comparisons.
|
||||
|
||||
`EXPECT_EQ` just compares pointers’ values, which is hardly what one
|
||||
`EXPECT_EQ` just compares pointers' values, which is hardly what one
|
||||
wants comparing C strings. GoogleTest provides `EXPECT_STREQ` and
|
||||
`EXPECT_STRNE` macros to compare C string contents. There are also
|
||||
case-insensitive versions `EXPECT_STRCASEEQ`, `EXPECT_STRCASENE`.
|
||||
@ -226,7 +226,7 @@ subsystem, etc.
|
||||
|
||||
This naming scheme helps to find tests, filter them and simplifies
|
||||
test failure analysis. For example, class `Foo` - test group `Foo`,
|
||||
compiler logging subsystem - test group `CompilerLogging`, G1 GC — test
|
||||
compiler logging subsystem - test group `CompilerLogging`, G1 GC - test
|
||||
group `G1GC`, and so forth.
|
||||
|
||||
### Filename
|
||||
@ -287,7 +287,7 @@ Fixture classes should be named after tested classes, subsystems, etc
|
||||
|
||||
All test purpose friends should have either `Test` or `Testable` suffix.
|
||||
|
||||
It greatly simplifies understanding of friendship’s purpose and allows
|
||||
It greatly simplifies understanding of friendship's purpose and allows
|
||||
statically check that private members are not exposed unexpectedly.
|
||||
Having `FooTest` as a friend of `Foo` without any comments will be
|
||||
understood as a necessary evil to get testability.
|
||||
@ -397,7 +397,7 @@ and filter out inapplicable tests.
|
||||
Restore changed flags.
|
||||
|
||||
It is quite common for tests to configure JVM in a certain way
|
||||
changing flags’ values. GoogleTest provides two ways to set up
|
||||
changing flags' values. GoogleTest provides two ways to set up
|
||||
environment before a test and restore it afterward: using either
|
||||
constructor and destructor or `SetUp` and `TearDown` functions. Both ways
|
||||
require to use a test fixture class, which sometimes is too wordy. The
|
||||
@ -406,7 +406,7 @@ be used in such cases to restore/set values.
|
||||
|
||||
Caveats:
|
||||
|
||||
* Changing a flag’s value could break the invariants between flags' values and hence could lead to unexpected/unsupported JVM state.
|
||||
* Changing a flag's value could break the invariants between flags' values and hence could lead to unexpected/unsupported JVM state.
|
||||
|
||||
* `FLAG_SET_*` macros can change more than one flag (in order to
|
||||
maintain invariants) so it is hard to predict what flags will be
|
||||
|
||||
124
doc/starting-next-release.html
Normal file
124
doc/starting-next-release.html
Normal file
@ -0,0 +1,124 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<title>Explanation of start of release changes</title>
|
||||
<style>
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
div.columns{display: flex; gap: min(4vw, 1.5em);}
|
||||
div.column{flex: auto; overflow-x: auto;}
|
||||
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
||||
ul.task-list{list-style: none;}
|
||||
ul.task-list li input[type="checkbox"] {
|
||||
width: 0.8em;
|
||||
margin: 0 0.8em 0.2em -1.6em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<header id="title-block-header">
|
||||
<h1 class="title">Explanation of start of release changes</h1>
|
||||
</header>
|
||||
<nav id="TOC" role="doc-toc">
|
||||
<ul>
|
||||
<li><a href="#overview" id="toc-overview">Overview</a></li>
|
||||
<li><a href="#details-and-file-updates"
|
||||
id="toc-details-and-file-updates">Details and file updates</a>
|
||||
<ul>
|
||||
<li><a href="#meta-data-files" id="toc-meta-data-files">Meta-data
|
||||
files</a></li>
|
||||
<li><a href="#src-files" id="toc-src-files"><code>src</code>
|
||||
files</a></li>
|
||||
<li><a href="#test-files" id="toc-test-files"><code>test</code>
|
||||
files</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<h2 id="overview">Overview</h2>
|
||||
<p>The start of release changes, the changes that turn JDK <em>N</em>
|
||||
into JDK (<em>N</em>+1), are primarily small updates to various files
|
||||
along with new files to store symbol information to allow
|
||||
<code>javac --release N ...</code> to run on JDK (<em>N</em>+1).</p>
|
||||
<p>The updates include changes to files holding meta-data about the
|
||||
release, files under the <code>src</code> directory for API and tooling
|
||||
updates, and incidental updates under the <code>test</code>
|
||||
directory.</p>
|
||||
<h2 id="details-and-file-updates">Details and file updates</h2>
|
||||
<p>As a matter of policy, there are a number of semantically distinct
|
||||
concepts which get incremented separately at the start of a new
|
||||
release:</p>
|
||||
<ul>
|
||||
<li>Feature value of <code>Runtime.version()</code></li>
|
||||
<li>Highest source version modeled by
|
||||
<code>javax.lang.model.SourceVersion</code></li>
|
||||
<li>Highest class file format major version recognized by the
|
||||
platform</li>
|
||||
<li>Highest
|
||||
<code>-source</code>/<code>-target</code>/<code>--release</code>
|
||||
argument recognized by <code>javac</code> and related tools</li>
|
||||
</ul>
|
||||
<p>The expected file updates are listed below. Additional files may need
|
||||
to be updated for a particular release.</p>
|
||||
<h3 id="meta-data-files">Meta-data files</h3>
|
||||
<ul>
|
||||
<li><code>jcheck/conf</code>: update meta-data used by
|
||||
<code>jcheck</code> and the Skara tooling</li>
|
||||
<li><code>make/conf/version-numbers.conf</code>: update to meta-data
|
||||
used in the build</li>
|
||||
</ul>
|
||||
<h3 id="src-files"><code>src</code> files</h3>
|
||||
<ul>
|
||||
<li><code>src/hotspot/share/classfile/classFileParser.cpp</code>: add a
|
||||
<code>#define</code> for the new version</li>
|
||||
<li><code>src/java.base/share/classes/java/lang/classfile/ClassFile.java</code>:
|
||||
add a constant for the new class file format version</li>
|
||||
<li><code>src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java</code>:
|
||||
add an <code>enum</code> constant for the new class file format
|
||||
version</li>
|
||||
<li><code>src/java.compiler/share/classes/javax/lang/model/SourceVersion.java</code>:
|
||||
add an <code>enum</code> constant for the new source version</li>
|
||||
<li><code>src/java.compiler/share/classes/javax/lang/model/util/*</code>
|
||||
visitors: Update <code>@SupportedSourceVersion</code> annotations to
|
||||
latest value. Note this update is done in lieu of introducing another
|
||||
set of visitors for each Java SE release.</li>
|
||||
<li><code>src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java</code>:
|
||||
add an <code>enum</code> constant for the new source version internal to
|
||||
<code>javac</code></li>
|
||||
<li><code>src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java</code>:
|
||||
add an <code>enum</code> constant for the new class file format version
|
||||
internal to <code>javac</code></li>
|
||||
<li><code>src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java</code>:
|
||||
add an <code>enum</code> constant for the new target version internal to
|
||||
<code>javac</code></li>
|
||||
<li><code>src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java</code>
|
||||
update printing processor to support the new source version</li>
|
||||
<li>The symbol information for <code>--release</code> is stored as new
|
||||
text files in the <code>src/jdk.compiler/share/data/symbols</code>
|
||||
directory, one file per module. The README file in that directory
|
||||
contains directions on how to create the files.</li>
|
||||
</ul>
|
||||
<h3 id="test-files"><code>test</code> files</h3>
|
||||
<ul>
|
||||
<li><code>test/langtools/tools/javac/api/TestGetSourceVersions.java</code>:
|
||||
add new <code>SourceVersion</code> constant to test matrix.</li>
|
||||
<li><code>test/langtools/tools/javac/classfiles/ClassVersionChecker.java</code>:
|
||||
add new enum constant for the new class file version</li>
|
||||
<li><code>test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java</code>
|
||||
update annotation processor extended by <code>javac</code> tests to
|
||||
cover the new source version</li>
|
||||
<li><code>test/langtools/tools/javac/preview/classReaderTest/Client.nopreview.out</code>
|
||||
and
|
||||
<code>test/langtools/tools/javac/preview/classReaderTest/Client.preview.out</code>:
|
||||
update expected messages for preview errors and warnings</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
68
doc/starting-next-release.md
Normal file
68
doc/starting-next-release.md
Normal file
@ -0,0 +1,68 @@
|
||||
% Explanation of start of release changes
|
||||
|
||||
## Overview
|
||||
|
||||
The start of release changes, the changes that turn JDK _N_ into JDK
|
||||
(_N_+1), are primarily small updates to various files along with new files to
|
||||
store symbol information to allow `javac --release N ...` to run on
|
||||
JDK (_N_+1).
|
||||
|
||||
The updates include changes to files holding meta-data about the
|
||||
release, files under the `src` directory for API and tooling updates,
|
||||
and incidental updates under the `test` directory.
|
||||
|
||||
## Details and file updates
|
||||
|
||||
As a matter of policy, there are a number of semantically distinct
|
||||
concepts which get incremented separately at the start of a new
|
||||
release:
|
||||
|
||||
* Feature value of `Runtime.version()`
|
||||
* Highest source version modeled by `javax.lang.model.SourceVersion`
|
||||
* Highest class file format major version recognized by the platform
|
||||
* Highest `-source`/`-target`/`--release` argument recognized by
|
||||
`javac` and related tools
|
||||
|
||||
The expected file updates are listed below. Additional files may need
|
||||
to be updated for a particular release.
|
||||
|
||||
### Meta-data files
|
||||
|
||||
* `jcheck/conf`: update meta-data used by `jcheck` and the Skara tooling
|
||||
* `make/conf/version-numbers.conf`: update to meta-data used in the build
|
||||
|
||||
### `src` files
|
||||
|
||||
* `src/hotspot/share/classfile/classFileParser.cpp`: add a `#define`
|
||||
for the new version
|
||||
* `src/java.base/share/classes/java/lang/classfile/ClassFile.java`:
|
||||
add a constant for the new class file format version
|
||||
* `src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java`:
|
||||
add an `enum` constant for the new class file format version
|
||||
* `src/java.compiler/share/classes/javax/lang/model/SourceVersion.java`:
|
||||
add an `enum` constant for the new source version
|
||||
* `src/java.compiler/share/classes/javax/lang/model/util/*` visitors: Update
|
||||
`@SupportedSourceVersion` annotations to latest value. Note this update
|
||||
is done in lieu of introducing another set of visitors for each Java
|
||||
SE release.
|
||||
* `src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java`:
|
||||
add an `enum` constant for the new source version internal to `javac`
|
||||
* `src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java`:
|
||||
add an `enum` constant for the new class file format version internal to `javac`
|
||||
* `src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java`:
|
||||
add an `enum` constant for the new target version internal to `javac`
|
||||
* `src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java`
|
||||
update printing processor to support the new source version
|
||||
* The symbol information for `--release` is stored as new text files in the
|
||||
`src/jdk.compiler/share/data/symbols` directory, one file per
|
||||
module. The README file in that directory contains directions on how
|
||||
to create the files.
|
||||
|
||||
### `test` files
|
||||
|
||||
* `test/langtools/tools/javac/api/TestGetSourceVersions.java`: add new `SourceVersion` constant to test matrix.
|
||||
* `test/langtools/tools/javac/classfiles/ClassVersionChecker.java`: add new enum constant for the new class file version
|
||||
* `test/langtools/tools/javac/lib/JavacTestingAbstractProcessor.java`
|
||||
update annotation processor extended by `javac` tests to cover the new source version
|
||||
* `test/langtools/tools/javac/preview/classReaderTest/Client.nopreview.out` and `test/langtools/tools/javac/preview/classReaderTest/Client.preview.out`: update expected messages for preview errors and warnings
|
||||
|
||||
@ -72,6 +72,9 @@ id="toc-notes-for-specific-tests">Notes for Specific Tests</a>
|
||||
<li><a href="#non-us-locale" id="toc-non-us-locale">Non-US
|
||||
locale</a></li>
|
||||
<li><a href="#pkcs11-tests" id="toc-pkcs11-tests">PKCS11 Tests</a></li>
|
||||
<li><a href="#testing-ahead-of-time-optimizations"
|
||||
id="toc-testing-ahead-of-time-optimizations">Testing Ahead-of-time
|
||||
Optimizations</a></li>
|
||||
<li><a href="#testing-with-alternative-security-providers"
|
||||
id="toc-testing-with-alternative-security-providers">Testing with
|
||||
alternative security providers</a></li>
|
||||
@ -395,7 +398,8 @@ TEST_OPTS keywords.</p>
|
||||
<h4 id="jobs">JOBS</h4>
|
||||
<p>Currently only applies to JTReg.</p>
|
||||
<h4 id="timeout_factor">TIMEOUT_FACTOR</h4>
|
||||
<p>Currently only applies to JTReg.</p>
|
||||
<p>Currently only applies to <a href="#timeout_factor-1">JTReg
|
||||
-timeoutFactor</a>.</p>
|
||||
<h4 id="java_options">JAVA_OPTIONS</h4>
|
||||
<p>Applies to JTReg, GTest and Micro.</p>
|
||||
<h4 id="vm_options">VM_OPTIONS</h4>
|
||||
@ -411,6 +415,13 @@ instrumentation
|
||||
special target <code>jcov-test</code> instead of <code>test</code>, e.g.
|
||||
<code>make jcov-test TEST=jdk_lang</code>. This will make sure the JCov
|
||||
image is built, and that JCov reporting is enabled.</p>
|
||||
<p>To include JCov coverage for just a subset of all modules, you can
|
||||
use the <code>--with-jcov-modules</code> arguments to
|
||||
<code>configure</code>, e.g.
|
||||
<code>--with-jcov-modules=jdk.compiler,java.desktop</code>.</p>
|
||||
<p>For more fine-grained control, you can pass arbitrary filters to JCov
|
||||
using <code>--with-jcov-filters</code>, and you can specify a specific
|
||||
JDK to instrument using <code>--with-jcov-input-jdk</code>.</p>
|
||||
<p>The JCov report is stored in
|
||||
<code>build/$BUILD/test-results/jcov-output/report</code>.</p>
|
||||
<p>Please note that running with JCov reporting can be very memory
|
||||
@ -423,6 +434,9 @@ the diff between the specified revision and the repository tip.</p>
|
||||
<p>The report is stored in
|
||||
<code>build/$BUILD/test-results/jcov-output/diff_coverage_report</code>
|
||||
file.</p>
|
||||
<h4 id="aot_jdk">AOT_JDK</h4>
|
||||
<p>See <a href="#testing-ahead-of-time-optimizations">Testing
|
||||
Ahead-of-time optimizations</a>.</p>
|
||||
<h3 id="jtreg-keywords">JTReg keywords</h3>
|
||||
<h4 id="jobs-1">JOBS</h4>
|
||||
<p>The test concurrency (<code>-concurrency</code>).</p>
|
||||
@ -431,8 +445,12 @@ otherwise it defaults to JOBS, except for Hotspot, where the default is
|
||||
<em>number of CPU cores/2</em>, but never more than <em>memory size in
|
||||
GB/2</em>.</p>
|
||||
<h4 id="timeout_factor-1">TIMEOUT_FACTOR</h4>
|
||||
<p>The timeout factor (<code>-timeoutFactor</code>).</p>
|
||||
<p>Defaults to 4.</p>
|
||||
<p>The <code>TIMEOUT_FACTOR</code> is forwarded to JTReg framework
|
||||
itself (<code>-timeoutFactor</code>). Also, some test cases that
|
||||
programmatically wait a certain amount of time will apply this factor.
|
||||
If we run in forced compilation mode (<code>-Xcomp</code>), the build
|
||||
system will automatically adjust this factor to compensate for less
|
||||
performance. Defaults to 4.</p>
|
||||
<h4 id="failure_handler_timeout">FAILURE_HANDLER_TIMEOUT</h4>
|
||||
<p>Sets the argument <code>-timeoutHandlerTimeout</code> for JTReg. The
|
||||
default value is 0. This is only valid if the failure handler is
|
||||
@ -445,6 +463,12 @@ 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="jvmti_stress_agent">JVMTI_STRESS_AGENT</h4>
|
||||
<p>Executes JTReg tests with JVM TI stress agent. The stress agent is
|
||||
the part of test library and located in
|
||||
<code>test/lib/jdk/test/lib/jvmti/libJvmtiStressAgent.cpp</code>. The
|
||||
value of this argument is set as JVM TI agent options. This mode uses
|
||||
ProblemList-jvmti-stress-agent.txt as an additional exclude list.</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>
|
||||
@ -544,6 +568,12 @@ each fork. Same as specifying <code>-wi <num></code>.</p>
|
||||
same values as <code>-rff</code>, i.e., <code>text</code>,
|
||||
<code>csv</code>, <code>scsv</code>, <code>json</code>, or
|
||||
<code>latex</code>.</p>
|
||||
<h4 id="test_jdk">TEST_JDK</h4>
|
||||
<p>The path to the JDK that will be used to run the benchmarks.</p>
|
||||
<p>Defaults to <code>build/<CONF-NAME>/jdk</code>.</p>
|
||||
<h4 id="benchmarks_jar">BENCHMARKS_JAR</h4>
|
||||
<p>The path to the JAR containing the benchmarks.</p>
|
||||
<p>Defaults to <code>test/micro/benchmarks.jar</code>.</p>
|
||||
<h4 id="vm_options-2">VM_OPTIONS</h4>
|
||||
<p>Additional VM arguments to provide to forked off VMs. Same as
|
||||
<code>-jvmArgs <args></code></p>
|
||||
@ -589,6 +619,37 @@ element of the appropriate <code>@Artifact</code> class. (See
|
||||
JTREG="JAVA_OPTIONS=-Djdk.test.lib.artifacts.nsslib-linux_aarch64=/path/to/NSS-libs"</code></pre>
|
||||
<p>For more notes about the PKCS11 tests, please refer to
|
||||
test/jdk/sun/security/pkcs11/README.</p>
|
||||
<h3 id="testing-ahead-of-time-optimizations">Testing Ahead-of-time
|
||||
Optimizations</h3>
|
||||
<p>One way to improve test coverage of ahead-of-time (AOT) optimizations
|
||||
in the JDK is to run existing jtreg test cases in a special "AOT_JDK"
|
||||
mode. Example:</p>
|
||||
<pre><code>$ make test JTREG="AOT_JDK=onestep" \
|
||||
TEST=open/test/hotspot/jtreg/runtime/invokedynamic</code></pre>
|
||||
<p>In this testing mode, we first perform an AOT training run (see
|
||||
https://openjdk.org/jeps/483) of a special test program (<a
|
||||
href="../test/setup_aot/TestSetupAOT.java">test/setup_aot/TestSetupAOT.java</a>)
|
||||
that accesses about 5,0000 classes in the JDK core libraries.
|
||||
Optimization artifacts for these classes (such as pre-linked lambda
|
||||
expressions, execution profiles, and pre-generated native code) are
|
||||
stored into an AOT cache file, which will be used by all the JVMs
|
||||
launched by the selected jtreg test cases.</p>
|
||||
<p>When the jtreg tests call into the core libraries classes that are in
|
||||
the AOT cache, we will be able to test the AOT optimizations that were
|
||||
used on those classes.</p>
|
||||
<p>Please note that not all existing jtreg test cases can be executed
|
||||
with the AOT_JDK mode. See <a
|
||||
href="../test/hotspot/jtreg/ProblemList-AotJdk.txt">test/hotspot/jtreg/ProblemList-AotJdk.txt</a>
|
||||
and <a
|
||||
href="../test/jdk/ProblemList-AotJdk.txt">test/jdk/ProblemList-AotJdk.txt</a>.</p>
|
||||
<p>Also, test cases that were written specifically to test AOT, such as
|
||||
the tests under <a
|
||||
href="../test/hotspot/jtreg/runtime/cds/">test/hotspot/jtreg/runtime/cds</a>,
|
||||
cannot be executed with the AOT_JDK mode.</p>
|
||||
<p>Valid values for <code>AOT_JDK</code> are <code>onestep</code> and
|
||||
<code>twostep</code>. These control how the AOT cache is generated. See
|
||||
https://openjdk.org/jeps/514 for details. All other values are
|
||||
ignored.</p>
|
||||
<h3 id="testing-with-alternative-security-providers">Testing with
|
||||
alternative security providers</h3>
|
||||
<p>Some security tests use a hardcoded provider for
|
||||
|
||||
@ -324,7 +324,7 @@ Currently only applies to JTReg.
|
||||
|
||||
#### TIMEOUT_FACTOR
|
||||
|
||||
Currently only applies to JTReg.
|
||||
Currently only applies to [JTReg -timeoutFactor](#timeout_factor-1).
|
||||
|
||||
#### JAVA_OPTIONS
|
||||
|
||||
@ -345,6 +345,14 @@ The simplest way to run tests with JCov coverage report is to use the special
|
||||
target `jcov-test` instead of `test`, e.g. `make jcov-test TEST=jdk_lang`. This
|
||||
will make sure the JCov image is built, and that JCov reporting is enabled.
|
||||
|
||||
To include JCov coverage for just a subset of all modules, you can use the
|
||||
`--with-jcov-modules` arguments to `configure`, e.g.
|
||||
`--with-jcov-modules=jdk.compiler,java.desktop`.
|
||||
|
||||
For more fine-grained control, you can pass arbitrary filters to JCov using
|
||||
`--with-jcov-filters`, and you can specify a specific JDK to instrument
|
||||
using `--with-jcov-input-jdk`.
|
||||
|
||||
The JCov report is stored in `build/$BUILD/test-results/jcov-output/report`.
|
||||
|
||||
Please note that running with JCov reporting can be very memory intensive.
|
||||
@ -359,6 +367,10 @@ between the specified revision and the repository tip.
|
||||
The report is stored in
|
||||
`build/$BUILD/test-results/jcov-output/diff_coverage_report` file.
|
||||
|
||||
#### AOT_JDK
|
||||
|
||||
See [Testing Ahead-of-time optimizations](#testing-ahead-of-time-optimizations).
|
||||
|
||||
### JTReg keywords
|
||||
|
||||
#### JOBS
|
||||
@ -371,9 +383,11 @@ never more than *memory size in GB/2*.
|
||||
|
||||
#### TIMEOUT_FACTOR
|
||||
|
||||
The timeout factor (`-timeoutFactor`).
|
||||
|
||||
Defaults to 4.
|
||||
The `TIMEOUT_FACTOR` is forwarded to JTReg framework itself
|
||||
(`-timeoutFactor`). Also, some test cases that programmatically wait a
|
||||
certain amount of time will apply this factor. If we run in forced
|
||||
compilation mode (`-Xcomp`), the build system will automatically
|
||||
adjust this factor to compensate for less performance. Defaults to 4.
|
||||
|
||||
#### FAILURE_HANDLER_TIMEOUT
|
||||
|
||||
@ -389,6 +403,13 @@ 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.
|
||||
|
||||
#### JVMTI_STRESS_AGENT
|
||||
|
||||
Executes JTReg tests with JVM TI stress agent. The stress agent is the part of
|
||||
test library and located in `test/lib/jdk/test/lib/jvmti/libJvmtiStressAgent.cpp`.
|
||||
The value of this argument is set as JVM TI agent options.
|
||||
This mode uses ProblemList-jvmti-stress-agent.txt as an additional exclude list.
|
||||
|
||||
#### TEST_MODE
|
||||
|
||||
The test mode (`agentvm` or `othervm`).
|
||||
@ -537,6 +558,18 @@ Amount of time to spend in each warmup iteration. Same as specifying `-w
|
||||
Specify to have the test run save a log of the values. Accepts the same values
|
||||
as `-rff`, i.e., `text`, `csv`, `scsv`, `json`, or `latex`.
|
||||
|
||||
#### TEST_JDK
|
||||
|
||||
The path to the JDK that will be used to run the benchmarks.
|
||||
|
||||
Defaults to `build/<CONF-NAME>/jdk`.
|
||||
|
||||
#### BENCHMARKS_JAR
|
||||
|
||||
The path to the JAR containing the benchmarks.
|
||||
|
||||
Defaults to `test/micro/benchmarks.jar`.
|
||||
|
||||
#### VM_OPTIONS
|
||||
|
||||
Additional VM arguments to provide to forked off VMs. Same as `-jvmArgs <args>`
|
||||
@ -603,6 +636,43 @@ $ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" \
|
||||
For more notes about the PKCS11 tests, please refer to
|
||||
test/jdk/sun/security/pkcs11/README.
|
||||
|
||||
### Testing Ahead-of-time Optimizations
|
||||
|
||||
One way to improve test coverage of ahead-of-time (AOT) optimizations in
|
||||
the JDK is to run existing jtreg test cases in a special "AOT_JDK" mode.
|
||||
Example:
|
||||
|
||||
```
|
||||
$ make test JTREG="AOT_JDK=onestep" \
|
||||
TEST=open/test/hotspot/jtreg/runtime/invokedynamic
|
||||
```
|
||||
|
||||
In this testing mode, we first perform an AOT training run
|
||||
(see https://openjdk.org/jeps/483) of a special test program
|
||||
([test/setup_aot/TestSetupAOT.java](../test/setup_aot/TestSetupAOT.java))
|
||||
that accesses about 5,0000 classes in the JDK core libraries.
|
||||
Optimization artifacts for these classes (such as pre-linked
|
||||
lambda expressions, execution profiles, and pre-generated native code)
|
||||
are stored into an AOT cache file, which will be used by all the JVMs
|
||||
launched by the selected jtreg test cases.
|
||||
|
||||
When the jtreg tests call into the core libraries classes that are in
|
||||
the AOT cache, we will be able to test the AOT optimizations that were
|
||||
used on those classes.
|
||||
|
||||
Please note that not all existing jtreg test cases can be executed with
|
||||
the AOT_JDK mode. See
|
||||
[test/hotspot/jtreg/ProblemList-AotJdk.txt](../test/hotspot/jtreg/ProblemList-AotJdk.txt)
|
||||
and [test/jdk/ProblemList-AotJdk.txt](../test/jdk/ProblemList-AotJdk.txt).
|
||||
|
||||
Also, test cases that were written specifically to test AOT, such as the tests
|
||||
under [test/hotspot/jtreg/runtime/cds](../test/hotspot/jtreg/runtime/cds/),
|
||||
cannot be executed with the AOT_JDK mode.
|
||||
|
||||
Valid values for `AOT_JDK` are `onestep` and `twostep`. These control how
|
||||
the AOT cache is generated. See https://openjdk.org/jeps/514 for details.
|
||||
All other values are ignored.
|
||||
|
||||
### Testing with alternative security providers
|
||||
|
||||
Some security tests use a hardcoded provider for `KeyFactory`, `Cipher`,
|
||||
|
||||
@ -174,9 +174,11 @@ else
|
||||
JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR)
|
||||
JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER)
|
||||
JRE_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)
|
||||
STATIC_JDK_BUNDLE_SUBDIR := static-jdk-$(VERSION_NUMBER)
|
||||
ifneq ($(DEBUG_LEVEL), release)
|
||||
JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
|
||||
JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
|
||||
STATIC_JDK_BUNDLE_SUBDIR := $(STATIC_JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
|
||||
endif
|
||||
# In certain situations, the JDK_IMAGE_DIR points to an image without the
|
||||
# the symbols and demos. If so, the symobls and demos can be found in a
|
||||
@ -242,7 +244,10 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
)
|
||||
|
||||
JDK_SYMBOLS_BUNDLE_FILES := \
|
||||
$(call FindFiles, $(SYMBOLS_IMAGE_DIR))
|
||||
$(filter-out \
|
||||
%.stripped.pdb, \
|
||||
$(call FindFiles, $(SYMBOLS_IMAGE_DIR)) \
|
||||
)
|
||||
|
||||
TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_DEMOS_IMAGE_HOMEDIR)/demo/%, \
|
||||
$(ALL_JDK_DEMOS_FILES))
|
||||
@ -296,7 +301,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
$(call LogWarn, Signing $(JDK_BUNDLE_NAME))
|
||||
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
|
||||
--timestamp --options runtime --deep --force \
|
||||
$(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
|
||||
$(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_BUNDLE_TOP_SUBDIR) $(LOG_DEBUG)
|
||||
$(TOUCH) $@
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
|
||||
@ -325,7 +330,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
$(call LogWarn, Signing $(JRE_BUNDLE_NAME))
|
||||
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
|
||||
--timestamp --options runtime --deep --force \
|
||||
$(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
|
||||
$(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_BUNDLE_TOP_SUBDIR) $(LOG_DEBUG)
|
||||
$(TOUCH) $@
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
|
||||
@ -497,6 +502,21 @@ ifneq ($(filter static-libs-graal-bundles, $(MAKECMDGOALS)), )
|
||||
STATIC_LIBS_GRAAL_TARGETS += $(BUILD_STATIC_LIBS_GRAAL_BUNDLE)
|
||||
endif
|
||||
|
||||
#################################################################################
|
||||
|
||||
ifneq ($(filter static-jdk-bundles, $(MAKECMDGOALS)), )
|
||||
STATIC_JDK_BUNDLE_FILES := $(call FindFiles, $(STATIC_JDK_IMAGE_DIR))
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_STATIC_JDK_BUNDLE, \
|
||||
BUNDLE_NAME := $(STATIC_JDK_BUNDLE_NAME), \
|
||||
FILES := $(STATIC_JDK_BUNDLE_FILES), \
|
||||
BASE_DIRS := $(STATIC_JDK_IMAGE_DIR), \
|
||||
SUBDIR := $(STATIC_JDK_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
STATIC_JDK_TARGETS += $(BUILD_STATIC_JDK_BUNDLE)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
product-bundles: $(PRODUCT_TARGETS)
|
||||
@ -507,11 +527,12 @@ docs-javase-bundles: $(DOCS_JAVASE_TARGETS)
|
||||
docs-reference-bundles: $(DOCS_REFERENCE_TARGETS)
|
||||
static-libs-bundles: $(STATIC_LIBS_TARGETS)
|
||||
static-libs-graal-bundles: $(STATIC_LIBS_GRAAL_TARGETS)
|
||||
static-jdk-bundles: $(STATIC_JDK_TARGETS)
|
||||
jcov-bundles: $(JCOV_TARGETS)
|
||||
|
||||
.PHONY: product-bundles test-bundles \
|
||||
docs-jdk-bundles docs-javase-bundles docs-reference-bundles \
|
||||
static-libs-bundles static-libs-graal-bundles jcov-bundles
|
||||
static-libs-bundles static-libs-graal-bundles static-jdk-bundles jcov-bundles
|
||||
|
||||
################################################################################
|
||||
|
||||
|
||||
@ -95,14 +95,16 @@ define SetupInterimModule
|
||||
SRC := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim \
|
||||
$$(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$1) \
|
||||
$(TOPDIR)/src/$1/share/classes, \
|
||||
EXCLUDES := sun javax/tools/snippet-files, \
|
||||
EXCLUDES := sun, \
|
||||
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 \
|
||||
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/MemoryClassLoader.java \
|
||||
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/MemoryContext.java \
|
||||
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/MemoryModuleFinder.java \
|
||||
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/SourceLauncher.java \
|
||||
Standard.java, \
|
||||
EXCLUDE_PATTERNS := -files, \
|
||||
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java \
|
||||
$($1.interim_EXTRA_FILES), \
|
||||
COPY := .gif .png .xml .css .svg .js .js.template .txt .woff .woff2 javax.tools.JavaCompilerTool, \
|
||||
|
||||
@ -85,7 +85,7 @@ CreateHkTargets = \
|
||||
################################################################################
|
||||
# Include module specific build settings
|
||||
|
||||
THIS_SNIPPET := modules/$(MODULE)/Java.gmk
|
||||
THIS_SNIPPET := $(call GetModuleSnippetName, Java)
|
||||
|
||||
ifneq ($(wildcard $(THIS_SNIPPET)), )
|
||||
include MakeSnippetStart.gmk
|
||||
@ -113,7 +113,9 @@ $(eval $(call SetupJavaCompilation, $(MODULE), \
|
||||
DISABLED_WARNINGS := $(DISABLED_WARNINGS_java), \
|
||||
EXCLUDES := $(EXCLUDES), \
|
||||
EXCLUDE_FILES := $(EXCLUDE_FILES), \
|
||||
EXCLUDE_PATTERNS := -files, \
|
||||
KEEP_ALL_TRANSLATIONS := $(KEEP_ALL_TRANSLATIONS), \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE), \
|
||||
JAVAC_FLAGS := \
|
||||
$(DOCLINT) \
|
||||
$(JAVAC_FLAGS) \
|
||||
|
||||
@ -34,21 +34,28 @@ else
|
||||
JCOV_INPUT_IMAGE_DIR := $(JDK_IMAGE_DIR)
|
||||
endif
|
||||
|
||||
JCOV_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/jcov
|
||||
|
||||
#moving instrumented jdk image in and out of jcov_temp because of CODETOOLS-7902299
|
||||
JCOV_TEMP := $(SUPPORT_OUTPUTDIR)/jcov_temp
|
||||
JCOV_TEMP := $(JCOV_SUPPORT_DIR)/temp
|
||||
|
||||
ifneq ($(JCOV_MODULES), )
|
||||
JCOV_MODULES_FILTER := $(foreach m, $(JCOV_MODULES), -include_module $m)
|
||||
endif
|
||||
|
||||
$(JCOV_IMAGE_DIR)/release: $(JCOV_INPUT_IMAGE_DIR)/release
|
||||
$(call LogWarn, Creating instrumented jdk image with JCov)
|
||||
$(call MakeDir, $(JCOV_TEMP) $(IMAGES_OUTPUTDIR))
|
||||
$(RM) -r $(JCOV_IMAGE_DIR) $(JCOV_TEMP)/*
|
||||
$(CP) -r $(JCOV_INPUT_IMAGE_DIR) $(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR)
|
||||
$(JAVA) -Xmx3g -jar $(JCOV_HOME)/lib/jcov.jar JREInstr \
|
||||
$(call ExecuteWithLog, $(JCOV_SUPPORT_DIR)/run-jcov, \
|
||||
$(JAVA) -Xmx3g -jar $(JCOV_HOME)/lib/jcov.jar JREInstr \
|
||||
-t $(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR)/template.xml \
|
||||
-rt $(JCOV_HOME)/lib/jcov_network_saver.jar \
|
||||
-exclude 'java.lang.Object' \
|
||||
-exclude jdk.test.Main -exclude '**\$Proxy*' \
|
||||
$(JCOV_FILTERS) \
|
||||
$(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR)
|
||||
$(JCOV_MODULES_FILTER) $(JCOV_FILTERS) \
|
||||
$(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR))
|
||||
$(MV) $(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR) $(JCOV_IMAGE_DIR)
|
||||
$(RMDIR) $(JCOV_TEMP)
|
||||
|
||||
|
||||
@ -184,7 +184,7 @@ endif
|
||||
################################################################################
|
||||
# Include module specific build settings
|
||||
|
||||
THIS_SNIPPET := modules/$(MODULE)/Jmod.gmk
|
||||
THIS_SNIPPET := $(call GetModuleSnippetName, Jmod)
|
||||
|
||||
ifneq ($(wildcard $(THIS_SNIPPET)), )
|
||||
include MakeSnippetStart.gmk
|
||||
@ -257,6 +257,7 @@ $(eval $(call SetupExecute, create_$(JMOD_FILE), \
|
||||
WARN := Creating $(INTERIM_MSG)$(JMOD_FILE), \
|
||||
DEPS := $(DEPS), \
|
||||
OUTPUT_FILE := $(JMODS_DIR)/$(JMOD_FILE), \
|
||||
WORKING_DIR := $(WORKSPACE_ROOT), \
|
||||
SUPPORT_DIR := $(JMODS_SUPPORT_DIR), \
|
||||
PRE_COMMAND := $(RM) $(JMODS_DIR)/$(JMOD_FILE) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
|
||||
COMMAND := $(JMOD) $(JMOD_SMALL_FLAGS) create --module-version $(VERSION_SHORT) \
|
||||
|
||||
@ -92,20 +92,16 @@ REFERENCE_TAGS := $(JAVADOC_TAGS)
|
||||
JAVADOC_DISABLED_DOCLINT_WARNINGS := missing
|
||||
JAVADOC_DISABLED_DOCLINT_PACKAGES := org.w3c.* javax.smartcardio
|
||||
|
||||
# Allow overriding on the command line
|
||||
# (intentionally sharing name with the javac option)
|
||||
JAVA_WARNINGS_ARE_ERRORS ?= -Werror
|
||||
|
||||
# The initial set of options for javadoc
|
||||
JAVADOC_OPTIONS := -use -keywords -notimestamp \
|
||||
-encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
|
||||
-serialwarn -encoding utf-8 -docencoding utf-8 -breakiterator \
|
||||
-splitIndex --system none -javafx --expand-requires transitive \
|
||||
--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 \
|
||||
-serialwarn -encoding utf-8 -breakiterator -splitIndex --system none \
|
||||
-html5 -javafx --expand-requires transitive
|
||||
|
||||
# Should we add DRAFT stamps to the generated javadoc?
|
||||
@ -240,8 +236,8 @@ define create_overview_file
|
||||
#
|
||||
ifneq ($$($1_GROUPS), )
|
||||
$1_OVERVIEW_TEXT += \
|
||||
<p>This document is divided into \
|
||||
$$(subst 2,two,$$(subst 3,three,$$(words $$($1_GROUPS)))) sections:</p> \
|
||||
<p>This document has \
|
||||
$$(subst 2,two,$$(subst 3,three,$$(words $$($1_GROUPS)))) major sections:</p> \
|
||||
<blockquote><dl> \
|
||||
#
|
||||
$1_OVERVIEW_TEXT += $$(foreach g, $$($1_GROUPS), \
|
||||
@ -250,7 +246,10 @@ define create_overview_file
|
||||
)
|
||||
$1_OVERVIEW_TEXT += \
|
||||
</dl></blockquote> \
|
||||
#
|
||||
<p><a href="../specs/index.html">Related documents</a> specify the Java \
|
||||
programming language, the Java Virtual Machine, various protocols and file \
|
||||
formats pertaining to the Java platform, and tools included in the JDK.</p> \
|
||||
#
|
||||
endif
|
||||
$1_OVERVIEW_TEXT += \
|
||||
</body></html> \
|
||||
@ -264,7 +263,7 @@ define create_overview_file
|
||||
$$($1_OVERVIEW): $$($1_OVERVIEW_VARDEPS_FILE)
|
||||
$$(call LogInfo, Creating overview.html for $1)
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(PRINTF) > $$@ '$$($1_OVERVIEW_TEXT)'
|
||||
$$(PRINTF) "%s" '$$($1_OVERVIEW_TEXT)' > $$@
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
@ -322,7 +321,9 @@ define SetupApiDocsGenerationBody
|
||||
# Ignore the doclint warnings in certain packages
|
||||
$1_OPTIONS += -Xdoclint/package:$$(call CommaList, $$(addprefix -, \
|
||||
$$(JAVADOC_DISABLED_DOCLINT_PACKAGES)))
|
||||
$1_OPTIONS += $$(JAVA_WARNINGS_ARE_ERRORS)
|
||||
ifeq ($$(JAVA_WARNINGS_AS_ERRORS), true)
|
||||
$1_OPTIONS += -Werror
|
||||
endif
|
||||
|
||||
$1_DOC_TITLE := $$($1_LONG_NAME)<br>Version $$(VERSION_SPECIFICATION) API \
|
||||
Specification
|
||||
@ -542,7 +543,9 @@ $(eval $(call SetupApiDocsGeneration, REFERENCE_API, \
|
||||
# Format: space-delimited list of names, including at most one '%' as a
|
||||
# wildcard. Spec source files match if their filename or any enclosing folder
|
||||
# name matches one of the items in SPEC_FILTER.
|
||||
SPEC_FILTER := %
|
||||
ifeq ($(SPEC_FILTER), )
|
||||
SPEC_FILTER := %
|
||||
endif
|
||||
|
||||
ApplySpecFilter = \
|
||||
$(strip $(foreach file, $(1), \
|
||||
@ -673,7 +676,7 @@ ifeq ($(ENABLE_PANDOC), true)
|
||||
|
||||
$(foreach m, $(ALL_MODULES), \
|
||||
$(eval MAN_$m := $(call ApplySpecFilter, $(filter %.md, $(call FindFiles, \
|
||||
$(call FindModuleManDirs, $m))))) \
|
||||
$(call FindModuleManDirsForDocs, $m))))) \
|
||||
$(if $(MAN_$m), \
|
||||
$(eval $(call SetupProcessMarkdown, MAN_TO_HTML_$m, \
|
||||
FILES := $(MAN_$m), \
|
||||
|
||||
@ -76,10 +76,14 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
|
||||
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $(JLI_TRACE_FILE)))
|
||||
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw \
|
||||
$(CLASSLIST_FILE_VM_OPTS) \
|
||||
-Xlog:aot=off \
|
||||
-Xlog:cds=off \
|
||||
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
|
||||
build.tools.classlist.HelloClasslist $(LOG_DEBUG)
|
||||
$(GREP) -v HelloClasslist $@.raw > $@.interim
|
||||
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-Xlog:aot=off \
|
||||
-Xlog:cds=off \
|
||||
-XX:SharedClassListFile=$@.interim -XX:SharedArchiveFile=$@.jsa \
|
||||
-Xmx128M -Xms128M $(LOG_INFO)
|
||||
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw.2 \
|
||||
@ -87,6 +91,8 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
|
||||
-Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
|
||||
$(CLASSLIST_FILE_VM_OPTS) \
|
||||
--module-path $(SUPPORT_OUTPUTDIR)/classlist.jar \
|
||||
-Xlog:aot=off \
|
||||
-Xlog:cds=off \
|
||||
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
|
||||
build.tools.classlist.HelloClasslist \
|
||||
2> $(LINK_OPT_DIR)/stderr > $(JLI_TRACE_FILE) \
|
||||
@ -100,6 +106,8 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
|
||||
$(GREP) -v HelloClasslist $@.raw.2 > $@.raw.3
|
||||
$(GREP) -v @cp $@.raw.3 > $@.raw.4
|
||||
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java \
|
||||
-Xlog:aot=off \
|
||||
-Xlog:cds=off \
|
||||
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
|
||||
build.tools.classlist.SortClasslist $@.raw.4 > $@
|
||||
|
||||
|
||||
@ -114,7 +114,6 @@ ifeq ($(HSDIS_BACKEND), binutils)
|
||||
TOOLCHAIN_TYPE := gcc
|
||||
OPENJDK_TARGET_OS := linux
|
||||
OPENJDK_TARGET_OS_TYPE := unix
|
||||
CC_OUT_OPTION := -o$(SPACE)
|
||||
GENDEPS_FLAGS := -MMD -MF
|
||||
CFLAGS_DEBUG_SYMBOLS := -g
|
||||
DISABLED_WARNINGS :=
|
||||
|
||||
@ -97,6 +97,10 @@ ifeq ($(JLINK_PRODUCE_LINKABLE_RUNTIME), true)
|
||||
JLINK_JDK_EXTRA_OPTS += --generate-linkable-runtime
|
||||
endif
|
||||
|
||||
ifneq ($(JLINK_USER_EXTRA_FLAGS), )
|
||||
JLINK_JDK_EXTRA_OPTS += $(JLINK_USER_EXTRA_FLAGS)
|
||||
endif
|
||||
|
||||
$(eval $(call SetupExecute, jlink_jdk, \
|
||||
WARN := Creating jdk image, \
|
||||
DEPS := $(JDK_JMODS) $(BASE_RELEASE_FILE) \
|
||||
@ -144,7 +148,6 @@ define CreateCDSArchive
|
||||
$1_$2_DUMP_EXTRA_ARG := $$($1_$2_COOPS_OPTION) $$($1_$2_COH_OPTION)
|
||||
$1_$2_DUMP_TYPE := $(if $(findstring _nocoops, $2),-NOCOOPS,)$(if $(findstring _coh, $2),-COH,)
|
||||
|
||||
# Only G1 supports dumping the shared heap, so explicitly use G1 if the JVM supports it.
|
||||
$1_$2_CDS_DUMP_FLAGS := $(CDS_DUMP_FLAGS) $(if $(filter g1gc, $(JVM_FEATURES_$1)), -XX:+UseG1GC)
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
@ -158,7 +161,7 @@ define CreateCDSArchive
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG_CDS_ARCHIVE), true)
|
||||
$1_$2_CDS_DUMP_FLAGS += -Xlog:cds+map*=trace:file=$$(JDK_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE).cdsmap:none:filesize=0
|
||||
$1_$2_CDS_DUMP_FLAGS += -Xlog:aot+map*=trace:file=$$(JDK_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE).cdsmap:none:filesize=0
|
||||
endif
|
||||
|
||||
$$(eval $$(call SetupExecute, $1_$2_gen_cds_archive_jdk, \
|
||||
@ -266,6 +269,7 @@ endif
|
||||
# Since debug symbols are not included in the jmod files, they need to be copied
|
||||
# in manually after generating the images.
|
||||
|
||||
# These variables are read by SetupCopyDebuginfo
|
||||
ALL_JDK_MODULES := $(JDK_MODULES)
|
||||
ALL_JRE_MODULES := $(sort $(JRE_MODULES), $(foreach m, $(JRE_MODULES), \
|
||||
$(call FindTransitiveDepsForModule, $m)))
|
||||
|
||||
@ -37,12 +37,6 @@ include MakeFileStart.gmk
|
||||
include $(TOPDIR)/make/InitSupport.gmk
|
||||
include LogUtils.gmk
|
||||
|
||||
# Force early generation of module-deps.gmk and find-tests.gmk
|
||||
GENERATE_MODULE_DEPS_FILE := true
|
||||
include Modules.gmk
|
||||
GENERATE_FIND_TESTS_FILE := true
|
||||
include FindTests.gmk
|
||||
|
||||
# Inclusion of this pseudo-target will cause make to execute this file
|
||||
# serially, regardless of -j.
|
||||
.NOTPARALLEL:
|
||||
@ -116,7 +110,18 @@ reconfigure:
|
||||
CUSTOM_CONFIG_DIR="$(CUSTOM_CONFIG_DIR)" \
|
||||
$(RECONFIGURE_COMMAND) )
|
||||
|
||||
.PHONY: print-modules print-targets print-tests print-configuration reconfigure
|
||||
# Create files that are needed to run most targets in Main.gmk
|
||||
create-make-helpers:
|
||||
( cd $(TOPDIR) && \
|
||||
$(MAKE) $(MAKE_ARGS) -j 1 -f make/GenerateFindTests.gmk \
|
||||
$(USER_MAKE_VARS) )
|
||||
( cd $(TOPDIR) && \
|
||||
$(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \
|
||||
UPDATE_MODULE_DEPS=true NO_RECIPES=true \
|
||||
create-main-targets-include )
|
||||
|
||||
.PHONY: print-modules print-targets print-tests print-configuration \
|
||||
reconfigure create-make-helpers
|
||||
|
||||
##############################################################################
|
||||
# The main target. This will delegate all other targets into Main.gmk.
|
||||
@ -136,16 +141,19 @@ TARGET_DESCRIPTION := target$(if $(word 2, $(MAIN_TARGETS)),s) \
|
||||
# variables are explicitly propagated using $(USER_MAKE_VARS).
|
||||
main: MAKEOVERRIDES :=
|
||||
|
||||
main: $(INIT_TARGETS)
|
||||
main: $(INIT_TARGETS) create-make-helpers
|
||||
ifneq ($(SEQUENTIAL_TARGETS)$(PARALLEL_TARGETS), )
|
||||
$(call RotateLogFiles)
|
||||
$(PRINTF) "Building $(TARGET_DESCRIPTION)\n" $(BUILD_LOG_PIPE_SIMPLE)
|
||||
$(ECHO) "Building $(TARGET_DESCRIPTION)" $(BUILD_LOG_PIPE_SIMPLE)
|
||||
ifneq ($(SEQUENTIAL_TARGETS), )
|
||||
# Don't touch build output dir since we might be cleaning. That
|
||||
# means no log pipe.
|
||||
( cd $(TOPDIR) && \
|
||||
$(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \
|
||||
$(SEQUENTIAL_TARGETS) )
|
||||
# We might have cleaned away essential files, recreate them.
|
||||
( cd $(TOPDIR) && \
|
||||
$(MAKE) $(MAKE_ARGS) -j 1 -f make/Init.gmk create-make-helpers )
|
||||
endif
|
||||
ifneq ($(PARALLEL_TARGETS), )
|
||||
$(call PrepareFailureLogs)
|
||||
@ -160,7 +168,8 @@ main: $(INIT_TARGETS)
|
||||
-f make/Main.gmk $(USER_MAKE_VARS) \
|
||||
$(PARALLEL_TARGETS) $(COMPARE_BUILD_MAKE) $(BUILD_LOG_PIPE) || \
|
||||
( exitcode=$$? && \
|
||||
$(PRINTF) "\nERROR: Build failed for $(TARGET_DESCRIPTION) (exit code $$exitcode) \n" \
|
||||
$(ECHO) "" $(BUILD_LOG_PIPE_SIMPLE) && \
|
||||
$(ECHO) "ERROR: Build failed for $(TARGET_DESCRIPTION) (exit code $$exitcode)" \
|
||||
$(BUILD_LOG_PIPE_SIMPLE) && \
|
||||
cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -j 1 -f make/Init.gmk \
|
||||
on-failure ; \
|
||||
@ -172,7 +181,7 @@ main: $(INIT_TARGETS)
|
||||
if test -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error ; then \
|
||||
exit 1 ; \
|
||||
fi
|
||||
$(PRINTF) "Finished building $(TARGET_DESCRIPTION)\n" $(BUILD_LOG_PIPE_SIMPLE)
|
||||
$(ECHO) "Finished building $(TARGET_DESCRIPTION)" $(BUILD_LOG_PIPE_SIMPLE)
|
||||
$(call ReportProfileTimes)
|
||||
endif
|
||||
|
||||
@ -183,7 +192,8 @@ on-failure:
|
||||
$(call PrintFailureReports)
|
||||
$(call PrintBuildLogFailures)
|
||||
$(call ReportProfileTimes)
|
||||
$(PRINTF) "HELP: Run 'make doctor' to diagnose build problems.\n\n"
|
||||
$(ECHO) "HELP: Run 'make doctor' to diagnose build problems."
|
||||
$(ECHO) ""
|
||||
ifneq ($(COMPARE_BUILD), )
|
||||
$(call CleanupCompareBuild)
|
||||
endif
|
||||
|
||||
@ -173,9 +173,10 @@ define PrintFailureReports
|
||||
$(RM) $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log ; \
|
||||
$(if $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log), \
|
||||
( \
|
||||
$(PRINTF) "\n=== Output from failing command(s) repeated here ===\n" ; \
|
||||
$(ECHO) "" ; \
|
||||
$(ECHO) "=== Output from failing command(s) repeated here ===" ; \
|
||||
$(foreach logfile, $(sort $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log)), \
|
||||
$(PRINTF) "* For target $(notdir $(basename $(logfile))):\n" ; \
|
||||
$(ECHO) "* For target $(notdir $(basename $(logfile))):" ; \
|
||||
$(if $(filter all, $(LOG_REPORT)), \
|
||||
$(GREP) -v -e "^Note: including file:" < $(logfile) || true ; \
|
||||
, \
|
||||
@ -185,8 +186,9 @@ define PrintFailureReports
|
||||
fi ; \
|
||||
) \
|
||||
) \
|
||||
$(PRINTF) "\n* All command lines available in $(MAKESUPPORT_OUTPUTDIR)/failure-logs.\n" ; \
|
||||
$(PRINTF) "=== End of repeated output ===\n" ; \
|
||||
$(ECHO) "" ; \
|
||||
$(ECHO) "* All command lines available in $(MAKESUPPORT_OUTPUTDIR)/failure-logs." ; \
|
||||
$(ECHO) "=== End of repeated output ===" ; \
|
||||
) >> $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log \
|
||||
) \
|
||||
)
|
||||
@ -195,13 +197,16 @@ endef
|
||||
define PrintBuildLogFailures
|
||||
$(if $(filter none, $(LOG_REPORT)), , \
|
||||
if $(GREP) -q "recipe for target .* failed" $(BUILD_LOG) 2> /dev/null; then \
|
||||
$(PRINTF) "\n=== Make failed targets repeated here ===\n" ; \
|
||||
$(ECHO) "" ; \
|
||||
$(ECHO) "=== Make failed targets repeated here ===" ; \
|
||||
$(GREP) "recipe for target .* failed" $(BUILD_LOG) ; \
|
||||
$(PRINTF) "=== End of repeated output ===\n" ; \
|
||||
$(PRINTF) "\nHELP: Try searching the build log for the name of the first failed target.\n" ; \
|
||||
$(ECHO) "=== End of repeated output ===" ; \
|
||||
$(ECHO) "" ; \
|
||||
$(ECHO) "HELP: Try searching the build log for the name of the first failed target." ; \
|
||||
else \
|
||||
$(PRINTF) "\nNo indication of failed target found.\n" ; \
|
||||
$(PRINTF) "HELP: Try searching the build log for '] Error'.\n" ; \
|
||||
$(ECHO) "" ; \
|
||||
$(ECHO) "No indication of failed target found." ; \
|
||||
$(ECHO) "HELP: Try searching the build log for '] Error'." ; \
|
||||
fi >> $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log ; \
|
||||
$(CAT) $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log \
|
||||
)
|
||||
|
||||
@ -42,6 +42,12 @@ include MakeFileStart.gmk
|
||||
include $(TOPDIR)/make/MainSupport.gmk
|
||||
|
||||
include FindTests.gmk
|
||||
|
||||
ifeq ($(UPDATE_MODULE_DEPS), true)
|
||||
# Update module-deps.gmk if requested. This is read in Modules.gmk.
|
||||
GENERATE_MODULE_DEPS_FILE := true
|
||||
endif
|
||||
|
||||
include Modules.gmk
|
||||
|
||||
# Are we requested to ignore dependencies?
|
||||
@ -411,12 +417,14 @@ $(eval $(call SetupTarget, create-source-revision-tracker, \
|
||||
))
|
||||
|
||||
BOOTCYCLE_TARGET := product-images
|
||||
BOOTCYCLE_SPEC := $(dir $(SPEC))bootcycle-spec.gmk
|
||||
|
||||
bootcycle-images:
|
||||
ifneq ($(COMPILE_TYPE), cross)
|
||||
$(call LogWarn, Boot cycle build step 2: Building a new JDK image using previously built image)
|
||||
$(call MakeDir, $(OUTPUTDIR)/bootcycle-build)
|
||||
+$(MAKE) $(MAKE_ARGS) -f $(TOPDIR)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \
|
||||
LOG_PREFIX="[bootcycle] " JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
|
||||
LOG_PREFIX="[bootcycle] " JOBS= SPEC=$(BOOTCYCLE_SPEC) main
|
||||
else
|
||||
$(call LogWarn, Boot cycle build disabled when cross compiling)
|
||||
endif
|
||||
@ -453,9 +461,9 @@ $(eval $(call SetupTarget, symbols-image, \
|
||||
TARGET := symbols, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTarget, static-launcher, \
|
||||
$(eval $(call SetupTarget, static-launchers, \
|
||||
MAKEFILE := StaticLibs, \
|
||||
TARGET := static-launcher, \
|
||||
TARGET := static-launchers, \
|
||||
DEPS := hotspot-static-libs static-libs, \
|
||||
))
|
||||
|
||||
@ -753,6 +761,17 @@ $(eval $(call SetupTarget, test-image-lib, \
|
||||
DEPS := build-test-lib, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTarget, build-test-setup-aot, \
|
||||
MAKEFILE := test/BuildTestSetupAOT, \
|
||||
DEPS := interim-langtools exploded-image, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTarget, test-image-setup-aot, \
|
||||
MAKEFILE := test/BuildTestSetupAOT, \
|
||||
TARGET := images, \
|
||||
DEPS := build-test-setup-aot, \
|
||||
))
|
||||
|
||||
ifeq ($(BUILD_FAILURE_HANDLER), true)
|
||||
# Builds the failure handler jtreg extension
|
||||
$(eval $(call SetupTarget, build-test-failure-handler, \
|
||||
@ -864,6 +883,12 @@ $(eval $(call SetupTarget, static-libs-graal-bundles, \
|
||||
DEPS := static-libs-graal-image, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTarget, static-jdk-bundles, \
|
||||
MAKEFILE := Bundles, \
|
||||
TARGET := static-jdk-bundles, \
|
||||
DEPS := static-jdk-image, \
|
||||
))
|
||||
|
||||
ifeq ($(JCOV_ENABLED), true)
|
||||
$(eval $(call SetupTarget, jcov-bundles, \
|
||||
MAKEFILE := Bundles, \
|
||||
@ -989,7 +1014,7 @@ else
|
||||
else ifeq ($(EXTERNAL_BUILDJDK), false)
|
||||
# When not cross compiling, the BUILD_JDK is the interim jdk image, and
|
||||
# the javac launcher is needed.
|
||||
jdk.compiler-gendata: jdk.compiler-launchers
|
||||
jdk.compiler-gendata: jdk.compiler-launchers java.base-launchers
|
||||
jdk.javadoc-gendata: jdk.compiler-launchers
|
||||
endif
|
||||
|
||||
@ -1265,7 +1290,7 @@ ifeq ($(call isTargetOs, macosx), true)
|
||||
legacy-images: mac-legacy-jre-bundle
|
||||
endif
|
||||
|
||||
static-exploded-image: static-launcher exploded-image
|
||||
static-exploded-image: static-launchers exploded-image
|
||||
|
||||
# These targets build the various documentation images
|
||||
docs-jdk-image: docs-jdk
|
||||
@ -1281,7 +1306,8 @@ all-docs-bundles: docs-jdk-bundles docs-javase-bundles docs-reference-bundles
|
||||
# This target builds the test image
|
||||
test-image: prepare-test-image test-image-jdk-jtreg-native \
|
||||
test-image-demos-jdk test-image-libtest-jtreg-native \
|
||||
test-image-lib test-image-lib-native
|
||||
test-image-lib test-image-lib-native \
|
||||
test-image-setup-aot
|
||||
|
||||
ifneq ($(JVM_TEST_IMAGE_TARGETS), )
|
||||
# If JVM_TEST_IMAGE_TARGETS is externally defined, use it instead of the
|
||||
@ -1309,10 +1335,7 @@ endif
|
||||
################################################################################
|
||||
|
||||
# all-images builds all our deliverables as images.
|
||||
all-images: product-images test-image all-docs-images
|
||||
ifeq ($(call isTargetOs, linux macosx windows), true)
|
||||
all-images: static-jdk-image
|
||||
endif
|
||||
all-images: product-images static-jdk-image test-image all-docs-images
|
||||
|
||||
# all-bundles packages all our deliverables as tar.gz bundles.
|
||||
all-bundles: product-bundles test-bundles docs-bundles static-libs-bundles
|
||||
@ -1384,7 +1407,7 @@ CLEAN_SUPPORT_DIRS += demos
|
||||
CLEAN_SUPPORT_DIR_TARGETS := $(addprefix clean-, $(CLEAN_SUPPORT_DIRS))
|
||||
CLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native lib
|
||||
CLEAN_TEST_TARGETS += $(addprefix clean-test-, $(CLEAN_TESTS))
|
||||
CLEAN_PHASES := gensrc java native include
|
||||
CLEAN_PHASES += gensrc java native include
|
||||
CLEAN_PHASE_TARGETS := $(addprefix clean-, $(CLEAN_PHASES))
|
||||
CLEAN_MODULE_TARGETS := $(addprefix clean-, $(ALL_MODULES))
|
||||
# Construct targets of the form clean-$module-$phase
|
||||
|
||||
@ -58,76 +58,76 @@ endef
|
||||
|
||||
define CleanDocs
|
||||
@$(PRINTF) "Cleaning docs ..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/docs
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/javadoc
|
||||
$(RM) -r $(IMAGES_OUTPUTDIR)/docs
|
||||
@$(PRINTF) " done\n"
|
||||
@$(ECHO) " done"
|
||||
endef
|
||||
|
||||
# Cleans the dir given as $1
|
||||
define CleanDir
|
||||
@$(PRINTF) "Cleaning $(strip $1) build artifacts ..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning %s build artifacts ..." "$(strip $1)"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
($(CD) $(OUTPUTDIR) && $(RM) -r $1)
|
||||
@$(PRINTF) " done\n"
|
||||
@$(ECHO) " done"
|
||||
endef
|
||||
|
||||
define CleanSupportDir
|
||||
@$(PRINTF) "Cleaning $(strip $1) build artifacts ..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning %s build artifacts ..." "$(strip $1)"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/$(strip $1)
|
||||
@$(PRINTF) " done\n"
|
||||
@$(ECHO) " done"
|
||||
endef
|
||||
|
||||
define CleanMakeSupportDir
|
||||
@$(PRINTF) "Cleaning $(strip $1) make support artifacts ..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning %s make support artifacts ..." "$(strip $1)"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
$(RM) -r $(MAKESUPPORT_OUTPUTDIR)/$(strip $1)
|
||||
@$(PRINTF) " done\n"
|
||||
@$(ECHO) " done"
|
||||
endef
|
||||
|
||||
define CleanTest
|
||||
@$(PRINTF) "Cleaning test $(strip $1) ..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning test %s ..." "$(strip $1)"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/test/$(strip $(subst -,/,$1))
|
||||
# Remove as much of the test directory structure as is empty
|
||||
$(RMDIR) -p $(dir $(SUPPORT_OUTPUTDIR)/test/$(strip $(subst -,/,$1))) 2> /dev/null || true
|
||||
@$(PRINTF) " done\n"
|
||||
@$(ECHO) " done"
|
||||
endef
|
||||
|
||||
define Clean-gensrc
|
||||
@$(PRINTF) "Cleaning gensrc $(if $1,for $(strip $1) )..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning gensrc %s..." "$(if $1,for $(strip $1) )"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/gensrc/$(strip $1)
|
||||
@$(PRINTF) " done\n"
|
||||
@$(ECHO) " done"
|
||||
endef
|
||||
|
||||
define Clean-java
|
||||
@$(PRINTF) "Cleaning java $(if $1,for $(strip $1) )..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning java %s..." "$(if $1,for $(strip $1) )"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
$(RM) -r $(JDK_OUTPUTDIR)/modules/$(strip $1)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/special_classes/$(strip $1)
|
||||
$(PRINTF) " done\n"
|
||||
$(PRINTF) "Cleaning headers $(if $1,for $(strip $1)) ..."
|
||||
$(ECHO) " done"
|
||||
$(PRINTF) "Cleaning headers %s..." "$(if $1,for $(strip $1) )"
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/headers/$(strip $1)
|
||||
@$(PRINTF) " done\n"
|
||||
@$(ECHO) " done"
|
||||
endef
|
||||
|
||||
define Clean-native
|
||||
@$(PRINTF) "Cleaning native $(if $1,for $(strip $1) )..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning native %s..." "$(if $1,for $(strip $1) )"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/native/$(strip $1)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_cmds/$(strip $1)
|
||||
@$(PRINTF) " done\n"
|
||||
@$(ECHO) " done"
|
||||
endef
|
||||
|
||||
define Clean-include
|
||||
@$(PRINTF) "Cleaning include $(if $1,for $(strip $1) )..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning include %s..." "$(if $1,for $(strip $1) )"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_include/$(strip $1)
|
||||
@$(PRINTF) " done\n"
|
||||
@$(ECHO) " done"
|
||||
endef
|
||||
|
||||
define CleanModule
|
||||
@ -149,7 +149,7 @@ endef
|
||||
|
||||
################################################################################
|
||||
|
||||
PHASE_MAKEDIRS := $(TOPDIR)/make
|
||||
PHASE_MAKEDIRS += $(TOPDIR)/make
|
||||
|
||||
# Helper macro for DeclareRecipesForPhase
|
||||
# Declare a recipe for calling the module and phase specific makefile.
|
||||
|
||||
@ -34,18 +34,23 @@ include MakeFileStart.gmk
|
||||
################################################################################
|
||||
|
||||
include CopyFiles.gmk
|
||||
include Modules.gmk
|
||||
|
||||
MODULE_SRC := $(TOPDIR)/src/$(MODULE)
|
||||
|
||||
# Define the snippet for MakeSnippetStart/End
|
||||
THIS_SNIPPET := modules/$(MODULE)/$(MAKEFILE_PREFIX).gmk
|
||||
################################################################################
|
||||
# Include module specific build settings
|
||||
|
||||
include MakeSnippetStart.gmk
|
||||
THIS_SNIPPET := $(call GetModuleSnippetName, $(MAKEFILE_PREFIX))
|
||||
|
||||
# Include the file being wrapped.
|
||||
include $(THIS_SNIPPET)
|
||||
ifneq ($(wildcard $(THIS_SNIPPET)), )
|
||||
include MakeSnippetStart.gmk
|
||||
|
||||
include MakeSnippetEnd.gmk
|
||||
# Include the file being wrapped.
|
||||
include $(THIS_SNIPPET)
|
||||
|
||||
include MakeSnippetEnd.gmk
|
||||
endif
|
||||
|
||||
ifeq ($(MAKEFILE_PREFIX), Lib)
|
||||
# We need to keep track of what libraries are generated/needed by this
|
||||
|
||||
@ -48,6 +48,11 @@ include $(TOPDIR)/make/common/LogUtils.gmk
|
||||
# a configuration. This will define ALL_GLOBAL_TARGETS.
|
||||
include $(TOPDIR)/make/Global.gmk
|
||||
|
||||
# Targets provided by Init.gmk.
|
||||
ALL_INIT_TARGETS := print-modules print-targets print-configuration \
|
||||
print-tests reconfigure pre-compare-build post-compare-build \
|
||||
create-make-helpers
|
||||
|
||||
# CALLED_TARGETS is the list of targets that the user provided,
|
||||
# or "default" if unspecified.
|
||||
CALLED_TARGETS := $(if $(MAKECMDGOALS), $(MAKECMDGOALS), default)
|
||||
@ -75,7 +80,6 @@ ifneq ($(SKIP_SPEC), true)
|
||||
|
||||
# Basic checks on environment and command line.
|
||||
$(eval $(call CheckControlVariables))
|
||||
$(eval $(call CheckDeprecatedEnvironment))
|
||||
$(eval $(call CheckInvalidMakeFlags))
|
||||
|
||||
# Check that CONF_CHECK is valid.
|
||||
@ -94,10 +98,6 @@ ifneq ($(SKIP_SPEC), true)
|
||||
# This will setup ALL_MAIN_TARGETS.
|
||||
$(eval $(call DefineMainTargets, FORCE, $(firstword $(SPECS))))
|
||||
|
||||
# Targets provided by Init.gmk.
|
||||
ALL_INIT_TARGETS := print-modules print-targets print-configuration \
|
||||
print-tests reconfigure pre-compare-build post-compare-build
|
||||
|
||||
# Separate called targets depending on type.
|
||||
INIT_TARGETS := $(filter $(ALL_INIT_TARGETS), $(CALLED_SPEC_TARGETS))
|
||||
MAIN_TARGETS := $(filter $(ALL_MAIN_TARGETS), $(CALLED_SPEC_TARGETS))
|
||||
@ -162,19 +162,19 @@ ifneq ($(SKIP_SPEC), true)
|
||||
( cd $(TOPDIR) && \
|
||||
$(foreach spec, $(SPECS), \
|
||||
$(MAKE) $(MAKE_INIT_ARGS) -j 1 -f $(TOPDIR)/make/Init.gmk \
|
||||
SPEC=$(spec) $(MAKE_INIT_MAIN_TARGET_ARGS) \
|
||||
main && \
|
||||
SPEC=$(spec) TOPDIR_ALT=$(TOPDIR) \
|
||||
$(MAKE_INIT_MAIN_TARGET_ARGS) main && \
|
||||
$(if $(and $(COMPARE_BUILD), $(PARALLEL_TARGETS)), \
|
||||
$(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk \
|
||||
SPEC=$(spec) \
|
||||
SPEC=$(spec) TOPDIR_ALT=$(TOPDIR) \
|
||||
COMPARE_BUILD="$(COMPARE_BUILD)" \
|
||||
pre-compare-build && \
|
||||
$(MAKE) $(MAKE_INIT_ARGS) -j 1 -f $(TOPDIR)/make/Init.gmk \
|
||||
SPEC=$(spec) $(MAKE_INIT_MAIN_TARGET_ARGS) \
|
||||
SPEC=$(spec) TOPDIR_ALT=$(TOPDIR) \
|
||||
COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" \
|
||||
main && \
|
||||
$(MAKE_INIT_MAIN_TARGET_ARGS) main && \
|
||||
$(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk \
|
||||
SPEC=$(spec) \
|
||||
SPEC=$(spec) TOPDIR_ALT=$(TOPDIR) \
|
||||
COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" \
|
||||
post-compare-build && \
|
||||
) \
|
||||
|
||||
@ -94,18 +94,6 @@ define CheckControlVariables
|
||||
endif
|
||||
endef
|
||||
|
||||
# Check for deprecated ALT_ variables
|
||||
define CheckDeprecatedEnvironment
|
||||
defined_alt_variables := $$(filter ALT_%, $$(.VARIABLES))
|
||||
ifneq ($$(defined_alt_variables), )
|
||||
$$(info Warning: You have the following ALT_ variables set:)
|
||||
$$(foreach var, $$(defined_alt_variables), $$(info * $$(var)=$$($$(var))))
|
||||
$$(info ALT_ variables are deprecated, and may result in a failed build.)
|
||||
$$(info Please clean your environment.)
|
||||
$$(info )
|
||||
endif
|
||||
endef
|
||||
|
||||
# Check for invalid make flags like -j
|
||||
define CheckInvalidMakeFlags
|
||||
# This is a trick to get this rule to execute before any other rules
|
||||
@ -262,13 +250,14 @@ endef
|
||||
# Param 1: FORCE = force generation of main-targets.gmk or LAZY = do not force.
|
||||
# Param 2: The SPEC file to use.
|
||||
define DefineMainTargets
|
||||
SPEC_FILE := $(strip $2)
|
||||
|
||||
# We will start by making sure the main-targets.gmk file is removed, if
|
||||
# make has not been restarted. By the -include, we will trigger the
|
||||
# rule for generating the file (which is never there since we removed it),
|
||||
# thus generating it fresh, and make will restart, incrementing the restart
|
||||
# count.
|
||||
main_targets_file := $$(dir $(strip $2))make-support/main-targets.gmk
|
||||
main_targets_file := $$(dir $$(SPEC_FILE))make-support/main-targets.gmk
|
||||
|
||||
ifeq ($$(MAKE_RESTARTS), )
|
||||
# Only do this if make has not been restarted, and if we do not force it.
|
||||
@ -279,8 +268,12 @@ define DefineMainTargets
|
||||
|
||||
$$(main_targets_file):
|
||||
@( cd $$(TOPDIR) && \
|
||||
$$(MAKE) $$(MAKE_LOG_FLAGS) -r -R -f $$(TOPDIR)/make/Main.gmk \
|
||||
-I $$(TOPDIR)/make/common SPEC=$(strip $2) NO_RECIPES=true \
|
||||
$$(MAKE) $$(MAKE_LOG_FLAGS) -s -r -R -f $$(TOPDIR)/make/GenerateFindTests.gmk \
|
||||
-I $$(TOPDIR)/make/common SPEC=$$(SPEC_FILE) TOPDIR_ALT=$$(TOPDIR))
|
||||
@( cd $$(TOPDIR) && \
|
||||
$$(MAKE) $$(MAKE_LOG_FLAGS) -s -r -R -f $$(TOPDIR)/make/Main.gmk \
|
||||
-I $$(TOPDIR)/make/common SPEC=$$(SPEC_FILE) TOPDIR_ALT=$$(TOPDIR) \
|
||||
UPDATE_MODULE_DEPS=true NO_RECIPES=true \
|
||||
$$(MAKE_LOG_VARS) \
|
||||
create-main-targets-include )
|
||||
|
||||
|
||||
@ -75,9 +75,6 @@ endif
|
||||
|
||||
# This is the JDK that we will test
|
||||
JDK_UNDER_TEST := $(JDK_IMAGE_DIR)
|
||||
# The JDK used to compile jtreg test code. By default it is the same as
|
||||
# JDK_UNDER_TEST.
|
||||
JDK_FOR_COMPILE := $(JDK_IMAGE_DIR)
|
||||
|
||||
TEST_RESULTS_DIR := $(OUTPUTDIR)/test-results
|
||||
TEST_SUPPORT_DIR := $(OUTPUTDIR)/test-support
|
||||
@ -118,6 +115,7 @@ JTREG_COV_OPTIONS :=
|
||||
|
||||
ifeq ($(TEST_OPTS_JCOV), true)
|
||||
JCOV_OUTPUT_DIR := $(TEST_RESULTS_DIR)/jcov-output
|
||||
JCOV_SUPPORT_DIR := $(TEST_SUPPORT_DIR)/jcov-support
|
||||
JCOV_GRABBER_LOG := $(JCOV_OUTPUT_DIR)/grabber.log
|
||||
JCOV_RESULT_FILE := $(JCOV_OUTPUT_DIR)/result.xml
|
||||
JCOV_REPORT := $(JCOV_OUTPUT_DIR)/report
|
||||
@ -206,8 +204,9 @@ $(eval $(call SetTestOpt,AOT_JDK,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 AOT_JDK $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
|
||||
TEST_MODE ASSERT VERBOSE RETAIN TEST_THREAD_FACTORY JVMTI_STRESS_AGENT \
|
||||
MAX_MEM RUN_PROBLEM_LISTS RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT \
|
||||
AOT_JDK $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
|
||||
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
|
||||
EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS \
|
||||
$(CUSTOM_JTREG_STRING_KEYWORDS), \
|
||||
@ -510,7 +509,7 @@ define SetupRunGtestTestBody
|
||||
$$(call LogWarn)
|
||||
$$(call LogWarn, Running test '$$($1_TEST)')
|
||||
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/gtest, ( \
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/gtest, \
|
||||
$$(CD) $$($1_TEST_SUPPORT_DIR) && \
|
||||
$$(FIXPATH) $$(TEST_IMAGE_DIR)/hotspot/gtest/$$($1_VARIANT)/gtestLauncher \
|
||||
-jdk $(JDK_UNDER_TEST) $$($1_GTEST_FILTER) \
|
||||
@ -521,7 +520,7 @@ define SetupRunGtestTestBody
|
||||
> >($(TEE) $$($1_TEST_RESULTS_DIR)/gtest.txt) \
|
||||
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||
))
|
||||
)
|
||||
|
||||
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/gtest.txt
|
||||
|
||||
@ -530,21 +529,33 @@ define SetupRunGtestTestBody
|
||||
$$(call LogWarn, Test report is stored in $$(strip \
|
||||
$$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR))))
|
||||
$$(if $$(wildcard $$($1_RESULT_FILE)), \
|
||||
$$(eval $1_TOTAL := $$(shell $$(AWK) '/==========.* tests? from .* \
|
||||
test (cases?|suites?) ran/ { print $$$$2 }' $$($1_RESULT_FILE))) \
|
||||
$$(if $$($1_TOTAL), , $$(eval $1_TOTAL := 0)) \
|
||||
$$(eval $1_RUN := $$(shell $$(AWK) \
|
||||
'/==========.* tests? from .* test (cases?|suites?) ran/ { print $$$$2 }' \
|
||||
$$($1_RESULT_FILE))) \
|
||||
$$(if $$($1_RUN), , $$(eval $1_RUN := 0)) \
|
||||
$$(eval $1_PASSED := $$(shell $$(AWK) '/\[ PASSED \] .* tests?./ \
|
||||
{ print $$$$4 }' $$($1_RESULT_FILE))) \
|
||||
$$(if $$($1_PASSED), , $$(eval $1_PASSED := 0)) \
|
||||
$$(eval $1_GTEST_DISABLED := $$(shell $$(AWK) '/YOU HAVE .* DISABLED TEST/ \
|
||||
{ print $$$$3 }' $$($1_RESULT_FILE))) \
|
||||
$$(if $$($1_GTEST_DISABLED), , $$(eval $1_GTEST_DISABLED := 0)) \
|
||||
$$(eval $1_GTEST_SKIPPED := $$(shell $$(AWK) '/\[ SKIPPED \] .* tests?.*/ \
|
||||
{ print $$$$4 }' $$($1_RESULT_FILE))) \
|
||||
$$(if $$($1_GTEST_SKIPPED), , $$(eval $1_GTEST_SKIPPED := 0)) \
|
||||
$$(eval $1_SKIPPED := $$(shell \
|
||||
$$(EXPR) $$($1_GTEST_DISABLED) + $$($1_GTEST_SKIPPED))) \
|
||||
$$(eval $1_FAILED := $$(shell $$(AWK) '/\[ FAILED \] .* tests?, \
|
||||
listed below/ { print $$$$4 }' $$($1_RESULT_FILE))) \
|
||||
$$(if $$($1_FAILED), , $$(eval $1_FAILED := 0)) \
|
||||
$$(eval $1_ERROR := $$(shell \
|
||||
$$(EXPR) $$($1_TOTAL) - $$($1_PASSED) - $$($1_FAILED))) \
|
||||
$$(EXPR) $$($1_RUN) - $$($1_PASSED) - $$($1_FAILED) - $$($1_GTEST_SKIPPED))) \
|
||||
$$(eval $1_TOTAL := $$(shell \
|
||||
$$(EXPR) $$($1_RUN) + $$($1_GTEST_DISABLED))) \
|
||||
, \
|
||||
$$(eval $1_PASSED := 0) \
|
||||
$$(eval $1_FAILED := 0) \
|
||||
$$(eval $1_ERROR := 1) \
|
||||
$$(eval $1_SKIPPED := 0) \
|
||||
$$(eval $1_TOTAL := 1) \
|
||||
)
|
||||
|
||||
@ -573,6 +584,8 @@ define SetMicroValue
|
||||
else
|
||||
ifneq ($3, )
|
||||
$1_$2 := $3
|
||||
else
|
||||
$1_$2 :=
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
@ -631,7 +644,7 @@ define SetupRunMicroTestBody
|
||||
$$(call LogWarn)
|
||||
$$(call LogWarn, Running test '$$($1_TEST)')
|
||||
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/micro, ( \
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/micro, \
|
||||
$$(CD) $$(TEST_IMAGE_DIR) && \
|
||||
$$(FIXPATH) $$($1_MICRO_TEST_JDK)/bin/java $$($1_MICRO_JAVA_OPTIONS) \
|
||||
-jar $$($1_MICRO_BENCHMARKS_JAR) \
|
||||
@ -642,7 +655,7 @@ define SetupRunMicroTestBody
|
||||
> >($(TEE) $$($1_TEST_RESULTS_DIR)/micro.txt) \
|
||||
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||
))
|
||||
)
|
||||
|
||||
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/micro.txt
|
||||
|
||||
@ -668,6 +681,7 @@ define SetupRunMicroTestBody
|
||||
$$(eval $1_ERROR := 1) \
|
||||
$$(eval $1_TOTAL := 1) \
|
||||
)
|
||||
$$(eval $1_SKIPPED := 0)
|
||||
|
||||
$1: run-test-$1 parse-test-$1
|
||||
|
||||
@ -698,63 +712,87 @@ define SetJtregValue
|
||||
else
|
||||
ifneq ($3, )
|
||||
$1_$2 := $3
|
||||
else
|
||||
$1_$2 :=
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# Helper function for creating a customized AOT cache for running tests
|
||||
################################################################################
|
||||
|
||||
# Parameter 1 is the name of the rule.
|
||||
#
|
||||
# Remaining parameters are named arguments.
|
||||
# TRAINING The AOT training mode: onestep or twostep
|
||||
# VM_OPTIONS List of JVM arguments to use when creating AOT cache
|
||||
#
|
||||
# After calling this, the following variables are defined
|
||||
# $1_AOT_TARGETS List of all targets that the test rule will need to depend on
|
||||
# $1_AOT_JDK_CACHE The AOT cache file to be used to run the test with
|
||||
#
|
||||
SetupAot = $(NamedParamsMacroTemplate)
|
||||
define SetupAotBody
|
||||
$1_AOT_JDK_CONF := $$($1_TEST_SUPPORT_DIR)/aot/jdk.aotconf
|
||||
$1_AOT_JDK_CACHE := $$($1_TEST_SUPPORT_DIR)/aot/jdk.aotcache
|
||||
SetupAOT = $(NamedParamsMacroTemplate)
|
||||
define SetupAOTBody
|
||||
$1_AOT_JDK_OUTPUT_DIR := $$($1_TEST_SUPPORT_DIR)/aot
|
||||
$1_AOT_JDK_CONF := $$($1_AOT_JDK_OUTPUT_DIR)/jdk.aotconf
|
||||
$1_AOT_JDK_CACHE := $$($1_AOT_JDK_OUTPUT_DIR)/jdk.aotcache
|
||||
$1_AOT_JDK_LOG := $$($1_AOT_JDK_OUTPUT_DIR)/TestSetupAOT.log
|
||||
|
||||
$1_JAVA_TOOL_OPTS := $$(addprefix -J, $$($1_VM_OPTIONS))
|
||||
# We execute the training run with the TestSetupAOT class from $(TEST_IMAGE_DIR)/setup_aot/TestSetupAOT.jar
|
||||
# to touch a fair number of classes inside the JDK. Note that we can't specify a classpath,
|
||||
# or else the AOT cache cannot be used with jtreg test cases that use a different value
|
||||
# for their classpaths. Instead, we cd in the $$($1_AOT_JDK_OUTPUT_DIR) directory,
|
||||
# extract the TestSetupAOT.jar there, and run in that directory without specifying a classpath.
|
||||
# The "java" launcher will have an implicit classpath of ".", so it can pick up the TestSetupAOT
|
||||
# class from the JVM's current directory.
|
||||
#
|
||||
# The TestSetupAOT class (or any other classes that are loaded from ".") will be excluded
|
||||
# from the the AOT cache as "." is an unsupported location. As a result, the AOT cache will contain
|
||||
# only classes from the JDK.
|
||||
|
||||
$$($1_AOT_JDK_CACHE): $$(JDK_IMAGE_DIR)/release
|
||||
$$(call MakeDir, $$($1_TEST_SUPPORT_DIR)/aot)
|
||||
$$(call MakeDir, $$($1_AOT_JDK_OUTPUT_DIR))
|
||||
|
||||
$(foreach jtool, javac javap jlink jar, \
|
||||
$(info AOT: Create cache configuration for $(jtool)) \
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot.$(jtool), ( \
|
||||
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/$(jtool) $$($1_JAVA_TOOL_OPTS) \
|
||||
-J-XX:AOTMode=record -J-XX:AOTConfiguration=$$($1_AOT_JDK_CONF).$(jtool) --help \
|
||||
))
|
||||
)
|
||||
ifeq ($$($1_TRAINING), onestep)
|
||||
|
||||
$$(info AOT: Copy $(JDK_UNDER_TEST)/lib/classlist to $$($1_AOT_JDK_CONF).jdk )
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot, ( \
|
||||
$$(FIXPATH) $(CP) $(JDK_UNDER_TEST)/lib/classlist $$($1_AOT_JDK_CONF).jdk \
|
||||
))
|
||||
$$(call LogWarn, AOT: Create AOT cache $$($1_AOT_JDK_CACHE) in one step with flags: $$($1_VM_OPTIONS)) \
|
||||
$$(call ExecuteWithLog, $$($1_AOT_JDK_OUTPUT_DIR), \
|
||||
cd $$($1_AOT_JDK_OUTPUT_DIR); \
|
||||
$(JAR) --extract --file $(TEST_IMAGE_DIR)/setup_aot/TestSetupAOT.jar; \
|
||||
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java $$($1_VM_OPTIONS) \
|
||||
-Xlog:class+load$$(COMMA)aot$$(COMMA)aot+class=debug:file=$$($1_AOT_JDK_CACHE).log -Xlog:cds*=error -Xlog:aot*=error \
|
||||
-XX:AOTMode=record -XX:AOTCacheOutput=$$($1_AOT_JDK_CACHE) \
|
||||
TestSetupAOT $$($1_AOT_JDK_OUTPUT_DIR) > $$($1_AOT_JDK_LOG) \
|
||||
)
|
||||
|
||||
$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).* > $$($1_AOT_JDK_CONF).temp
|
||||
$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).temp | $(GREP) -v '#' | $(GREP) -v '@' | $(SORT) | \
|
||||
$(SED) -e 's/id:.*//g' | uniq \
|
||||
> $$($1_AOT_JDK_CONF)
|
||||
$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).temp | $(GREP) '@cp' | $(SORT) \
|
||||
>> $$($1_AOT_JDK_CONF)
|
||||
else
|
||||
|
||||
$$(info AOT: Generate AOT cache $$($1_AOT_JDK_CACHE) with flags: $$($1_VM_OPTIONS))
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot, ( \
|
||||
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java \
|
||||
$$($1_VM_OPTIONS) -Xlog:cds,cds+class=debug:file=$$($1_AOT_JDK_CACHE).log \
|
||||
-XX:AOTMode=create -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) -XX:AOTCache=$$($1_AOT_JDK_CACHE) \
|
||||
))
|
||||
$$(call LogWarn, AOT: Create cache configuration) \
|
||||
$$(call ExecuteWithLog, $$($1_AOT_JDK_OUTPUT_DIR), \
|
||||
cd $$($1_AOT_JDK_OUTPUT_DIR); \
|
||||
$(JAR) --extract --file $(TEST_IMAGE_DIR)/setup_aot/TestSetupAOT.jar; \
|
||||
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java $$($1_VM_OPTIONS) \
|
||||
-Xlog:class+load$$(COMMA)aot$$(COMMA)aot+class=debug:file=$$($1_AOT_JDK_CONF).log -Xlog:cds*=error -Xlog:aot*=error \
|
||||
-XX:AOTMode=record -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) \
|
||||
TestSetupAOT $$($1_AOT_JDK_OUTPUT_DIR) > $$($1_AOT_JDK_LOG) \
|
||||
)
|
||||
|
||||
$$(call LogWarn, AOT: Generate AOT cache $$($1_AOT_JDK_CACHE) with flags: $$($1_VM_OPTIONS))
|
||||
$$(call ExecuteWithLog, $$($1_AOT_JDK_OUTPUT_DIR), \
|
||||
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java \
|
||||
$$($1_VM_OPTIONS) -Xlog:aot$$(COMMA)aot+class=debug:file=$$($1_AOT_JDK_CACHE).log -Xlog:cds*=error -Xlog:aot*=error \
|
||||
-XX:ExtraSharedClassListFile=$(JDK_UNDER_TEST)/lib/classlist \
|
||||
-XX:AOTMode=create -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) -XX:AOTCache=$$($1_AOT_JDK_CACHE) \
|
||||
)
|
||||
|
||||
endif
|
||||
|
||||
$1_AOT_TARGETS += $$($1_AOT_JDK_CACHE)
|
||||
|
||||
endef
|
||||
|
||||
|
||||
SetupRunJtregTest = $(NamedParamsMacroTemplate)
|
||||
define SetupRunJtregTestBody
|
||||
$1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1
|
||||
@ -815,7 +853,7 @@ define SetupRunJtregTestBody
|
||||
JTREG_RETRY_COUNT ?= 0
|
||||
JTREG_REPEAT_COUNT ?= 0
|
||||
JTREG_REPORT ?= files
|
||||
JTREG_AOT_JDK ?= false
|
||||
JTREG_AOT_JDK ?= none
|
||||
|
||||
ifneq ($$(JTREG_RETRY_COUNT), 0)
|
||||
ifneq ($$(JTREG_REPEAT_COUNT), 0)
|
||||
@ -825,6 +863,12 @@ define SetupRunJtregTestBody
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($$(JTREG_RUN_PROBLEM_LISTS), true)
|
||||
JTREG_PROBLEM_LIST_PREFIX := -match:
|
||||
else
|
||||
JTREG_PROBLEM_LIST_PREFIX := -exclude:
|
||||
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)
|
||||
@ -833,6 +877,15 @@ define SetupRunJtregTestBody
|
||||
))
|
||||
endif
|
||||
|
||||
ifneq ($$(JTREG_JVMTI_STRESS_AGENT), )
|
||||
AGENT := $$(LIBRARY_PREFIX)JvmtiStressAgent$$(SHARED_LIBRARY_SUFFIX)=$$(JTREG_JVMTI_STRESS_AGENT)
|
||||
$1_JTREG_BASIC_OPTIONS += -javaoption:'-agentpath:$(TEST_IMAGE_DIR)/hotspot/jtreg/native/$$(AGENT)'
|
||||
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
|
||||
$$(addprefix $$($1_TEST_ROOT)/, ProblemList-jvmti-stress-agent.txt) \
|
||||
))
|
||||
endif
|
||||
|
||||
|
||||
ifneq ($$(JTREG_LAUNCHER_OPTIONS), )
|
||||
$1_JTREG_LAUNCHER_OPTIONS += $$(JTREG_LAUNCHER_OPTIONS)
|
||||
endif
|
||||
@ -853,7 +906,7 @@ define SetupRunJtregTestBody
|
||||
# version of the JDK.
|
||||
$1_JTREG_BASIC_OPTIONS += -$$($1_JTREG_TEST_MODE) \
|
||||
-verbose:$$(JTREG_VERBOSE) -retain:$$(JTREG_RETAIN) \
|
||||
-concurrency:$$($1_JTREG_JOBS) -timeoutFactor:$$(JTREG_TIMEOUT_FACTOR) \
|
||||
-concurrency:$$($1_JTREG_JOBS) \
|
||||
-vmoption:-XX:MaxRAMPercentage=$$($1_JTREG_MAX_RAM_PERCENTAGE) \
|
||||
-vmoption:-Dtest.boot.jdk="$$(BOOT_JDK)" \
|
||||
-vmoption:-Djava.io.tmpdir="$$($1_TEST_TMP_DIR)"
|
||||
@ -886,12 +939,6 @@ define SetupRunJtregTestBody
|
||||
$1_JTREG_BASIC_OPTIONS += -nativepath:$$($1_JTREG_NATIVEPATH)
|
||||
endif
|
||||
|
||||
ifeq ($$(JTREG_RUN_PROBLEM_LISTS), true)
|
||||
JTREG_PROBLEM_LIST_PREFIX := -match:
|
||||
else
|
||||
JTREG_PROBLEM_LIST_PREFIX := -exclude:
|
||||
endif
|
||||
|
||||
ifneq ($$($1_JTREG_PROBLEM_LIST), )
|
||||
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$($1_JTREG_PROBLEM_LIST))
|
||||
endif
|
||||
@ -899,6 +946,7 @@ define SetupRunJtregTestBody
|
||||
JTREG_ALL_OPTIONS := $$(JTREG_JAVA_OPTIONS) $$(JTREG_VM_OPTIONS)
|
||||
|
||||
JTREG_AUTO_PROBLEM_LISTS :=
|
||||
# Please reach consensus before changing this.
|
||||
JTREG_AUTO_TIMEOUT_FACTOR := 4
|
||||
|
||||
ifneq ($$(findstring -Xcomp, $$(JTREG_ALL_OPTIONS)), )
|
||||
@ -914,6 +962,11 @@ define SetupRunJtregTestBody
|
||||
JTREG_AUTO_PROBLEM_LISTS += ProblemList-shenandoah.txt
|
||||
endif
|
||||
|
||||
ifneq ($$(findstring --enable-preview, $$(JTREG_ALL_OPTIONS)), )
|
||||
JTREG_AUTO_PROBLEM_LISTS += ProblemList-enable-preview.txt
|
||||
endif
|
||||
|
||||
|
||||
ifneq ($$(JTREG_EXTRA_PROBLEM_LISTS), )
|
||||
# Accept both absolute paths as well as relative to the current test root.
|
||||
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
|
||||
@ -926,6 +979,11 @@ define SetupRunJtregTestBody
|
||||
$1_JTREG_BASIC_OPTIONS += -e:JIB_HOME=$$(JIB_HOME)
|
||||
endif
|
||||
|
||||
ifneq ($$(JDK_FOR_COMPILE), )
|
||||
# Allow overriding the JDK used for compilation from the command line
|
||||
$1_JTREG_BASIC_OPTIONS += -compilejdk:$$(JDK_FOR_COMPILE)
|
||||
endif
|
||||
|
||||
$1_JTREG_BASIC_OPTIONS += -e:TEST_IMAGE_DIR=$(TEST_IMAGE_DIR)
|
||||
|
||||
$1_JTREG_BASIC_OPTIONS += -e:DOCS_JDK_IMAGE_DIR=$$(DOCS_JDK_IMAGE_DIR)
|
||||
@ -945,13 +1003,12 @@ define SetupRunJtregTestBody
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($$(JTREG_AOT_JDK), true)
|
||||
$$(info Add AOT target for $1)
|
||||
$$(eval $$(call SetupAot, $1, VM_OPTIONS := $$(JTREG_ALL_OPTIONS) ))
|
||||
|
||||
$$(info AOT_TARGETS=$$($1_AOT_TARGETS))
|
||||
$$(info AOT_JDK_CACHE=$$($1_AOT_JDK_CACHE))
|
||||
|
||||
ifneq ($$(filter $$(JTREG_AOT_JDK), onestep twostep), )
|
||||
$$(call LogWarn, Add AOT target for $1)
|
||||
$$(eval $$(call SetupAOT, $1, \
|
||||
TRAINING := $$(JTREG_AOT_JDK), \
|
||||
VM_OPTIONS := $$(JTREG_ALL_OPTIONS) ))
|
||||
$$(call LogWarn, AOT_JDK_CACHE=$$($1_AOT_JDK_CACHE))
|
||||
$1_JTREG_BASIC_OPTIONS += -vmoption:-XX:AOTCache="$$($1_AOT_JDK_CACHE)"
|
||||
endif
|
||||
|
||||
@ -969,6 +1026,7 @@ define SetupRunJtregTestBody
|
||||
endif
|
||||
|
||||
JTREG_TIMEOUT_FACTOR ?= $$(JTREG_AUTO_TIMEOUT_FACTOR)
|
||||
$1_JTREG_BASIC_OPTIONS += -timeoutFactor:$$(JTREG_TIMEOUT_FACTOR)
|
||||
|
||||
clean-outputdirs-$1:
|
||||
$$(call LogWarn, Clean up dirs for $1)
|
||||
@ -979,7 +1037,6 @@ define SetupRunJtregTestBody
|
||||
$$(JTREG_JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \
|
||||
-Dprogram=jtreg -jar $$(JT_HOME)/lib/jtreg.jar \
|
||||
$$($1_JTREG_BASIC_OPTIONS) \
|
||||
-compilejdk:$$(JDK_FOR_COMPILE) \
|
||||
-testjdk:$$(JDK_UNDER_TEST) \
|
||||
-dir:$$(JTREG_TOPDIR) \
|
||||
-reportDir:$$($1_TEST_RESULTS_DIR) \
|
||||
@ -998,7 +1055,8 @@ define SetupRunJtregTestBody
|
||||
$1_COMMAND_LINE := \
|
||||
for i in {0..$$(JTREG_RETRY_COUNT)}; do \
|
||||
if [ "$$$$i" != 0 ]; then \
|
||||
$$(PRINTF) "\nRetrying Jtreg run. Attempt: $$$$i\n"; \
|
||||
$$(ECHO) ""; \
|
||||
$$(ECHO) "Retrying Jtreg run. Attempt: $$$$i"; \
|
||||
fi; \
|
||||
$$($1_COMMAND_LINE); \
|
||||
if [ "`$$(CAT) $$($1_EXITCODE)`" = "0" ]; then \
|
||||
@ -1011,10 +1069,12 @@ define SetupRunJtregTestBody
|
||||
ifneq ($$(JTREG_REPEAT_COUNT), 0)
|
||||
$1_COMMAND_LINE := \
|
||||
for i in {1..$$(JTREG_REPEAT_COUNT)}; do \
|
||||
$$(PRINTF) "\nRepeating Jtreg run: $$$$i out of $$(JTREG_REPEAT_COUNT)\n"; \
|
||||
$$(ECHO) ""; \
|
||||
$$(ECHO) "Repeating Jtreg run: $$$$i out of $$(JTREG_REPEAT_COUNT)"; \
|
||||
$$($1_COMMAND_LINE); \
|
||||
if [ "`$$(CAT) $$($1_EXITCODE)`" != "0" ]; then \
|
||||
$$(PRINTF) "\nFailures detected, no more repeats.\n"; \
|
||||
$$(ECHO) ""; \
|
||||
$$(ECHO) "Failures detected, no more repeats."; \
|
||||
break; \
|
||||
fi; \
|
||||
done
|
||||
@ -1025,9 +1085,9 @@ define SetupRunJtregTestBody
|
||||
$$(call LogWarn, Running test '$$($1_TEST)')
|
||||
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR) \
|
||||
$$($1_TEST_TMP_DIR))
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/jtreg, ( \
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/jtreg, \
|
||||
$$(COV_ENVIRONMENT) $$($1_COMMAND_LINE) \
|
||||
))
|
||||
)
|
||||
|
||||
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/text/stats.txt
|
||||
|
||||
@ -1035,23 +1095,64 @@ define SetupRunJtregTestBody
|
||||
$$(call LogWarn, Finished running test '$$($1_TEST)')
|
||||
$$(call LogWarn, Test report is stored in $$(strip \
|
||||
$$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR))))
|
||||
|
||||
# Read jtreg documentation to learn on the test stats categories:
|
||||
# https://github.com/openjdk/jtreg/blob/master/src/share/doc/javatest/regtest/faq.md#what-do-all-those-numbers-in-the-test-results-line-mean
|
||||
# In jtreg, "skipped:" category accounts for tests that threw jtreg.SkippedException at runtime.
|
||||
# At the same time these tests contribute to "passed:" tests.
|
||||
# In here we don't want that and so we substract number of "skipped:" from "passed:".
|
||||
|
||||
$$(if $$(wildcard $$($1_RESULT_FILE)), \
|
||||
$$(eval $1_PASSED := $$(shell $$(AWK) '{ gsub(/[,;]/, ""); \
|
||||
$$(eval $1_PASSED_AND_RUNTIME_SKIPPED := $$(shell $$(AWK) '{ gsub(/[,;]/, ""); \
|
||||
for (i=1; i<=NF; i++) { if ($$$$i == "passed:") \
|
||||
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \
|
||||
$$(if $$($1_PASSED), , $$(eval $1_PASSED := 0)) \
|
||||
$$(if $$($1_PASSED_AND_RUNTIME_SKIPPED), , $$(eval $1_PASSED_AND_RUNTIME_SKIPPED := 0)) \
|
||||
$$(eval $1_FAILED := $$(shell $$(AWK) '{gsub(/[,;]/, ""); \
|
||||
for (i=1; i<=NF; i++) { if ($$$$i == "failed:") \
|
||||
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \
|
||||
$$(if $$($1_FAILED), , $$(eval $1_FAILED := 0)) \
|
||||
$$(eval $1_RUNTIME_SKIPPED := $$(shell $$(AWK) '{gsub(/[,;]/, ""); \
|
||||
for (i=1; i<=NF; i++) { if ($$$$i == "skipped:") \
|
||||
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \
|
||||
$$(if $$($1_RUNTIME_SKIPPED), , $$(eval $1_RUNTIME_SKIPPED := 0)) \
|
||||
$$(eval $1_SKIPPED := $$(shell \
|
||||
$$(AWK) \
|
||||
'BEGIN { \
|
||||
overall_skipped = 0; \
|
||||
patterns[1] = "skipped"; \
|
||||
patterns[2] = "excluded"; \
|
||||
patterns[3] = "not in match-list"; \
|
||||
patterns[4] = "did not match keywords"; \
|
||||
patterns[5] = "did not meet module requirements"; \
|
||||
patterns[6] = "did not meet platform requirements"; \
|
||||
patterns[7] = "did not match prior status"; \
|
||||
patterns[8] = "did not meet time-limit requirements"; \
|
||||
} { \
|
||||
split($$$$0, arr, ";"); \
|
||||
for (item in arr) { \
|
||||
for (p in patterns) { \
|
||||
if (match(arr[item], patterns[p] ": [0-9]+")) { \
|
||||
overall_skipped += substr(arr[item], RSTART + length(patterns[p]) + 2, RLENGTH); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
print overall_skipped; \
|
||||
}' \
|
||||
$$($1_RESULT_FILE) \
|
||||
)) \
|
||||
$$(eval $1_ERROR := $$(shell $$(AWK) '{gsub(/[,;]/, ""); \
|
||||
for (i=1; i<=NF; i++) { if ($$$$i == "error:") \
|
||||
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \
|
||||
$$(if $$($1_ERROR), , $$(eval $1_ERROR := 0)) \
|
||||
\
|
||||
$$(eval $1_PASSED := $$(shell \
|
||||
$$(EXPR) $$($1_PASSED_AND_RUNTIME_SKIPPED) - $$($1_RUNTIME_SKIPPED))) \
|
||||
$$(eval $1_TOTAL := $$(shell \
|
||||
$$(EXPR) $$($1_PASSED) + $$($1_FAILED) + $$($1_ERROR))) \
|
||||
$$(EXPR) $$($1_PASSED) + $$($1_FAILED) + $$($1_ERROR) + $$($1_SKIPPED))) \
|
||||
, \
|
||||
$$(eval $1_PASSED := 0) \
|
||||
$$(eval $1_PASSED_AND_RUNTIME_SKIPPED := 0) \
|
||||
$$(eval $1_RUNTIME_SKIPPED := 0) \
|
||||
$$(eval $1_SKIPPED := 0) \
|
||||
$$(eval $1_FAILED := 0) \
|
||||
$$(eval $1_ERROR := 1) \
|
||||
$$(eval $1_TOTAL := 1) \
|
||||
@ -1103,14 +1204,12 @@ define SetupRunSpecialTestBody
|
||||
$$(call LogWarn)
|
||||
$$(call LogWarn, Running test '$$($1_TEST)')
|
||||
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/test-execution, ( \
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/test-execution, \
|
||||
$$($1_TEST_COMMAND_LINE) \
|
||||
> >($(TEE) $$($1_TEST_RESULTS_DIR)/test-output.txt) \
|
||||
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||
))
|
||||
|
||||
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/gtest.txt
|
||||
)
|
||||
|
||||
# We can not parse the various "special" tests.
|
||||
parse-test-$1: run-test-$1
|
||||
@ -1121,6 +1220,7 @@ define SetupRunSpecialTestBody
|
||||
$$(eval $1_PASSED := $$(shell \
|
||||
if [ `$(CAT) $$($1_EXITCODE)` = "0" ]; then $(ECHO) 1; else $(ECHO) 0; fi \
|
||||
))
|
||||
$$(eval $1_SKIPPED := 0)
|
||||
$$(eval $1_FAILED := $$(shell \
|
||||
if [ `$(CAT) $$($1_EXITCODE)` = "0" ]; then $(ECHO) 0; else $(ECHO) 1; fi \
|
||||
))
|
||||
@ -1154,7 +1254,7 @@ UseSpecialTestHandler = \
|
||||
# Now process each test to run and setup a proper make rule
|
||||
$(foreach test, $(TESTS_TO_RUN), \
|
||||
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
|
||||
$(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \
|
||||
$(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \
|
||||
$(eval ALL_TEST_IDS += $(TEST_ID)) \
|
||||
$(if $(call UseCustomTestHandler, $(test)), \
|
||||
$(eval $(call SetupRunCustomTest, $(TEST_ID), \
|
||||
@ -1230,28 +1330,28 @@ run-test-report: post-run-test
|
||||
$(ECHO) >> $(TEST_SUMMARY) ==============================
|
||||
$(ECHO) >> $(TEST_SUMMARY) Test summary
|
||||
$(ECHO) >> $(TEST_SUMMARY) ==============================
|
||||
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5s %5s %5s %5s %2s\n" " " \
|
||||
TEST TOTAL PASS FAIL ERROR " "
|
||||
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5s %5s %5s %5s %5s %2s\n" " " \
|
||||
TEST TOTAL PASS FAIL ERROR SKIP " "
|
||||
$(foreach test, $(TESTS_TO_RUN), \
|
||||
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
|
||||
$(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \
|
||||
$(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \
|
||||
$(ECHO) >> $(TEST_LAST_IDS) $(TEST_ID) $(NEWLINE) \
|
||||
$(eval NAME_PATTERN := $(shell $(ECHO) $(test) | $(TR) -c '\n' '[_*1000]')) \
|
||||
$(eval NAME_PATTERN := $(shell $(ECHO) $(test) | $(TR) -c '\n' '_')) \
|
||||
$(if $(filter __________________________________________________%, $(NAME_PATTERN)), \
|
||||
$(eval TEST_NAME := ) \
|
||||
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s\n" " " "$(test)" $(NEWLINE) \
|
||||
, \
|
||||
$(eval TEST_NAME := $(test)) \
|
||||
) \
|
||||
$(if $(filter $($(TEST_ID)_PASSED), $($(TEST_ID)_TOTAL)), \
|
||||
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %2s\n" \
|
||||
" " "$(TEST_NAME)" $($(TEST_ID)_TOTAL) $($(TEST_ID)_PASSED) \
|
||||
$($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) " " $(NEWLINE) \
|
||||
, \
|
||||
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %2s\n" \
|
||||
$(if $(filter-out 0, $($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR)), \
|
||||
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %5d %2s\n" \
|
||||
">>" "$(TEST_NAME)" $($(TEST_ID)_TOTAL) $($(TEST_ID)_PASSED) \
|
||||
$($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) "<<" $(NEWLINE) \
|
||||
$($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) $($(TEST_ID)_SKIPPED) "<<" $(NEWLINE) \
|
||||
$(eval TEST_FAILURE := true) \
|
||||
, \
|
||||
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %5d %2s\n" \
|
||||
" " "$(TEST_NAME)" $($(TEST_ID)_TOTAL) $($(TEST_ID)_PASSED) \
|
||||
$($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) $($(TEST_ID)_SKIPPED) " " $(NEWLINE) \
|
||||
) \
|
||||
)
|
||||
$(ECHO) >> $(TEST_SUMMARY) ==============================
|
||||
@ -1277,12 +1377,14 @@ TARGETS += run-all-tests pre-run-test post-run-test run-test-report run-test
|
||||
|
||||
ifeq ($(TEST_OPTS_JCOV), true)
|
||||
|
||||
JCOV_VM_OPTS := -Xmx4g -Djdk.xml.totalEntitySizeLimit=0 -Djdk.xml.maxGeneralEntitySizeLimit=0
|
||||
|
||||
jcov-do-start-grabber:
|
||||
$(call MakeDir, $(JCOV_OUTPUT_DIR))
|
||||
if $(JAVA) -jar $(JCOV_HOME)/lib/jcov.jar GrabberManager -status 1>/dev/null 2>&1 ; then \
|
||||
$(JAVA) -jar $(JCOV_HOME)/lib/jcov.jar GrabberManager -stop -stoptimeout 3600 ; \
|
||||
fi
|
||||
$(JAVA) -Xmx4g -jar $(JCOV_HOME)/lib/jcov.jar Grabber -v -t \
|
||||
$(JAVA) $(JCOV_VM_OPTS) -jar $(JCOV_HOME)/lib/jcov.jar Grabber -v -t \
|
||||
$(JCOV_IMAGE_DIR)/template.xml -o $(JCOV_RESULT_FILE) \
|
||||
1>$(JCOV_GRABBER_LOG) 2>&1 &
|
||||
|
||||
@ -1295,6 +1397,10 @@ ifeq ($(TEST_OPTS_JCOV), true)
|
||||
$(JAVA) -jar $(JCOV_HOME)/lib/jcov.jar GrabberManager -stop -stoptimeout 3600
|
||||
|
||||
JCOV_REPORT_TITLE := JDK code coverage report<br/>
|
||||
ifneq ($(JCOV_MODULES), )
|
||||
JCOV_MODULES_FILTER := $(foreach m, $(JCOV_MODULES), -include_module $m)
|
||||
JCOV_REPORT_TITLE += Included modules: $(JCOV_MODULES)<br>
|
||||
endif
|
||||
ifneq ($(JCOV_FILTERS), )
|
||||
JCOV_REPORT_TITLE += Code filters: $(JCOV_FILTERS)<br>
|
||||
endif
|
||||
@ -1302,11 +1408,12 @@ ifeq ($(TEST_OPTS_JCOV), true)
|
||||
|
||||
jcov-gen-report: jcov-stop-grabber
|
||||
$(call LogWarn, Generating JCov report ...)
|
||||
$(JAVA) -Xmx4g -jar $(JCOV_HOME)/lib/jcov.jar RepGen -sourcepath \
|
||||
$(call ExecuteWithLog, $(JCOV_SUPPORT_DIR)/run-jcov-repgen, \
|
||||
$(JAVA) $(JCOV_VM_OPTS) -jar $(JCOV_HOME)/lib/jcov.jar RepGen -sourcepath \
|
||||
`$(ECHO) $(TOPDIR)/src/*/share/classes/ | $(TR) ' ' ':'` -fmt html \
|
||||
$(JCOV_FILTERS) \
|
||||
$(JCOV_MODULES_FILTER) $(JCOV_FILTERS) \
|
||||
-mainReportTitle "$(JCOV_REPORT_TITLE)" \
|
||||
-o $(JCOV_REPORT) $(JCOV_RESULT_FILE)
|
||||
-o $(JCOV_REPORT) $(JCOV_RESULT_FILE))
|
||||
|
||||
TARGETS += jcov-do-start-grabber jcov-start-grabber jcov-stop-grabber \
|
||||
jcov-gen-report
|
||||
@ -1326,7 +1433,7 @@ ifeq ($(TEST_OPTS_JCOV), true)
|
||||
jcov-gen-diffcoverage: jcov-stop-grabber
|
||||
$(call LogWarn, Generating diff coverage with changeset $(TEST_OPTS_JCOV_DIFF_CHANGESET) ... )
|
||||
$(DIFF_COMMAND)
|
||||
$(JAVA) -Xmx4g -jar $(JCOV_HOME)/lib/jcov.jar \
|
||||
$(JAVA) $(JCOV_VM_OPTS) -jar $(JCOV_HOME)/lib/jcov.jar \
|
||||
DiffCoverage -replaceDiff "src/.*/classes/:" -all \
|
||||
$(JCOV_RESULT_FILE) $(JCOV_SOURCE_DIFF) > \
|
||||
$(JCOV_DIFF_COVERAGE_REPORT)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2017, 2025, 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
|
||||
@ -140,7 +140,6 @@ $(eval $(call SetupVariable,JIB_JAR,OPTIONAL))
|
||||
include $(TOPDIR)/make/PreInitSupport.gmk
|
||||
include $(TOPDIR)/make/common/LogUtils.gmk
|
||||
|
||||
$(eval $(call CheckDeprecatedEnvironment))
|
||||
$(eval $(call CheckInvalidMakeFlags))
|
||||
$(eval $(call ParseLogLevel))
|
||||
|
||||
@ -218,9 +217,9 @@ else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
else ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
NUM_CORES := $(NUMBER_OF_PROCESSORS)
|
||||
MEMORY_SIZE := $(shell \
|
||||
$(EXPR) `wmic computersystem get totalphysicalmemory -value \
|
||||
| $(GREP) = | $(SED) 's/\\r//g' \
|
||||
| $(CUT) -d "=" -f 2-` / 1024 / 1024 \
|
||||
$(EXPR) `powershell -Command \
|
||||
"(Get-CimInstance Win32_ComputerSystem).TotalPhysicalMemory" \
|
||||
| $(SED) 's/\\r//g' ` / 1024 / 1024 \
|
||||
)
|
||||
endif
|
||||
ifeq ($(NUM_CORES), )
|
||||
@ -299,7 +298,7 @@ test-prebuilt:
|
||||
@$(RM) -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error
|
||||
# We need to fill the FindTest cache before entering RunTests.gmk.
|
||||
@cd $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) SPEC=$(SPEC) \
|
||||
-f RunTestsPrebuiltFindTests.gmk
|
||||
-f GenerateFindTests.gmk
|
||||
@cd $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test \
|
||||
TEST="$(TEST)"
|
||||
|
||||
|
||||
@ -176,3 +176,19 @@ ULIMIT := ulimit
|
||||
ifeq ($(OPENJDK_BUILD_OS), windows)
|
||||
PATHTOOL := cygpath
|
||||
endif
|
||||
|
||||
# These settings are needed to run testing with jvmti agent
|
||||
ifeq ($(OPENJDK_BUILD_OS), linux)
|
||||
LIBRARY_PREFIX := lib
|
||||
SHARED_LIBRARY_SUFFIX := .so
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_BUILD_OS), windows)
|
||||
LIBRARY_PREFIX :=
|
||||
SHARED_LIBRARY_SUFFIX := .dll
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_BUILD_OS), macosx)
|
||||
LIBRARY_PREFIX := lib
|
||||
SHARED_LIBRARY_SUFFIX := .dylib
|
||||
endif
|
||||
|
||||
@ -55,7 +55,7 @@ ifneq ($(and $(GIT), $(wildcard $(TOPDIR)/.git)), )
|
||||
SCM_DIR := .git
|
||||
ID_COMMAND := $(PRINTF) "git:%s%s\n" \
|
||||
"$$($(GIT) log -n1 --format=%H | cut -c1-12)" \
|
||||
"$$(if test -n "$$($(GIT) status --porcelain)"; then printf '+'; fi)"
|
||||
"$$(if test -n "$$($(GIT) status --porcelain)"; then $(PRINTF) '+'; fi)"
|
||||
endif
|
||||
|
||||
ifeq ($(USE_SCM), true)
|
||||
|
||||
@ -31,6 +31,7 @@ include CopyFiles.gmk
|
||||
include DebugInfoUtils.gmk
|
||||
include Modules.gmk
|
||||
include modules/LauncherCommon.gmk
|
||||
include Execute.gmk
|
||||
|
||||
################################################################################
|
||||
#
|
||||
@ -47,8 +48,8 @@ ifneq ($(word 2, $(wildcard $(HOTSPOT_STATIC_LIB_PATH))), )
|
||||
endif
|
||||
|
||||
# Find all modules with static libraries
|
||||
STATIC_LIB_MODULES := $(patsubst $(SUPPORT_OUTPUTDIR)/modules_static-libs/%, \
|
||||
%, $(wildcard $(SUPPORT_OUTPUTDIR)/modules_static-libs/*))
|
||||
STATIC_LIB_MODULES := $(sort $(patsubst $(SUPPORT_OUTPUTDIR)/modules_static-libs/%, \
|
||||
%, $(wildcard $(SUPPORT_OUTPUTDIR)/modules_static-libs/*)))
|
||||
|
||||
# Filter out known broken libraries. This is a temporary measure until
|
||||
# proper support for these libraries can be provided.
|
||||
@ -68,6 +69,10 @@ else ifeq ($(call isTargetOs, windows), true)
|
||||
BROKEN_STATIC_LIBS += sspi_bridge
|
||||
# dt_shmem define jdwpTransport_OnLoad which conflict with dt_socket
|
||||
BROKEN_STATIC_LIBS += dt_shmem
|
||||
else ifeq ($(call isTargetOs, aix), true)
|
||||
# libsplashscreen has a name conflict with libawt in the function
|
||||
# BitmapToYXBandedRectangles, so we exclude it for now.
|
||||
BROKEN_STATIC_LIBS += splashscreen
|
||||
endif
|
||||
|
||||
$(foreach module, $(STATIC_LIB_MODULES), \
|
||||
@ -99,17 +104,37 @@ else ifeq ($(call isTargetOs, linux), true)
|
||||
STATIC_LIBS := -Wl,--export-dynamic -Wl,--whole-archive $(STATIC_LIB_FILES) -Wl,--no-whole-archive
|
||||
else ifeq ($(call isTargetOs, windows), true)
|
||||
STATIC_LIBS := $(addprefix -wholearchive:, $(STATIC_LIB_FILES))
|
||||
else ifeq ($(call isTargetOs, aix), true)
|
||||
# on AIX we have to generate export files for all static libs, because we have no whole-archive linker flag
|
||||
$(foreach lib, $(STATIC_LIB_FILES), \
|
||||
$(eval $(call SetupExecute, generate_export_list_$(notdir $(lib)), \
|
||||
INFO := Generating export list for $(notdir $(lib)), \
|
||||
DEPS := $(lib), \
|
||||
OUTPUT_FILE := $(lib).exp, \
|
||||
COMMAND := $(AR) $(ARFLAGS) -w $(lib) | $(GREP) -v '^\.' | $(AWK) '{print $$1}' | $(SORT) -u > $(lib).exp, \
|
||||
)) \
|
||||
$(eval STATIC_LIB_EXPORT_FILES += $(lib).exp) \
|
||||
)
|
||||
STATIC_LIBS := -Wl,-bexpfull $(STATIC_LIB_FILES) $(addprefix -Wl$(COMMA)-bE:, $(STATIC_LIB_EXPORT_FILES))
|
||||
ifeq ($(DEBUG_LEVEL), slowdebug)
|
||||
STATIC_LIBS += -Wl,-bbigtoc
|
||||
endif
|
||||
else
|
||||
$(error Unsupported platform)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Build the java static launcher
|
||||
################################################################################
|
||||
$(eval $(call SetupBuildLauncher, java, \
|
||||
ENABLE_ARG_FILES := true, \
|
||||
EXPAND_CLASSPATH_WILDCARDS := true, \
|
||||
EXTRA_RCFLAGS := $(JAVA_RCFLAGS), \
|
||||
VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \
|
||||
OPTIMIZATION := HIGH, \
|
||||
MACOSX_PRIVILEGED := true, \
|
||||
STATIC_LAUNCHER := true, \
|
||||
CFLAGS := -DSTATIC_BUILD, \
|
||||
LDFLAGS := $(LDFLAGS_STATIC_JDK), \
|
||||
LIBS := $(STATIC_LIBS) $(EXTERNAL_LIBS), \
|
||||
LINK_TYPE := C++, \
|
||||
@ -118,12 +143,61 @@ $(eval $(call SetupBuildLauncher, java, \
|
||||
))
|
||||
|
||||
$(java): $(STATIC_LIB_FILES)
|
||||
ifeq ($(call isTargetOs, aix), true)
|
||||
$(java): $(STATIC_LIB_EXPORT_FILES)
|
||||
endif
|
||||
|
||||
TARGETS += $(java)
|
||||
|
||||
JAVA_LAUNCHER := $(BUILD_LAUNCHER_java_TARGET)
|
||||
|
||||
static-launcher: $(java)
|
||||
static-launchers: $(java)
|
||||
|
||||
################################################################################
|
||||
# Build relaunchers (thin wrappers calling the java binary) for all other
|
||||
# JDK launchers.
|
||||
################################################################################
|
||||
|
||||
RELAUNCHER_SRC := $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/launcher
|
||||
|
||||
# $1: The module name
|
||||
# $2: The launcher name
|
||||
define SetupRelauncher
|
||||
$1_$2_LAUNCHER_ARGS_LINE := $$(call ReadFile, $$(SUPPORT_OUTPUTDIR)/static-native/relaunchers/$1/$2-relauncher-arguments.txt)
|
||||
# Restore |||| with space
|
||||
$1_$2_LAUNCHER_ARGS := '{ $$(subst ||||,$(SPACE),$$(strip $$(foreach a, $$($1_$2_LAUNCHER_ARGS_LINE), "-J$$a"$$(COMMA) )) ) }'
|
||||
|
||||
$$(eval $$(call SetupJdkExecutable, BUILD_relauncher_$2, \
|
||||
NAME := $2, \
|
||||
EXTRA_FILES := $$(RELAUNCHER_SRC)/relauncher.c, \
|
||||
CFLAGS := -DLAUNCHER_ARGS=$$($1_$2_LAUNCHER_ARGS), \
|
||||
LIBS_windows := shlwapi.lib, \
|
||||
OUTPUT_DIR := $$(STATIC_LAUNCHER_OUTPUT_DIR), \
|
||||
OBJECT_DIR := $$(STATIC_LAUNCHER_OUTPUT_DIR)/relaunchers/$2, \
|
||||
))
|
||||
|
||||
TARGETS += $$(BUILD_relauncher_$2)
|
||||
|
||||
RELAUNCHERS += $$(BUILD_relauncher_$2_TARGET)
|
||||
static-launchers: $$(BUILD_relauncher_$2)
|
||||
endef
|
||||
|
||||
# Find all modules with launchers
|
||||
LAUNCHER_MODULES := $(sort $(patsubst $(SUPPORT_OUTPUTDIR)/modules_static-launchers/%, \
|
||||
%, $(wildcard $(SUPPORT_OUTPUTDIR)/modules_static-launchers/*)))
|
||||
|
||||
# Find launchers for each module
|
||||
$(foreach module, $(LAUNCHER_MODULES), \
|
||||
$(eval LAUNCHERS_$(module) := $(if $(wildcard \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_static-launchers/$(module)/module-included-launchers.txt), \
|
||||
$(shell cat \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_static-launchers/$(module)/module-included-launchers.txt))) \
|
||||
)
|
||||
|
||||
# For all launchers (except java and javaw), setup a relauncher build
|
||||
$(foreach module, $(LAUNCHER_MODULES), \
|
||||
$(foreach launcher, $(filter-out java javaw, $(LAUNCHERS_$(module))), \
|
||||
$(eval $(call SetupRelauncher,$(module),$(launcher)))))
|
||||
|
||||
################################################################################
|
||||
#
|
||||
@ -165,26 +239,72 @@ TARGETS += $(copy-from-jdk-image)
|
||||
|
||||
$(copy-from-jdk-image): | static-jdk-info
|
||||
|
||||
$(eval $(call SetupCopyFiles, copy-static-launcher, \
|
||||
FILES := $(JAVA_LAUNCHER), \
|
||||
$(eval $(call SetupCopyFiles, copy-static-launchers, \
|
||||
FILES := $(JAVA_LAUNCHER) $(RELAUNCHERS), \
|
||||
DEST := $(STATIC_JDK_IMAGE_DIR)/bin, \
|
||||
))
|
||||
|
||||
TARGETS += $(copy-static-launcher)
|
||||
TARGETS += $(copy-static-launchers)
|
||||
|
||||
$(eval $(call SetupCopyFiles, copy-static-launcher-debuginfo, \
|
||||
$(eval $(call SetupCopyFiles, copy-static-launchers-debuginfo, \
|
||||
SRC := $(STATIC_LAUNCHER_OUTPUT_DIR), \
|
||||
DEST := $(STATIC_JDK_IMAGE_DIR)/bin, \
|
||||
FILES := $(call FindDebuginfoFiles, $(STATIC_LAUNCHER_OUTPUT_DIR)), \
|
||||
))
|
||||
|
||||
TARGETS += $(copy-static-launcher-debuginfo)
|
||||
TARGETS += $(copy-static-launchers-debuginfo)
|
||||
|
||||
static-jdk-image: $(copy-from-jdk-image) $(copy-static-launcher) $(copy-static-launcher-debuginfo)
|
||||
# Copy the microsoft runtime libraries on windows
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
# Chmod to avoid permission issues if bundles are unpacked on unix platforms.
|
||||
# Use separate macro calls in case the source files are not in the same
|
||||
# directory.
|
||||
$(eval $(call SetupCopyFiles, copy-windows-msvcr, \
|
||||
DEST := $(STATIC_JDK_IMAGE_DIR)/bin, \
|
||||
FILES := $(MSVCR_DLL), \
|
||||
MACRO := copy-and-chmod-executable, \
|
||||
))
|
||||
|
||||
TARGETS += $(copy-windows-msvcr)
|
||||
|
||||
$(eval $(call SetupCopyFiles, copy-windows-vcruntime, \
|
||||
DEST := $(STATIC_JDK_IMAGE_DIR)/bin, \
|
||||
FILES := $(VCRUNTIME_1_DLL), \
|
||||
MACRO := copy-and-chmod-executable, \
|
||||
))
|
||||
|
||||
TARGETS += $(copy-windows-vcruntime)
|
||||
|
||||
$(eval $(call SetupCopyFiles, copy-windows-msvcp, \
|
||||
DEST := $(STATIC_JDK_IMAGE_DIR)/bin, \
|
||||
FILES := $(MSVCP_DLL), \
|
||||
MACRO := copy-and-chmod-executable, \
|
||||
))
|
||||
|
||||
TARGETS += $(copy-windows-msvcp)
|
||||
|
||||
copy-windows-libs := $(copy-windows-msvcr) $(copy-windows-vcruntime) $(copy-windows-msvcp)
|
||||
|
||||
ifneq ($(UCRT_DLL_DIR), )
|
||||
$(eval $(call SetupCopyFiles, copy-windows-ucrt, \
|
||||
DEST := $(STATIC_JDK_IMAGE_DIR)/bin, \
|
||||
SRC := $(UCRT_DLL_DIR), \
|
||||
FILES := $(wildcard $(UCRT_DLL_DIR)/*.dll), \
|
||||
MACRO := copy-and-chmod-executable, \
|
||||
))
|
||||
|
||||
TARGETS += $(copy-windows-ucrt)
|
||||
|
||||
copy-windows-libs += $(copy-windows-ucrt)
|
||||
endif
|
||||
endif
|
||||
|
||||
static-jdk-image: $(copy-from-jdk-image) $(copy-static-launchers) \
|
||||
$(copy-static-launchers-debuginfo) $(copy-windows-libs)
|
||||
|
||||
TARGETS += static-jdk-image
|
||||
|
||||
.PHONY: static-launcher static-jdk-image
|
||||
.PHONY: static-launchers static-jdk-image
|
||||
|
||||
################################################################################
|
||||
|
||||
|
||||
@ -78,6 +78,9 @@ TOOL_GENERATECACERTS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_class
|
||||
TOOL_GENERATEEXTRAPROPERTIES = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.generateextraproperties.GenerateExtraProperties
|
||||
|
||||
TOOL_GENERATECASEFOLDING = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.generatecharacter.CaseFolding
|
||||
|
||||
TOOL_MAKEZIPREPRODUCIBLE = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.makezipreproducible.MakeZipReproducible
|
||||
|
||||
@ -127,6 +130,9 @@ TOOL_PUBLICSUFFIXLIST = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_clas
|
||||
TOOL_FIXUPPANDOC = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.fixuppandoc.Main
|
||||
|
||||
TOOL_VARHANDLEGUARDMETHODGENERATOR = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.methodhandle.VarHandleGuardMethodGenerator
|
||||
|
||||
################################################################################
|
||||
|
||||
# Executable javascript filter for man page generation using pandoc.
|
||||
|
||||
@ -36,7 +36,7 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_LANGTOOLS, \
|
||||
COMPILER := bootjdk, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||
SRC := $(TOPDIR)/make/langtools/tools, \
|
||||
INCLUDES := compileproperties propertiesparser, \
|
||||
INCLUDES := compileproperties flagsgenerator propertiesparser, \
|
||||
COPY := .properties, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes, \
|
||||
))
|
||||
|
||||
@ -81,8 +81,8 @@ SLEEF_CMAKE_FILE := toolchains/$(OPENJDK_TARGET_CPU)-$(SLEEF_TOOLCHAIN_TYPE).cma
|
||||
$(eval $(call SetupExecute, sleef_native_config, \
|
||||
INFO := Configuring native sleef build, \
|
||||
OUTPUT_DIR := $(SLEEF_NATIVE_BUILD_DIR), \
|
||||
COMMAND := cd $(SLEEF_SOURCE_DIR) && $(CMAKE) -S . -B \
|
||||
$(SLEEF_NATIVE_BUILD_DIR), \
|
||||
WORKING_DIR := $(SLEEF_SOURCE_DIR), \
|
||||
COMMAND := $(CMAKE) -S . -B $(SLEEF_NATIVE_BUILD_DIR), \
|
||||
))
|
||||
|
||||
TARGETS := $(sleef_native_config)
|
||||
@ -91,8 +91,8 @@ $(eval $(call SetupExecute, sleef_native_build, \
|
||||
INFO := Building native sleef, \
|
||||
DEPS := $(sleef_native_config), \
|
||||
OUTPUT_DIR := $(SLEEF_NATIVE_BUILD_DIR), \
|
||||
COMMAND := cd $(SLEEF_SOURCE_DIR) && $(CMAKE) --build \
|
||||
$(SLEEF_NATIVE_BUILD_DIR) -j, \
|
||||
WORKING_DIR := $(SLEEF_SOURCE_DIR), \
|
||||
COMMAND := $(CMAKE) --build $(SLEEF_NATIVE_BUILD_DIR) -j, \
|
||||
))
|
||||
|
||||
TARGETS := $(sleef_native_build)
|
||||
@ -101,8 +101,8 @@ $(eval $(call SetupExecute, sleef_cross_config, \
|
||||
INFO := Configuring cross-compiling sleef build, \
|
||||
DEPS := $(sleef_native_build), \
|
||||
OUTPUT_DIR := $(SLEEF_CROSS_BUILD_DIR), \
|
||||
COMMAND := cd $(SLEEF_SOURCE_DIR) && $(CMAKE) -S . -B \
|
||||
$(SLEEF_CROSS_BUILD_DIR) \
|
||||
WORKING_DIR := $(SLEEF_SOURCE_DIR), \
|
||||
COMMAND := $(CMAKE) -S . -B $(SLEEF_CROSS_BUILD_DIR) \
|
||||
-DCMAKE_C_COMPILER=$(CC) \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$(SLEEF_CMAKE_FILE) \
|
||||
-DNATIVE_BUILD_DIR=$(SLEEF_NATIVE_BUILD_DIR) \
|
||||
@ -116,8 +116,8 @@ $(eval $(call SetupExecute, sleef_cross_build, \
|
||||
INFO := Building cross-compiling sleef, \
|
||||
DEPS := $(sleef_cross_config), \
|
||||
OUTPUT_DIR := $(SLEEF_NATIVE_BUILD_DIR), \
|
||||
COMMAND := cd $(SLEEF_SOURCE_DIR) && $(CMAKE) --build \
|
||||
$(SLEEF_CROSS_BUILD_DIR) -j, \
|
||||
WORKING_DIR := $(SLEEF_SOURCE_DIR), \
|
||||
COMMAND := $(CMAKE) --build $(SLEEF_CROSS_BUILD_DIR) -j, \
|
||||
))
|
||||
|
||||
TARGETS := $(sleef_cross_build)
|
||||
|
||||
@ -75,10 +75,11 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
|
||||
AC_MSG_NOTICE([Rewriting ORIGINAL_PATH to $REWRITTEN_PATH])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86 && test "x$with_jvm_variants" != xzero; then
|
||||
AC_MSG_ERROR([32-bit x86 builds are not supported])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
|
||||
AC_MSG_ERROR([32-bit Windows builds are not supported])
|
||||
fi
|
||||
BASIC_SETUP_PATHS_WINDOWS
|
||||
fi
|
||||
|
||||
@ -133,17 +134,33 @@ AC_DEFUN_ONCE([BASIC_SETUP_BUILD_ENV],
|
||||
)
|
||||
AC_SUBST(BUILD_ENV)
|
||||
|
||||
AC_MSG_CHECKING([for locale to use])
|
||||
if test "x$LOCALE" != x; then
|
||||
# Check if we actually have C.UTF-8; if so, use it
|
||||
if $LOCALE -a | $GREP -q -E "^C\.(utf8|UTF-8)$"; then
|
||||
LOCALE_USED=C.UTF-8
|
||||
AC_MSG_RESULT([C.UTF-8 (recommended)])
|
||||
elif $LOCALE -a | $GREP -q -E "^en_US\.(utf8|UTF-8)$"; then
|
||||
LOCALE_USED=en_US.UTF-8
|
||||
AC_MSG_RESULT([en_US.UTF-8 (acceptable fallback)])
|
||||
else
|
||||
AC_MSG_WARN([C.UTF-8 locale not found, using C locale])
|
||||
LOCALE_USED=C
|
||||
# As a fallback, check if users locale is UTF-8. USER_LOCALE was saved
|
||||
# by the wrapper configure script before autconf messed up LC_ALL.
|
||||
if $ECHO $USER_LOCALE | $GREP -q -E "\.(utf8|UTF-8)$"; then
|
||||
LOCALE_USED=$USER_LOCALE
|
||||
AC_MSG_RESULT([$USER_LOCALE (untested fallback)])
|
||||
AC_MSG_WARN([Could not find C.UTF-8 or en_US.UTF-8 locale. This is not supported, and the build might fail unexpectedly.])
|
||||
else
|
||||
AC_MSG_RESULT([no UTF-8 locale found])
|
||||
AC_MSG_WARN([No UTF-8 locale found. This is not supported. Proceeding with the C locale, but the build might fail unexpectedly.])
|
||||
LOCALE_USED=C
|
||||
fi
|
||||
AC_MSG_NOTICE([The recommended locale is C.UTF-8, but en_US.UTF-8 is also accepted.])
|
||||
fi
|
||||
else
|
||||
AC_MSG_WARN([locale command not not found, using C locale])
|
||||
LOCALE_USED=C
|
||||
LOCALE_USED=C.UTF-8
|
||||
AC_MSG_RESULT([C.UTF-8 (default)])
|
||||
AC_MSG_WARN([locale command not not found, using C.UTF-8 locale])
|
||||
fi
|
||||
|
||||
export LC_ALL=$LOCALE_USED
|
||||
@ -193,17 +210,8 @@ AC_DEFUN([BASIC_SETUP_XCODE_SYSROOT],
|
||||
if test $? -ne 0; then
|
||||
AC_MSG_ERROR([The xcodebuild tool in the devkit reports an error: $XCODEBUILD_OUTPUT])
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_PATH" != x; then
|
||||
UTIL_LOOKUP_PROGS(XCODEBUILD, xcodebuild, $TOOLCHAIN_PATH)
|
||||
if test "x$XCODEBUILD" != x; then
|
||||
XCODEBUILD_OUTPUT=`"$XCODEBUILD" -version 2>&1`
|
||||
if test $? -ne 0; then
|
||||
AC_MSG_WARN([Ignoring the located xcodebuild tool $XCODEBUILD due to an error: $XCODEBUILD_OUTPUT])
|
||||
XCODEBUILD=
|
||||
fi
|
||||
fi
|
||||
else
|
||||
UTIL_LOOKUP_PROGS(XCODEBUILD, xcodebuild)
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(XCODEBUILD, xcodebuild)
|
||||
if test "x$XCODEBUILD" != x; then
|
||||
XCODEBUILD_OUTPUT=`"$XCODEBUILD" -version 2>&1`
|
||||
if test $? -ne 0; then
|
||||
@ -331,21 +339,11 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
||||
|
||||
# You can force the sysroot if the sysroot encoded into the compiler tools
|
||||
# is not correct.
|
||||
AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
|
||||
[alias for --with-sysroot for backwards compatibility])],
|
||||
[SYSROOT=$with_sys_root]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(sysroot, [AS_HELP_STRING([--with-sysroot],
|
||||
[use this directory as sysroot])],
|
||||
[SYSROOT=$with_sysroot]
|
||||
)
|
||||
|
||||
AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
|
||||
[alias for --with-toolchain-path for backwards compatibility])],
|
||||
[UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$with_tools_dir)]
|
||||
)
|
||||
|
||||
AC_ARG_WITH([toolchain-path], [AS_HELP_STRING([--with-toolchain-path],
|
||||
[prepend these directories when searching for toolchain binaries (compilers etc)])],
|
||||
[UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$with_toolchain_path)]
|
||||
@ -354,6 +352,9 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
||||
AC_ARG_WITH([xcode-path], [AS_HELP_STRING([--with-xcode-path],
|
||||
[set up toolchain on Mac OS using a path to an Xcode installation])])
|
||||
|
||||
UTIL_DEPRECATED_ARG_WITH(sys-root)
|
||||
UTIL_DEPRECATED_ARG_WITH(tools-dir)
|
||||
|
||||
if test "x$with_xcode_path" != x; then
|
||||
if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
|
||||
UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],
|
||||
@ -398,11 +399,21 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
[ CONF_NAME=${with_conf_name} ])
|
||||
|
||||
# Test from where we are running configure, in or outside of src root.
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows || test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
|
||||
# These systems have case insensitive paths, so convert them to lower case.
|
||||
[ cmp_configure_start_dir=`$ECHO $CONFIGURE_START_DIR | $TR '[:upper:]' '[:lower:]'` ]
|
||||
[ cmp_topdir=`$ECHO $TOPDIR | $TR '[:upper:]' '[:lower:]'` ]
|
||||
[ cmp_custom_root=`$ECHO $CUSTOM_ROOT | $TR '[:upper:]' '[:lower:]'` ]
|
||||
else
|
||||
cmp_configure_start_dir="$CONFIGURE_START_DIR"
|
||||
cmp_topdir="$TOPDIR"
|
||||
cmp_custom_root="$CUSTOM_ROOT"
|
||||
fi
|
||||
AC_MSG_CHECKING([where to store configuration])
|
||||
if test "x$CONFIGURE_START_DIR" = "x$TOPDIR" \
|
||||
|| test "x$CONFIGURE_START_DIR" = "x$CUSTOM_ROOT" \
|
||||
|| test "x$CONFIGURE_START_DIR" = "x$TOPDIR/make/autoconf" \
|
||||
|| test "x$CONFIGURE_START_DIR" = "x$TOPDIR/make" ; then
|
||||
if test "x$cmp_configure_start_dir" = "x$cmp_topdir" \
|
||||
|| test "x$cmp_configure_start_dir" = "x$cmp_custom_root" \
|
||||
|| test "x$cmp_configure_start_dir" = "x$cmp_topdir/make/autoconf" \
|
||||
|| test "x$cmp_configure_start_dir" = "x$cmp_topdir/make" ; then
|
||||
# We are running configure from the src root.
|
||||
# Create a default ./build/target-variant-debuglevel output root.
|
||||
if test "x${CONF_NAME}" = x; then
|
||||
@ -423,7 +434,12 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
# If configuration is situated in normal build directory, just use the build
|
||||
# directory name as configuration name, otherwise use the complete path.
|
||||
if test "x${CONF_NAME}" = x; then
|
||||
CONF_NAME=`$ECHO $CONFIGURE_START_DIR | $SED -e "s!^${TOPDIR}/build/!!"`
|
||||
[ if [[ "$cmp_configure_start_dir" =~ ^${cmp_topdir}/build/[^/]+$ ||
|
||||
"$cmp_configure_start_dir" =~ ^${cmp_custom_root}/build/[^/]+$ ]]; then ]
|
||||
CONF_NAME="${CONFIGURE_START_DIR##*/}"
|
||||
else
|
||||
CONF_NAME="$CONFIGURE_START_DIR"
|
||||
fi
|
||||
fi
|
||||
OUTPUTDIR="$CONFIGURE_START_DIR"
|
||||
AC_MSG_RESULT([in current directory])
|
||||
@ -549,9 +565,6 @@ AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
|
||||
|
||||
BASIC_CHECK_SRC_PERMS
|
||||
|
||||
# Check if the user has any old-style ALT_ variables set.
|
||||
FOUND_ALT_VARIABLES=`env | grep ^ALT_`
|
||||
|
||||
# Before generating output files, test if they exist. If they do, this is a reconfigure.
|
||||
# Since we can't properly handle the dependencies for this, warn the user about the situation
|
||||
if test -e $OUTPUTDIR/spec.gmk; then
|
||||
@ -624,10 +637,4 @@ AC_DEFUN_ONCE([BASIC_POST_CONFIG_OUTPUT],
|
||||
|
||||
# Make the compare script executable
|
||||
$CHMOD +x $OUTPUTDIR/compare.sh
|
||||
|
||||
# Copy the linker wrapper script for clang on AIX and make it executable
|
||||
if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
$CP -f "$TOPDIR/make/scripts/aix/ld.sh" "$OUTPUTDIR/ld.sh"
|
||||
$CHMOD +x "$OUTPUTDIR/ld.sh"
|
||||
fi
|
||||
])
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, 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,6 +57,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
UTIL_LOOKUP_PROGS(LOCALE, locale)
|
||||
UTIL_LOOKUP_PROGS(PATHTOOL, cygpath wslpath)
|
||||
UTIL_LOOKUP_PROGS(CMD, cmd.exe, $PATH:/cygdrive/c/windows/system32:/mnt/c/windows/system32:/c/windows/system32)
|
||||
UTIL_LOOKUP_PROGS(LSB_RELEASE, lsb_release)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
@ -106,9 +107,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
|
||||
UTIL_LOOKUP_PROGS(READLINK, greadlink readlink)
|
||||
UTIL_LOOKUP_PROGS(WHOAMI, whoami)
|
||||
|
||||
# Tools only needed on some platforms
|
||||
UTIL_LOOKUP_PROGS(LSB_RELEASE, lsb_release)
|
||||
|
||||
# For compare.sh only
|
||||
UTIL_LOOKUP_PROGS(CMP, cmp)
|
||||
UTIL_LOOKUP_PROGS(UNIQ, uniq)
|
||||
@ -209,29 +207,14 @@ AC_DEFUN([BASIC_CHECK_GNU_MAKE],
|
||||
UTIL_SETUP_TOOL(MAKE,
|
||||
[
|
||||
# Try our hardest to locate a correct version of GNU make
|
||||
UTIL_LOOKUP_PROGS(CHECK_GMAKE, gmake)
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(CHECK_GMAKE, gmake)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_GMAKE", [gmake in PATH])
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
UTIL_LOOKUP_PROGS(CHECK_MAKE, make)
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(CHECK_MAKE, make)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_MAKE", [make in PATH])
|
||||
fi
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
if test "x$TOOLCHAIN_PATH" != x; then
|
||||
# We have a toolchain path, check that as well before giving up.
|
||||
OLD_PATH=$PATH
|
||||
PATH=$TOOLCHAIN_PATH:$PATH
|
||||
UTIL_LOOKUP_PROGS(CHECK_TOOLSDIR_GMAKE, gmake)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_GMAKE", [gmake in tools-dir])
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
UTIL_LOOKUP_PROGS(CHECK_TOOLSDIR_MAKE, make)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_MAKE", [make in tools-dir])
|
||||
fi
|
||||
PATH=$OLD_PATH
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
AC_MSG_ERROR([Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.])
|
||||
fi
|
||||
@ -380,7 +363,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
|
||||
# Check if it's a GNU date compatible version
|
||||
AC_MSG_CHECKING([if date is a GNU compatible version])
|
||||
check_date=`$DATE --version 2>&1 | $GREP "GNU\|BusyBox"`
|
||||
check_date=`$DATE --version 2>&1 | $GREP "GNU\|BusyBox\|uutils"`
|
||||
if test "x$check_date" != x; then
|
||||
AC_MSG_RESULT([yes])
|
||||
IS_GNU_DATE=yes
|
||||
@ -470,7 +453,15 @@ AC_DEFUN_ONCE([BASIC_SETUP_PANDOC],
|
||||
AC_MSG_CHECKING([if the pandoc smart extension needs to be disabled for markdown])
|
||||
if $PANDOC --list-extensions | $GREP -q '+smart'; then
|
||||
AC_MSG_RESULT([yes])
|
||||
PANDOC_MARKDOWN_FLAG="markdown-smart"
|
||||
PANDOC_MARKDOWN_FLAG="$PANDOC_MARKDOWN_FLAG-smart"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if the pandoc tex_math_dollars extension needs to be disabled for markdown])
|
||||
if $PANDOC --list-extensions | $GREP -q '+tex_math_dollars'; then
|
||||
AC_MSG_RESULT([yes])
|
||||
PANDOC_MARKDOWN_FLAG="$PANDOC_MARKDOWN_FLAG-tex_math_dollars"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, 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
|
||||
@ -159,7 +159,7 @@ AC_DEFUN([BASIC_SETUP_PATHS_WINDOWS],
|
||||
else
|
||||
WINENV_PREFIX_ARG="$WINENV_PREFIX"
|
||||
fi
|
||||
FIXPATH_ARGS="-e $PATHTOOL -p $WINENV_PREFIX_ARG -r ${WINENV_ROOT//\\/\\\\} -t $WINENV_TEMP_DIR -c $CMD -q"
|
||||
FIXPATH_ARGS="-e $PATHTOOL -p $WINENV_PREFIX_ARG -r ${WINENV_ROOT//\\/\\\\} -t $WINENV_TEMP_DIR -c $CMD"
|
||||
FIXPATH_BASE="$BASH $FIXPATH_DIR/fixpath.sh $FIXPATH_ARGS"
|
||||
FIXPATH="$FIXPATH_BASE exec"
|
||||
|
||||
@ -215,7 +215,7 @@ AC_DEFUN([BASIC_WINDOWS_FINALIZE_FIXPATH],
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
FIXPATH_CMDLINE=". $TOPDIR/make/scripts/fixpath.sh -e $PATHTOOL \
|
||||
-p $WINENV_PREFIX_ARG -r ${WINENV_ROOT//\\/\\\\} -t $WINENV_TEMP_DIR \
|
||||
-c $CMD -q"
|
||||
-c $CMD"
|
||||
$ECHO > $OUTPUTDIR/fixpath '#!/bin/bash'
|
||||
$ECHO >> $OUTPUTDIR/fixpath export PATH='"[$]PATH:'$PATH'"'
|
||||
$ECHO >> $OUTPUTDIR/fixpath $FIXPATH_CMDLINE '"[$]@"'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, 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
|
||||
@ -180,11 +180,13 @@ AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
|
||||
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
|
||||
AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK],
|
||||
[
|
||||
UTIL_LOOKUP_PROGS(JAVAC_CHECK, javac, , NOFIXPATH)
|
||||
UTIL_LOOKUP_PROGS(JAVA_CHECK, java, , NOFIXPATH)
|
||||
BINARY="$JAVAC_CHECK"
|
||||
if test "x$JAVAC_CHECK" = x; then
|
||||
BINARY="$JAVA_CHECK"
|
||||
UTIL_LOOKUP_PROGS(JAVAC_CHECK, javac)
|
||||
UTIL_GET_EXECUTABLE(JAVAC_CHECK) # Will setup JAVAC_CHECK_EXECUTABLE
|
||||
UTIL_LOOKUP_PROGS(JAVA_CHECK, java)
|
||||
UTIL_GET_EXECUTABLE(JAVA_CHECK) # Will setup JAVA_CHECK_EXECUTABLE
|
||||
BINARY="$JAVAC_CHECK_EXECUTABLE"
|
||||
if test "x$JAVAC_CHECK_EXECUTABLE" = x; then
|
||||
BINARY="$JAVA_CHECK_EXECUTABLE"
|
||||
fi
|
||||
if test "x$BINARY" != x; then
|
||||
# So there is a java(c) binary, it might be part of a JDK.
|
||||
@ -393,11 +395,9 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
||||
|
||||
# When compiling code to be executed by the Boot JDK, force compatibility with the
|
||||
# oldest supported bootjdk.
|
||||
OLDEST_BOOT_JDK=`$ECHO $DEFAULT_ACCEPTABLE_BOOT_VERSIONS \
|
||||
OLDEST_BOOT_JDK_VERSION=`$ECHO $DEFAULT_ACCEPTABLE_BOOT_VERSIONS \
|
||||
| $TR " " "\n" | $SORT -n | $HEAD -n1`
|
||||
# -Xlint:-options is added to avoid "warning: [options] system modules path not set in conjunction with -source"
|
||||
BOOT_JDK_SOURCETARGET="-source $OLDEST_BOOT_JDK -target $OLDEST_BOOT_JDK -Xlint:-options"
|
||||
AC_SUBST(BOOT_JDK_SOURCETARGET)
|
||||
AC_SUBST(OLDEST_BOOT_JDK_VERSION)
|
||||
|
||||
# Check if the boot jdk is 32 or 64 bit
|
||||
if $JAVA -version 2>&1 | $GREP -q "64-Bit"; then
|
||||
@ -408,27 +408,6 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
||||
AC_MSG_CHECKING([if Boot JDK is 32 or 64 bits])
|
||||
AC_MSG_RESULT([$BOOT_JDK_BITS])
|
||||
|
||||
# Try to enable CDS
|
||||
AC_MSG_CHECKING([for local Boot JDK Class Data Sharing (CDS)])
|
||||
BOOT_JDK_CDS_ARCHIVE=$CONFIGURESUPPORT_OUTPUTDIR/classes.jsa
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=$BOOT_JDK_CDS_ARCHIVE],boot_jdk_cds_args,[$JAVA])
|
||||
|
||||
if test "x$boot_jdk_cds_args" != x; then
|
||||
# Try creating a CDS archive
|
||||
$JAVA $boot_jdk_cds_args -Xshare:dump > /dev/null 2>&1
|
||||
if test $? -eq 0; then
|
||||
BOOTJDK_USE_LOCAL_CDS=true
|
||||
AC_MSG_RESULT([yes, created])
|
||||
else
|
||||
# Generation failed, don't use CDS.
|
||||
BOOTJDK_USE_LOCAL_CDS=false
|
||||
AC_MSG_RESULT([no, creation failed])
|
||||
fi
|
||||
else
|
||||
BOOTJDK_USE_LOCAL_CDS=false
|
||||
AC_MSG_RESULT([no, -XX:SharedArchiveFile not supported])
|
||||
fi
|
||||
|
||||
BOOTJDK_SETUP_CLASSPATH
|
||||
])
|
||||
|
||||
@ -444,13 +423,8 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
# Force en-US environment
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Duser.language=en -Duser.country=US],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
if test "x$BOOTJDK_USE_LOCAL_CDS" = xtrue; then
|
||||
# Use our own CDS archive
|
||||
UTIL_ADD_JVM_ARG_IF_OK([$boot_jdk_cds_args -Xshare:auto],boot_jdk_jvmargs,[$JAVA])
|
||||
else
|
||||
# Otherwise optimistically use the system-wide one, if one is present
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xshare:auto],boot_jdk_jvmargs,[$JAVA])
|
||||
fi
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xlog:all=off:stdout],boot_jdk_jvmargs,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xlog:all=warning:stderr],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
# Finally append user provided options to allow them to override.
|
||||
UTIL_ADD_JVM_ARG_IF_OK([$USER_BOOT_JDK_OPTIONS],boot_jdk_jvmargs,[$JAVA])
|
||||
@ -597,10 +571,9 @@ AC_DEFUN([BOOTJDK_SETUP_BUILD_JDK],
|
||||
AC_ARG_WITH(build-jdk, [AS_HELP_STRING([--with-build-jdk],
|
||||
[path to JDK of same version as is being built@<:@the newly built JDK@:>@])])
|
||||
|
||||
CREATE_BUILDJDK=false
|
||||
EXTERNAL_BUILDJDK=false
|
||||
BUILD_JDK_FOUND="no"
|
||||
EXTERNAL_BUILDJDK_PATH=""
|
||||
if test "x$with_build_jdk" != "x"; then
|
||||
BUILD_JDK_FOUND=no
|
||||
BOOTJDK_CHECK_BUILD_JDK([
|
||||
if test "x$with_build_jdk" != x; then
|
||||
BUILD_JDK=$with_build_jdk
|
||||
@ -608,40 +581,15 @@ AC_DEFUN([BOOTJDK_SETUP_BUILD_JDK],
|
||||
AC_MSG_NOTICE([Found potential Build JDK using configure arguments])
|
||||
fi
|
||||
])
|
||||
EXTERNAL_BUILDJDK=true
|
||||
else
|
||||
if test "x$COMPILE_TYPE" = "xcross"; then
|
||||
BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
|
||||
BUILD_JDK_FOUND=yes
|
||||
CREATE_BUILDJDK=true
|
||||
if test "x$BUILD_JDK_FOUND" != "xyes"; then
|
||||
AC_MSG_CHECKING([for Build JDK])
|
||||
AC_MSG_RESULT([yes, will build it for the host platform])
|
||||
else
|
||||
BUILD_JDK="\$(JDK_OUTPUTDIR)"
|
||||
BUILD_JDK_FOUND=yes
|
||||
AC_MSG_CHECKING([for Build JDK])
|
||||
AC_MSG_RESULT([yes, will use output dir])
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Could not find a suitable Build JDK])
|
||||
fi
|
||||
EXTERNAL_BUILDJDK_PATH="$BUILD_JDK"
|
||||
fi
|
||||
|
||||
# Since these tools do not yet exist, we cannot use UTIL_FIXUP_EXECUTABLE to
|
||||
# detect the need of fixpath
|
||||
JMOD="$BUILD_JDK/bin/jmod"
|
||||
UTIL_ADD_FIXPATH(JMOD)
|
||||
JLINK="$BUILD_JDK/bin/jlink"
|
||||
UTIL_ADD_FIXPATH(JLINK)
|
||||
AC_SUBST(JMOD)
|
||||
AC_SUBST(JLINK)
|
||||
|
||||
if test "x$BUILD_JDK_FOUND" != "xyes"; then
|
||||
AC_MSG_CHECKING([for Build JDK])
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Could not find a suitable Build JDK])
|
||||
fi
|
||||
|
||||
AC_SUBST(CREATE_BUILDJDK)
|
||||
AC_SUBST(BUILD_JDK)
|
||||
AC_SUBST(EXTERNAL_BUILDJDK)
|
||||
AC_SUBST(EXTERNAL_BUILDJDK_PATH)
|
||||
])
|
||||
|
||||
# The docs-reference JDK is used to run javadoc for the docs-reference targets.
|
||||
|
||||
@ -44,7 +44,3 @@ JAVAC_CMD := $(FIXPATH) $(BOOT_JDK)/bin/javac
|
||||
JAR_CMD := $(FIXPATH) $(BOOT_JDK)/bin/jar
|
||||
# The bootcycle JVM arguments may differ from the original boot jdk.
|
||||
JAVA_FLAGS_BIG := @BOOTCYCLE_JVM_ARGS_BIG@
|
||||
# Any CDS settings generated for the bootjdk are invalid in the bootcycle build.
|
||||
# By filtering out those JVM args, the bootcycle JVM will use its default
|
||||
# settings for CDS.
|
||||
JAVA_FLAGS := $(filter-out -XX:SharedArchiveFile% -Xshare%, $(JAVA_FLAGS))
|
||||
|
||||
12
make/autoconf/build-aux/config.guess
vendored
12
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, 2025, 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.
|
||||
#
|
||||
@ -53,10 +53,10 @@ if [ "x$OUT" = x ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test and fix cygwin on x86_64
|
||||
echo $OUT | grep 86-pc-cygwin > /dev/null 2> /dev/null
|
||||
# Test and fix cygwin/msys CPUs
|
||||
echo $OUT | grep -e "-pc-cygwin" > /dev/null 2> /dev/null
|
||||
if test $? != 0; then
|
||||
echo $OUT | grep 86-pc-mingw > /dev/null 2> /dev/null
|
||||
echo $OUT | grep -e "-pc-mingw" > /dev/null 2> /dev/null
|
||||
fi
|
||||
if test $? = 0; then
|
||||
case `echo $PROCESSOR_IDENTIFIER | cut -f1 -d' '` in
|
||||
@ -64,6 +64,10 @@ if test $? = 0; then
|
||||
REAL_CPU=x86_64
|
||||
OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
|
||||
;;
|
||||
ARMv8)
|
||||
REAL_CPU=aarch64
|
||||
OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, 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
|
||||
@ -75,7 +75,8 @@ AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
|
||||
FOUND_MEM=yes
|
||||
elif test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
# Windows, but without cygwin
|
||||
MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
|
||||
MEMORY_SIZE=`powershell -Command \
|
||||
"(Get-CimInstance Win32_ComputerSystem).TotalPhysicalMemory" | $SED 's/\\r//g' `
|
||||
MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
|
||||
FOUND_MEM=yes
|
||||
fi
|
||||
@ -161,12 +162,7 @@ AC_DEFUN([BPERF_SETUP_CCACHE],
|
||||
# Check if ccache is available
|
||||
CCACHE_AVAILABLE=true
|
||||
|
||||
OLD_PATH="$PATH"
|
||||
if test "x$TOOLCHAIN_PATH" != x; then
|
||||
PATH=$TOOLCHAIN_PATH:$PATH
|
||||
fi
|
||||
UTIL_LOOKUP_PROGS(CCACHE, ccache)
|
||||
PATH="$OLD_PATH"
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(CCACHE, ccache)
|
||||
|
||||
AC_MSG_CHECKING([if ccache is available])
|
||||
if test "x$TOOLCHAIN_TYPE" != "xgcc" && test "x$TOOLCHAIN_TYPE" != "xclang"; then
|
||||
|
||||
@ -110,4 +110,4 @@ $MV $OUTPUTDIR/compare.log $OUTPUTDIR/compare.log.old 2> /dev/null
|
||||
|
||||
export SCRIPT_DIR="$( cd "$( dirname "$0" )" > /dev/null && pwd )"
|
||||
|
||||
$BASH $TOPDIR/make/scripts/logger.sh $OUTPUTDIR/compare.log $BASH "$REAL_COMPARE_SCRIPT" "$@"
|
||||
$BASH $TOPDIR/make/scripts/compare-logger.sh $OUTPUTDIR/compare.log $BASH "$REAL_COMPARE_SCRIPT" "$@"
|
||||
|
||||
8
make/autoconf/configure
vendored
8
make/autoconf/configure
vendored
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -49,7 +49,9 @@ fi
|
||||
export CONFIG_SHELL=$BASH
|
||||
export _as_can_reexec=no
|
||||
|
||||
# Make sure all shell commands are executed with the C locale
|
||||
# Save user's current locale, but make sure all future shell commands are
|
||||
# executed with the C locale
|
||||
export USER_LOCALE=$LC_ALL
|
||||
export LC_ALL=C
|
||||
|
||||
if test "x$CUSTOM_CONFIG_DIR" != x; then
|
||||
@ -364,7 +366,7 @@ EOT
|
||||
|
||||
# Print additional help, e.g. a list of toolchains and JVM features.
|
||||
# This must be done by the autoconf script.
|
||||
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $generated_script PRINTF=printf )
|
||||
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $generated_script PRINTF=printf ECHO=echo )
|
||||
|
||||
cat <<EOT
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, 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
|
||||
@ -174,9 +174,6 @@ SRCDIRS_SETUP_IMPORT_MODULES
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# See if we are doing a complete static build or not
|
||||
JDKOPT_SETUP_STATIC_BUILD
|
||||
|
||||
# First determine the toolchain type (compiler family)
|
||||
TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE
|
||||
|
||||
@ -224,6 +221,9 @@ JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER
|
||||
# LeakSanitizer
|
||||
JDKOPT_SETUP_LEAK_SANITIZER
|
||||
|
||||
# Setup static analyzer
|
||||
JDKOPT_SETUP_STATIC_ANALYZER
|
||||
|
||||
# Fallback linker
|
||||
# This needs to go before 'LIB_DETERMINE_DEPENDENCIES'
|
||||
JDKOPT_SETUP_FALLBACK_LINKER
|
||||
@ -259,11 +259,12 @@ LIB_TESTS_ENABLE_DISABLE_JTREG_TEST_THREAD_FACTORY
|
||||
|
||||
JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
|
||||
JDKOPT_EXCLUDE_TRANSLATIONS
|
||||
JDKOPT_ENABLE_DISABLE_MANPAGES
|
||||
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE
|
||||
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE_COH
|
||||
JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT
|
||||
JDKOPT_SETUP_MACOSX_SIGNING
|
||||
JDKOPT_SETUP_SIGNING_HOOK
|
||||
JDKOPT_SETUP_JAVA_WARNINGS
|
||||
|
||||
################################################################################
|
||||
#
|
||||
|
||||
@ -37,56 +37,25 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
# Default works for linux, might work on other platforms as well.
|
||||
SHARED_LIBRARY_FLAGS='-shared'
|
||||
# --disable-new-dtags forces use of RPATH instead of RUNPATH for rpaths.
|
||||
# This protects internal library dependencies within the JDK from being
|
||||
# overridden using LD_LIBRARY_PATH. See JDK-8326891 for more information.
|
||||
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1 -Wl,--disable-new-dtags'
|
||||
SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
|
||||
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# Linking is different on MacOSX
|
||||
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0"
|
||||
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or [$]1,/.)'
|
||||
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
|
||||
SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]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=''
|
||||
|
||||
else
|
||||
# Default works for linux, might work on other platforms as well.
|
||||
SHARED_LIBRARY_FLAGS='-shared'
|
||||
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
SET_EXECUTABLE_ORIGIN="$SET_EXECUTABLE_ORIGIN -Wl,--disable-new-dtags"
|
||||
fi
|
||||
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
|
||||
|
||||
# arm specific settings
|
||||
if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
|
||||
# '-Wl,-z,origin' isn't used on arm.
|
||||
SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN[$]1'
|
||||
else
|
||||
SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
|
||||
fi
|
||||
fi
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
SHARED_LIBRARY_FLAGS="-dll"
|
||||
SET_EXECUTABLE_ORIGIN=''
|
||||
SET_SHARED_LIBRARY_ORIGIN=''
|
||||
SET_SHARED_LIBRARY_NAME=''
|
||||
fi
|
||||
|
||||
AC_SUBST(SET_EXECUTABLE_ORIGIN)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_NAME)
|
||||
AC_SUBST(SHARED_LIBRARY_FLAGS)
|
||||
])
|
||||
|
||||
@ -482,6 +451,16 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
else
|
||||
DEBUG_CFLAGS_JDK="-DDEBUG"
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang ; then
|
||||
INIT_PATTERN_FLAG="-ftrivial-auto-var-init=pattern"
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$INIT_PATTERN_FLAG],
|
||||
IF_TRUE: [
|
||||
DEBUG_CFLAGS_JDK="$DEBUG_CFLAGS_JDK $INIT_PATTERN_FLAG"
|
||||
DEBUG_CFLAGS_JVM="$INIT_PATTERN_FLAG"
|
||||
]
|
||||
)
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
DEBUG_CFLAGS_JVM="-fpic -mcmodel=large"
|
||||
fi
|
||||
@ -563,12 +542,20 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK -fvisibility=hidden -fstack-protector"
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# The -utf-8 option sets source and execution character sets to UTF-8 to enable correct
|
||||
# compilation of all source files regardless of the active code page on Windows.
|
||||
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -utf-8 -MP"
|
||||
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -utf-8 -Zc:wchar_t-"
|
||||
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -MP"
|
||||
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:inline -Zc:throwingNew -permissive- -Zc:wchar_t-"
|
||||
fi
|
||||
|
||||
# Set character encoding in source
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
CHARSET_CFLAGS="-finput-charset=utf-8"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# The -utf-8 option sets both source and execution character sets
|
||||
CHARSET_CFLAGS="-utf-8 -validate-charset"
|
||||
fi
|
||||
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM $CHARSET_CFLAGS"
|
||||
TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK $CHARSET_CFLAGS"
|
||||
|
||||
# CFLAGS C language level for JDK sources (hotspot only uses C++)
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
LANGSTD_CFLAGS="-std=c11"
|
||||
@ -579,11 +566,11 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
|
||||
# CXXFLAGS C++ language level for all of JDK, including Hotspot.
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
LANGSTD_CXXFLAGS="-std=c++14"
|
||||
LANGSTD_CXXFLAGS="-std=c++17"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
LANGSTD_CXXFLAGS="-std:c++14"
|
||||
LANGSTD_CXXFLAGS="-std:c++17"
|
||||
else
|
||||
AC_MSG_ERROR([Cannot enable C++14 for this toolchain])
|
||||
AC_MSG_ERROR([Cannot enable C++17 for this toolchain])
|
||||
fi
|
||||
TOOLCHAIN_CFLAGS_JDK_CXXONLY="$TOOLCHAIN_CFLAGS_JDK_CXXONLY $LANGSTD_CXXFLAGS"
|
||||
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM $LANGSTD_CXXFLAGS"
|
||||
@ -711,15 +698,23 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
$1_CFLAGS_CPU="-fsigned-char -Wno-psabi $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
|
||||
$1_CFLAGS_CPU_JVM="-DARM"
|
||||
elif test "x$FLAGS_CPU_ARCH" = xppc; then
|
||||
$1_CFLAGS_CPU_JVM="-minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
|
||||
$1_CFLAGS_CPU_JVM="-mno-multiple -mno-string"
|
||||
if test "x$FLAGS_CPU" = xppc64; then
|
||||
# -mminimal-toc fixes `relocation truncated to fit' error for gcc 4.1.
|
||||
# Use ppc64 instructions, but schedule for power5
|
||||
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -mminimal-toc -mcpu=powerpc64 -mtune=power5"
|
||||
$1_CFLAGS_CPU="-mcpu=power8 -mtune=power8"
|
||||
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -mminimal-toc"
|
||||
elif test "x$FLAGS_CPU" = xppc64le; then
|
||||
# Little endian machine uses ELFv2 ABI.
|
||||
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
|
||||
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power8"
|
||||
# Use Power8 for target cpu, this is the first CPU to support PPC64 LE with ELFv2 ABI.
|
||||
# Use Power10 for tuning target, this is supported by gcc >= 10
|
||||
POWER_TUNE_VERSION="-mtune=power10"
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${POWER_TUNE_VERSION}],
|
||||
IF_FALSE: [
|
||||
POWER_TUNE_VERSION="-mtune=power8"
|
||||
]
|
||||
)
|
||||
$1_CFLAGS_CPU="-mcpu=power8 ${POWER_TUNE_VERSION}"
|
||||
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2"
|
||||
fi
|
||||
elif test "x$FLAGS_CPU" = xs390x; then
|
||||
$1_CFLAGS_CPU="-mbackchain -march=z10"
|
||||
@ -740,7 +735,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
if test "x$FLAGS_CPU" = xppc64le; then
|
||||
# Little endian machine uses ELFv2 ABI.
|
||||
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
|
||||
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power8"
|
||||
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power10"
|
||||
fi
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
@ -908,36 +903,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
IF_FALSE: [$2FDLIBM_CFLAGS=""])
|
||||
fi
|
||||
AC_SUBST($2FDLIBM_CFLAGS)
|
||||
|
||||
# Check whether the compiler supports the Arm C Language Extensions (ACLE)
|
||||
# for SVE. Set SVE_CFLAGS to -march=armv8-a+sve if it does.
|
||||
# ACLE and this flag are required to build the aarch64 SVE related functions in
|
||||
# libvectormath.
|
||||
if test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
AC_LANG_PUSH(C)
|
||||
OLD_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -march=armv8-a+sve"
|
||||
AC_MSG_CHECKING([if Arm SVE ACLE is supported])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <arm_sve.h>],
|
||||
[
|
||||
svint32_t r = svdup_n_s32(1);
|
||||
return 0;
|
||||
])],
|
||||
[
|
||||
AC_MSG_RESULT([yes])
|
||||
$2SVE_CFLAGS="-march=armv8-a+sve"
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([no])
|
||||
$2SVE_CFLAGS=""
|
||||
]
|
||||
)
|
||||
CFLAGS="$OLD_CFLAGS"
|
||||
AC_LANG_POP(C)
|
||||
fi
|
||||
fi
|
||||
AC_SUBST($2SVE_CFLAGS)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([FLAGS_SETUP_BRANCH_PROTECTION],
|
||||
|
||||
@ -74,12 +74,12 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
# Clang needs the lld linker to work correctly
|
||||
BASIC_LDFLAGS="-fuse-ld=lld -Wl,--exclude-libs,ALL"
|
||||
if test "x$CXX_IS_USER_SUPPLIED" = xfalse && test "x$CC_IS_USER_SUPPLIED" = xfalse; then
|
||||
UTIL_REQUIRE_PROGS(LLD, lld, $TOOLCHAIN_PATH:$PATH)
|
||||
UTIL_REQUIRE_TOOLCHAIN_PROGS(LLD, lld)
|
||||
fi
|
||||
fi
|
||||
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 -fuse-ld=$OUTPUTDIR/ld.sh"
|
||||
BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-blibpath:/usr/lib:lib -Wl,-bnoexpall \
|
||||
-Wl,-bernotok -Wl,-bcdtors:mbr::s -Wl,-bdatapsize:64k -Wl,-btextpsize:64k -Wl,-bstackpsize:64k"
|
||||
BASIC_LDFLAGS_JVM_ONLY="$BASIC_LDFLAGS_JVM_ONLY -Wl,-lC_r -Wl,-bbigtoc"
|
||||
fi
|
||||
|
||||
@ -98,9 +98,9 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
|
||||
# Setup OS-dependent LDFLAGS
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
# FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
|
||||
# FIXME: We should really generalize SetSharedLibraryOrigin instead.
|
||||
OS_LDFLAGS_JVM_ONLY="-Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
|
||||
OS_LDFLAGS="-mmacosx-version-min=$MACOSX_VERSION_MIN"
|
||||
OS_LDFLAGS="-mmacosx-version-min=$MACOSX_VERSION_MIN -Wl,-reproducible"
|
||||
fi
|
||||
|
||||
# Setup debug level-dependent LDFLAGS
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, 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
|
||||
@ -107,6 +107,62 @@ AC_DEFUN([FLAGS_SETUP_NMFLAGS],
|
||||
AC_SUBST(NMFLAGS)
|
||||
])
|
||||
|
||||
# Check whether the compiler supports the Arm C Language Extensions (ACLE)
|
||||
# for SVE. Set SVE_CFLAGS to -march=armv8-a+sve if it does.
|
||||
# ACLE and this flag are required to build the aarch64 SVE related functions
|
||||
# in libvectormath.
|
||||
AC_DEFUN([FLAGS_SETUP_SVE],
|
||||
[
|
||||
AARCH64_SVE_AVAILABLE=false
|
||||
# Apple Silicon does not support SVE; use macOS as a proxy for that check.
|
||||
if test "x$OPENJDK_TARGET_CPU" = "xaarch64" && test "x$OPENJDK_TARGET_OS" = "xlinux"; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
# check the compiler and binutils support sve or not
|
||||
AC_MSG_CHECKING([if Arm SVE ACLE is supported])
|
||||
AC_LANG_PUSH([C])
|
||||
saved_cflags="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -march=armv8-a+sve $CFLAGS_WARNINGS_ARE_ERRORS ARG_ARGUMENT"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[
|
||||
#include <arm_sve.h>
|
||||
svfloat64_t a() {}
|
||||
],
|
||||
[
|
||||
svint32_t r = svdup_n_s32(1)
|
||||
])],
|
||||
[
|
||||
AARCH64_SVE_AVAILABLE=true
|
||||
]
|
||||
)
|
||||
CFLAGS="$saved_cflags"
|
||||
AC_LANG_POP([C])
|
||||
AC_MSG_RESULT([$AARCH64_SVE_AVAILABLE])
|
||||
fi
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: aarch64-sve, DEFAULT: auto,
|
||||
RESULT: AARCH64_SVE_ENABLED,
|
||||
DESC: [Use SVE when compiling libsleef],
|
||||
AVAILABLE: $AARCH64_SVE_AVAILABLE)
|
||||
SVE_CFLAGS=""
|
||||
if test "x$AARCH64_SVE_ENABLED" = xtrue; then
|
||||
SVE_CFLAGS="-march=armv8-a+sve"
|
||||
# Switching the initialization mode with gcc from 'pattern' to 'zero'
|
||||
# avoids the use of unsupported `__builtin_clear_padding` for variable
|
||||
# length aggregates
|
||||
if test "x$DEBUG_LEVEL" != xrelease && test "x$TOOLCHAIN_TYPE" = xgcc ; then
|
||||
AC_MSG_CHECKING([Switching the initialization mode with gcc from pattern to zero])
|
||||
INIT_ZERO_FLAG="-ftrivial-auto-var-init=zero"
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$INIT_ZERO_FLAG],
|
||||
IF_TRUE: [
|
||||
SVE_CFLAGS="${SVE_CFLAGS} $INIT_ZERO_FLAG"
|
||||
]
|
||||
)
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(SVE_CFLAGS)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# platform independent
|
||||
AC_DEFUN([FLAGS_SETUP_ASFLAGS],
|
||||
@ -115,7 +171,11 @@ AC_DEFUN([FLAGS_SETUP_ASFLAGS],
|
||||
# Force preprocessor to run, just to make sure
|
||||
BASIC_ASFLAGS="-x assembler-with-cpp"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
BASIC_ASFLAGS="-nologo -c"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
|
||||
BASIC_ASFLAGS="-nologo"
|
||||
else
|
||||
BASIC_ASFLAGS="-nologo -c"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(BASIC_ASFLAGS)
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, 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
|
||||
@ -319,13 +319,11 @@ AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN],
|
||||
AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL],
|
||||
[
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
CC_OUT_OPTION=-Fo
|
||||
else
|
||||
# The option used to specify the target .o,.a or .so file.
|
||||
# When compiling, how to specify the to be created object file.
|
||||
CC_OUT_OPTION='-o$(SPACE)'
|
||||
if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
|
||||
AS_NON_ASM_EXTENSION_OPTION=-Ta
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(CC_OUT_OPTION)
|
||||
AC_SUBST(AS_NON_ASM_EXTENSION_OPTION)
|
||||
|
||||
# Generate make dependency files
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
@ -370,6 +368,7 @@ AC_DEFUN([FLAGS_SETUP_FLAGS],
|
||||
FLAGS_SETUP_RCFLAGS
|
||||
FLAGS_SETUP_NMFLAGS
|
||||
|
||||
FLAGS_SETUP_SVE
|
||||
FLAGS_SETUP_ASFLAGS
|
||||
FLAGS_SETUP_ASFLAGS_CPU_DEP([TARGET])
|
||||
FLAGS_SETUP_ASFLAGS_CPU_DEP([BUILD], [OPENJDK_BUILD_])
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, 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
|
||||
@ -228,19 +228,19 @@ AC_DEFUN_ONCE([HELP_PRINT_ADDITIONAL_HELP_AND_EXIT],
|
||||
if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
|
||||
|
||||
# Print available toolchains
|
||||
$PRINTF "The following toolchains are valid as arguments to --with-toolchain-type.\n"
|
||||
$PRINTF "Which are available to use depends on the build platform.\n"
|
||||
$ECHO "The following toolchains are valid as arguments to --with-toolchain-type."
|
||||
$ECHO "Which are available to use depends on the build platform."
|
||||
for toolchain in $VALID_TOOLCHAINS_all; do
|
||||
# Use indirect variable referencing
|
||||
toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
|
||||
TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
|
||||
$PRINTF " %-22s %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
|
||||
done
|
||||
$PRINTF "\n"
|
||||
$ECHO ""
|
||||
|
||||
# Print available JVM features
|
||||
$PRINTF "The following JVM features are valid as arguments to --with-jvm-features.\n"
|
||||
$PRINTF "Which are available to use depends on the environment and JVM variant.\n"
|
||||
$ECHO "The following JVM features are valid as arguments to --with-jvm-features."
|
||||
$ECHO "Which are available to use depends on the environment and JVM variant."
|
||||
m4_foreach(FEATURE, m4_split(jvm_features_valid), [
|
||||
# Create an m4 variable containing the description for FEATURE.
|
||||
m4_define(FEATURE_DESCRIPTION, [jvm_feature_desc_]m4_translit(FEATURE, -, _))
|
||||
@ -257,123 +257,117 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
[
|
||||
# Finally output some useful information to the user
|
||||
|
||||
printf "\n"
|
||||
printf "====================================================\n"
|
||||
$ECHO ""
|
||||
$ECHO "===================================================="
|
||||
if test "x$no_create" != "xyes"; then
|
||||
if test "x$IS_RECONFIGURE" != "xyes"; then
|
||||
printf "A new configuration has been successfully created in\n%s\n" "$OUTPUTDIR"
|
||||
$ECHO "A new configuration has been successfully created in"
|
||||
$ECHO "$OUTPUTDIR"
|
||||
else
|
||||
printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUTDIR"
|
||||
$ECHO "The existing configuration has been successfully updated in"
|
||||
$ECHO "$OUTPUTDIR"
|
||||
fi
|
||||
else
|
||||
if test "x$IS_RECONFIGURE" != "xyes"; then
|
||||
printf "A configuration has been successfully checked but not created\n"
|
||||
$ECHO "A configuration has been successfully checked but not created"
|
||||
else
|
||||
printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUTDIR"
|
||||
$ECHO "The existing configuration has been successfully checked in"
|
||||
$ECHO "$OUTPUTDIR"
|
||||
fi
|
||||
fi
|
||||
if test "x$CONFIGURE_COMMAND_LINE" != x; then
|
||||
printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
|
||||
$ECHO "using configure arguments '$CONFIGURE_COMMAND_LINE'."
|
||||
else
|
||||
printf "using default settings.\n"
|
||||
$ECHO "using default settings."
|
||||
fi
|
||||
|
||||
if test "x$REAL_CONFIGURE_COMMAND_EXEC_FULL" != x; then
|
||||
printf "\n"
|
||||
printf "The original configure invocation was '$REAL_CONFIGURE_COMMAND_EXEC_SHORT $REAL_CONFIGURE_COMMAND_LINE'.\n"
|
||||
$ECHO ""
|
||||
$ECHO "The original configure invocation was '$REAL_CONFIGURE_COMMAND_EXEC_SHORT $REAL_CONFIGURE_COMMAND_LINE'."
|
||||
fi
|
||||
|
||||
printf "\n"
|
||||
printf "Configuration summary:\n"
|
||||
printf "* Name: $CONF_NAME\n"
|
||||
printf "* Debug level: $DEBUG_LEVEL\n"
|
||||
printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
|
||||
printf "* JVM variants: $JVM_VARIANTS\n"
|
||||
printf "* JVM features: "
|
||||
$ECHO ""
|
||||
$ECHO "Configuration summary:"
|
||||
$ECHO "* Name: $CONF_NAME"
|
||||
$ECHO "* Debug level: $DEBUG_LEVEL"
|
||||
$ECHO "* HS debug level: $HOTSPOT_DEBUG_LEVEL"
|
||||
$ECHO "* JVM variants: $JVM_VARIANTS"
|
||||
$PRINTF "* JVM features: "
|
||||
|
||||
for variant in $JVM_VARIANTS; do
|
||||
features_var_name=JVM_FEATURES_$variant
|
||||
JVM_FEATURES_FOR_VARIANT=${!features_var_name}
|
||||
printf "$variant: \'$JVM_FEATURES_FOR_VARIANT\' "
|
||||
$PRINTF "%s: \'%s\' " "$variant" "$JVM_FEATURES_FOR_VARIANT"
|
||||
done
|
||||
printf "\n"
|
||||
$ECHO ""
|
||||
|
||||
printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
|
||||
printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
|
||||
$ECHO "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS"
|
||||
$ECHO "* Version string: $VERSION_STRING ($VERSION_SHORT)"
|
||||
|
||||
if test "x$SOURCE_DATE" != xupdated; then
|
||||
source_date_info="$SOURCE_DATE ($SOURCE_DATE_ISO_8601)"
|
||||
else
|
||||
source_date_info="Determined at build time"
|
||||
fi
|
||||
printf "* Source date: $source_date_info\n"
|
||||
$ECHO "* Source date: $source_date_info"
|
||||
|
||||
printf "\n"
|
||||
printf "Tools summary:\n"
|
||||
$ECHO ""
|
||||
$ECHO "Tools summary:"
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
printf "* Environment: %s version %s; windows version %s; prefix \"%s\"; root \"%s\"\n" \
|
||||
"$WINENV_VENDOR" "$WINENV_VERSION" "$WINDOWS_VERSION" "$WINENV_PREFIX" "$WINENV_ROOT"
|
||||
$ECHO "* Environment: $WINENV_VENDOR version $WINENV_VERSION; windows version $WINDOWS_VERSION; prefix \"$WINENV_PREFIX\"; root \"$WINENV_ROOT\""
|
||||
fi
|
||||
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
|
||||
printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
|
||||
$ECHO "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)"
|
||||
$ECHO "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)"
|
||||
if test "x$DEVKIT_NAME" != x; then
|
||||
printf "* Devkit: $DEVKIT_NAME ($DEVKIT_ROOT)\n"
|
||||
$ECHO "* Devkit: $DEVKIT_NAME ($DEVKIT_ROOT)"
|
||||
elif test "x$DEVKIT_ROOT" != x; then
|
||||
printf "* Devkit: $DEVKIT_ROOT\n"
|
||||
$ECHO "* Devkit: $DEVKIT_ROOT"
|
||||
elif test "x$SYSROOT" != x; then
|
||||
printf "* Sysroot: $SYSROOT\n"
|
||||
$ECHO "* Sysroot: $SYSROOT"
|
||||
fi
|
||||
printf "* C Compiler: Version $CC_VERSION_NUMBER (at ${CC#"$FIXPATH "})\n"
|
||||
printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at ${CXX#"$FIXPATH "})\n"
|
||||
$ECHO "* C Compiler: Version $CC_VERSION_NUMBER (at ${CC#"$FIXPATH "})"
|
||||
$ECHO "* C++ Compiler: Version $CXX_VERSION_NUMBER (at ${CXX#"$FIXPATH "})"
|
||||
|
||||
printf "\n"
|
||||
printf "Build performance summary:\n"
|
||||
printf "* Build jobs: $JOBS\n"
|
||||
printf "* Memory limit: $MEMORY_SIZE MB\n"
|
||||
$ECHO ""
|
||||
$ECHO "Build performance summary:"
|
||||
$ECHO "* Build jobs: $JOBS"
|
||||
$ECHO "* Memory limit: $MEMORY_SIZE MB"
|
||||
if test "x$CCACHE_STATUS" != "x"; then
|
||||
printf "* ccache status: $CCACHE_STATUS\n"
|
||||
$ECHO "* ccache status: $CCACHE_STATUS"
|
||||
fi
|
||||
printf "\n"
|
||||
$ECHO ""
|
||||
|
||||
if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
|
||||
printf "NOTE: You have requested to build more than one version of the JVM, which\n"
|
||||
printf "will result in longer build times.\n"
|
||||
printf "\n"
|
||||
fi
|
||||
|
||||
if test "x$FOUND_ALT_VARIABLES" != "x"; then
|
||||
printf "WARNING: You have old-style ALT_ environment variables set.\n"
|
||||
printf "These are not respected, and will be ignored. It is recommended\n"
|
||||
printf "that you clean your environment. The following variables are set:\n"
|
||||
printf "$FOUND_ALT_VARIABLES\n"
|
||||
printf "\n"
|
||||
$ECHO "NOTE: You have requested to build more than one version of the JVM, which"
|
||||
$ECHO "will result in longer build times."
|
||||
$ECHO ""
|
||||
fi
|
||||
|
||||
if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
|
||||
printf "WARNING: Your build output directory is not on a local disk.\n"
|
||||
printf "This will severely degrade build performance!\n"
|
||||
printf "It is recommended that you create an output directory on a local disk,\n"
|
||||
printf "and run the configure script again from that directory.\n"
|
||||
printf "\n"
|
||||
$ECHO "WARNING: Your build output directory is not on a local disk."
|
||||
$ECHO "This will severely degrade build performance!"
|
||||
$ECHO "It is recommended that you create an output directory on a local disk,"
|
||||
$ECHO "and run the configure script again from that directory."
|
||||
$ECHO ""
|
||||
fi
|
||||
|
||||
if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
|
||||
printf "WARNING: The result of this configuration has overridden an older\n"
|
||||
printf "configuration. You *should* run 'make clean' to make sure you get a\n"
|
||||
printf "proper build. Failure to do so might result in strange build problems.\n"
|
||||
printf "\n"
|
||||
$ECHO "WARNING: The result of this configuration has overridden an older"
|
||||
$ECHO "configuration. You *should* run 'make clean' to make sure you get a"
|
||||
$ECHO "proper build. Failure to do so might result in strange build problems."
|
||||
$ECHO ""
|
||||
fi
|
||||
|
||||
if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
|
||||
printf "WARNING: The result of this configuration was not saved.\n"
|
||||
printf "You should run without '--no-create | -n' to create the configuration.\n"
|
||||
printf "\n"
|
||||
$ECHO "WARNING: The result of this configuration was not saved."
|
||||
$ECHO "You should run without '--no-create | -n' to create the configuration."
|
||||
$ECHO ""
|
||||
fi
|
||||
|
||||
if test "x$UNSUPPORTED_TOOLCHAIN_VERSION" = "xyes"; then
|
||||
printf "WARNING: The toolchain version used is known to have issues. Please\n"
|
||||
printf "consider using a supported version unless you know what you are doing.\n"
|
||||
printf "\n"
|
||||
$ECHO "WARNING: The toolchain version used is known to have issues. Please"
|
||||
$ECHO "consider using a supported version unless you know what you are doing."
|
||||
$ECHO ""
|
||||
fi
|
||||
])
|
||||
|
||||
@ -389,10 +383,10 @@ AC_DEFUN_ONCE([HELP_REPEAT_WARNINGS],
|
||||
if test -e "$CONFIG_LOG_PATH/config.log"; then
|
||||
$GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
|
||||
if test $? -eq 0; then
|
||||
printf "The following warnings were produced. Repeated here for convenience:\n"
|
||||
$ECHO "The following warnings were produced. Repeated here for convenience:"
|
||||
# We must quote sed expression (using []) to stop m4 from eating the [].
|
||||
$GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e [ 's/^configure:[0-9]*: //' ]
|
||||
printf "\n"
|
||||
$ECHO ""
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
@ -405,10 +405,19 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
|
||||
JCOV_FILTERS="$with_jcov_filters"
|
||||
fi
|
||||
fi
|
||||
|
||||
UTIL_ARG_WITH(NAME: jcov-modules, TYPE: string,
|
||||
DEFAULT: [], RESULT: JCOV_MODULES_COMMMA_SEPARATED,
|
||||
DESC: [which modules to include in jcov (comma-separated)],
|
||||
OPTIONAL: true)
|
||||
|
||||
# Replace "," with " ".
|
||||
JCOV_MODULES=${JCOV_MODULES_COMMMA_SEPARATED//,/ }
|
||||
AC_SUBST(JCOV_ENABLED)
|
||||
AC_SUBST(JCOV_HOME)
|
||||
AC_SUBST(JCOV_INPUT_JDK)
|
||||
AC_SUBST(JCOV_FILTERS)
|
||||
AC_SUBST(JCOV_MODULES)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
@ -470,6 +479,31 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
|
||||
AC_SUBST(ASAN_ENABLED)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Static analyzer
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_ANALYZER],
|
||||
[
|
||||
UTIL_ARG_ENABLE(NAME: static-analyzer, DEFAULT: false, RESULT: STATIC_ANALYZER_ENABLED,
|
||||
DESC: [enable the GCC static analyzer],
|
||||
CHECK_AVAILABLE: [
|
||||
AC_MSG_CHECKING([if static analyzer is available])
|
||||
if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AVAILABLE=false
|
||||
fi
|
||||
],
|
||||
IF_ENABLED: [
|
||||
STATIC_ANALYZER_CFLAGS="-fanalyzer -Wno-analyzer-fd-leak"
|
||||
CFLAGS_JDKLIB="$CFLAGS_JDKLIB $STATIC_ANALYZER_CFLAGS"
|
||||
CFLAGS_JDKEXE="$CFLAGS_JDKEXE $STATIC_ANALYZER_CFLAGS"
|
||||
])
|
||||
AC_SUBST(STATIC_ANALYZER_ENABLED)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# LeakSanitizer
|
||||
@ -520,8 +554,26 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER],
|
||||
# Silence them for now.
|
||||
UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment \
|
||||
$ADDITIONAL_UBSAN_CHECKS"
|
||||
UBSAN_CFLAGS="$UBSAN_CHECKS -Wno-stringop-truncation -Wno-format-overflow -Wno-array-bounds -Wno-stringop-overflow -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER"
|
||||
UBSAN_CFLAGS="$UBSAN_CHECKS -Wno-array-bounds -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER"
|
||||
if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
|
||||
UBSAN_CFLAGS="$UBSAN_CFLAGS -Wno-format-overflow -Wno-stringop-overflow -Wno-stringop-truncation"
|
||||
fi
|
||||
UBSAN_LDFLAGS="$UBSAN_CHECKS"
|
||||
# On AIX, the llvm_symbolizer is not found out of the box, so we have to provide the
|
||||
# full qualified llvm_symbolizer path in the __ubsan_default_options() function in
|
||||
# make/data/ubsan/ubsan_default_options.c. To get it there we compile our sources
|
||||
# with an additional define LLVM_SYMBOLIZER, which we set here.
|
||||
# To calculate the correct llvm_symbolizer path we can use the location of the compiler, because
|
||||
# their relation is fixed.
|
||||
# In the ubsan case we have to link every binary with the C++-compiler as linker, because inherently
|
||||
# the C-Compiler and the C++-compiler used as linker provide a different set of ubsan exports.
|
||||
# Linking an executable with the C-compiler and one of its shared libraries with the C++-compiler
|
||||
# leeds to unresolved symbols.
|
||||
if test "x$TOOLCHAIN_TYPE" = "xclang" && test "x$OPENJDK_TARGET_OS" = "xaix"; then
|
||||
UBSAN_CFLAGS="$UBSAN_CFLAGS -DLLVM_SYMBOLIZER=$(dirname $(dirname $CC))/tools/ibm-llvm-symbolizer"
|
||||
UBSAN_LDFLAGS="$UBSAN_LDFLAGS -Wl,-bbigtoc"
|
||||
LD="$LDCXX"
|
||||
fi
|
||||
UTIL_ARG_ENABLE(NAME: ubsan, DEFAULT: false, RESULT: UBSAN_ENABLED,
|
||||
DESC: [enable UndefinedBehaviorSanitizer],
|
||||
CHECK_AVAILABLE: [
|
||||
@ -554,16 +606,6 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER],
|
||||
AC_SUBST(UBSAN_ENABLED)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Static build support. When enabled will generate static
|
||||
# libraries instead of shared libraries for all JDK libs.
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_BUILD],
|
||||
[
|
||||
UTIL_DEPRECATED_ARG_ENABLE(static-build)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# jmod options.
|
||||
@ -630,6 +672,18 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JLINK_OPTIONS],
|
||||
DEFAULT_DESC: [enabled by default unless --enable-linkable-runtime is set],
|
||||
CHECKING_MSG: [if packaged modules are kept])
|
||||
AC_SUBST(JLINK_KEEP_PACKAGED_MODULES)
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Extra jlink options to be (optionally) passed to the JDK build
|
||||
#
|
||||
UTIL_ARG_WITH(NAME: extra-jlink-flags, TYPE: string,
|
||||
DEFAULT: [],
|
||||
DESC: [extra flags to be passed to jlink during the build],
|
||||
OPTIONAL: true)
|
||||
|
||||
JLINK_USER_EXTRA_FLAGS="$EXTRA_JLINK_FLAGS"
|
||||
AC_SUBST(JLINK_USER_EXTRA_FLAGS)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
@ -671,15 +725,6 @@ AC_DEFUN([JDKOPT_EXCLUDE_TRANSLATIONS],
|
||||
AC_SUBST(EXCLUDE_TRANSLATIONS)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Optionally disable man pages (deprecated)
|
||||
#
|
||||
AC_DEFUN([JDKOPT_ENABLE_DISABLE_MANPAGES],
|
||||
[
|
||||
UTIL_DEPRECATED_ARG_ENABLE(manpages)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Disable the default CDS archive generation
|
||||
@ -866,8 +911,6 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
|
||||
AC_SUBST(SOURCE_DATE)
|
||||
AC_SUBST(ISO_8601_FORMAT_STRING)
|
||||
AC_SUBST(SOURCE_DATE_ISO_8601)
|
||||
|
||||
UTIL_DEPRECATED_ARG_ENABLE(reproducible-build)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
@ -974,6 +1017,41 @@ AC_DEFUN([JDKOPT_SETUP_MACOSX_SIGNING],
|
||||
AC_SUBST(MACOSX_CODESIGN_MODE)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Setup a hook to invoke a script that runs for file produced by the native
|
||||
# compilation steps, after linking.
|
||||
# Parameter is the path to the script to be called.
|
||||
#
|
||||
AC_DEFUN([JDKOPT_SETUP_SIGNING_HOOK],
|
||||
[
|
||||
UTIL_ARG_WITH(NAME: signing-hook, TYPE: executable,
|
||||
OPTIONAL: true, DEFAULT: "",
|
||||
DESC: [specify path to script used to code sign native binaries]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING([for signing hook])
|
||||
if test "x$SIGNING_HOOK" != x; then
|
||||
UTIL_FIXUP_EXECUTABLE(SIGNING_HOOK)
|
||||
AC_MSG_RESULT([$SIGNING_HOOK])
|
||||
else
|
||||
AC_MSG_RESULT([none])
|
||||
fi
|
||||
AC_SUBST(SIGNING_HOOK)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Setup how javac should handle warnings.
|
||||
#
|
||||
AC_DEFUN([JDKOPT_SETUP_JAVA_WARNINGS],
|
||||
[
|
||||
UTIL_ARG_ENABLE(NAME: java-warnings-as-errors, DEFAULT: true,
|
||||
RESULT: JAVA_WARNINGS_AS_ERRORS,
|
||||
DESC: [consider java warnings to be an error])
|
||||
AC_SUBST(JAVA_WARNINGS_AS_ERRORS)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# fallback linker
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, 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
|
||||
@ -50,9 +50,8 @@ m4_define(jvm_features_valid, m4_normalize( \
|
||||
))
|
||||
|
||||
# Deprecated JVM features (these are ignored, but with a warning)
|
||||
m4_define(jvm_features_deprecated, m4_normalize(
|
||||
cmsgc trace \
|
||||
))
|
||||
# This list is empty at the moment.
|
||||
m4_define(jvm_features_deprecated, m4_normalize( ))
|
||||
|
||||
# Feature descriptions
|
||||
m4_define(jvm_feature_desc_cds, [enable class data sharing (CDS)])
|
||||
@ -514,6 +513,10 @@ AC_DEFUN([JVM_FEATURES_VERIFY],
|
||||
[
|
||||
variant=$1
|
||||
|
||||
if JVM_FEATURES_IS_ACTIVE(jfr) && ! JVM_FEATURES_IS_ACTIVE(services); then
|
||||
AC_MSG_ERROR([Specified JVM feature 'jfr' requires feature 'services' for variant '$variant'])
|
||||
fi
|
||||
|
||||
if JVM_FEATURES_IS_ACTIVE(jvmci) && ! (JVM_FEATURES_IS_ACTIVE(compiler1) || \
|
||||
JVM_FEATURES_IS_ACTIVE(compiler2)); then
|
||||
AC_MSG_ERROR([Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1' for variant '$variant'])
|
||||
|
||||
@ -62,19 +62,29 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBJPEG],
|
||||
|
||||
if test "x${with_libjpeg}" = "xbundled"; then
|
||||
USE_EXTERNAL_LIBJPEG=false
|
||||
LIBJPEG_CFLAGS=""
|
||||
LIBJPEG_LIBS=""
|
||||
elif test "x${with_libjpeg}" = "xsystem"; then
|
||||
AC_CHECK_HEADER(jpeglib.h, [],
|
||||
[ AC_MSG_ERROR([--with-libjpeg=system specified, but jpeglib.h not found!])])
|
||||
AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [],
|
||||
[ AC_MSG_ERROR([--with-libjpeg=system specified, but no libjpeg found])])
|
||||
PKG_CHECK_MODULES(LIBJPEG, libjpeg, [LIBJPEG_FOUND=yes], [LIBJPEG_FOUND=no])
|
||||
if test "x${LIBJPEG_FOUND}" = "xyes"; then
|
||||
# PKG_CHECK_MODULES will set LIBJPEG_CFLAGS and LIBJPEG_LIBS
|
||||
USE_EXTERNAL_LIBJPEG=true
|
||||
else
|
||||
AC_CHECK_HEADER(jpeglib.h, [],
|
||||
[ AC_MSG_ERROR([--with-libjpeg=system specified, but jpeglib.h not found!])])
|
||||
AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [],
|
||||
[ AC_MSG_ERROR([--with-libjpeg=system specified, but no libjpeg found])])
|
||||
|
||||
USE_EXTERNAL_LIBJPEG=true
|
||||
LIBJPEG_LIBS="-ljpeg"
|
||||
USE_EXTERNAL_LIBJPEG=true
|
||||
LIBJPEG_CFLAGS=""
|
||||
LIBJPEG_LIBS="-ljpeg"
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'])
|
||||
fi
|
||||
|
||||
AC_SUBST(USE_EXTERNAL_LIBJPEG)
|
||||
AC_SUBST(LIBJPEG_CFLAGS)
|
||||
AC_SUBST(LIBJPEG_LIBS)
|
||||
])
|
||||
|
||||
@ -85,6 +95,10 @@ AC_DEFUN_ONCE([LIB_SETUP_GIFLIB],
|
||||
[
|
||||
AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib],
|
||||
[use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
|
||||
AC_ARG_WITH(giflib-include, [AS_HELP_STRING([--with-giflib-include],
|
||||
[specify directory for the system giflib include files])])
|
||||
AC_ARG_WITH(giflib-lib, [AS_HELP_STRING([--with-giflib-lib],
|
||||
[specify directory for the system giflib library])])
|
||||
|
||||
AC_MSG_CHECKING([for which giflib to use])
|
||||
# default is bundled
|
||||
@ -97,11 +111,40 @@ AC_DEFUN_ONCE([LIB_SETUP_GIFLIB],
|
||||
|
||||
if test "x${with_giflib}" = "xbundled"; then
|
||||
USE_EXTERNAL_LIBGIF=false
|
||||
GIFLIB_CFLAGS=""
|
||||
GIFLIB_LIBS=""
|
||||
elif test "x${with_giflib}" = "xsystem"; then
|
||||
AC_CHECK_HEADER(gif_lib.h, [],
|
||||
[ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])])
|
||||
AC_CHECK_LIB(gif, DGifGetCode, [],
|
||||
[ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])])
|
||||
GIFLIB_H_FOUND=no
|
||||
if test "x${with_giflib_include}" != x; then
|
||||
GIFLIB_CFLAGS="-I${with_giflib_include}"
|
||||
GIFLIB_H_FOUND=yes
|
||||
fi
|
||||
if test "x$GIFLIB_H_FOUND" = xno; then
|
||||
AC_CHECK_HEADER(gif_lib.h,
|
||||
[
|
||||
GIFLIB_CFLAGS=""
|
||||
GIFLIB_H_FOUND=yes
|
||||
])
|
||||
fi
|
||||
if test "x$GIFLIB_H_FOUND" = xno; then
|
||||
AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])
|
||||
fi
|
||||
|
||||
GIFLIB_LIB_FOUND=no
|
||||
if test "x${with_giflib_lib}" != x; then
|
||||
GIFLIB_LIBS="-L${with_giflib_lib} -lgif"
|
||||
GIFLIB_LIB_FOUND=yes
|
||||
fi
|
||||
if test "x$GIFLIB_LIB_FOUND" = xno; then
|
||||
AC_CHECK_LIB(gif, DGifGetCode,
|
||||
[
|
||||
GIFLIB_LIBS="-lgif"
|
||||
GIFLIB_LIB_FOUND=yes
|
||||
])
|
||||
fi
|
||||
if test "x$GIFLIB_LIB_FOUND" = xno; then
|
||||
AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])
|
||||
fi
|
||||
|
||||
USE_EXTERNAL_LIBGIF=true
|
||||
GIFLIB_LIBS=-lgif
|
||||
@ -110,6 +153,7 @@ AC_DEFUN_ONCE([LIB_SETUP_GIFLIB],
|
||||
fi
|
||||
|
||||
AC_SUBST(USE_EXTERNAL_LIBGIF)
|
||||
AC_SUBST(GIFLIB_CFLAGS)
|
||||
AC_SUBST(GIFLIB_LIBS)
|
||||
])
|
||||
|
||||
|
||||
@ -304,6 +304,8 @@ AC_DEFUN([LIB_SETUP_HSDIS_BINUTILS],
|
||||
# If we have libsframe add it.
|
||||
if test -e $BINUTILS_INSTALL_DIR/lib/libsframe.a; then
|
||||
HSDIS_LIBS="$HSDIS_LIBS $BINUTILS_INSTALL_DIR/lib/libsframe.a"
|
||||
elif test -e $BINUTILS_INSTALL_DIR/lib64/libsframe.a; then
|
||||
HSDIS_LIBS="$HSDIS_LIBS $BINUTILS_INSTALL_DIR/lib64/libsframe.a"
|
||||
fi
|
||||
AC_CHECK_LIB(z, deflate, [ HSDIS_LIBS="$HSDIS_LIBS -lz" ], AC_MSG_ERROR([libz not found]))
|
||||
else
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -28,7 +28,7 @@
|
||||
################################################################################
|
||||
|
||||
# Minimum supported versions
|
||||
JTREG_MINIMUM_VERSION=7.4
|
||||
JTREG_MINIMUM_VERSION=8.1
|
||||
GTEST_MINIMUM_VERSION=1.14.0
|
||||
|
||||
################################################################################
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, 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,13 +98,7 @@ AC_DEFUN([LIB_SETUP_JVM_LIBS],
|
||||
# 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
|
||||
test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
|
||||
BASIC_JVM_LIBS_$1="$BASIC_JVM_LIBS_$1 -latomic"
|
||||
fi
|
||||
fi
|
||||
@ -139,15 +133,11 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
|
||||
|
||||
# Threading library
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lpthread"
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBPTHREAD"
|
||||
fi
|
||||
|
||||
# librt for legacy clock_gettime
|
||||
# librt - for timers (timer_* functions)
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
# Hotspot needs to link librt to get the clock_* functions.
|
||||
# But once our supported minimum build and runtime platform
|
||||
# has glibc 2.17, this can be removed as the functions are
|
||||
# in libc.
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lrt"
|
||||
fi
|
||||
|
||||
@ -197,6 +187,28 @@ AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
|
||||
AC_SUBST(LIBDL)
|
||||
LIBS="$save_LIBS"
|
||||
|
||||
# Setup posix pthread support
|
||||
if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
|
||||
LIBPTHREAD="-lpthread"
|
||||
else
|
||||
LIBPTHREAD=""
|
||||
fi
|
||||
AC_SUBST(LIBPTHREAD)
|
||||
|
||||
# Setup libiconv flags and library
|
||||
if test "x$OPENJDK_TARGET_OS" == "xaix" || test "x$OPENJDK_TARGET_OS" == "xmacosx"; then
|
||||
ICONV_CFLAGS=
|
||||
ICONV_LDFLAGS=
|
||||
ICONV_LIBS=-liconv
|
||||
else
|
||||
ICONV_CFLAGS=
|
||||
ICONV_LDFLAGS=
|
||||
ICONV_LIBS=
|
||||
fi
|
||||
AC_SUBST(ICONV_CFLAGS)
|
||||
AC_SUBST(ICONV_LDFLAGS)
|
||||
AC_SUBST(ICONV_LIBS)
|
||||
|
||||
# Control if libzip can use mmap. Available for purposes of overriding.
|
||||
LIBZIP_CAN_USE_MMAP=true
|
||||
AC_SUBST(LIBZIP_CAN_USE_MMAP)
|
||||
|
||||
@ -666,17 +666,7 @@ 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@:>@])])
|
||||
# Unfortunately, variants have not been parsed yet, so we have to check the configure option
|
||||
# directly. Allow only the directly specified Zero variant, treat any other mix as containing
|
||||
# something non-Zero.
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86 && test "x$with_jvm_variants" != xzero; then
|
||||
if test "x$enable_deprecated_ports" = "xyes"; then
|
||||
AC_MSG_WARN([The 32-bit x86 port is deprecated and may be removed in a future release.])
|
||||
else
|
||||
AC_MSG_ERROR(m4_normalize([The 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
|
||||
# There are no deprecated ports. Implement the deprecation warnings here.
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, 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
|
||||
@ -144,6 +144,7 @@ endif
|
||||
|
||||
LIBM := @LIBM@
|
||||
LIBDL := @LIBDL@
|
||||
LIBPTHREAD := @LIBPTHREAD@
|
||||
|
||||
WINENV_ROOT := @WINENV_ROOT@
|
||||
WINENV_PREFIX := @WINENV_PREFIX@
|
||||
@ -385,16 +386,28 @@ CAPSTONE_ARCH_AARCH64_NAME := @CAPSTONE_ARCH_AARCH64_NAME@
|
||||
# it in sync.
|
||||
BOOT_JDK := @BOOT_JDK@
|
||||
|
||||
BUILD_JDK := @BUILD_JDK@
|
||||
CREATE_BUILDJDK := @CREATE_BUILDJDK@
|
||||
EXTERNAL_BUILDJDK := @EXTERNAL_BUILDJDK@
|
||||
EXTERNAL_BUILDJDK_PATH := @EXTERNAL_BUILDJDK_PATH@
|
||||
|
||||
ifneq ($(EXTERNAL_BUILDJDK_PATH), )
|
||||
EXTERNAL_BUILDJDK := true
|
||||
CREATE_BUILDJDK := false
|
||||
BUILD_JDK := $(EXTERNAL_BUILDJDK_PATH)
|
||||
else
|
||||
EXTERNAL_BUILDJDK := false
|
||||
ifeq ($(COMPILE_TYPE), cross)
|
||||
CREATE_BUILDJDK := true
|
||||
BUILD_JDK := $(BUILDJDK_OUTPUTDIR)/jdk
|
||||
else
|
||||
CREATE_BUILDJDK := false
|
||||
BUILD_JDK := $(JDK_OUTPUTDIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Whether the boot jdk jar supports --date=TIMESTAMP
|
||||
BOOT_JDK_JAR_SUPPORTS_DATE := @BOOT_JDK_JAR_SUPPORTS_DATE@
|
||||
|
||||
# When compiling Java source to be run by the boot jdk
|
||||
# use these extra flags, eg -source 6 -target 6
|
||||
BOOT_JDK_SOURCETARGET := @BOOT_JDK_SOURCETARGET@
|
||||
# The oldest supported boot jdk version
|
||||
OLDEST_BOOT_JDK_VERSION := @OLDEST_BOOT_JDK_VERSION@
|
||||
|
||||
# Information about the build system
|
||||
NUM_CORES := @NUM_CORES@
|
||||
@ -426,6 +439,9 @@ LIBFFI_LIBS := @LIBFFI_LIBS@
|
||||
LIBFFI_CFLAGS := @LIBFFI_CFLAGS@
|
||||
ENABLE_LIBFFI_BUNDLING := @ENABLE_LIBFFI_BUNDLING@
|
||||
LIBFFI_LIB_FILE := @LIBFFI_LIB_FILE@
|
||||
ICONV_CFLAGS := @ICONV_CFLAGS@
|
||||
ICONV_LDFLAGS := @ICONV_LDFLAGS@
|
||||
ICONV_LIBS := @ICONV_LIBS@
|
||||
FILE_MACRO_CFLAGS := @FILE_MACRO_CFLAGS@
|
||||
REPRODUCIBLE_CFLAGS := @REPRODUCIBLE_CFLAGS@
|
||||
|
||||
@ -450,6 +466,7 @@ JCOV_ENABLED := @JCOV_ENABLED@
|
||||
JCOV_HOME := @JCOV_HOME@
|
||||
JCOV_INPUT_JDK := @JCOV_INPUT_JDK@
|
||||
JCOV_FILTERS := @JCOV_FILTERS@
|
||||
JCOV_MODULES := @JCOV_MODULES@
|
||||
|
||||
# AddressSanitizer
|
||||
ASAN_ENABLED := @ASAN_ENABLED@
|
||||
@ -475,6 +492,9 @@ MACOSX_VERSION_MAX := @MACOSX_VERSION_MAX@
|
||||
MACOSX_CODESIGN_MODE := @MACOSX_CODESIGN_MODE@
|
||||
MACOSX_CODESIGN_IDENTITY := @MACOSX_CODESIGN_IDENTITY@
|
||||
|
||||
# The code signing hook configuration
|
||||
SIGNING_HOOK := @SIGNING_HOOK@
|
||||
|
||||
# Toolchain type: gcc, clang, microsoft...
|
||||
TOOLCHAIN_TYPE := @TOOLCHAIN_TYPE@
|
||||
TOOLCHAIN_VERSION := @TOOLCHAIN_VERSION@
|
||||
@ -484,7 +504,7 @@ CXX_VERSION_NUMBER := @CXX_VERSION_NUMBER@
|
||||
# Legacy support
|
||||
HOTSPOT_TOOLCHAIN_TYPE := @HOTSPOT_TOOLCHAIN_TYPE@
|
||||
|
||||
CC_OUT_OPTION := @CC_OUT_OPTION@
|
||||
AS_NON_ASM_EXTENSION_OPTION := @AS_NON_ASM_EXTENSION_OPTION@
|
||||
|
||||
# Flags used for overriding the default opt setting for a C/C++ source file.
|
||||
C_O_FLAG_HIGHEST_JVM := @C_O_FLAG_HIGHEST_JVM@
|
||||
@ -510,6 +530,7 @@ DISABLED_WARNINGS_CXX := @DISABLED_WARNINGS_CXX@
|
||||
|
||||
# A global flag (true or false) determining if native warnings are considered errors.
|
||||
WARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@
|
||||
JAVA_WARNINGS_AS_ERRORS := @JAVA_WARNINGS_AS_ERRORS@
|
||||
|
||||
CFLAGS_CCACHE := @CFLAGS_CCACHE@
|
||||
ADLC_LANGSTD_CXXFLAGS := @ADLC_LANGSTD_CXXFLAGS@
|
||||
@ -615,17 +636,8 @@ ASFLAGS_DEBUG_SYMBOLS := @ASFLAGS_DEBUG_SYMBOLS@
|
||||
# Compress (or not) jars
|
||||
COMPRESS_JARS := @COMPRESS_JARS@
|
||||
|
||||
# Options to linker to specify the library name.
|
||||
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
|
||||
SET_SHARED_LIBRARY_NAME = @SET_SHARED_LIBRARY_NAME@
|
||||
|
||||
SHARED_LIBRARY_FLAGS := @SHARED_LIBRARY_FLAGS@
|
||||
|
||||
# Set origin using the linker, ie use the relative path to the dependent library to find the dependencies.
|
||||
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
|
||||
SET_SHARED_LIBRARY_ORIGIN = @SET_SHARED_LIBRARY_ORIGIN@
|
||||
SET_EXECUTABLE_ORIGIN = @SET_EXECUTABLE_ORIGIN@
|
||||
|
||||
LIBRARY_PREFIX := @LIBRARY_PREFIX@
|
||||
SHARED_LIBRARY_SUFFIX := @SHARED_LIBRARY_SUFFIX@
|
||||
STATIC_LIBRARY_SUFFIX := @STATIC_LIBRARY_SUFFIX@
|
||||
@ -648,8 +660,8 @@ JAVA_CMD := @JAVA@
|
||||
JAVAC_CMD := @JAVAC@
|
||||
JAVADOC_CMD := @JAVADOC@
|
||||
JAR_CMD := @JAR@
|
||||
JLINK_CMD := @JLINK@
|
||||
JMOD_CMD := @JMOD@
|
||||
JLINK_CMD := @FIXPATH@ $(BUILD_JDK)/bin/jlink
|
||||
JMOD_CMD := @FIXPATH@ $(BUILD_JDK)/bin/jmod
|
||||
# These variables are meant to be used. They are defined with = instead of := to make
|
||||
# it possible to override only the *_CMD variables.
|
||||
JAVA = $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
|
||||
@ -708,6 +720,7 @@ NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS)
|
||||
JMOD_COMPRESS := @JMOD_COMPRESS@
|
||||
JLINK_KEEP_PACKAGED_MODULES := @JLINK_KEEP_PACKAGED_MODULES@
|
||||
JLINK_PRODUCE_LINKABLE_RUNTIME := @JLINK_PRODUCE_LINKABLE_RUNTIME@
|
||||
JLINK_USER_EXTRA_FLAGS := @JLINK_USER_EXTRA_FLAGS@
|
||||
|
||||
RCFLAGS := @RCFLAGS@
|
||||
|
||||
@ -792,8 +805,10 @@ TAR_SUPPORTS_TRANSFORM := @TAR_SUPPORTS_TRANSFORM@
|
||||
|
||||
# Build setup
|
||||
USE_EXTERNAL_LIBJPEG := @USE_EXTERNAL_LIBJPEG@
|
||||
LIBJPEG_CFLAGS := @LIBJPEG_CFLAGS@
|
||||
LIBJPEG_LIBS := @LIBJPEG_LIBS@
|
||||
USE_EXTERNAL_LIBGIF := @USE_EXTERNAL_LIBGIF@
|
||||
GIFLIB_CFLAGS := @GIFLIB_CFLAGS@
|
||||
GIFLIB_LIBS := @GIFLIB_LIBS@
|
||||
USE_EXTERNAL_LIBZ := @USE_EXTERNAL_LIBZ@
|
||||
LIBZ_CFLAGS := @LIBZ_CFLAGS@
|
||||
@ -835,10 +850,12 @@ SVE_CFLAGS := @SVE_CFLAGS@
|
||||
JDK_IMAGE_SUBDIR := jdk
|
||||
JRE_IMAGE_SUBDIR := jre
|
||||
JCOV_IMAGE_SUBDIR := jdk-jcov
|
||||
STATIC_JDK_IMAGE_SUBDIR := static-jdk
|
||||
|
||||
# Colon left out to be able to override output dir for bootcycle-images
|
||||
JDK_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
|
||||
JRE_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR)
|
||||
STATIC_JDK_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(STATIC_JDK_IMAGE_SUBDIR)
|
||||
JCOV_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(JCOV_IMAGE_SUBDIR)
|
||||
|
||||
# Test image, as above
|
||||
@ -884,12 +901,14 @@ JDK_MACOSX_BUNDLE_DIR = $(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR)
|
||||
JRE_MACOSX_BUNDLE_DIR = $(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR)
|
||||
JDK_MACOSX_BUNDLE_DIR_SIGNED = $(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR_SIGNED)
|
||||
JRE_MACOSX_BUNDLE_DIR_SIGNED = $(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR_SIGNED)
|
||||
JDK_MACOSX_BUNDLE_TOP_DIR = jdk-$(VERSION_NUMBER).jdk
|
||||
JRE_MACOSX_BUNDLE_TOP_DIR = jre-$(VERSION_NUMBER).jre
|
||||
JDK_MACOSX_CONTENTS_SUBDIR = $(JDK_MACOSX_BUNDLE_TOP_DIR)/Contents
|
||||
JRE_MACOSX_CONTENTS_SUBDIR = $(JRE_MACOSX_BUNDLE_TOP_DIR)/Contents
|
||||
JDK_MACOSX_BUNDLE_TOP_SUBDIR = jdk-$(VERSION_NUMBER).jdk
|
||||
JRE_MACOSX_BUNDLE_TOP_SUBDIR = jre-$(VERSION_NUMBER).jre
|
||||
JDK_MACOSX_CONTENTS_SUBDIR = $(JDK_MACOSX_BUNDLE_TOP_SUBDIR)/Contents
|
||||
JRE_MACOSX_CONTENTS_SUBDIR = $(JRE_MACOSX_BUNDLE_TOP_SUBDIR)/Contents
|
||||
JDK_MACOSX_CONTENTS_DIR = $(JDK_MACOSX_BUNDLE_DIR)/$(JDK_MACOSX_CONTENTS_SUBDIR)
|
||||
JRE_MACOSX_CONTENTS_DIR = $(JRE_MACOSX_BUNDLE_DIR)/$(JRE_MACOSX_CONTENTS_SUBDIR)
|
||||
JDK_MACOSX_BUNDLE_TOP_DIR = $(JDK_MACOSX_BUNDLE_DIR)/$(JDK_MACOSX_BUNDLE_TOP_SUBDIR)
|
||||
JRE_MACOSX_BUNDLE_TOP_DIR = $(JRE_MACOSX_BUNDLE_DIR)/$(JRE_MACOSX_BUNDLE_TOP_SUBDIR)
|
||||
|
||||
# Bundle names
|
||||
ifneq ($(VERSION_BUILD), )
|
||||
@ -918,6 +937,7 @@ DOCS_JAVASE_BUNDLE_NAME := javase-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
|
||||
DOCS_REFERENCE_BUNDLE_NAME := jdk-reference-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
|
||||
STATIC_LIBS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-static-libs$(DEBUG_PART).tar.gz
|
||||
STATIC_LIBS_GRAAL_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-static-libs-graal$(DEBUG_PART).tar.gz
|
||||
STATIC_JDK_BUNDLE_NAME := static-jdk-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
|
||||
JCOV_BUNDLE_NAME := jdk-jcov-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
|
||||
|
||||
JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_BUNDLE_NAME)
|
||||
@ -928,6 +948,7 @@ TEST_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_BUNDLE_NAME)
|
||||
DOCS_JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_JDK_BUNDLE_NAME)
|
||||
DOCS_JAVASE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_JAVASE_BUNDLE_NAME)
|
||||
DOCS_REFERENCE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_REFERENCE_BUNDLE_NAME)
|
||||
STATIC_JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(STATIC_JDK_BUNDLE_NAME)
|
||||
JCOV_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JCOV_BUNDLE_NAME)
|
||||
|
||||
# This macro is called to allow inclusion of closed source counterparts.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, 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
|
||||
@ -276,9 +276,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
|
||||
ORG_CFLAGS="$CFLAGS"
|
||||
ORG_CXXFLAGS="$CXXFLAGS"
|
||||
|
||||
# autoconf magic only relies on PATH, so update it if tools dir is specified
|
||||
OLD_PATH="$PATH"
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
|
||||
if test "x$XCODEBUILD" != x; then
|
||||
XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2> /dev/null | $HEAD -n 1`
|
||||
@ -291,13 +288,19 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
|
||||
# For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
|
||||
TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
|
||||
TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode $TOOLCHAIN_VERSION"
|
||||
if test "x$TOOLCHAIN_VERSION" = "x16" || test "x$TOOLCHAIN_VERSION" = "x16.1" ; then
|
||||
AC_MSG_NOTICE([Xcode $TOOLCHAIN_VERSION has a compiler bug that causes the build to fail.])
|
||||
AC_MSG_NOTICE([Please use Xcode 16.2 or later, or a version prior to 16.])
|
||||
AC_MSG_ERROR([Compiler version is not supported.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(TOOLCHAIN_VERSION)
|
||||
|
||||
# Finally prepend TOOLCHAIN_PATH to the PATH, to allow --with-tools-dir to
|
||||
# override all other locations.
|
||||
if test "x$TOOLCHAIN_PATH" != x; then
|
||||
# For the microsoft toolchain the toolchain path needs to be added to the
|
||||
# normal path, or the compiler will not work in some situations in later
|
||||
# configure checks.
|
||||
if test "x$TOOLCHAIN_TYPE" = "xmicrosoft" && test "x$TOOLCHAIN_PATH" != x; then
|
||||
export PATH=$TOOLCHAIN_PATH:$PATH
|
||||
fi
|
||||
])
|
||||
@ -305,13 +308,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
|
||||
# Restore path, etc
|
||||
AC_DEFUN_ONCE([TOOLCHAIN_POST_DETECTION],
|
||||
[
|
||||
# Restore old path, except for the microsoft toolchain, which requires the
|
||||
# toolchain path to remain in place. Otherwise the compiler will not work in
|
||||
# some situations in later configure checks.
|
||||
if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
|
||||
PATH="$OLD_PATH"
|
||||
fi
|
||||
|
||||
# Restore the flags to the user specified values.
|
||||
# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
|
||||
CFLAGS="$ORG_CFLAGS"
|
||||
@ -620,6 +616,13 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
# All other toolchains use the compiler to link.
|
||||
LD="$CC"
|
||||
LDCXX="$CXX"
|
||||
# Force use of lld, since that is what we expect when setting flags later on
|
||||
if test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
LD="$LD -fuse-ld=lld"
|
||||
LDCXX="$LDCXX -fuse-ld=lld"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(LD)
|
||||
# FIXME: it should be CXXLD, according to standard (cf CXXCPP)
|
||||
@ -643,8 +646,11 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
if test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
|
||||
AS="$CC -c"
|
||||
else
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
|
||||
# On 64 bit windows, the assembler is "ml64.exe"
|
||||
if test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
|
||||
# On Windows aarch64, the assembler is "armasm64.exe"
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(AS, armasm64)
|
||||
elif test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
|
||||
# On Windows x64, the assembler is "ml64.exe"
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(AS, ml64)
|
||||
else
|
||||
# otherwise, the assembler is "ml.exe"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, 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
|
||||
@ -87,7 +87,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
|
||||
elif test "x$TARGET_CPU" = xaarch64; then
|
||||
# for host x86-64, target aarch64
|
||||
# aarch64 requires Visual Studio 16.8 or higher
|
||||
VCVARSFILES="vcvarsamd64_arm64.bat vcvarsx86_arm64.bat"
|
||||
VCVARSFILES="vcvarsarm64.bat vcvarsamd64_arm64.bat vcvarsx86_arm64.bat"
|
||||
fi
|
||||
|
||||
for VCVARSFILE in $VCVARSFILES; do
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, 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
|
||||
@ -566,6 +566,14 @@ AC_DEFUN([UTIL_CHECK_TYPE_file],
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([UTIL_CHECK_TYPE_executable],
|
||||
[
|
||||
# Check that the argument is an existing file that the user has execute access to.
|
||||
if (test ! -x "$1") || (test ! -f "$1") ; then
|
||||
FAILURE="File $1 does not exist or is not executable"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([UTIL_CHECK_TYPE_directory],
|
||||
[
|
||||
# Check that the argument is an existing directory
|
||||
@ -648,7 +656,7 @@ AC_DEFUN([UTIL_CHECK_TYPE_features],
|
||||
# Arguments:
|
||||
# NAME: The base name of this option (i.e. what follows --with-). Required.
|
||||
# TYPE: The type of the value. Can be one of "string", "integer", "file",
|
||||
# "directory", "literal", "multivalue" or "features". Required.
|
||||
# "executable", "directory", "literal", "multivalue" or "features". Required.
|
||||
# DEFAULT: The default value for this option. Can be any valid string.
|
||||
# Required.
|
||||
# OPTIONAL: If this feature can be disabled. Defaults to false. If true,
|
||||
@ -758,7 +766,7 @@ UTIL_DEFUN_NAMED([UTIL_ARG_WITH],
|
||||
# Need to assign since we can't expand ARG TYPE inside the m4 quoted if statement
|
||||
TEST_TYPE="ARG_TYPE"
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
[ if [[ ! "$TEST_TYPE" =~ ^(string|integer|file|directory|literal|multivalue|features)$ ]] ; then ]
|
||||
[ if [[ ! "$TEST_TYPE" =~ ^(string|integer|file|executable|directory|literal|multivalue|features)$ ]] ; then ]
|
||||
AC_MSG_ERROR([Internal error: Argument TYPE to [UTIL_ARG_WITH] must be a valid type, was: 'ARG_TYPE'])
|
||||
fi
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2025, 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
|
||||
@ -58,21 +58,32 @@ AC_DEFUN([UTIL_PREPEND_TO_PATH],
|
||||
# 2) The path will be absolute, and it will be in unix-style (on
|
||||
# cygwin).
|
||||
# $1: The name of the variable to fix
|
||||
# $2: if NOFAIL, errors will be silently ignored
|
||||
# $2: if NOFAIL, if the path cannot be resolved then errors will not be
|
||||
# reported and an empty path will be set
|
||||
AC_DEFUN([UTIL_FIXUP_PATH],
|
||||
[
|
||||
# Only process if variable expands to non-empty
|
||||
path="[$]$1"
|
||||
if test "x$path" != x; then
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
if test "x$2" = "xNOFAIL"; then
|
||||
quiet_option="-q"
|
||||
imported_path=`$FIXPATH_BASE -q import "$path"`
|
||||
if test $? -ne 0 || test ! -e $imported_path; then
|
||||
if test "x$2" != "xNOFAIL"; then
|
||||
AC_MSG_NOTICE([The path of $1, which is given as "$path", can not be properly resolved.])
|
||||
AC_MSG_NOTICE([Please see the section "Special Considerations" in building.md.])
|
||||
AC_MSG_NOTICE([This is the error message given by fixpath:])
|
||||
# Rerun fixpath without -q to get an error message
|
||||
$FIXPATH_BASE import "$path"
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
else
|
||||
imported_path=""
|
||||
fi
|
||||
fi
|
||||
imported_path=`$FIXPATH_BASE $quiet_option import "$path"`
|
||||
$FIXPATH_BASE verify "$imported_path"
|
||||
|
||||
$FIXPATH_BASE -q verify "$imported_path"
|
||||
if test $? -ne 0; then
|
||||
if test "x$2" != "xNOFAIL"; then
|
||||
AC_MSG_ERROR([The path of $1, which resolves as "$path", could not be imported.])
|
||||
AC_MSG_ERROR([The path of $1, which resolves as "$path", could not be verified.])
|
||||
else
|
||||
imported_path=""
|
||||
fi
|
||||
@ -83,7 +94,7 @@ AC_DEFUN([UTIL_FIXUP_PATH],
|
||||
if test "x$imported_path_lower" != "x$orig_path_lower"; then
|
||||
$1="$imported_path"
|
||||
fi
|
||||
else
|
||||
else # non-Windows
|
||||
[ if [[ "$path" =~ " " ]]; then ]
|
||||
if test "x$2" != "xNOFAIL"; then
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
|
||||
@ -186,7 +197,6 @@ AC_DEFUN([UTIL_CHECK_WINENV_EXEC_TYPE],
|
||||
# it need to be in the PATH.
|
||||
# $1: The name of the variable to fix
|
||||
# $2: Where to look for the command (replaces $PATH)
|
||||
# $3: set to NOFIXPATH to skip prefixing FIXPATH, even if needed on platform
|
||||
AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
|
||||
[
|
||||
input="[$]$1"
|
||||
@ -233,15 +243,19 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
|
||||
# This is a path with slashes, don't look at $PATH
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
# fixpath.sh import will do all heavy lifting for us
|
||||
new_path=`$FIXPATH_BASE import "$path"`
|
||||
new_path=`$FIXPATH_BASE -q import "$path"`
|
||||
|
||||
if test ! -e $new_path; then
|
||||
if test $? -ne 0 || test ! -e $new_path; then
|
||||
# It failed, but maybe spaces were part of the path and not separating
|
||||
# the command and argument. Retry using that assumption.
|
||||
new_path=`$FIXPATH_BASE import "$input"`
|
||||
if test ! -e $new_path; then
|
||||
AC_MSG_NOTICE([The command for $1, which resolves as "$input", can not be found.])
|
||||
AC_MSG_ERROR([Cannot locate $input])
|
||||
new_path=`$FIXPATH_BASE -q import "$input"`
|
||||
if test $? -ne 0 || test ! -e $new_path; then
|
||||
AC_MSG_NOTICE([The command for $1, which is given as "$input", can not be properly resolved.])
|
||||
AC_MSG_NOTICE([Please see the section "Special Considerations" in building.md.])
|
||||
AC_MSG_NOTICE([This is the error message given by fixpath:])
|
||||
# Rerun fixpath without -q to get an error message
|
||||
$FIXPATH_BASE import "$input"
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
# It worked, clear all "arguments"
|
||||
arguments=""
|
||||
@ -282,10 +296,6 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$3" = xNOFIXPATH; then
|
||||
fixpath_prefix=""
|
||||
fi
|
||||
|
||||
# Now join together the path and the arguments once again
|
||||
new_complete="$fixpath_prefix$new_path$arguments"
|
||||
$1="$new_complete"
|
||||
@ -353,7 +363,15 @@ AC_DEFUN([UTIL_SETUP_TOOL],
|
||||
else
|
||||
# Otherwise we believe it is a complete path. Use it as it is.
|
||||
if test ! -x "$tool_command" && test ! -x "${tool_command}.exe"; then
|
||||
AC_MSG_ERROR([User supplied tool $1="$tool_command" does not exist or is not executable])
|
||||
# Maybe the path had spaces in it; try again with the entire argument
|
||||
if test ! -x "$tool_override" && test ! -x "${tool_override}.exe"; then
|
||||
AC_MSG_ERROR([User supplied tool $1="$tool_override" does not exist or is not executable])
|
||||
else
|
||||
# We successfully located the executable assuming the spaces were part of the path.
|
||||
# We can't combine using paths with spaces and arguments, so assume tool_args is empty.
|
||||
tool_command="$tool_override"
|
||||
tool_args=""
|
||||
fi
|
||||
fi
|
||||
if test ! -x "$tool_command"; then
|
||||
tool_command="${tool_command}.exe"
|
||||
@ -379,7 +397,6 @@ AC_DEFUN([UTIL_SETUP_TOOL],
|
||||
# $1: variable to set
|
||||
# $2: executable name (or list of names) to look for
|
||||
# $3: [path]
|
||||
# $4: set to NOFIXPATH to skip prefixing FIXPATH, even if needed on platform
|
||||
AC_DEFUN([UTIL_LOOKUP_PROGS],
|
||||
[
|
||||
UTIL_SETUP_TOOL($1, [
|
||||
@ -421,10 +438,8 @@ AC_DEFUN([UTIL_LOOKUP_PROGS],
|
||||
|
||||
# If we have FIXPATH enabled, strip all instances of it and prepend
|
||||
# a single one, to avoid double fixpath prefixing.
|
||||
if test "x$4" != xNOFIXPATH; then
|
||||
[ if [[ $FIXPATH != "" && $result =~ ^"$FIXPATH " ]]; then ]
|
||||
result="\$FIXPATH ${result#"$FIXPATH "}"
|
||||
fi
|
||||
[ if [[ $FIXPATH != "" && $result =~ ^"$FIXPATH " ]]; then ]
|
||||
result="\$FIXPATH ${result#"$FIXPATH "}"
|
||||
fi
|
||||
AC_MSG_RESULT([$result])
|
||||
break 2;
|
||||
@ -443,17 +458,18 @@ AC_DEFUN([UTIL_LOOKUP_PROGS],
|
||||
|
||||
################################################################################
|
||||
# Call UTIL_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool. This will look
|
||||
# first for cross-compilation tools.
|
||||
# first for tools using the cross-compilation prefix, and then for tools without
|
||||
# this prefix. For each of these name variants, it will look first in the
|
||||
# toolchain path, and then in the normal path.
|
||||
# $1: variable to set
|
||||
# $2: executable name (or list of names) to look for
|
||||
# $3: [path]
|
||||
AC_DEFUN([UTIL_LOOKUP_TOOLCHAIN_PROGS],
|
||||
[
|
||||
if test "x$ac_tool_prefix" = x; then
|
||||
UTIL_LOOKUP_PROGS($1, $2, $3)
|
||||
UTIL_LOOKUP_PROGS($1, $2, [$TOOLCHAIN_PATH:$PATH])
|
||||
else
|
||||
prefixed_names=$(for name in $2; do echo ${ac_tool_prefix}${name} $name; done)
|
||||
UTIL_LOOKUP_PROGS($1, $prefixed_names, $3)
|
||||
UTIL_LOOKUP_PROGS($1, $prefixed_names, [$TOOLCHAIN_PATH:$PATH])
|
||||
fi
|
||||
])
|
||||
|
||||
@ -482,10 +498,9 @@ AC_DEFUN([UTIL_REQUIRE_PROGS],
|
||||
# Like UTIL_LOOKUP_PROGS but fails if no tool was found.
|
||||
# $1: variable to set
|
||||
# $2: executable name (or list of names) to look for
|
||||
# $3: [path]
|
||||
AC_DEFUN([UTIL_REQUIRE_TOOLCHAIN_PROGS],
|
||||
[
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS($1, $2, $3)
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS($1, $2)
|
||||
UTIL_CHECK_NONEMPTY($1)
|
||||
])
|
||||
|
||||
@ -515,6 +530,24 @@ AC_DEFUN([UTIL_ADD_FIXPATH],
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# Return a path to the executable binary from a command line, stripping away
|
||||
# any FIXPATH prefix or arguments. The resulting value can be checked for
|
||||
# existence using "test -e". The result is returned in a variable named
|
||||
# "$1_EXECUTABLE".
|
||||
#
|
||||
# $1: variable describing the command to get the binary for
|
||||
AC_DEFUN([UTIL_GET_EXECUTABLE],
|
||||
[
|
||||
# Strip the FIXPATH prefix, if any
|
||||
fixpath_stripped="[$]$1"
|
||||
[ if [[ $FIXPATH != "" && $fixpath_stripped =~ ^"$FIXPATH " ]]; then ]
|
||||
fixpath_stripped="${fixpath_stripped#"$FIXPATH "}"
|
||||
fi
|
||||
# Remove any arguments following the binary
|
||||
$1_EXECUTABLE="${fixpath_stripped%% *}"
|
||||
])
|
||||
|
||||
################################################################################
|
||||
AC_DEFUN([UTIL_REMOVE_SYMBOLIC_LINKS],
|
||||
[
|
||||
|
||||
@ -45,6 +45,9 @@ ifeq ($(INCLUDE), true)
|
||||
# e.g. a simple sed replacement on the input file. If the operations are
|
||||
# unrelated to the main COMMAND, this is not a suitable solution.
|
||||
#
|
||||
# Before execution, the current working directory is changed to SUPPORT_DIR.
|
||||
# This can be overridden with WORKING_DIR.
|
||||
#
|
||||
# If your command outputs a variety of files, or if it's really a single file
|
||||
# but you don't really care about the output from the perspective, you can just
|
||||
# supply an OUTPUT_DIR. You are supposed to make sure the command creates files
|
||||
@ -75,9 +78,12 @@ ifeq ($(INCLUDE), true)
|
||||
# OUTPUT_DIR : The directory that will contain the result from the command
|
||||
# OUTPUT_FILE : Use this if the command results in a single output file
|
||||
# SUPPORT_DIR : Where to store generated support files
|
||||
# WORKING_DIR : Directory to cd to before executing the command
|
||||
# INFO : Message to display at LOG=info level when running command (optional)
|
||||
# WARN : Message to display at LOG=warn level when running command (optional)
|
||||
# DEPS : Dependencies for the execution to take place
|
||||
# DRYRUN : Set to true to perform everything but executing the command \
|
||||
# (defaults to false, primarily intended for debugging)
|
||||
#
|
||||
|
||||
# Setup make rules for copying files, with an option to do more complex
|
||||
@ -133,44 +139,61 @@ define SetupExecuteBody
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($$($1_WORKING_DIR), )
|
||||
$1_WORKING_DIR := $$($1_SUPPORT_DIR)
|
||||
endif
|
||||
|
||||
ifeq ($$($1_INFO)$$($1_WARN), )
|
||||
# If neither info nor warn is provided, add basic info text.
|
||||
$1_INFO := Running commands for $1
|
||||
endif
|
||||
|
||||
$1_VARDEPS := $$($1_COMMAND) $$($1_PRE_COMMAND) $$($1_POST_COMMAND)
|
||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$($1_BASE)_exec.vardeps)
|
||||
|
||||
ifneq ($$($1_PRE_COMMAND), )
|
||||
|
||||
$$($1_PRE_MARKER): $$($1_DEPS)
|
||||
$$($1_PRE_MARKER): $$($1_DEPS) $$($1_VARDEPS_FILE)
|
||||
ifneq ($$($1_WARN), )
|
||||
$$(call LogWarn, $$($1_WARN))
|
||||
endif
|
||||
ifneq ($$($1_INFO), )
|
||||
$$(call LogInfo, $$($1_INFO))
|
||||
endif
|
||||
$$(call MakeDir, $$($1_SUPPORT_DIR) $$($1_OUTPUT_DIR))
|
||||
$$(call MakeDir, $$(call EncodeSpace, $$($1_WORKING_DIR)) $$(call EncodeSpace, $$($1_SUPPORT_DIR)) $$(call EncodeSpace, $$($1_OUTPUT_DIR)))
|
||||
$$(call ExecuteWithLog, $$($1_BASE)_pre, \
|
||||
$$($1_PRE_COMMAND))
|
||||
cd $$($1_WORKING_DIR) && $$($1_PRE_COMMAND))
|
||||
$$(TOUCH) $$@
|
||||
|
||||
$$($1_EXEC_RESULT): $$($1_PRE_MARKER)
|
||||
$$(call ExecuteWithLog, $$($1_BASE)_exec, \
|
||||
$$($1_COMMAND))
|
||||
ifneq ($$($1_DRYRUN), true)
|
||||
$$(call ExecuteWithLog, $$($1_BASE)_exec, \
|
||||
cd $$($1_WORKING_DIR) && $$($1_COMMAND))
|
||||
else
|
||||
$$(call LogWarn, DRYRUN enabled for $1, not actually running command)
|
||||
$$(TOUCH) $$@
|
||||
endif
|
||||
ifeq ($$($1_EXEC_RESULT), $$($1_EXEC_MARKER))
|
||||
$$(TOUCH) $$@
|
||||
endif
|
||||
|
||||
$1 := $$($1_PRE_MARKER) $$($1_EXEC_RESULT)
|
||||
else
|
||||
$$($1_EXEC_RESULT): $$($1_DEPS)
|
||||
$$($1_EXEC_RESULT): $$($1_DEPS) $$($1_VARDEPS_FILE)
|
||||
ifneq ($$($1_WARN), )
|
||||
$$(call LogWarn, $$($1_WARN))
|
||||
endif
|
||||
ifneq ($$($1_INFO), )
|
||||
$$(call LogInfo, $$($1_INFO))
|
||||
endif
|
||||
$$(call MakeDir, $$(call EncodeSpace, $$($1_SUPPORT_DIR)) $$(call EncodeSpace, $$($1_OUTPUT_DIR)))
|
||||
$$(call ExecuteWithLog, $$($1_BASE)_exec, \
|
||||
$$($1_COMMAND))
|
||||
$$(call MakeDir, $$(call EncodeSpace, $$($1_WORKING_DIR)) $$(call EncodeSpace, $$($1_SUPPORT_DIR)) $$(call EncodeSpace, $$($1_OUTPUT_DIR)))
|
||||
ifneq ($$($1_DRYRUN), true)
|
||||
$$(call ExecuteWithLog, $$($1_BASE)_exec, \
|
||||
cd $$($1_WORKING_DIR) && $$($1_COMMAND))
|
||||
else
|
||||
$$(call LogWarn, DRYRUN enabled for $1, not actually running command)
|
||||
$$(TOUCH) $$@
|
||||
endif
|
||||
ifeq ($$($1_EXEC_RESULT), $$($1_EXEC_MARKER))
|
||||
$$(TOUCH) $$@
|
||||
endif
|
||||
@ -182,7 +205,7 @@ define SetupExecuteBody
|
||||
|
||||
$$($1_FINAL_RESULT): $$($1_EXEC_RESULT)
|
||||
$$(call ExecuteWithLog, $$($1_BASE)_post, \
|
||||
$$($1_POST_COMMAND))
|
||||
cd $$($1_WORKING_DIR) && $$($1_POST_COMMAND))
|
||||
$$(TOUCH) $$@
|
||||
|
||||
$1 += $$($1_FINAL_RESULT)
|
||||
|
||||
@ -58,13 +58,15 @@ ifeq ($(GENERATE_FIND_TESTS_FILE), true)
|
||||
$(TOPDIR)/test/make/TestMake.gmk
|
||||
$(call MakeTargetDir)
|
||||
( $(foreach root, $(JTREG_TESTROOTS), \
|
||||
$(PRINTF) "\n$(root)_JTREG_TEST_GROUPS := " ; \
|
||||
$(ECHO) ""; \
|
||||
$(PRINTF) "\n%s_JTREG_TEST_GROUPS := " "$(root)"; \
|
||||
$(SED) -n -e 's/^\#.*//g' -e 's/\([^ ]*\)\w*=.*/\1/gp' \
|
||||
$($(root)_JTREG_GROUP_FILES) \
|
||||
| $(SORT) -u | $(TR) '\n' ' ' ; \
|
||||
) \
|
||||
) > $@
|
||||
$(PRINTF) "\nMAKE_TEST_TARGETS := " >> $@
|
||||
$(ECHO) "" >> $@
|
||||
$(PRINTF) "MAKE_TEST_TARGETS := " >> $@
|
||||
$(MAKE) -s --no-print-directory $(MAKE_ARGS) \
|
||||
SPEC=$(SPEC) -f $(TOPDIR)/test/make/TestMake.gmk print-targets \
|
||||
TARGETS_FILE=$@
|
||||
|
||||
@ -256,7 +256,7 @@ define SetupJarArchiveBody
|
||||
$$(if $$($1_JARMAIN), \
|
||||
$(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \
|
||||
$$(if $$($1_EXTRA_MANIFEST_ATTR), \
|
||||
$(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \
|
||||
$(ECHO) "$$($1_EXTRA_MANIFEST_ATTR)" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \
|
||||
$(ECHO) Creating $$($1_NAME) $$(NEWLINE) \
|
||||
$$($1_JAR_CMD) --create $$($1_JAR_OPTIONS) --file $$@ --manifest $$($1_MANIFEST_FILE) $$(NEWLINE) \
|
||||
$$($1_SCAPTURE_CONTENTS) \
|
||||
|
||||
@ -38,10 +38,15 @@ include JarArchive.gmk
|
||||
###
|
||||
|
||||
# Create classes that can run on the bootjdk
|
||||
TARGET_RELEASE_BOOTJDK := $(BOOT_JDK_SOURCETARGET)
|
||||
# -Xlint:-options is added to avoid the warning
|
||||
# "system modules path not set in conjunction with -source"
|
||||
TARGET_RELEASE_BOOTJDK := -source $(OLDEST_BOOT_JDK_VERSION) \
|
||||
-target $(OLDEST_BOOT_JDK_VERSION) -Xlint:-options
|
||||
|
||||
# Create classes that can be used in (or be a part of) the new jdk we're building
|
||||
TARGET_RELEASE_NEWJDK := -source $(JDK_SOURCE_TARGET_VERSION) -target $(JDK_SOURCE_TARGET_VERSION)
|
||||
# Create classes that can be used in (or be a part of) the new jdk we're
|
||||
# building
|
||||
TARGET_RELEASE_NEWJDK := -source $(JDK_SOURCE_TARGET_VERSION) \
|
||||
-target $(JDK_SOURCE_TARGET_VERSION)
|
||||
|
||||
# Create classes that can be used in JDK 8, for legacy support
|
||||
TARGET_RELEASE_JDK8 := --release 8
|
||||
@ -80,15 +85,13 @@ endef
|
||||
#
|
||||
# The sed expression does this:
|
||||
# 1. Add a backslash before any :, = or ! that do not have a backslash already.
|
||||
# 2. Apply the file unicode2x.sed which does a whole bunch of \u00XX to \xXX
|
||||
# conversions.
|
||||
# 3. Delete all lines starting with #.
|
||||
# 4. Delete empty lines.
|
||||
# 5. Append lines ending with \ with the next line.
|
||||
# 6. Remove leading and trailing white space. Note that tabs must be explicit
|
||||
# 2. Delete all lines starting with #.
|
||||
# 3. Delete empty lines.
|
||||
# 4. Append lines ending with \ with the next line.
|
||||
# 5. Remove leading and trailing white space. Note that tabs must be explicit
|
||||
# as sed on macosx does not understand '\t'.
|
||||
# 7. Replace the first \= with just =.
|
||||
# 8. Finally it's all sorted to create a stable output.
|
||||
# 6. Replace the first \= with just =.
|
||||
# 7. Finally it's all sorted to create a stable output.
|
||||
#
|
||||
# It is assumed that = is the character used for separating names and values.
|
||||
define add_file_to_clean
|
||||
@ -108,7 +111,6 @@ define add_file_to_clean
|
||||
( $(CAT) $$< && $(ECHO) "" ) \
|
||||
| $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' \
|
||||
-e 's/\([^\\]\)!/\1\\!/g' -e 's/^[ ]*#.*/#/g' \
|
||||
| $(SED) -f "$$(TOPDIR)/make/common/support/unicode2x.sed" \
|
||||
| $(SED) -e '/^#/d' -e '/^$$$$/d' \
|
||||
-e :a -e '/\\$$$$/N; s/\\\n//; ta' \
|
||||
-e 's/^[ ]*//;s/[ ]*$$$$//' \
|
||||
@ -155,6 +157,7 @@ endef
|
||||
# INCLUDE_FILES "com/sun/SolarisFoobar.java" means only compile this file!
|
||||
# EXCLUDE_FILES "com/sun/SolarisFoobar.java" means do not compile this particular file!
|
||||
# "SolarisFoobar.java" means do not compile SolarisFoobar, wherever it is found.
|
||||
# EXCLUDE_PATTERNS Exclude files matching any of these substrings
|
||||
# EXTRA_FILES List of extra source files to include in compilation. Can be used to
|
||||
# specify files that need to be generated by other rules first.
|
||||
# HEADERS path to directory where all generated c-headers are written.
|
||||
@ -180,6 +183,10 @@ define SetupJavaCompilationBody
|
||||
|
||||
$1_SAFE_NAME := $$(strip $$(subst /,_, $1))
|
||||
|
||||
ifeq ($$($1_LOG_ACTION), )
|
||||
$1_LOG_ACTION := Compiling
|
||||
endif
|
||||
|
||||
ifeq ($$($1_SMALL_JAVA), )
|
||||
# If unspecified, default to true
|
||||
$1_SMALL_JAVA := true
|
||||
@ -264,14 +271,17 @@ define SetupJavaCompilationBody
|
||||
$$(error Invalid value for COMPILER in SetupJavaCompilation for $1: '$$($1_COMPILER)')
|
||||
endif
|
||||
|
||||
# Allow overriding on the command line
|
||||
JAVA_WARNINGS_ARE_ERRORS ?= -Werror
|
||||
|
||||
# Tell javac to do exactly as told and no more
|
||||
PARANOIA_FLAGS := -implicit:none -Xprefer:source -XDignore.symbol.file=true -encoding ascii
|
||||
PARANOIA_FLAGS := -implicit:none -Xprefer:source -XDignore.symbol.file=true
|
||||
|
||||
$1_FLAGS += -g -Xlint:all $$($1_TARGET_RELEASE) $$(PARANOIA_FLAGS) $$(JAVA_WARNINGS_ARE_ERRORS)
|
||||
$1_FLAGS += -g -Xlint:all $$($1_TARGET_RELEASE) $$(PARANOIA_FLAGS)
|
||||
$1_FLAGS += $$($1_JAVAC_FLAGS)
|
||||
# Set character encoding in source
|
||||
$1_FLAGS += -encoding utf-8
|
||||
|
||||
ifeq ($$(JAVA_WARNINGS_AS_ERRORS), true)
|
||||
$1_FLAGS += -Werror
|
||||
endif
|
||||
|
||||
ifneq ($$($1_DISABLED_WARNINGS), )
|
||||
$1_FLAGS += -Xlint:$$(call CommaList, $$(addprefix -, $$($1_DISABLED_WARNINGS)))
|
||||
@ -332,6 +342,20 @@ define SetupJavaCompilationBody
|
||||
$1_INCLUDE_PATTERN += $$(foreach i, $$($1_SRC), $$(addprefix $$i/, $$(addsuffix /%, $$($1_INCLUDES))))
|
||||
endif
|
||||
|
||||
ifneq ($$($1_EXCLUDE_PATTERNS), )
|
||||
# We must not match the exclude pattern against the src roots, so first
|
||||
# strip the src prefixes from the absolute file paths in SRCS.
|
||||
$1_SRCS_WITHOUT_ROOTS := $$(foreach i, $$($1_SRC), \
|
||||
$$(patsubst $$i/%,%, $$(filter $$i/%, $$($1_SRCS))))
|
||||
$1_EXCLUDE_PATTERNS_WITHOUT_ROOTS := $$(call containing, \
|
||||
$$($1_EXCLUDE_PATTERNS), $$($1_SRCS_WITHOUT_ROOTS))
|
||||
# The add back all possible src prefixes; this will generate more paths
|
||||
# than really exists, but it does not matter since we will use this as
|
||||
# input to filter-out.
|
||||
$1_EXCLUDE_PATTERN += $$(foreach i, $$($1_SRC), $$(addprefix $$i/, \
|
||||
$$($1_EXCLUDE_PATTERNS_WITHOUT_ROOTS)))
|
||||
endif
|
||||
|
||||
# Apply include/exclude patterns to java sources
|
||||
ifneq ($$($1_EXCLUDE_PATTERN), )
|
||||
$1_SRCS := $$(filter-out $$($1_EXCLUDE_PATTERN), $$($1_SRCS))
|
||||
@ -457,7 +481,7 @@ define SetupJavaCompilationBody
|
||||
# list of files.
|
||||
$$($1_FILELIST): $$($1_SRCS) $$($1_VARDEPS_FILE)
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(call LogWarn, Compiling up to $$(words $$($1_SRCS)) files for $1)
|
||||
$$(call LogWarn, $$($1_LOG_ACTION) up to $$(words $$($1_SRCS)) files for $1)
|
||||
$$(eval $$(call ListPathsSafely, $1_SRCS, $$($1_FILELIST)))
|
||||
|
||||
# Create a $$($1_MODFILELIST) file with significant modified dependencies
|
||||
|
||||
@ -30,6 +30,47 @@ ifeq ($(INCLUDE), true)
|
||||
|
||||
include NativeCompilation.gmk
|
||||
|
||||
ifeq ($(call isCompiler, gcc), true)
|
||||
# --disable-new-dtags forces use of RPATH instead of RUNPATH for rpaths.
|
||||
# This protects internal library dependencies within the JDK from being
|
||||
# overridden using LD_LIBRARY_PATH. See JDK-8326891 for more information.
|
||||
SetExecutableOrigin = \
|
||||
-Wl,-rpath,\$(DOLLAR)ORIGIN$1 -Wl,--disable-new-dtags
|
||||
SetSharedLibraryOrigin = \
|
||||
-Wl,-z,origin -Wl,-rpath,\$(DOLLAR)ORIGIN$1 -Wl,--disable-new-dtags
|
||||
else ifeq ($(call isCompiler, clang), true)
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
SetExecutableOrigin = \
|
||||
-Wl,-rpath,@loader_path$(or $1,/.)
|
||||
SetSharedLibraryOrigin = \
|
||||
-Wl,-rpath,@loader_path$(or $1,/.)
|
||||
else ifeq ($(call isTargetOs, aix), true)
|
||||
SetExecutableOrigin =
|
||||
SetSharedLibraryOrigin =
|
||||
else
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
SetExecutableOrigin = \
|
||||
-Wl,-rpath,\$(DOLLAR)ORIGIN$1 -Wl,--disable-new-dtags
|
||||
else
|
||||
SetExecutableOrigin = \
|
||||
-Wl,-rpath,\$(DOLLAR)ORIGIN$1
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, arm), true)
|
||||
SetSharedLibraryOrigin = \
|
||||
-Wl,-rpath,\$(DOLLAR)ORIGIN$1
|
||||
else
|
||||
SetSharedLibraryOrigin = \
|
||||
-Wl,-z,origin -Wl,-rpath,\$(DOLLAR)ORIGIN$1
|
||||
endif
|
||||
endif
|
||||
else ifeq ($(call isCompiler, microsoft), true)
|
||||
SetExecutableOrigin =
|
||||
SetSharedLibraryOrigin =
|
||||
else
|
||||
$(error Unknown toolchain)
|
||||
endif
|
||||
|
||||
FindSrcDirsForComponent += \
|
||||
$(call uniq, $(wildcard \
|
||||
$(TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native/$(strip $2) \
|
||||
@ -227,6 +268,8 @@ endef
|
||||
|
||||
GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc
|
||||
|
||||
# \xA9 is the copyright symbol in ANSI encoding (Windows-1252), which rc.exe
|
||||
# assumes the resource file is in.
|
||||
JDK_RCFLAGS=$(RCFLAGS) \
|
||||
-D"JDK_VERSION_STRING=$(VERSION_STRING)" \
|
||||
-D"JDK_COMPANY=$(JDK_RC_COMPANY_NAME)" \
|
||||
@ -442,9 +485,9 @@ define SetupJdkNativeCompilationBody
|
||||
|
||||
ifneq ($$($1_LD_SET_ORIGIN), false)
|
||||
ifeq ($$($1_TYPE), EXECUTABLE)
|
||||
$1_LDFLAGS += $$(call SET_EXECUTABLE_ORIGIN)
|
||||
$1_LDFLAGS += $$(call SetExecutableOrigin)
|
||||
else
|
||||
$1_LDFLAGS += $$(call SET_SHARED_LIBRARY_ORIGIN)
|
||||
$1_LDFLAGS += $$(call SetSharedLibraryOrigin)
|
||||
endif
|
||||
endif
|
||||
# APPEND_LDFLAGS, if it exists, must be set after the origin flags
|
||||
|
||||
@ -64,12 +64,6 @@ define ParseLogValue
|
||||
endef
|
||||
|
||||
define ParseLogLevel
|
||||
# Catch old-style VERBOSE= command lines.
|
||||
ifneq ($$(origin VERBOSE), undefined)
|
||||
$$(info Error: VERBOSE is deprecated. Use LOG=<warn|info|debug|trace> instead.)
|
||||
$$(error Cannot continue)
|
||||
endif
|
||||
|
||||
# Setup logging according to LOG
|
||||
|
||||
# If "nofile" is present, do not log to a file
|
||||
|
||||
@ -284,6 +284,12 @@ else
|
||||
LogCmdlines =
|
||||
endif
|
||||
|
||||
# Check if the command line contains redirection, that is <, > or >>,
|
||||
# and if so, return a value that is interpreted as true in a make $(if)
|
||||
# construct.
|
||||
is_redirect = \
|
||||
$(if $(filter < > >>, $1), true)
|
||||
|
||||
################################################################################
|
||||
# ExecuteWithLog will run a command and log the output appropriately. This is
|
||||
# meant to be used by commands that do "real" work, like a compilation.
|
||||
@ -291,21 +297,23 @@ endif
|
||||
# of the build in case of failure. The command line itself is stored in a file,
|
||||
# and also logged to stdout if the LOG=cmdlines option has been given.
|
||||
#
|
||||
# NOTE: If the command redirects stdout, the caller needs to wrap it in a
|
||||
# subshell (by adding parentheses around it), otherwise the redirect to the
|
||||
# subshell tee process will create a race condition where the target file may
|
||||
# not be fully written when the make recipe is done.
|
||||
#
|
||||
# Param 1 - The path to base the name of the log file / command line file on
|
||||
# Param 2 - The command to run
|
||||
ExecuteWithLog = \
|
||||
$(call LogCmdlines, Executing: [$(strip $2)]) \
|
||||
$(call LogCmdlines, Executing: \
|
||||
[$(if $(call is_redirect, $2),$(LEFT_PAREN) )$(strip $2)$(if $(call \
|
||||
is_redirect, $2), $(RIGHT_PAREN))]) \
|
||||
$(call MakeDir, $(dir $(strip $1)) $(MAKESUPPORT_OUTPUTDIR)/failure-logs) \
|
||||
$(call WriteFile, $2, $(strip $1).cmdline) \
|
||||
( $(RM) $(strip $1).log && $(strip $2) > >($(TEE) -a $(strip $1).log) 2> >($(TEE) -a $(strip $1).log >&2) || \
|
||||
( $(RM) $(strip $1).log && \
|
||||
$(if $(call is_redirect, $2),$(LEFT_PAREN) )$(strip $2)$(if $(call \
|
||||
is_redirect, $2), $(RIGHT_PAREN)) \
|
||||
> >($(TEE) -a $(strip $1).log) 2> >($(TEE) -a $(strip $1).log >&2) || \
|
||||
( exitcode=$(DOLLAR)? && \
|
||||
$(CP) $(strip $1).log $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst /,_,$(patsubst $(OUTPUTDIR)/%,%,$(strip $1))).log && \
|
||||
$(CP) $(strip $1).cmdline $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst /,_,$(patsubst $(OUTPUTDIR)/%,%,$(strip $1))).cmdline && \
|
||||
$(CP) $(strip $1).log $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst \
|
||||
/,_,$(patsubst $(OUTPUTDIR)/%,%,$(strip $1))).log && \
|
||||
$(CP) $(strip $1).cmdline $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst \
|
||||
/,_,$(patsubst $(OUTPUTDIR)/%,%,$(strip $1))).cmdline && \
|
||||
exit $(DOLLAR)exitcode ) )
|
||||
|
||||
################################################################################
|
||||
|
||||
@ -47,7 +47,7 @@ endif
|
||||
# We need spec.gmk to get $(TOPDIR)
|
||||
include $(SPEC)
|
||||
|
||||
THIS_MAKEFILE := $(patsubst make/%,%,$(patsubst $(TOPDIR)/%,%,$(THIS_MAKEFILE_PATH)))
|
||||
THIS_MAKEFILE := $(patsubst make/%,%,$(patsubst $(TOPDIR_ALT)/make/%,%,$(patsubst $(TOPDIR)/%,%,$(THIS_MAKEFILE_PATH))))
|
||||
|
||||
ifeq ($(LOG_FLOW), true)
|
||||
$(info :Enter $(THIS_MAKEFILE))
|
||||
|
||||
@ -27,19 +27,24 @@
|
||||
# MakeIncludeEnd.gmk should be included last of all in all include files
|
||||
################################################################################
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
ifneq ($(NO_CUSTOM_EXTENSIONS), true)
|
||||
CUSTOM_POST_NAME := $(subst .gmk,-post.gmk, $(THIS_INCLUDE))
|
||||
$(eval $(call IncludeCustomExtension, $(CUSTOM_POST_NAME)))
|
||||
ifneq ($(INCLUDE_GUARD_$(THIS_INCLUDE)), true)
|
||||
# This was the first time this file was included. Prevent future inclusion.
|
||||
INCLUDE_GUARD_$(THIS_INCLUDE) := true
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
ifneq ($(NO_CUSTOM_EXTENSIONS), true)
|
||||
CUSTOM_POST_NAME := $(subst .gmk,-post.gmk, $(THIS_INCLUDE))
|
||||
$(eval $(call IncludeCustomExtension, $(CUSTOM_POST_NAME)))
|
||||
endif
|
||||
endif
|
||||
|
||||
# Pop our helper name off the stack
|
||||
HELPER_STACK := $(wordlist 2, $(words $(HELPER_STACK)), $(HELPER_STACK))
|
||||
INCLUDE_STACK := $(wordlist 2, $(words $(INCLUDE_STACK)), $(INCLUDE_STACK))
|
||||
|
||||
# Print an indented message, also counting the top-level makefile as a level
|
||||
ifeq ($(LOG_FLOW), true)
|
||||
$(info :$(foreach s, top $(HELPER_STACK), )Leave $(THIS_INCLUDE))
|
||||
$(info :$(foreach s, top $(INCLUDE_STACK) $(SNIPPET_STACK), )Leave $(THIS_INCLUDE))
|
||||
endif
|
||||
|
||||
# Restore the previous helper name
|
||||
THIS_INCLUDE := $(firstword $(HELPER_STACK))
|
||||
THIS_INCLUDE := $(firstword $(INCLUDE_STACK))
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
# Get the next to last word (by prepending a padding element)
|
||||
THIS_INCLUDE_PATH := $(word $(words ${MAKEFILE_LIST}),padding ${MAKEFILE_LIST})
|
||||
THIS_INCLUDE := $(patsubst $(TOPDIR)/make/%,%,$(THIS_INCLUDE_PATH))
|
||||
THIS_INCLUDE := $(patsubst $(TOPDIR_ALT)/make/%,%,$(patsubst $(TOPDIR)/make/%,%,$(THIS_INCLUDE_PATH)))
|
||||
|
||||
# Print an indented message, also counting the top-level makefile as a level
|
||||
ifneq ($(INCLUDE_GUARD_$(THIS_INCLUDE)), true)
|
||||
@ -39,11 +39,11 @@ else
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_FLOW), true)
|
||||
$(info :$(foreach s, top $(HELPER_STACK), )Enter $(THIS_INCLUDE) [$(THIS_INCLUDE_MSG)])
|
||||
$(info :$(foreach s, top $(INCLUDE_STACK) $(SNIPPET_STACK), )Enter $(THIS_INCLUDE) [$(THIS_INCLUDE_MSG)])
|
||||
endif
|
||||
|
||||
ifneq ($(filter $(THIS_INCLUDE), $(HELPER_STACK)), )
|
||||
$(error Internal makefile error: Include loop detected: $(THIS_INCLUDE) $(HELPER_STACK))
|
||||
ifneq ($(filter $(THIS_INCLUDE), $(INCLUDE_STACK)), )
|
||||
$(error Internal makefile error: Include loop detected: $(THIS_INCLUDE) $(INCLUDE_STACK))
|
||||
endif
|
||||
|
||||
ifeq ($(words $(MAKEFILE_LIST)), 2)
|
||||
@ -66,11 +66,10 @@ ifneq ($(IS_PREINIT_ENV), true)
|
||||
endif
|
||||
|
||||
# Push our helper name onto the stack
|
||||
HELPER_STACK := $(THIS_INCLUDE) $(HELPER_STACK)
|
||||
INCLUDE_STACK := $(THIS_INCLUDE) $(INCLUDE_STACK)
|
||||
|
||||
# Setup an automatic include guard
|
||||
ifneq ($(INCLUDE_GUARD_$(THIS_INCLUDE)), true)
|
||||
INCLUDE_GUARD_$(THIS_INCLUDE) := true
|
||||
INCLUDE := true
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
|
||||
@ -34,12 +34,12 @@ ifneq ($(NO_CUSTOM_EXTENSIONS), true)
|
||||
endif
|
||||
|
||||
# Pop our helper name off the stack
|
||||
HELPER_STACK := $(wordlist 2, $(words $(HELPER_STACK)), $(HELPER_STACK))
|
||||
SNIPPET_STACK := $(wordlist 2, $(words $(SNIPPET_STACK)), $(SNIPPET_STACK))
|
||||
|
||||
# Print an indented message, also counting the top-level makefile as a level
|
||||
ifeq ($(LOG_FLOW), true)
|
||||
$(info :$(foreach s, top $(HELPER_STACK), )Leave $(THIS_SNIPPET))
|
||||
$(info :$(foreach s, top $(INCLUDE_STACK) $(SNIPPET_STACK), )Leave $(THIS_SNIPPET))
|
||||
endif
|
||||
|
||||
# Restore the previous helper name
|
||||
THIS_SNIPPET := $(firstword $(HELPER_STACK))
|
||||
THIS_SNIPPET := $(firstword $(SNIPPET_STACK))
|
||||
|
||||
@ -33,11 +33,11 @@ endif
|
||||
|
||||
# Print an indented message, also counting the top-level makefile as a level
|
||||
ifeq ($(LOG_FLOW), true)
|
||||
$(info :$(foreach s, top $(HELPER_STACK), )Enter $(THIS_SNIPPET) [snippet])
|
||||
$(info :$(foreach s, top $(INCLUDE_STACK) $(SNIPPET_STACK), )Enter $(THIS_SNIPPET) [snippet])
|
||||
endif
|
||||
|
||||
# Push our helper name onto the stack
|
||||
HELPER_STACK := $(THIS_SNIPPET) $(HELPER_STACK)
|
||||
SNIPPET_STACK := $(THIS_SNIPPET) $(SNIPPET_STACK)
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
ifneq ($(NO_CUSTOM_EXTENSIONS), true)
|
||||
|
||||
@ -33,7 +33,7 @@ include $(TOPDIR)/make/conf/module-loader-map.conf
|
||||
|
||||
# Append platform-specific and upgradeable modules
|
||||
PLATFORM_MODULES += $(PLATFORM_MODULES_$(OPENJDK_TARGET_OS)) \
|
||||
$(UPGRADEABLE_PLATFORM_MODULES)
|
||||
$(UPGRADEABLE_PLATFORM_MODULES) $(CUSTOM_UPGRADEABLE_PLATFORM_MODULES)
|
||||
|
||||
################################################################################
|
||||
# Setup module sets for docs
|
||||
@ -87,7 +87,10 @@ SRC_SUBDIRS += share/classes
|
||||
|
||||
SPEC_SUBDIRS += share/specs
|
||||
|
||||
MAN_SUBDIRS += share/man windows/man
|
||||
MAN_SUBDIRS += share/man $(TARGET_OS)/man
|
||||
|
||||
# The docs should include the sum of all man pages for all platforms
|
||||
MAN_DOCS_SUBDIRS += share/man windows/man
|
||||
|
||||
# Find all module-info.java files for the current build target platform and
|
||||
# configuration.
|
||||
@ -153,6 +156,10 @@ FindModuleManDirs = \
|
||||
$(strip $(wildcard \
|
||||
$(foreach sub, $(MAN_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS)))))
|
||||
|
||||
FindModuleManDirsForDocs = \
|
||||
$(strip $(wildcard \
|
||||
$(foreach sub, $(MAN_DOCS_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS)))))
|
||||
|
||||
# Construct the complete module source path
|
||||
GetModuleSrcPath = \
|
||||
$(call PathList, \
|
||||
@ -173,7 +180,7 @@ ifeq ($(GENERATE_MODULE_DEPS_FILE), true)
|
||||
$(call MakeTargetDir)
|
||||
$(RM) $@
|
||||
$(foreach m, $(MODULE_INFOS), \
|
||||
( $(PRINTF) "DEPS_$(call GetModuleNameFromModuleInfo, $m) := " && \
|
||||
( $(PRINTF) "DEPS_%s := " "$(call GetModuleNameFromModuleInfo, $m)" && \
|
||||
$(AWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) ' \
|
||||
BEGIN { if (MODULE != "java.base") printf(" java.base"); } \
|
||||
/^ *requires/ { sub(/;/, ""); \
|
||||
@ -187,7 +194,7 @@ ifeq ($(GENERATE_MODULE_DEPS_FILE), true)
|
||||
gsub(/\r/, ""); \
|
||||
printf(" %s", $$0) } \
|
||||
END { printf("\n") }' $m && \
|
||||
$(PRINTF) "TRANSITIVE_MODULES_$(call GetModuleNameFromModuleInfo, $m) := " && \
|
||||
$(PRINTF) "TRANSITIVE_MODULES_%s := " "$(call GetModuleNameFromModuleInfo, $m)" && \
|
||||
$(AWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) ' \
|
||||
BEGIN { if (MODULE != "java.base") printf(" java.base"); } \
|
||||
/^ *requires *transitive/ { \
|
||||
@ -209,7 +216,7 @@ endif
|
||||
# Find dependencies ("requires") for a given module.
|
||||
# Param 1: Module to find dependencies for.
|
||||
FindDepsForModule = \
|
||||
$(DEPS_$(strip $1))
|
||||
$(filter-out $(IMPORT_MODULES), $(DEPS_$(strip $1)))
|
||||
|
||||
# Find dependencies ("requires") transitively in 3 levels for a given module.
|
||||
# Param 1: Module to find dependencies for.
|
||||
@ -247,7 +254,8 @@ FindTransitiveIndirectDepsForModules = \
|
||||
# Upgradeable modules are those that are either defined as upgradeable or that
|
||||
# require an upradeable module.
|
||||
FindAllUpgradeableModules = \
|
||||
$(sort $(filter-out $(MODULES_FILTER), $(UPGRADEABLE_PLATFORM_MODULES)))
|
||||
$(sort $(filter-out $(MODULES_FILTER), \
|
||||
$(UPGRADEABLE_PLATFORM_MODULES) $(CUSTOM_UPGRADEABLE_PLATFORM_MODULES)))
|
||||
|
||||
################################################################################
|
||||
|
||||
@ -309,6 +317,19 @@ define ReadImportMetaData
|
||||
$$(eval $$(call ReadSingleImportMetaData, $$m)))
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# Get a full snippet path for the current module and a given base name.
|
||||
#
|
||||
# Param 1 - The base name of the snippet file to include
|
||||
GetModuleSnippetName = \
|
||||
$(if $(CUSTOM_MODULE_MAKE_ROOT), \
|
||||
$(if $(wildcard $(CUSTOM_MODULE_MAKE_ROOT)/$(MODULE)/$(strip $1).gmk), \
|
||||
$(CUSTOM_MODULE_MAKE_ROOT)/$(MODULE)/$(strip $1).gmk, \
|
||||
$(wildcard modules/$(MODULE)/$(strip $1).gmk) \
|
||||
), \
|
||||
$(wildcard modules/$(MODULE)/$(strip $1).gmk) \
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
endif # include guard
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user