mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-17 23:09:43 +01:00
Compare commits
83 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f5ed961db | ||
|
|
df57c97d29 | ||
|
|
2a1a416c37 | ||
|
|
89c46f11f8 | ||
|
|
b1b55f712c | ||
|
|
15f90f0c7b | ||
|
|
926455d6c5 | ||
|
|
ec00b6b7ac | ||
|
|
2d4731917d | ||
|
|
612ae737c0 | ||
|
|
a315b9326b | ||
|
|
ab43ba0ef8 | ||
|
|
564e0a2076 | ||
|
|
53aa9f2596 | ||
|
|
99e21c6aaf | ||
|
|
4ce95c95ef | ||
|
|
93ea8e708d | ||
|
|
a9fae67913 | ||
|
|
aaf3415de8 | ||
|
|
535922059c | ||
|
|
bc19494216 | ||
|
|
febcfd69ff | ||
|
|
1495f7addb | ||
|
|
c141aa1e08 | ||
|
|
467f407037 | ||
|
|
f7858e2422 | ||
|
|
6965840e0d | ||
|
|
1399f253b0 | ||
|
|
f45a23cabd | ||
|
|
f42e2c10c6 | ||
|
|
57c46ac2fe | ||
|
|
24053d9b6a | ||
|
|
e76cc44502 | ||
|
|
4a623a2b6d | ||
|
|
ecdc322029 | ||
|
|
da74fbd920 | ||
|
|
f0a89c5d8e | ||
|
|
c61fbfd6ea | ||
|
|
92a4e23467 | ||
|
|
ba36d309c3 | ||
|
|
41630c5c32 | ||
|
|
864d0fde23 | ||
|
|
ff9b8e4607 | ||
|
|
7d4fa7818b | ||
|
|
c033806b8c | ||
|
|
bf45128055 | ||
|
|
29c6bf23fb | ||
|
|
c3b52089f6 | ||
|
|
860b30ddf9 | ||
|
|
256856a5a1 | ||
|
|
cc7c293bce | ||
|
|
33971ecb6e | ||
|
|
4254e99ce2 | ||
|
|
05c3769986 | ||
|
|
ab78b04cf6 | ||
|
|
bed040191b | ||
|
|
5d138cbba0 | ||
|
|
63aa68a7c6 | ||
|
|
f0ada9f34e | ||
|
|
303736b038 | ||
|
|
2c336299aa | ||
|
|
4aec2d4ef9 | ||
|
|
b8249c5d90 | ||
|
|
0225372e0b | ||
|
|
2cc14faa21 | ||
|
|
f703b6e7b1 | ||
|
|
297b21fb60 | ||
|
|
67b8251679 | ||
|
|
6e8aad1ad4 | ||
|
|
4d6eccd9fc | ||
|
|
6bc14d6b77 | ||
|
|
897a8abecc | ||
|
|
3b53ed7fb0 | ||
|
|
6fdfa72996 | ||
|
|
950c8adfd7 | ||
|
|
03bdee0f75 | ||
|
|
4ecb28ccdc | ||
|
|
ba02e0bd1b | ||
|
|
253030a6d4 | ||
|
|
a81325433d | ||
|
|
203422a8ed | ||
|
|
8e9ba788ae | ||
|
|
3aa07dbf14 |
@@ -1,14 +0,0 @@
|
||||
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,5 +1,4 @@
|
||||
* -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: 5
|
||||
retention-days: 1
|
||||
|
||||
2
.github/actions/config/action.yml
vendored
2
.github/actions/config/action.yml
vendored
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
|
||||
4
.github/actions/do-build/action.yml
vendored
4
.github/actions/do-build/action.yml
vendored
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -42,7 +42,7 @@ runs:
|
||||
- name: 'Build'
|
||||
id: build
|
||||
run: >
|
||||
make -k LOG=info ${{ inputs.make-target }}
|
||||
make LOG=info ${{ inputs.make-target }}
|
||||
|| bash ./.github/scripts/gen-build-failure-report.sh "$GITHUB_STEP_SUMMARY"
|
||||
shell: bash
|
||||
|
||||
|
||||
2
.github/actions/get-bootjdk/action.yml
vendored
2
.github/actions/get-bootjdk/action.yml
vendored
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
|
||||
39
.github/actions/get-bundles/action.yml
vendored
39
.github/actions/get-bundles/action.yml
vendored
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -32,16 +32,10 @@ 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 }}
|
||||
@@ -67,15 +61,6 @@ 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
|
||||
@@ -90,20 +75,6 @@ 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
|
||||
@@ -135,12 +106,4 @@ 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
|
||||
|
||||
4
.github/actions/get-gtest/action.yml
vendored
4
.github/actions/get-gtest/action.yml
vendored
@@ -49,6 +49,6 @@ runs:
|
||||
- name: 'Export path to where GTest is installed'
|
||||
id: path-name
|
||||
run: |
|
||||
# Export the absolute path
|
||||
echo "path=`pwd`/gtest" >> $GITHUB_OUTPUT
|
||||
# Export the path
|
||||
echo 'path=gtest' >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
4
.github/actions/get-jtreg/action.yml
vendored
4
.github/actions/get-jtreg/action.yml
vendored
@@ -49,6 +49,6 @@ runs:
|
||||
- name: 'Export path to where JTReg is installed'
|
||||
id: path-name
|
||||
run: |
|
||||
# Export the absolute path
|
||||
echo "path=`pwd`/jtreg/installed" >> $GITHUB_OUTPUT
|
||||
# Export the path
|
||||
echo 'path=jtreg/installed' >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
10
.github/actions/get-msys2/action.yml
vendored
10
.github/actions/get-msys2/action.yml
vendored
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -30,15 +30,15 @@ runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Install MSYS2'
|
||||
id: msys2
|
||||
uses: msys2/setup-msys2@v2.28.0
|
||||
uses: msys2/setup-msys2@v2.22.0
|
||||
with:
|
||||
install: 'autoconf tar unzip zip make'
|
||||
path-type: minimal
|
||||
release: false
|
||||
location: ${{ runner.tool_cache }}/msys2
|
||||
|
||||
# We can't run bash until this is completed, so stick with pwsh
|
||||
- name: 'Set MSYS2 path'
|
||||
run: |
|
||||
echo "${{ steps.msys2.outputs.msys2-location }}/usr/bin" >> $env:GITHUB_PATH
|
||||
# Prepend msys2/msys64/usr/bin to the PATH
|
||||
echo "$env:RUNNER_TOOL_CACHE/msys2/msys64/usr/bin" >> $env:GITHUB_PATH
|
||||
shell: pwsh
|
||||
|
||||
20
.github/actions/upload-bundles/action.yml
vendored
20
.github/actions/upload-bundles/action.yml
vendored
@@ -32,12 +32,6 @@ 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
|
||||
@@ -49,8 +43,6 @@ 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)"
|
||||
@@ -63,12 +55,6 @@ 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
|
||||
@@ -79,7 +65,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$static_jdk_bundle_zip$static_jdk_bundle_tar_gz$symbols_bundle$tests_bundle$static_libs_bundle" != "" ]]; then
|
||||
if [[ "$jdk_bundle_zip$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
|
||||
@@ -89,7 +75,7 @@ runs:
|
||||
- name: 'Upload bundles artifact'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}${{ inputs.bundle-suffix }}
|
||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
|
||||
path: bundles
|
||||
retention-days: 5
|
||||
retention-days: 1
|
||||
if: steps.bundles.outputs.bundles-found == 'true'
|
||||
|
||||
2
.github/scripts/gen-build-failure-report.sh
vendored
2
.github/scripts/gen-build-failure-report.sh
vendored
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
|
||||
2
.github/scripts/gen-test-summary.sh
vendored
2
.github/scripts/gen-test-summary.sh
vendored
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
|
||||
8
.github/workflows/build-alpine-linux.yml
vendored
8
.github/workflows/build-alpine-linux.yml
vendored
@@ -51,15 +51,11 @@ on:
|
||||
make-arguments:
|
||||
required: false
|
||||
type: string
|
||||
dry-run:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
name: build
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: alpine:3.20
|
||||
|
||||
@@ -108,11 +104,9 @@ 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 }}
|
||||
|
||||
22
.github/workflows/build-cross-compile.yml
vendored
22
.github/workflows/build-cross-compile.yml
vendored
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -40,15 +40,11 @@ on:
|
||||
make-arguments:
|
||||
required: false
|
||||
type: string
|
||||
dry-run:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build-cross-compile:
|
||||
name: build
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -64,33 +60,33 @@ jobs:
|
||||
gnu-arch: aarch64
|
||||
debian-arch: arm64
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: trixie
|
||||
debian-version: bullseye
|
||||
tolerate-sysroot-errors: false
|
||||
- target-cpu: arm
|
||||
gnu-arch: arm
|
||||
debian-arch: armhf
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: trixie
|
||||
debian-version: bullseye
|
||||
tolerate-sysroot-errors: false
|
||||
gnu-abi: eabihf
|
||||
- target-cpu: s390x
|
||||
gnu-arch: s390x
|
||||
debian-arch: s390x
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: trixie
|
||||
debian-version: bullseye
|
||||
tolerate-sysroot-errors: false
|
||||
- target-cpu: ppc64le
|
||||
gnu-arch: powerpc64le
|
||||
debian-arch: ppc64el
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: trixie
|
||||
debian-version: bullseye
|
||||
tolerate-sysroot-errors: false
|
||||
- target-cpu: riscv64
|
||||
gnu-arch: riscv64
|
||||
debian-arch: riscv64
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: trixie
|
||||
tolerate-sysroot-errors: false
|
||||
debian-version: sid
|
||||
tolerate-sysroot-errors: true
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
@@ -193,4 +189,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') && inputs.dry-run == false)
|
||||
if: steps.create-sysroot.outcome == 'success' || steps.get-cached-sysroot.outputs.cache-hit == 'true'
|
||||
|
||||
50
.github/workflows/build-linux.yml
vendored
50
.github/workflows/build-linux.yml
vendored
@@ -61,26 +61,20 @@ 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:
|
||||
name: build
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
strategy:
|
||||
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'
|
||||
@@ -115,28 +109,16 @@ jobs:
|
||||
if [[ '${{ inputs.apt-architecture }}' != '' ]]; then
|
||||
sudo dpkg --add-architecture ${{ inputs.apt-architecture }}
|
||||
fi
|
||||
sudo apt update
|
||||
sudo apt install --only-upgrade apt
|
||||
sudo apt install \
|
||||
gcc-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }} \
|
||||
g++-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }} \
|
||||
libasound2-dev${{ steps.arch.outputs.suffix }} \
|
||||
libcups2-dev${{ steps.arch.outputs.suffix }} \
|
||||
libfontconfig1-dev${{ steps.arch.outputs.suffix }} \
|
||||
libx11-dev${{ steps.arch.outputs.suffix }} \
|
||||
libxext-dev${{ steps.arch.outputs.suffix }} \
|
||||
libxrandr-dev${{ steps.arch.outputs.suffix }} \
|
||||
libxrender-dev${{ steps.arch.outputs.suffix }} \
|
||||
libxt-dev${{ steps.arch.outputs.suffix }} \
|
||||
libxtst-dev${{ steps.arch.outputs.suffix }} \
|
||||
${{ inputs.apt-extra-packages }}
|
||||
sudo apt-get update
|
||||
sudo apt-get install --only-upgrade apt
|
||||
sudo apt-get install gcc-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }} g++-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }}
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }}
|
||||
|
||||
- name: 'Configure'
|
||||
run: >
|
||||
bash configure
|
||||
--with-conf-name=${{ inputs.platform }}
|
||||
${{ matrix.debug-level == 'debug' && '--with-debug-level=fastdebug' || '' }}
|
||||
${{ matrix.flags }}
|
||||
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
|
||||
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
|
||||
--with-jtreg=${{ steps.jtreg.outputs.path }}
|
||||
@@ -151,17 +133,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 }} ${{ inputs.make-arguments }}'
|
||||
make-target: '${{ inputs.make-target }} ${STATIC_LIBS} ${{ inputs.make-arguments }}'
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
|
||||
- name: 'Upload bundles'
|
||||
uses: ./.github/actions/upload-bundles
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
|
||||
bundle-suffix: ${{ inputs.bundle-suffix }}
|
||||
static-suffix: ${{ inputs.static-suffix }}
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
debug-suffix: '${{ matrix.suffix }}'
|
||||
|
||||
6
.github/workflows/build-macos.yml
vendored
6
.github/workflows/build-macos.yml
vendored
@@ -54,10 +54,6 @@ on:
|
||||
make-arguments:
|
||||
required: false
|
||||
type: string
|
||||
dry-run:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build-macos:
|
||||
@@ -122,11 +118,9 @@ 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,10 +54,6 @@ 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
|
||||
@@ -67,7 +63,7 @@ env:
|
||||
jobs:
|
||||
build-windows:
|
||||
name: build
|
||||
runs-on: windows-2025
|
||||
runs-on: windows-2019
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
@@ -106,7 +102,7 @@ jobs:
|
||||
id: toolchain-check
|
||||
run: |
|
||||
set +e
|
||||
'/c/Program Files/Microsoft Visual Studio/2022/Enterprise/vc/auxiliary/build/vcvars64.bat' -vcvars_ver=${{ inputs.msvc-toolset-version }}
|
||||
'/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/vc/auxiliary/build/vcvars64.bat' -vcvars_ver=${{ inputs.msvc-toolset-version }}
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Toolchain is already installed"
|
||||
echo "toolchain-installed=true" >> $GITHUB_OUTPUT
|
||||
@@ -119,7 +115,7 @@ jobs:
|
||||
run: |
|
||||
# Run Visual Studio Installer
|
||||
'/c/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe' \
|
||||
modify --quiet --installPath 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise' \
|
||||
modify --quiet --installPath 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise' \
|
||||
--add Microsoft.VisualStudio.Component.VC.${{ inputs.msvc-toolset-version }}.${{ inputs.msvc-toolset-architecture }}
|
||||
if: steps.toolchain-check.outputs.toolchain-installed != 'true'
|
||||
|
||||
@@ -143,7 +139,6 @@ 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
|
||||
@@ -152,11 +147,9 @@ 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 }}
|
||||
|
||||
133
.github/workflows/main.yml
vendored
133
.github/workflows/main.yml
vendored
@@ -28,7 +28,9 @@ name: 'OpenJDK GHA Sanity Checks'
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- master
|
||||
- pr/*
|
||||
- jdk*
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
platforms:
|
||||
@@ -41,9 +43,6 @@ 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 }}
|
||||
@@ -57,7 +56,7 @@ jobs:
|
||||
|
||||
prepare:
|
||||
name: 'Prepare the run'
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
# List of platforms to exclude by default
|
||||
EXCLUDED_PLATFORMS: 'alpine-linux-x64'
|
||||
@@ -71,7 +70,6 @@ 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'
|
||||
@@ -145,35 +143,6 @@ 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
|
||||
@@ -183,7 +152,6 @@ 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
|
||||
@@ -198,7 +166,6 @@ 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:
|
||||
@@ -213,7 +180,6 @@ 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:
|
||||
@@ -228,7 +194,6 @@ 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:
|
||||
@@ -243,7 +208,6 @@ 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:
|
||||
@@ -259,44 +223,6 @@ 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:
|
||||
@@ -307,7 +233,6 @@ 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:
|
||||
@@ -318,7 +243,6 @@ 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:
|
||||
@@ -327,11 +251,10 @@ jobs:
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
platform: macos-x64
|
||||
runs-on: 'macos-15-intel'
|
||||
xcode-toolset-version: '16.4'
|
||||
runs-on: 'macos-13'
|
||||
xcode-toolset-version: '14.3.1'
|
||||
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:
|
||||
@@ -340,11 +263,10 @@ jobs:
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
platform: macos-aarch64
|
||||
runs-on: 'macos-15'
|
||||
xcode-toolset-version: '16.4'
|
||||
runs-on: 'macos-14'
|
||||
xcode-toolset-version: '15.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:
|
||||
@@ -353,11 +275,10 @@ jobs:
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
platform: windows-x64
|
||||
msvc-toolset-version: '14.44'
|
||||
msvc-toolset-version: '14.29'
|
||||
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:
|
||||
@@ -366,13 +287,12 @@ jobs:
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
platform: windows-aarch64
|
||||
msvc-toolset-version: '14.44'
|
||||
msvc-toolset-version: '14.29'
|
||||
msvc-toolset-architecture: 'arm64'
|
||||
make-target: 'hotspot'
|
||||
extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
if: needs.prepare.outputs.windows-aarch64 == 'true'
|
||||
|
||||
build-docs:
|
||||
@@ -389,7 +309,6 @@ 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'
|
||||
|
||||
###
|
||||
@@ -399,53 +318,41 @@ 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-24.04
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
debug-suffix: -debug
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
test-linux-x64-static:
|
||||
name: linux-x64-static
|
||||
test-macos-x64:
|
||||
name: macos-x64
|
||||
needs:
|
||||
- prepare
|
||||
- build-linux-x64
|
||||
- build-linux-x64-static
|
||||
- build-macos-x64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
bootjdk-platform: linux-x64
|
||||
runs-on: ubuntu-24.04
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
static-suffix: "-static"
|
||||
platform: macos-x64
|
||||
bootjdk-platform: macos-x64
|
||||
runs-on: macos-13
|
||||
xcode-toolset-version: '14.3.1'
|
||||
|
||||
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-15
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
xcode-toolset-version: '16.4'
|
||||
debug-suffix: -debug
|
||||
runs-on: macos-14
|
||||
xcode-toolset-version: '15.4'
|
||||
|
||||
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-2025
|
||||
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||
debug-suffix: -debug
|
||||
runs-on: windows-2019
|
||||
|
||||
57
.github/workflows/test.yml
vendored
57
.github/workflows/test.yml
vendored
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -40,16 +40,6 @@ 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
|
||||
@@ -76,6 +66,7 @@ jobs:
|
||||
- 'hs/tier1 compiler part 1'
|
||||
- 'hs/tier1 compiler part 2'
|
||||
- 'hs/tier1 compiler part 3'
|
||||
- 'hs/tier1 compiler not-xcomp'
|
||||
- 'hs/tier1 gc'
|
||||
- 'hs/tier1 runtime'
|
||||
- 'hs/tier1 serviceability'
|
||||
@@ -96,35 +87,39 @@ jobs:
|
||||
|
||||
- test-name: 'hs/tier1 common'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_common'
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 compiler part 1'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_1'
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 compiler part 2'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_2'
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 compiler part 3'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_3'
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 compiler not-xcomp'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_compiler_not_xcomp'
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 gc'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_gc'
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 runtime'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_runtime'
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'hs/tier1 serviceability'
|
||||
test-suite: 'test/hotspot/jtreg/:tier1_serviceability'
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
debug-suffix: -debug
|
||||
|
||||
- test-name: 'lib-test/tier1'
|
||||
test-suite: 'test/lib-test/:tier1'
|
||||
debug-suffix: ${{ inputs.debug-suffix }}
|
||||
debug-suffix: -debug
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
@@ -150,8 +145,6 @@ jobs:
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
debug-suffix: ${{ matrix.debug-suffix }}
|
||||
static-suffix: ${{ inputs.static-suffix }}
|
||||
if: ${{ inputs.dry-run == false }}
|
||||
|
||||
- name: 'Install dependencies'
|
||||
run: |
|
||||
@@ -172,21 +165,6 @@ 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
|
||||
@@ -198,13 +176,10 @@ 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 }}
|
||||
${{ 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 }}'
|
||||
JTREG='JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash;VERBOSE=fail,error,time;KEYWORDS=!headful'
|
||||
&& 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
|
||||
@@ -234,7 +209,7 @@ jobs:
|
||||
echo '::warning ::Missing test-support directory'
|
||||
fi
|
||||
|
||||
artifact_name="results-${{ inputs.platform }}-$(echo ${{ matrix.test-name }}${{ inputs.static-suffix }} | tr '/ ' '__')"
|
||||
artifact_name="results-${{ inputs.platform }}-$(echo ${{ matrix.test-name }} | tr '/ ' '__')"
|
||||
echo "artifact-name=$artifact_name" >> $GITHUB_OUTPUT
|
||||
if: always()
|
||||
|
||||
|
||||
9
.gitignore
vendored
9
.gitignore
vendored
@@ -22,12 +22,3 @@ NashornProfile.txt
|
||||
/.cache
|
||||
/.gdbinit
|
||||
/.lldbinit
|
||||
**/core.[0-9]*
|
||||
*.rej
|
||||
*.orig
|
||||
test/benchmarks/**/target
|
||||
/src/hotspot/CMakeLists.txt
|
||||
/src/hotspot/compile_commands.json
|
||||
/src/hotspot/cmake-build-debug/
|
||||
/src/hotspot/.cache/
|
||||
/src/hotspot/.idea/
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[general]
|
||||
project=jdk
|
||||
jbs=JDK
|
||||
version=27
|
||||
version=24
|
||||
|
||||
[checks]
|
||||
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists,copyright
|
||||
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
|
||||
warning=issuestitle,binary
|
||||
|
||||
[repository]
|
||||
@@ -34,8 +34,3 @@ pattern=^([124-8][0-9]{6}): (\S.*)$
|
||||
|
||||
[checks "problemlists"]
|
||||
dirs=test/jdk|test/langtools|test/lib-test|test/hotspot/jtreg|test/jaxp
|
||||
|
||||
[checks "copyright"]
|
||||
files=^(?!LICENSE|license\.txt|.*\.bin|.*\.gif|.*\.jpg|.*\.png|.*\.icon|.*\.tiff|.*\.dat|.*\.patch|.*\.wav|.*\.class|.*-header|.*\.jar).*
|
||||
oracle_locator=.*Copyright \(c\)(.*)Oracle and/or its affiliates\. All rights reserved\.
|
||||
oracle_validator=.*Copyright \(c\) (\d{4})(?:, (\d{4}))?, Oracle and/or its affiliates\. All rights reserved\.
|
||||
|
||||
@@ -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/).
|
||||
|
||||
13
Makefile
13
Makefile
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2015, 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
|
||||
@@ -24,9 +24,8 @@
|
||||
#
|
||||
|
||||
###
|
||||
### This file is just a very small wrapper which will include make/PreInit.gmk,
|
||||
### where the real work is done. This wrapper also performs some sanity checks
|
||||
### on make that must be done before we can include another file.
|
||||
### This file is just a very small wrapper needed to run the real make/Init.gmk.
|
||||
### It also performs some sanity checks on make.
|
||||
###
|
||||
|
||||
# The shell code below will be executed on /usr/bin/make on Solaris, but not in GNU Make.
|
||||
@@ -59,7 +58,7 @@ ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))),)
|
||||
else
|
||||
makefile_path := $(lastword $(MAKEFILE_LIST))
|
||||
endif
|
||||
TOPDIR := $(strip $(patsubst %/, %, $(dir $(makefile_path))))
|
||||
topdir := $(strip $(patsubst %/, %, $(dir $(makefile_path))))
|
||||
|
||||
# ... and then we can include the real makefile to bootstrap the build
|
||||
include $(TOPDIR)/make/PreInit.gmk
|
||||
# ... and then we can include the real makefile
|
||||
include $(topdir)/make/Init.gmk
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Welcome to the JDK!
|
||||
|
||||
For build instructions please see the
|
||||
[online documentation](https://git.openjdk.org/jdk/blob/master/doc/building.md),
|
||||
[online documentation](https://openjdk.org/groups/build/doc/building.html),
|
||||
or either of these files:
|
||||
|
||||
- [doc/building.html](doc/building.html) (html version)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2009, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2009, 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
|
||||
@@ -99,7 +99,7 @@ if [ "$VERBOSE" = "true" ] ; then
|
||||
echo "idea template dir: $IDEA_TEMPLATE"
|
||||
fi
|
||||
|
||||
cd $TOP ; make idea-gen-config ALLOW=IDEA_OUTPUT,MODULES IDEA_OUTPUT=$IDEA_OUTPUT MODULES="$*" $CONF_ARG || exit 1
|
||||
cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I $MAKE_DIR/.. idea MAKEOVERRIDES= OUT=$IDEA_OUTPUT/env.cfg MODULES="$*" $CONF_ARG || exit 1
|
||||
cd $SCRIPT_DIR
|
||||
|
||||
. $IDEA_OUTPUT/env.cfg
|
||||
@@ -125,8 +125,7 @@ if [ -d "$TOPLEVEL_DIR/.hg" ] ; then
|
||||
VCS_TYPE="hg4idea"
|
||||
fi
|
||||
|
||||
# Git worktrees use a '.git' file rather than directory, so test both.
|
||||
if [ -d "$TOPLEVEL_DIR/.git" -o -f "$TOPLEVEL_DIR/.git" ] ; then
|
||||
if [ -d "$TOPLEVEL_DIR/.git" ] ; then
|
||||
VCS_TYPE="Git"
|
||||
fi
|
||||
|
||||
|
||||
192
bin/unshuffle_list.txt
Normal file
192
bin/unshuffle_list.txt
Normal file
@@ -0,0 +1,192 @@
|
||||
#
|
||||
# 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
|
||||
237
bin/unshuffle_patch.sh
Normal file
237
bin/unshuffle_patch.sh
Normal file
@@ -0,0 +1,237 @@
|
||||
#!/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,111 +0,0 @@
|
||||
#!/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,34 +282,9 @@ 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>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>
|
||||
<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>
|
||||
<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
|
||||
@@ -319,9 +294,6 @@ 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>
|
||||
@@ -339,7 +311,9 @@ 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></li>
|
||||
</ul>
|
||||
<p>Failure to follow this procedure might result in hard-to-debug build
|
||||
problems.</p></li>
|
||||
</ul>
|
||||
<h2 id="build-hardware-requirements">Build Hardware Requirements</h2>
|
||||
<p>The JDK is a massive project, and require machines ranging from
|
||||
@@ -402,7 +376,7 @@ to date at the time of writing.</p>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>macOS</td>
|
||||
<td>macOS 14.x</td>
|
||||
<td>macOS 13.x (Ventura)</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>Windows</td>
|
||||
@@ -539,13 +513,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 14 and Xcode 15.4, but
|
||||
earlier versions may also work.</p>
|
||||
<p>Starting with Xcode 26, introduced in macOS 26, the Metal toolchain
|
||||
no longer comes bundled with Xcode, so it needs to be installed
|
||||
separately. This can either be done via the Xcode's Settings/Components
|
||||
UI, or in the command line calling
|
||||
<code>xcodebuild -downloadComponent metalToolchain</code>.</p>
|
||||
<p>It is recommended that you use at least macOS 13 (Ventura) and Xcode
|
||||
14, 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
|
||||
@@ -617,15 +586,15 @@ to compile successfully without issues.</p>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td>Linux</td>
|
||||
<td>gcc 14.2.0</td>
|
||||
<td>gcc 13.2.0</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>macOS</td>
|
||||
<td>Apple Xcode 15.4 (using clang 15.0.0)</td>
|
||||
<td>Apple Xcode 14.3.1 (using clang 14.0.3)</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>Windows</td>
|
||||
<td>Microsoft Visual Studio 2022 version 17.13.2</td>
|
||||
<td>Microsoft Visual Studio 2022 version 17.6.5</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -635,7 +604,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
|
||||
14.2 or newer.</p>
|
||||
13.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
|
||||
@@ -673,7 +642,7 @@ update.</p>
|
||||
(Note that this version is often presented as "MSVC 14.28", and reported
|
||||
by cl.exe as 19.28.) Older versions will not be accepted by
|
||||
<code>configure</code> and will not work. The maximum accepted version
|
||||
of Visual Studio is 2026.</p>
|
||||
of Visual Studio is 2022.</p>
|
||||
<p>If you have multiple versions of Visual Studio installed,
|
||||
<code>configure</code> will by default pick the latest. You can request
|
||||
a specific version to be used by setting
|
||||
@@ -894,12 +863,12 @@ href="https://www.gnu.org/software/bash">GNU Bash</a>. No other shells
|
||||
are supported.</p>
|
||||
<p>At least version 3.2 of GNU Bash must be used.</p>
|
||||
<h3 id="graphviz-and-pandoc">Graphviz and Pandoc</h3>
|
||||
<p>In order to build man pages and the full docs (see the
|
||||
<p>In order to build the full docs (see the
|
||||
<code>--enable-full-docs</code> configure option) <a
|
||||
href="https://pandoc.org">Pandoc</a> is required. For full docs also <a
|
||||
href="https://www.graphviz.org">Graphviz</a> is required. Any recent
|
||||
versions should work. For reference, and subject to change, Oracle
|
||||
builds use Graphviz 9.0.0 and Pandoc 2.19.2.</p>
|
||||
href="https://www.graphviz.org">Graphviz</a> and <a
|
||||
href="https://pandoc.org">Pandoc</a> are required. Any recent versions
|
||||
should work. For reference, and subject to change, Oracle builds use
|
||||
Graphviz 9.0.0 and Pandoc 2.19.2.</p>
|
||||
<h2 id="running-configure">Running Configure</h2>
|
||||
<p>To build the JDK, you need a "configuration", which consists of a
|
||||
directory where to store the build output, coupled with information
|
||||
@@ -1456,10 +1425,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=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>
|
||||
<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>
|
||||
<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>
|
||||
@@ -1486,22 +1455,22 @@ following targets are known to work:</p>
|
||||
<td>arm-linux-gnueabihf</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>ppc64le-linux-gnu</td>
|
||||
<td>ppc64-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td>riscv64-linux-gnu</td>
|
||||
<td>ppc64le-linux-gnu</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td>s390x-linux-gnu</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<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>
|
||||
<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>
|
||||
<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/
|
||||
@@ -1753,20 +1722,6 @@ 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
|
||||
|
||||
115
doc/building.md
115
doc/building.md
@@ -83,44 +83,19 @@ 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.
|
||||
|
||||
* 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.
|
||||
* 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:
|
||||
|
||||
* On Windows, extra care must be taken to have a smooth building experience:
|
||||
* 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.
|
||||
|
||||
* 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.
|
||||
* 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.
|
||||
|
||||
* 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.
|
||||
@@ -138,6 +113,9 @@ 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
|
||||
@@ -197,7 +175,7 @@ time of writing.
|
||||
| ----------------- | ---------------------------------- |
|
||||
| Linux/x64 | Oracle Enterprise Linux 6.4 / 8.x |
|
||||
| Linux/aarch64 | Oracle Enterprise Linux 7.6 / 8.x |
|
||||
| macOS | macOS 14.x |
|
||||
| macOS | macOS 13.x (Ventura) |
|
||||
| Windows | Windows Server 2016 |
|
||||
|
||||
The double version numbers for Linux are due to the hybrid model used at
|
||||
@@ -349,14 +327,9 @@ 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 14 and Xcode 15.4, but
|
||||
It is recommended that you use at least macOS 13 (Ventura) and Xcode 14, but
|
||||
earlier versions may also work.
|
||||
|
||||
Starting with Xcode 26, introduced in macOS 26, the Metal toolchain no longer
|
||||
comes bundled with Xcode, so it needs to be installed separately. This can
|
||||
either be done via the Xcode's Settings/Components UI, or in the command line
|
||||
calling `xcodebuild -downloadComponent metalToolchain`.
|
||||
|
||||
The standard macOS environment contains the basic tooling needed to build, but
|
||||
for external libraries a package manager is recommended. The JDK uses
|
||||
[homebrew](https://brew.sh/) in the examples, but feel free to use whatever
|
||||
@@ -417,11 +390,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 14.2.0 |
|
||||
| macOS | Apple Xcode 15.4 (using clang 15.0.0) |
|
||||
| Windows | Microsoft Visual Studio 2022 version 17.13.2 |
|
||||
| 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 |
|
||||
|
||||
All compilers are expected to be able to handle the C11 language standard for
|
||||
C, and C++14 for C++.
|
||||
@@ -431,7 +404,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 14.2 or
|
||||
The JDK is currently known to compile successfully with gcc version 13.2 or
|
||||
newer.
|
||||
|
||||
In general, any version between these two should be usable.
|
||||
@@ -473,7 +446,7 @@ available for this update.
|
||||
The minimum accepted version is Visual Studio 2019 version 16.8. (Note that
|
||||
this version is often presented as "MSVC 14.28", and reported by cl.exe as
|
||||
19.28.) Older versions will not be accepted by `configure` and will not work.
|
||||
The maximum accepted version of Visual Studio is 2026.
|
||||
The maximum accepted version of Visual Studio is 2022.
|
||||
|
||||
If you have multiple versions of Visual Studio installed, `configure` will by
|
||||
default pick the latest. You can request a specific version to be used by
|
||||
@@ -707,9 +680,9 @@ At least version 3.2 of GNU Bash must be used.
|
||||
|
||||
### Graphviz and Pandoc
|
||||
|
||||
In order to build man pages and the full docs (see the `--enable-full-docs`
|
||||
configure option) [Pandoc](https://pandoc.org) is required. For full docs also
|
||||
[Graphviz](https://www.graphviz.org) is required. Any recent versions should
|
||||
In order to build the full docs (see the `--enable-full-docs`
|
||||
configure option) [Graphviz](https://www.graphviz.org) and
|
||||
[Pandoc](https://pandoc.org) are required. Any recent versions should
|
||||
work. For reference, and subject to change, Oracle builds use Graphviz
|
||||
9.0.0 and Pandoc 2.19.2.
|
||||
|
||||
@@ -1263,11 +1236,11 @@ toolchain and a sysroot environment which can easily be used together with the
|
||||
following command:
|
||||
|
||||
```
|
||||
bash configure --with-devkit=<devkit-path> --openjdk-target=ppc64le-linux-gnu && make
|
||||
bash configure --with-devkit=<devkit-path> --openjdk-target=ppc64-linux-gnu && make
|
||||
```
|
||||
|
||||
will configure and build the JDK for Linux/ppc64le assuming that `<devkit-path>`
|
||||
points to a Linux/x86_64 to Linux/ppc64le devkit.
|
||||
will configure and build the JDK for Linux/ppc64 assuming that `<devkit-path>`
|
||||
points to a Linux/x86_64 to Linux/ppc64 devkit.
|
||||
|
||||
Devkits can be created from the `make/devkit` directory by executing:
|
||||
|
||||
@@ -1286,14 +1259,16 @@ 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 `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:
|
||||
`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:
|
||||
|
||||
```
|
||||
cd make/devkit
|
||||
@@ -1482,24 +1457,6 @@ 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
|
||||
@@ -245,7 +245,7 @@ compare C string contents. There are also case-insensitive versions
|
||||
<p>All GoogleTest asserts print compared expressions and their values,
|
||||
so there is no need to have them in error messages. Asserts print only
|
||||
compared values, they do not print any of interim variables, e.g.
|
||||
<code>ASSERT_TRUE((val1 == val2 && isFail(foo(8))) || i == 18)</code>
|
||||
<code>ASSERT_TRUE((val1 == val2 && isFail(foo(8)) || i == 18)</code>
|
||||
prints only one value. If you use some complex predicates, please
|
||||
consider <code>EXPECT_PRED*</code> or <code>EXPECT_FORMAT_PRED</code>
|
||||
assertions family, they check that a predicate returns true/success and
|
||||
@@ -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>
|
||||
@@ -305,11 +305,11 @@ recognize your tests.</p>
|
||||
the product.</p>
|
||||
<ul>
|
||||
<li><p>All unit tests for a class from <code>foo/bar/baz.cpp</code>
|
||||
should be placed <code>foo/bar/test_baz.cpp</code> in the
|
||||
<code>test/hotspot/gtest/</code> directory. Having all tests for a class
|
||||
in one file is a common practice for unit tests, it helps to see all
|
||||
existing tests at once, share functions and/or resources without losing
|
||||
encapsulation.</p></li>
|
||||
should be placed <code>foo/bar/test_baz.cpp</code> in
|
||||
<code>hotspot/test/native/</code> directory. Having all tests for a
|
||||
class in one file is a common practice for unit tests, it helps to see
|
||||
all existing tests at once, share functions and/or resources without
|
||||
losing encapsulation.</p></li>
|
||||
<li><p>For tests which test more than one class, directory hierarchy
|
||||
should be the same as product hierarchy, and file name should reflect
|
||||
the name of the tested subsystem/functionality. For example, if a
|
||||
@@ -319,7 +319,7 @@ placed in <code>gc/g1</code> directory.</p></li>
|
||||
<p>Please note that framework prepends directory name to a test group
|
||||
name. For example, if <code>TEST(foo, check_this)</code> and
|
||||
<code>TEST(bar, check_that)</code> are defined in
|
||||
<code>test/hotspot/gtest/gc/shared/test_foo.cpp</code> file, they will
|
||||
<code>hotspot/test/native/gc/shared/test_foo.cpp</code> file, they will
|
||||
be reported as <code>gc/shared/foo::check_this</code> and
|
||||
<code>gc/shared/bar::check_that</code>.</p>
|
||||
<h3 id="test-names">Test names</h3>
|
||||
@@ -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`.
|
||||
@@ -172,7 +172,7 @@ Provide informative, but not too verbose error messages.
|
||||
All GoogleTest asserts print compared expressions and their values, so
|
||||
there is no need to have them in error messages. Asserts print only
|
||||
compared values, they do not print any of interim variables, e.g.
|
||||
`ASSERT_TRUE((val1 == val2 && isFail(foo(8))) || i == 18)` prints only
|
||||
`ASSERT_TRUE((val1 == val2 && isFail(foo(8)) || i == 18)` prints only
|
||||
one value. If you use some complex predicates, please consider
|
||||
`EXPECT_PRED*` or `EXPECT_FORMAT_PRED` assertions family, they check that
|
||||
a predicate returns true/success and print out all parameters values.
|
||||
@@ -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
|
||||
@@ -241,7 +241,7 @@ recognize your tests.
|
||||
Test file location should reflect a location of the tested part of the product.
|
||||
|
||||
* All unit tests for a class from `foo/bar/baz.cpp` should be placed
|
||||
`foo/bar/test_baz.cpp` in the `test/hotspot/gtest/` directory. Having all
|
||||
`foo/bar/test_baz.cpp` in `hotspot/test/native/` directory. Having all
|
||||
tests for a class in one file is a common practice for unit tests, it
|
||||
helps to see all existing tests at once, share functions and/or
|
||||
resources without losing encapsulation.
|
||||
@@ -254,7 +254,7 @@ sub-system under tests belongs to `gc/g1`, tests should be placed in
|
||||
|
||||
Please note that framework prepends directory name to a test group
|
||||
name. For example, if `TEST(foo, check_this)` and `TEST(bar, check_that)`
|
||||
are defined in `test/hotspot/gtest/gc/shared/test_foo.cpp` file, they
|
||||
are defined in `hotspot/test/native/gc/shared/test_foo.cpp` file, they
|
||||
will be reported as `gc/shared/foo::check_this` and
|
||||
`gc/shared/bar::check_that`.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
<!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>
|
||||
<li><code>test/langtools/tools/javac/versions/Versions.java</code>: add
|
||||
new source version to the set of valid sources and add new enum constant
|
||||
for the new class file version.</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,68 +0,0 @@
|
||||
% 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
|
||||
* `test/langtools/tools/javac/versions/Versions.java`: add new source version to the set of valid sources and add new enum constant for the new class file version.
|
||||
@@ -72,9 +72,6 @@ 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>
|
||||
@@ -398,8 +395,7 @@ 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 <a href="#timeout_factor-1">JTReg
|
||||
-timeoutFactor</a>.</p>
|
||||
<p>Currently only applies to JTReg.</p>
|
||||
<h4 id="java_options">JAVA_OPTIONS</h4>
|
||||
<p>Applies to JTReg, GTest and Micro.</p>
|
||||
<h4 id="vm_options">VM_OPTIONS</h4>
|
||||
@@ -415,13 +411,6 @@ 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
|
||||
@@ -434,9 +423,6 @@ 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>
|
||||
@@ -445,12 +431,8 @@ 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 <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>
|
||||
<p>The timeout factor (<code>-timeoutFactor</code>).</p>
|
||||
<p>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
|
||||
@@ -463,12 +445,6 @@ 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>
|
||||
@@ -535,8 +511,6 @@ failure. This helps to reproduce intermittent test failures. Defaults to
|
||||
<h4 id="report">REPORT</h4>
|
||||
<p>Use this report style when reporting test results (sent to JTReg as
|
||||
<code>-report</code>). Defaults to <code>files</code>.</p>
|
||||
<h4 id="manual">MANUAL</h4>
|
||||
<p>Set to <code>true</code> to execute manual tests only.</p>
|
||||
<h3 id="gtest-keywords">Gtest keywords</h3>
|
||||
<h4 id="repeat">REPEAT</h4>
|
||||
<p>The number of times to repeat the tests
|
||||
@@ -570,12 +544,6 @@ 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>
|
||||
@@ -621,37 +589,6 @@ 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 -timeoutFactor](#timeout_factor-1).
|
||||
Currently only applies to JTReg.
|
||||
|
||||
#### JAVA_OPTIONS
|
||||
|
||||
@@ -345,14 +345,6 @@ 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.
|
||||
@@ -367,10 +359,6 @@ 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
|
||||
@@ -383,11 +371,9 @@ never more than *memory size in GB/2*.
|
||||
|
||||
#### TIMEOUT_FACTOR
|
||||
|
||||
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.
|
||||
The timeout factor (`-timeoutFactor`).
|
||||
|
||||
Defaults to 4.
|
||||
|
||||
#### FAILURE_HANDLER_TIMEOUT
|
||||
|
||||
@@ -403,13 +389,6 @@ 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`).
|
||||
@@ -512,10 +491,6 @@ helps to reproduce intermittent test failures. Defaults to 0.
|
||||
Use this report style when reporting test results (sent to JTReg as `-report`).
|
||||
Defaults to `files`.
|
||||
|
||||
#### MANUAL
|
||||
|
||||
Set to `true` to execute manual tests only.
|
||||
|
||||
### Gtest keywords
|
||||
|
||||
#### REPEAT
|
||||
@@ -562,18 +537,6 @@ 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>`
|
||||
@@ -640,43 +603,6 @@ $ 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`,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2024, 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
|
||||
@@ -23,9 +23,10 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
default: all
|
||||
|
||||
################################################################################
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include CopyFiles.gmk
|
||||
include MakeIO.gmk
|
||||
@@ -42,6 +43,8 @@ ifeq ($(call isBuildOs, windows), true)
|
||||
TAR_IGNORE_EXIT_VALUE := || test "$$$$?" = "1"
|
||||
endif
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, Bundles-pre.gmk))
|
||||
################################################################################
|
||||
# BUNDLE : Name of bundle to create
|
||||
# FILES : Files in BASE_DIRS to add to bundle
|
||||
@@ -125,6 +128,13 @@ define SetupBundleFileBody
|
||||
&& $(TAR) cf - -$(TAR_INCLUDE_PARAM) $$($1_$$d_LIST_FILE) \
|
||||
$(TAR_IGNORE_EXIT_VALUE) ) \
|
||||
| ( $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) && $(TAR) xf - )$$(NEWLINE) )
|
||||
# Rename stripped pdb files
|
||||
ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
|
||||
for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.stripped.pdb"`; do \
|
||||
$(ECHO) Renaming $$$${f} to $$$${f%stripped.pdb}pdb $(LOG_INFO); \
|
||||
$(MV) $$$${f} $$$${f%stripped.pdb}pdb; \
|
||||
done
|
||||
endif
|
||||
# Unzip any zipped debuginfo files
|
||||
ifeq ($$($1_UNZIP_DEBUGINFO), true)
|
||||
for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.diz"`; do \
|
||||
@@ -167,11 +177,9 @@ 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
|
||||
@@ -215,6 +223,14 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), )
|
||||
JDK_SYMBOLS_EXCLUDE_PATTERN := %.pdb
|
||||
else
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), public)
|
||||
JDK_SYMBOLS_EXCLUDE_PATTERN := \
|
||||
$(filter-out \
|
||||
%.stripped.pdb, \
|
||||
$(filter %.pdb, $(ALL_JDK_FILES)) \
|
||||
)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -249,6 +265,14 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), )
|
||||
JRE_SYMBOLS_EXCLUDE_PATTERN := %.pdb
|
||||
else
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), public)
|
||||
JRE_SYMBOLS_EXCLUDE_PATTERN := \
|
||||
$(filter-out \
|
||||
%.stripped.pdb, \
|
||||
$(filter %.pdb, $(ALL_JRE_FILES)) \
|
||||
)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -275,7 +299,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_SUBDIR) $(LOG_DEBUG)
|
||||
$(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
|
||||
$(TOUCH) $@
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
|
||||
@@ -304,7 +328,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_SUBDIR) $(LOG_DEBUG)
|
||||
$(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
|
||||
$(TOUCH) $@
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
|
||||
@@ -476,20 +500,10 @@ 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
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, Bundles.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -501,13 +515,8 @@ 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 \
|
||||
.PHONY: all default product-bundles test-bundles \
|
||||
docs-jdk-bundles docs-javase-bundles docs-reference-bundles \
|
||||
static-libs-bundles static-libs-graal-bundles static-jdk-bundles jcov-bundles
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
static-libs-bundles static-libs-graal-bundles jcov-bundles
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2018, 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
|
||||
@@ -23,9 +23,10 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
default: all
|
||||
|
||||
################################################################################
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
# When FIXPATH is set, let it process the file to make sure all paths are usable
|
||||
# by system native tools. The FIXPATH tool assumes arguments preceded by an @
|
||||
@@ -49,6 +50,6 @@ $(OUTPUTDIR)/compile_commands.json: $(wildcard $(MAKESUPPORT_OUTPUTDIR)/compile-
|
||||
|
||||
TARGETS += $(OUTPUTDIR)/compile_commands.json
|
||||
|
||||
################################################################################
|
||||
all: $(TARGETS)
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
.PHONY: all
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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
|
||||
@@ -23,17 +23,23 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
|
||||
################################################################################
|
||||
# Build demos for the JDK into $(SUPPORT_OUTPUTDIR)/demos/image.
|
||||
################################################################################
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include CopyFiles.gmk
|
||||
include JavaCompilation.gmk
|
||||
include TextFileProcessing.gmk
|
||||
include ZipArchive.gmk
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, CompileDemos-pre.gmk))
|
||||
|
||||
# Prepare the find cache.
|
||||
DEMO_SRC_DIRS += $(TOPDIR)/src/demo
|
||||
|
||||
@@ -126,19 +132,12 @@ define SetupBuildDemoBody
|
||||
JARMAIN := $$($1_MAIN_CLASS), \
|
||||
MANIFEST := $(DEMO_MANIFEST), \
|
||||
EXTRA_MANIFEST_ATTR := $$($1_EXTRA_MANIFEST_ATTR), \
|
||||
SRCZIP := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1/src.zip, \
|
||||
EXCLUDE_FILES := $$($1_EXCLUDE_FILES), \
|
||||
DISABLED_WARNINGS := $$($1_DISABLED_WARNINGS), \
|
||||
))
|
||||
|
||||
$1 += $$(BUILD_DEMO_$1)
|
||||
|
||||
$$(eval $$(call SetupZipArchive, ZIP_SRC_DEMO_$1, \
|
||||
SRC := $$($1_MAIN_SRC) $$($1_EXTRA_SRC_DIR), \
|
||||
ZIP := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1/src.zip, \
|
||||
EXCLUDE_FILES := $$($1_EXCLUDE_FILES), \
|
||||
))
|
||||
|
||||
$1 += $$(ZIP_SRC_DEMO_$1)
|
||||
endif
|
||||
|
||||
# Copy files. Sort is needed to remove duplicates.
|
||||
@@ -258,8 +257,11 @@ ifneq ($(filter images, $(MAKECMDGOALS)), )
|
||||
IMAGES_TARGETS := $(COPY_TO_TEST_IMAGE)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, CompileDemos-post.gmk))
|
||||
|
||||
all: $(TARGETS)
|
||||
images: $(IMAGES_TARGETS)
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
.PHONY: all
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2024, 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
|
||||
@@ -23,9 +23,11 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
# This must be the first rule
|
||||
default: all
|
||||
|
||||
################################################################################
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include CopyFiles.gmk
|
||||
include JavaCompilation.gmk
|
||||
@@ -95,16 +97,14 @@ define SetupInterimModule
|
||||
SRC := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim \
|
||||
$$(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$1) \
|
||||
$(TOPDIR)/src/$1/share/classes, \
|
||||
EXCLUDES := sun, \
|
||||
EXCLUDES := sun javax/tools/snippet-files, \
|
||||
EXCLUDE_FILES := $(TOPDIR)/src/$1/share/classes/module-info.java \
|
||||
$(TOPDIR)/src/$1/share/classes/javax/tools/ToolProvider.java \
|
||||
$(TOPDIR)/src/$1/share/classes/com/sun/tools/javac/launcher/Main.java \
|
||||
$(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, \
|
||||
@@ -148,4 +148,5 @@ TARGETS += $(BUILD_JAVAC_SERVER)
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# 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
|
||||
@@ -23,12 +23,13 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
# This must be the first rule
|
||||
default: all
|
||||
|
||||
################################################################################
|
||||
|
||||
include JavaCompilation.gmk
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include Modules.gmk
|
||||
include JavaCompilation.gmk
|
||||
|
||||
################################################################################
|
||||
# If this is an imported module that has prebuilt classes, only compile
|
||||
@@ -85,15 +86,7 @@ CreateHkTargets = \
|
||||
################################################################################
|
||||
# Include module specific build settings
|
||||
|
||||
THIS_SNIPPET := $(call GetModuleSnippetName, Java)
|
||||
|
||||
ifneq ($(wildcard $(THIS_SNIPPET)), )
|
||||
include MakeSnippetStart.gmk
|
||||
|
||||
include $(THIS_SNIPPET)
|
||||
|
||||
include MakeSnippetEnd.gmk
|
||||
endif
|
||||
-include Java.gmk
|
||||
|
||||
################################################################################
|
||||
# Setup the main compilation
|
||||
@@ -113,9 +106,7 @@ $(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) \
|
||||
@@ -157,4 +148,6 @@ endif
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,12 +23,14 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
include JavaCompilation.gmk
|
||||
|
||||
TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes
|
||||
|
||||
# When using an external BUILDJDK, make it possible to shortcut building of
|
||||
@@ -62,4 +64,4 @@ TARGETS += $(BUILD_JIGSAW_TOOLS)
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
all: $(TARGETS)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,12 +23,19 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
# This must be the first rule
|
||||
default: all
|
||||
|
||||
################################################################################
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include JavaCompilation.gmk
|
||||
|
||||
TARGETS :=
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, hotspot/CompileTools.gmk))
|
||||
|
||||
################################################################################
|
||||
# Build tools needed for the JFR source code generation
|
||||
|
||||
@@ -44,6 +51,7 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_HOTSPOT, \
|
||||
|
||||
TARGETS += $(BUILD_TOOLS_HOTSPOT)
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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
|
||||
@@ -23,14 +23,21 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
default: all
|
||||
|
||||
################################################################################
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include CopyFiles.gmk
|
||||
include JavaCompilation.gmk
|
||||
include TextFileProcessing.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call IncludeCustomExtension, CompileTools.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
# Use += to be able to add to this from a custom extension
|
||||
BUILD_TOOLS_SRC_DIRS += \
|
||||
$(TOPDIR)/make/jdk/src/classes \
|
||||
@@ -153,6 +160,4 @@ ifeq ($(ENABLE_PANDOC), true)
|
||||
TARGETS += $(PANDOC_HTML_MANPAGE_FILTER_SETUP)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
all: $(TARGETS)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2019, 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
|
||||
@@ -23,12 +23,13 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
|
||||
################################################################################
|
||||
# This makefile is called for every imported module to copy the non class
|
||||
# contents into the exploded jdk image.
|
||||
################################################################################
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include CopyFiles.gmk
|
||||
|
||||
@@ -102,6 +103,4 @@ ifneq ($(CONF_DIR), )
|
||||
TARGETS += $(COPY_CONF)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
all: $(TARGETS)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2019, 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
|
||||
@@ -23,12 +23,15 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
default: all
|
||||
|
||||
################################################################################
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include CopyFiles.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
### TZDB tool needs files from java.time.zone package
|
||||
|
||||
define tzdb_copyfiles
|
||||
@@ -48,7 +51,3 @@ $(eval $(call SetupCopyFiles, COPY_INTERIM_TZDB, \
|
||||
################################################################################
|
||||
|
||||
all: $(COPY_INTERIM_TZDB)
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2018, 2019, 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
|
||||
@@ -22,7 +22,8 @@
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
|
||||
include MakeFileStart.gmk
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -34,33 +35,23 @@ 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 := $(JCOV_SUPPORT_DIR)/temp
|
||||
|
||||
ifneq ($(JCOV_MODULES), )
|
||||
JCOV_MODULES_FILTER := $(foreach m, $(JCOV_MODULES), -include_module $m)
|
||||
endif
|
||||
JCOV_TEMP := $(SUPPORT_OUTPUTDIR)/jcov_temp
|
||||
|
||||
$(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)
|
||||
$(call ExecuteWithLog, $(JCOV_SUPPORT_DIR)/run-jcov, \
|
||||
$(JAVA) -Xmx3g -jar $(JCOV_HOME)/lib/jcov.jar JREInstr \
|
||||
$(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.internal.org.objectweb.**' \
|
||||
-exclude jdk.test.Main -exclude '**\$Proxy*' \
|
||||
$(JCOV_MODULES_FILTER) $(JCOV_FILTERS) \
|
||||
$(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR))
|
||||
$(JCOV_FILTERS) \
|
||||
$(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR)
|
||||
$(MV) $(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR) $(JCOV_IMAGE_DIR)
|
||||
$(RMDIR) $(JCOV_TEMP)
|
||||
|
||||
jcov-image: $(JCOV_IMAGE_DIR)/release
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2024, 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
|
||||
@@ -23,9 +23,10 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
default: all
|
||||
|
||||
################################################################################
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include CopyFiles.gmk
|
||||
include Execute.gmk
|
||||
@@ -35,6 +36,8 @@ ifeq ($(MODULE), )
|
||||
$(error MODULE must be set when calling CreateJmods.gmk)
|
||||
endif
|
||||
|
||||
$(eval $(call IncludeCustomExtension, CreateJmods.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
JMODS_DIR := $(IMAGES_OUTPUTDIR)/jmods
|
||||
@@ -184,15 +187,7 @@ endif
|
||||
################################################################################
|
||||
# Include module specific build settings
|
||||
|
||||
THIS_SNIPPET := $(call GetModuleSnippetName, Jmod)
|
||||
|
||||
ifneq ($(wildcard $(THIS_SNIPPET)), )
|
||||
include MakeSnippetStart.gmk
|
||||
|
||||
include $(THIS_SNIPPET)
|
||||
|
||||
include MakeSnippetEnd.gmk
|
||||
endif
|
||||
-include Jmod.gmk
|
||||
|
||||
# Set main class
|
||||
ifneq ($(JMOD_FLAGS_main_class), )
|
||||
@@ -257,7 +252,6 @@ $(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) \
|
||||
@@ -272,4 +266,6 @@ TARGETS += $(create_$(JMOD_FILE))
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
all: $(TARGETS)
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1997, 2024, 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
|
||||
@@ -22,7 +22,26 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include CopyFiles.gmk
|
||||
include Execute.gmk
|
||||
include Modules.gmk
|
||||
include ModuleTools.gmk
|
||||
include ProcessMarkdown.gmk
|
||||
include ToolsJdk.gmk
|
||||
include ZipArchive.gmk
|
||||
include TextFileProcessing.gmk
|
||||
|
||||
# This is needed to properly setup DOCS_MODULES.
|
||||
$(eval $(call ReadImportMetaData))
|
||||
|
||||
################################################################################
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, Docs.gmk))
|
||||
|
||||
################################################################################
|
||||
# This file generates all documentation for OpenJDK.
|
||||
@@ -35,19 +54,7 @@ include MakeFileStart.gmk
|
||||
#
|
||||
# We will also generate separate, free-standing specifications from either
|
||||
# markdown or existing html files.
|
||||
################################################################################
|
||||
|
||||
include CopyFiles.gmk
|
||||
include Execute.gmk
|
||||
include Modules.gmk
|
||||
include ProcessMarkdown.gmk
|
||||
include TextFileProcessing.gmk
|
||||
include ZipArchive.gmk
|
||||
include $(TOPDIR)/make/ModuleTools.gmk
|
||||
include $(TOPDIR)/make/ToolsJdk.gmk
|
||||
|
||||
# This is needed to properly setup DOCS_MODULES.
|
||||
$(eval $(call ReadImportMetaData))
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Javadoc settings
|
||||
@@ -92,16 +99,20 @@ 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 \
|
||||
-serialwarn -encoding utf-8 -docencoding utf-8 -breakiterator \
|
||||
-encoding ISO-8859-1 -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 \
|
||||
-serialwarn -encoding utf-8 -breakiterator -splitIndex --system none \
|
||||
-encoding ISO-8859-1 -breakiterator -splitIndex --system none \
|
||||
-html5 -javafx --expand-requires transitive
|
||||
|
||||
# Should we add DRAFT stamps to the generated javadoc?
|
||||
@@ -236,8 +247,8 @@ define create_overview_file
|
||||
#
|
||||
ifneq ($$($1_GROUPS), )
|
||||
$1_OVERVIEW_TEXT += \
|
||||
<p>This document has \
|
||||
$$(subst 2,two,$$(subst 3,three,$$(words $$($1_GROUPS)))) major sections:</p> \
|
||||
<p>This document is divided into \
|
||||
$$(subst 2,two,$$(subst 3,three,$$(words $$($1_GROUPS)))) sections:</p> \
|
||||
<blockquote><dl> \
|
||||
#
|
||||
$1_OVERVIEW_TEXT += $$(foreach g, $$($1_GROUPS), \
|
||||
@@ -246,10 +257,7 @@ 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> \
|
||||
@@ -263,7 +271,7 @@ define create_overview_file
|
||||
$$($1_OVERVIEW): $$($1_OVERVIEW_VARDEPS_FILE)
|
||||
$$(call LogInfo, Creating overview.html for $1)
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(PRINTF) "%s" '$$($1_OVERVIEW_TEXT)' > $$@
|
||||
$$(PRINTF) > $$@ '$$($1_OVERVIEW_TEXT)'
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
@@ -291,7 +299,8 @@ define SetupApiDocsGenerationBody
|
||||
$1_INDIRECT_EXPORTS := $$(call FindTransitiveIndirectDepsForModules, $$($1_MODULES))
|
||||
$1_ALL_MODULES := $$(sort $$($1_MODULES) $$($1_INDIRECT_EXPORTS))
|
||||
|
||||
$1_JAVA_ARGS := -Dextlink.spec.version=$$(VERSION_SPECIFICATION)
|
||||
$1_JAVA_ARGS := -Dextlink.spec.version=$$(VERSION_SPECIFICATION) \
|
||||
-Djspec.version=$$(VERSION_SPECIFICATION)
|
||||
|
||||
ifeq ($$(ENABLE_FULL_DOCS), true)
|
||||
$1_SEALED_GRAPHS_DIR := $$(SUPPORT_OUTPUTDIR)/docs/$1-sealed-graphs
|
||||
@@ -320,9 +329,7 @@ define SetupApiDocsGenerationBody
|
||||
# Ignore the doclint warnings in certain packages
|
||||
$1_OPTIONS += -Xdoclint/package:$$(call CommaList, $$(addprefix -, \
|
||||
$$(JAVADOC_DISABLED_DOCLINT_PACKAGES)))
|
||||
ifeq ($$(JAVA_WARNINGS_AS_ERRORS), true)
|
||||
$1_OPTIONS += -Werror
|
||||
endif
|
||||
$1_OPTIONS += $$(JAVA_WARNINGS_ARE_ERRORS)
|
||||
|
||||
$1_DOC_TITLE := $$($1_LONG_NAME)<br>Version $$(VERSION_SPECIFICATION) API \
|
||||
Specification
|
||||
@@ -542,9 +549,7 @@ $(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.
|
||||
ifeq ($(SPEC_FILTER), )
|
||||
SPEC_FILTER := %
|
||||
endif
|
||||
SPEC_FILTER := %
|
||||
|
||||
ApplySpecFilter = \
|
||||
$(strip $(foreach file, $(1), \
|
||||
@@ -675,7 +680,7 @@ ifeq ($(ENABLE_PANDOC), true)
|
||||
|
||||
$(foreach m, $(ALL_MODULES), \
|
||||
$(eval MAN_$m := $(call ApplySpecFilter, $(filter %.md, $(call FindFiles, \
|
||||
$(call FindModuleManDirsForDocs, $m))))) \
|
||||
$(call FindModuleManDirs, $m))))) \
|
||||
$(if $(MAN_$m), \
|
||||
$(eval $(call SetupProcessMarkdown, MAN_TO_HTML_$m, \
|
||||
FILES := $(MAN_$m), \
|
||||
@@ -756,6 +761,10 @@ $(eval $(call SetupZipArchive, BUILD_JAVADOC_ZIP, \
|
||||
|
||||
ZIP_TARGETS += $(BUILD_JAVADOC_ZIP)
|
||||
|
||||
################################################################################
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, Docs-post.gmk))
|
||||
|
||||
################################################################################
|
||||
# Bundles all generated specs into a zip archive, skipping javadocs.
|
||||
|
||||
@@ -797,11 +806,7 @@ all: docs-jdk-api-javadoc docs-jdk-api-graphs docs-javase-api-javadoc \
|
||||
docs-reference-api-graphs docs-jdk-specs docs-jdk-index docs-zip \
|
||||
docs-specs-zip
|
||||
|
||||
.PHONY: docs-jdk-api-javadoc docs-jdk-api-graphs \
|
||||
.PHONY: default all docs-jdk-api-javadoc docs-jdk-api-graphs \
|
||||
docs-javase-api-javadoc docs-javase-api-graphs \
|
||||
docs-reference-api-javadoc docs-reference-api-graphs docs-jdk-specs \
|
||||
docs-jdk-index docs-zip docs-specs-zip
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,11 +23,18 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, Doctor.gmk))
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Help user diagnose possible errors and problems with the build environment.
|
||||
################################################################################
|
||||
#
|
||||
|
||||
prologue:
|
||||
$(ECHO)
|
||||
@@ -138,8 +145,4 @@ doctor: $(TARGETS)
|
||||
|
||||
all: doctor
|
||||
|
||||
.PHONY: doctor $(TARGETS)
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
.PHONY: default all doctor $(TARGETS)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2019, 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
|
||||
@@ -23,15 +23,17 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
|
||||
################################################################################
|
||||
# Runs a tool on the exploded image to improve performance
|
||||
################################################################################
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include Execute.gmk
|
||||
include $(TOPDIR)/make/ModuleTools.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
ALL_MODULEINFO_CLASSES := $(wildcard $(JDK_OUTPUTDIR)/modules/*/module-info.class)
|
||||
|
||||
$(eval $(call SetupExecute, optimize_image, \
|
||||
@@ -45,4 +47,6 @@ TARGETS := $(optimize_image_TARGET)
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all default
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
#
|
||||
# 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
|
||||
################################################################################
|
||||
# This makefile is a thin wrapper around FindTests.gmk, just to make FindTest
|
||||
# fill the cache.
|
||||
################################################################################
|
||||
|
||||
GENERATE_FIND_TESTS_FILE := true
|
||||
include FindTests.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2024, 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
|
||||
@@ -23,12 +23,15 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
|
||||
################################################################################
|
||||
# Generate classlist
|
||||
################################################################################
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include CopyFiles.gmk
|
||||
include JavaCompilation.gmk
|
||||
|
||||
@@ -76,14 +79,10 @@ $(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 \
|
||||
@@ -91,8 +90,6 @@ $(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) \
|
||||
@@ -106,8 +103,6 @@ $(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 > $@
|
||||
|
||||
@@ -153,4 +148,4 @@ TARGETS += $(COPY_JLI_TRACE)
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
all: $(TARGETS)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2018, 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
|
||||
@@ -23,11 +23,12 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
# Default target declared first
|
||||
default: all
|
||||
|
||||
################################################################################
|
||||
|
||||
include $(TOPDIR)/make/ModuleTools.gmk
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include ModuleTools.gmk
|
||||
|
||||
GENGRAPHS_DIR := $(IMAGES_OUTPUTDIR)/gengraphs
|
||||
SPEC_DOTFILES_DIR := $(GENGRAPHS_DIR)/spec-dotfiles
|
||||
@@ -49,7 +50,3 @@ $(GENGRAPHS_DIR)/module-summary.html: $(BUILD_JIGSAW_TOOLS) $(GENGRAPHS_DIR)/tec
|
||||
$(TOOL_MODULESUMMARY) -o $@ --module-path $(IMAGES_OUTPUTDIR)/jmods
|
||||
|
||||
all: $(GENGRAPHS_DIR)/jdk.dot $(GENGRAPHS_DIR)/module-summary.html $(SPEC_DOTFILES_DIR)/java.se.dot
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -108,7 +108,6 @@ help:
|
||||
$(info $(_) MICRO="OPT1=x;OPT2=y" # Control the MICRO test harness, use 'make test-only MICRO=help' to list)
|
||||
$(info $(_) TEST_OPTS="OPT1=x;..." # Generic control of all test harnesses)
|
||||
$(info $(_) TEST_VM_OPTS="ARG ..." # Same as setting TEST_OPTS to VM_OPTIONS="ARG ...")
|
||||
$(info $(_) ALLOW="FOO,BAR" # Do not warn that FOO and BAR are non-control variables)
|
||||
$(info )
|
||||
$(if $(all_confs), $(info Available configurations in $(build_dir):) $(foreach var,$(all_confs),$(info * $(var))), \
|
||||
$(info No configurations were found in $(build_dir).) $(info Run 'bash configure' to create a configuration.))
|
||||
@@ -121,12 +120,12 @@ print-configurations:
|
||||
@true
|
||||
|
||||
test-prebuilt:
|
||||
@( cd $(TOPDIR) && \
|
||||
@( cd $(topdir) && \
|
||||
$(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \
|
||||
test-prebuilt CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
|
||||
|
||||
test-prebuilt-with-exit-code:
|
||||
@( cd $(TOPDIR) && \
|
||||
@( cd $(topdir) && \
|
||||
$(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \
|
||||
test-prebuilt-with-exit-code CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
|
||||
|
||||
|
||||
@@ -23,15 +23,20 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
|
||||
################################################################################
|
||||
# This makefile creates a jdk image overlaid with statically linked core
|
||||
# libraries.
|
||||
################################################################################
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include CopyFiles.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
TARGETS :=
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_JDK_IMG, \
|
||||
SRC := $(JDK_IMAGE_DIR)/, \
|
||||
DEST := $(GRAAL_BUILDER_IMAGE_DIR)/, \
|
||||
@@ -49,4 +54,6 @@ TARGETS += $(COPY_STATIC_LIBS)
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2020, 2024, 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
|
||||
@@ -23,14 +23,17 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JdkNativeCompilation.gmk
|
||||
|
||||
################################################################################
|
||||
# This makefile compiles and installs the hsdis library
|
||||
#
|
||||
################################################################################
|
||||
|
||||
include JdkNativeCompilation.gmk
|
||||
|
||||
HSDIS_OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/hsdis
|
||||
REAL_HSDIS_NAME := hsdis-$(OPENJDK_TARGET_CPU_LEGACY_LIB)$(SHARED_LIBRARY_SUFFIX)
|
||||
BUILT_HSDIS_LIB := $(HSDIS_OUTPUT_DIR)/$(REAL_HSDIS_NAME)
|
||||
@@ -114,6 +117,7 @@ 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 :=
|
||||
@@ -197,8 +201,8 @@ endif
|
||||
|
||||
TARGETS += install
|
||||
|
||||
.PHONY: build install
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all default build install
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2024, 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
|
||||
@@ -23,9 +23,10 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
default: all
|
||||
|
||||
################################################################################
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include CopyFiles.gmk
|
||||
include DebugInfoUtils.gmk
|
||||
@@ -36,6 +37,9 @@ include Utils.gmk
|
||||
JDK_TARGETS :=
|
||||
JRE_TARGETS :=
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, Images-pre.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
# All modules for the current target platform.
|
||||
@@ -97,10 +101,6 @@ 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) \
|
||||
@@ -148,6 +148,7 @@ 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)
|
||||
@@ -161,7 +162,7 @@ define CreateCDSArchive
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG_CDS_ARCHIVE), true)
|
||||
$1_$2_CDS_DUMP_FLAGS += -Xlog:aot+map*=trace:file=$$(JDK_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE).cdsmap:none:filesize=0
|
||||
$1_$2_CDS_DUMP_FLAGS += -Xlog:cds+map*=trace:file=$$(JDK_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE).cdsmap:none:filesize=0
|
||||
endif
|
||||
|
||||
$$(eval $$(call SetupExecute, $1_$2_gen_cds_archive_jdk, \
|
||||
@@ -269,7 +270,6 @@ 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)))
|
||||
@@ -282,37 +282,39 @@ else
|
||||
endif
|
||||
CMDS_TARGET_SUBDIR := bin
|
||||
|
||||
# Copy debug info files into symbols bundle.
|
||||
# In case of Windows and --with-external-symbols-in-bundles=public, take care to remove *.stripped.pdb files
|
||||
# Param 1 - either JDK or JRE
|
||||
SetupCopyDebuginfo = \
|
||||
$(foreach m, $(ALL_$1_MODULES), \
|
||||
$(eval dbgfiles := $(call FindDebuginfoFiles, $(SUPPORT_OUTPUTDIR)/modules_libs/$m)) \
|
||||
$(eval dbgfiles := $(if $(filter true+public,$(call isTargetOs,windows)+$(SHIP_DEBUG_SYMBOLS)), \
|
||||
$(filter-out %.stripped.pdb,$(dbgfiles)),$(dbgfiles)) \
|
||||
) \
|
||||
$(eval $(call SetupCopyFiles, COPY_$1_LIBS_DEBUGINFO_$m, \
|
||||
SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/$m, \
|
||||
DEST := $($1_IMAGE_DIR)/$(LIBS_TARGET_SUBDIR), \
|
||||
FILES := $(dbgfiles), \
|
||||
FILES := $(call FindDebuginfoFiles, \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_libs/$m), \
|
||||
)) \
|
||||
$(eval $1_TARGETS += $$(COPY_$1_LIBS_DEBUGINFO_$m)) \
|
||||
$(eval dbgfiles := $(call FindDebuginfoFiles, $(SUPPORT_OUTPUTDIR)/modules_cmds/$m)) \
|
||||
$(eval dbgfiles := $(if $(filter true+public,$(call isTargetOs,windows)+$(SHIP_DEBUG_SYMBOLS)), \
|
||||
$(filter-out %.stripped.pdb,$(dbgfiles)),$(dbgfiles)) \
|
||||
) \
|
||||
$(eval $(call SetupCopyFiles, COPY_$1_CMDS_DEBUGINFO_$m, \
|
||||
SRC := $(SUPPORT_OUTPUTDIR)/modules_cmds/$m, \
|
||||
DEST := $($1_IMAGE_DIR)/$(CMDS_TARGET_SUBDIR), \
|
||||
FILES := $(dbgfiles), \
|
||||
FILES := $(call FindDebuginfoFiles, \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_cmds/$m), \
|
||||
)) \
|
||||
$(eval $1_TARGETS += $$(COPY_$1_CMDS_DEBUGINFO_$m)) \
|
||||
)
|
||||
|
||||
# No space before argument to avoid having to put $(strip ) everywhere in implementation above.
|
||||
# No space before argument to avoid having to put $(strip ) everywhere in
|
||||
# implementation above.
|
||||
$(call SetupCopyDebuginfo,JDK)
|
||||
$(call SetupCopyDebuginfo,JRE)
|
||||
$(call SetupCopyDebuginfo,SYMBOLS)
|
||||
|
||||
################################################################################
|
||||
|
||||
# Include custom post hook here to make it possible to augment the target lists
|
||||
# before actual target prerequisites are declared.
|
||||
$(eval $(call IncludeCustomExtension, Images-post.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
$(JRE_TARGETS): $(JLINK_JRE_TARGETS)
|
||||
$(JDK_TARGETS): $(JLINK_JDK_TARGETS)
|
||||
|
||||
@@ -322,8 +324,4 @@ symbols: $(SYMBOLS_TARGETS)
|
||||
|
||||
all: jdk jre symbols
|
||||
|
||||
.PHONY: jdk jre symbols
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
.PHONY: default all jdk jre symbols
|
||||
|
||||
350
make/Init.gmk
350
make/Init.gmk
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,78 +23,263 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
|
||||
################################################################################
|
||||
# Init.gmk sits between PreInit.gmk and Main.gmk when bootstrapping the build.
|
||||
# It is called from PreInit.gmk, and its main responsibility is to launch
|
||||
# Main.gmk with the proper make and the proper make arguments.
|
||||
# PreMain.gmk has provided us with a proper SPEC. This allows us to use the
|
||||
# value of $(MAKE) for all further make calls.
|
||||
# This is the bootstrapping part of the build. This file is included from the
|
||||
# top level Makefile, and is responsible for launching the Main.gmk file with
|
||||
# the proper make and the proper make arguments.
|
||||
################################################################################
|
||||
|
||||
# Our helper functions.
|
||||
include $(TOPDIR)/make/InitSupport.gmk
|
||||
include LogUtils.gmk
|
||||
# This must be the first rule
|
||||
default:
|
||||
.PHONY: default
|
||||
|
||||
# Inclusion of this pseudo-target will cause make to execute this file
|
||||
# serially, regardless of -j.
|
||||
.NOTPARALLEL:
|
||||
|
||||
# Parse COMPARE_BUILD (for makefile development)
|
||||
$(eval $(call ParseCompareBuild))
|
||||
ifeq ($(HAS_SPEC), )
|
||||
##############################################################################
|
||||
# This is the default mode. We have not been recursively called with a SPEC.
|
||||
##############################################################################
|
||||
|
||||
# Setup reproducible build environment
|
||||
$(eval $(call SetupReproducibleBuild))
|
||||
# Include our helper functions.
|
||||
include $(topdir)/make/InitSupport.gmk
|
||||
|
||||
# If no LOG= was given on command line, but we have a non-standard default
|
||||
# value, use that instead and re-parse log level.
|
||||
ifeq ($(LOG), )
|
||||
ifneq ($(DEFAULT_LOG), )
|
||||
override LOG := $(DEFAULT_LOG)
|
||||
$(eval $(call ParseLogLevel))
|
||||
# Here are "global" targets, i.e. targets that can be executed without having
|
||||
# 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
|
||||
|
||||
# CALLED_TARGETS is the list of targets that the user provided,
|
||||
# or "default" if unspecified.
|
||||
CALLED_TARGETS := $(if $(MAKECMDGOALS), $(MAKECMDGOALS), default)
|
||||
|
||||
# Extract non-global targets that require a spec file.
|
||||
CALLED_SPEC_TARGETS := $(filter-out $(ALL_GLOBAL_TARGETS), $(CALLED_TARGETS))
|
||||
|
||||
# If we have only global targets, or if we are called with -qp (assuming an
|
||||
# external part, e.g. bash completion, is trying to understand our targets),
|
||||
# we will skip SPEC location and the sanity checks.
|
||||
ifeq ($(CALLED_SPEC_TARGETS), )
|
||||
ONLY_GLOBAL_TARGETS := true
|
||||
endif
|
||||
ifeq ($(findstring p, $(MAKEFLAGS))$(findstring q, $(MAKEFLAGS)), pq)
|
||||
ONLY_GLOBAL_TARGETS := true
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_NOFILE), true)
|
||||
# Disable build log if LOG=[level,]nofile was given
|
||||
override BUILD_LOG_PIPE :=
|
||||
override BUILD_LOG_PIPE_SIMPLE :=
|
||||
endif
|
||||
ifeq ($(ONLY_GLOBAL_TARGETS), true)
|
||||
############################################################################
|
||||
# We have only global targets, or are called with -pq.
|
||||
############################################################################
|
||||
|
||||
ifeq ($(filter dist-clean, $(SEQUENTIAL_TARGETS)), dist-clean)
|
||||
# We can't have a log file if we're about to remove it.
|
||||
override BUILD_LOG_PIPE :=
|
||||
override BUILD_LOG_PIPE_SIMPLE :=
|
||||
endif
|
||||
ifeq ($(wildcard $(SPEC)), )
|
||||
# If we have no SPEC provided, we will just make a "best effort" target list.
|
||||
# First try to grab any available pre-existing main-targets.gmk.
|
||||
main_targets_file := $(firstword $(wildcard $(build_dir)/*/make-support/main-targets.gmk))
|
||||
ifneq ($(main_targets_file), )
|
||||
# Extract the SPEC that corresponds to this main-targets.gmk file.
|
||||
SPEC := $(patsubst %/make-support/main-targets.gmk, %/spec.gmk, $(main_targets_file))
|
||||
else
|
||||
# None found, pick an arbitrary SPEC for which to generate a file
|
||||
SPEC := $(firstword $(all_spec_files))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OUTPUT_SYNC_SUPPORTED), true)
|
||||
OUTPUT_SYNC_FLAG := -O$(OUTPUT_SYNC)
|
||||
endif
|
||||
ifneq ($(wildcard $(SPEC)), )
|
||||
$(eval $(call DefineMainTargets, LAZY, $(SPEC)))
|
||||
else
|
||||
# If we have no configurations we can not provide any main targets.
|
||||
ALL_MAIN_TARGETS :=
|
||||
endif
|
||||
|
||||
##############################################################################
|
||||
# Init targets. These are handled fully, here and now.
|
||||
##############################################################################
|
||||
ALL_TARGETS := $(sort $(ALL_GLOBAL_TARGETS) $(ALL_MAIN_TARGETS) $(ALL_INIT_TARGETS))
|
||||
|
||||
print-modules:
|
||||
# Just list all our targets.
|
||||
$(ALL_TARGETS):
|
||||
|
||||
.PHONY: $(ALL_TARGETS)
|
||||
|
||||
else
|
||||
############################################################################
|
||||
# This is the normal case, we have been called from the command line by the
|
||||
# user and we need to call ourself back with a proper SPEC.
|
||||
# We have at least one non-global target, so we need to find a spec file.
|
||||
############################################################################
|
||||
|
||||
# Basic checks on environment and command line.
|
||||
$(eval $(call CheckControlVariables))
|
||||
$(eval $(call CheckDeprecatedEnvironment))
|
||||
$(eval $(call CheckInvalidMakeFlags))
|
||||
|
||||
# Check that CONF_CHECK is valid.
|
||||
$(eval $(call ParseConfCheckOption))
|
||||
|
||||
# Check that the LOG given is valid, and set LOG_LEVEL, LOG_NOFILE, MAKE_LOG_VARS and MAKE_LOG_FLAGS.
|
||||
$(eval $(call ParseLogLevel))
|
||||
|
||||
# After this SPECS contain 1..N spec files (otherwise ParseConfAndSpec fails).
|
||||
$(eval $(call ParseConfAndSpec))
|
||||
|
||||
# Extract main targets from Main.gmk using the spec(s) provided. In theory,
|
||||
# with multiple specs, we should find the intersection of targets provided
|
||||
# by all specs, but we approximate this by an arbitrary spec from the list.
|
||||
# This will setup ALL_MAIN_TARGETS.
|
||||
$(eval $(call DefineMainTargets, FORCE, $(firstword $(SPECS))))
|
||||
|
||||
# Separate called targets depending on type.
|
||||
INIT_TARGETS := $(filter $(ALL_INIT_TARGETS), $(CALLED_SPEC_TARGETS))
|
||||
MAIN_TARGETS := $(filter $(ALL_MAIN_TARGETS), $(CALLED_SPEC_TARGETS))
|
||||
SEQUENTIAL_TARGETS := $(filter dist-clean clean%, $(MAIN_TARGETS))
|
||||
PARALLEL_TARGETS := $(filter-out $(SEQUENTIAL_TARGETS), $(MAIN_TARGETS))
|
||||
|
||||
# The spec files depend on the autoconf source code. This check makes sure
|
||||
# the configuration is up to date after changes to configure.
|
||||
$(SPECS): $(wildcard $(topdir)/make/autoconf/*) \
|
||||
$(if $(CUSTOM_CONFIG_DIR), $(wildcard $(CUSTOM_CONFIG_DIR)/*)) \
|
||||
$(addprefix $(topdir)/make/conf/, version-numbers.conf branding.conf) \
|
||||
$(if $(CUSTOM_CONF_DIR), $(wildcard $(addprefix $(CUSTOM_CONF_DIR)/, \
|
||||
version-numbers.conf branding.conf)))
|
||||
ifeq ($(CONF_CHECK), fail)
|
||||
@echo Error: The configuration is not up to date for \
|
||||
"'$(lastword $(subst /, , $(dir $@)))'."
|
||||
$(call PrintConfCheckFailed)
|
||||
@exit 2
|
||||
else ifeq ($(CONF_CHECK), auto)
|
||||
@echo Note: The configuration is not up to date for \
|
||||
"'$(lastword $(subst /, , $(dir $@)))'."
|
||||
@( cd $(topdir) && \
|
||||
$(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -f $(topdir)/make/Init.gmk \
|
||||
SPEC=$@ HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) \
|
||||
reconfigure )
|
||||
else ifeq ($(CONF_CHECK), ignore)
|
||||
# Do nothing
|
||||
endif
|
||||
|
||||
# Do not let make delete spec files even if aborted while doing a reconfigure
|
||||
.PRECIOUS: $(SPECS)
|
||||
|
||||
# Unless reconfigure is explicitly called, let all main targets depend on
|
||||
# the spec files to be up to date.
|
||||
ifeq ($(findstring reconfigure, $(INIT_TARGETS)), )
|
||||
$(MAIN_TARGETS): $(SPECS)
|
||||
endif
|
||||
|
||||
make-info:
|
||||
ifneq ($(findstring $(LOG_LEVEL), info debug trace), )
|
||||
$(info Running make as '$(strip $(MAKE) $(MFLAGS) \
|
||||
$(COMMAND_LINE_VARIABLES) $(MAKECMDGOALS))')
|
||||
endif
|
||||
|
||||
MAKE_INIT_WITH_SPEC_ARGUMENTS := ACTUAL_TOPDIR=$(topdir) \
|
||||
USER_MAKE_VARS="$(USER_MAKE_VARS)" MAKE_LOG_FLAGS=$(MAKE_LOG_FLAGS) \
|
||||
$(MAKE_LOG_VARS) \
|
||||
INIT_TARGETS="$(INIT_TARGETS)" \
|
||||
SEQUENTIAL_TARGETS="$(SEQUENTIAL_TARGETS)" \
|
||||
PARALLEL_TARGETS="$(PARALLEL_TARGETS)"
|
||||
|
||||
# Now the init and main targets will be called, once for each SPEC. The
|
||||
# recipe will be run once for every target specified, but we only want to
|
||||
# execute the recipe a single time, hence the TARGET_DONE with a dummy
|
||||
# command if true.
|
||||
# The COMPARE_BUILD part implements special support for makefile development.
|
||||
$(ALL_INIT_TARGETS) $(ALL_MAIN_TARGETS): make-info
|
||||
@$(if $(TARGET_DONE), \
|
||||
true \
|
||||
, \
|
||||
( cd $(topdir) && \
|
||||
$(foreach spec, $(SPECS), \
|
||||
$(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -j 1 -f $(topdir)/make/Init.gmk \
|
||||
SPEC=$(spec) HAS_SPEC=true $(MAKE_INIT_WITH_SPEC_ARGUMENTS) \
|
||||
main && \
|
||||
$(if $(and $(COMPARE_BUILD), $(PARALLEL_TARGETS)), \
|
||||
$(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -f $(topdir)/make/Init.gmk \
|
||||
SPEC=$(spec) HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) \
|
||||
COMPARE_BUILD="$(COMPARE_BUILD)" pre-compare-build && \
|
||||
$(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -j 1 -f $(topdir)/make/Init.gmk \
|
||||
SPEC=$(spec) HAS_SPEC=true $(MAKE_INIT_WITH_SPEC_ARGUMENTS) \
|
||||
COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" main && \
|
||||
$(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -f $(topdir)/make/Init.gmk \
|
||||
SPEC=$(spec) HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) \
|
||||
COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" post-compare-build && \
|
||||
) \
|
||||
) true ) \
|
||||
$(eval TARGET_DONE=true) \
|
||||
)
|
||||
|
||||
.PHONY: $(ALL_MAIN_TARGETS) $(ALL_INIT_TARGETS)
|
||||
|
||||
endif # $(ONLY_GLOBAL_TARGETS)!=true
|
||||
|
||||
else # HAS_SPEC=true
|
||||
|
||||
##############################################################################
|
||||
# Now we have a spec. This part provides the "main" target that acts as a
|
||||
# trampoline to call the Main.gmk with the value of $(MAKE) found in the spec
|
||||
# file.
|
||||
##############################################################################
|
||||
|
||||
include $(SPEC)
|
||||
|
||||
# Our helper functions.
|
||||
include $(TOPDIR)/make/InitSupport.gmk
|
||||
|
||||
# Parse COMPARE_BUILD (for makefile development)
|
||||
$(eval $(call ParseCompareBuild))
|
||||
|
||||
# Setup reproducible build environment
|
||||
$(eval $(call SetupReproducibleBuild))
|
||||
|
||||
# If no LOG= was given on command line, but we have a non-standard default
|
||||
# value, use that instead and re-parse log level.
|
||||
ifeq ($(LOG), )
|
||||
ifneq ($(DEFAULT_LOG), )
|
||||
override LOG := $(DEFAULT_LOG)
|
||||
$(eval $(call ParseLogLevel))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(LOG_NOFILE), true)
|
||||
# Disable build log if LOG=[level,]nofile was given
|
||||
override BUILD_LOG_PIPE :=
|
||||
override BUILD_LOG_PIPE_SIMPLE :=
|
||||
endif
|
||||
|
||||
ifeq ($(filter dist-clean, $(SEQUENTIAL_TARGETS)), dist-clean)
|
||||
# We can't have a log file if we're about to remove it.
|
||||
override BUILD_LOG_PIPE :=
|
||||
override BUILD_LOG_PIPE_SIMPLE :=
|
||||
endif
|
||||
|
||||
ifeq ($(OUTPUT_SYNC_SUPPORTED), true)
|
||||
OUTPUT_SYNC_FLAG := -O$(OUTPUT_SYNC)
|
||||
endif
|
||||
|
||||
##############################################################################
|
||||
# Init targets
|
||||
##############################################################################
|
||||
|
||||
print-modules:
|
||||
( cd $(TOPDIR) && \
|
||||
$(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \
|
||||
NO_RECIPES=true print-modules )
|
||||
|
||||
print-targets:
|
||||
print-targets:
|
||||
( cd $(TOPDIR) && \
|
||||
$(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \
|
||||
NO_RECIPES=true print-targets )
|
||||
|
||||
print-tests:
|
||||
print-tests:
|
||||
( cd $(TOPDIR) && \
|
||||
$(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \
|
||||
NO_RECIPES=true print-tests )
|
||||
|
||||
print-configuration:
|
||||
$(ECHO) $(CONFIGURE_COMMAND_LINE)
|
||||
print-configuration:
|
||||
$(ECHO) $(CONFIGURE_COMMAND_LINE)
|
||||
|
||||
reconfigure:
|
||||
reconfigure:
|
||||
ifneq ($(REAL_CONFIGURE_COMMAND_EXEC_FULL), )
|
||||
$(ECHO) "Re-running configure using original command line '$(REAL_CONFIGURE_COMMAND_EXEC_SHORT) $(REAL_CONFIGURE_COMMAND_LINE)'"
|
||||
$(eval RECONFIGURE_COMMAND := $(REAL_CONFIGURE_COMMAND_EXEC_FULL) $(REAL_CONFIGURE_COMMAND_LINE))
|
||||
@@ -110,50 +295,34 @@ reconfigure:
|
||||
CUSTOM_CONFIG_DIR="$(CUSTOM_CONFIG_DIR)" \
|
||||
$(RECONFIGURE_COMMAND) )
|
||||
|
||||
# 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 )
|
||||
##############################################################################
|
||||
# The main target, for delegating into Main.gmk
|
||||
##############################################################################
|
||||
|
||||
.PHONY: print-modules print-targets print-tests print-configuration \
|
||||
reconfigure create-make-helpers
|
||||
MAIN_TARGETS := $(SEQUENTIAL_TARGETS) $(PARALLEL_TARGETS) $(COMPARE_BUILD_MAKE)
|
||||
# If building the default target, add what they are to the description.
|
||||
DESCRIPTION_TARGETS := $(strip $(MAIN_TARGETS))
|
||||
ifeq ($(DESCRIPTION_TARGETS), default)
|
||||
DESCRIPTION_TARGETS += ($(DEFAULT_MAKE_TARGET))
|
||||
endif
|
||||
TARGET_DESCRIPTION := target$(if $(word 2, $(MAIN_TARGETS)),s) \
|
||||
'$(strip $(DESCRIPTION_TARGETS))' in configuration '$(CONF_NAME)'
|
||||
|
||||
##############################################################################
|
||||
# The main target. This will delegate all other targets into Main.gmk.
|
||||
##############################################################################
|
||||
# MAKEOVERRIDES is automatically set and propagated by Make to sub-Make calls.
|
||||
# We need to clear it of the init-specific variables. The user-specified
|
||||
# variables are explicitly propagated using $(USER_MAKE_VARS).
|
||||
main: MAKEOVERRIDES :=
|
||||
|
||||
MAIN_TARGETS := $(SEQUENTIAL_TARGETS) $(PARALLEL_TARGETS) $(COMPARE_BUILD_MAKE)
|
||||
# If building the default target, add what they are to the description.
|
||||
DESCRIPTION_TARGETS := $(strip $(MAIN_TARGETS))
|
||||
ifeq ($(DESCRIPTION_TARGETS), default)
|
||||
DESCRIPTION_TARGETS += ($(DEFAULT_MAKE_TARGET))
|
||||
endif
|
||||
TARGET_DESCRIPTION := target$(if $(word 2, $(MAIN_TARGETS)),s) \
|
||||
'$(strip $(DESCRIPTION_TARGETS))' in configuration '$(CONF_NAME)'
|
||||
|
||||
# MAKEOVERRIDES is automatically set and propagated by Make to sub-Make calls.
|
||||
# We need to clear it of the init-specific variables. The user-specified
|
||||
# variables are explicitly propagated using $(USER_MAKE_VARS).
|
||||
main: MAKEOVERRIDES :=
|
||||
|
||||
main: $(INIT_TARGETS) create-make-helpers
|
||||
main: $(INIT_TARGETS)
|
||||
ifneq ($(SEQUENTIAL_TARGETS)$(PARALLEL_TARGETS), )
|
||||
$(call RotateLogFiles)
|
||||
$(ECHO) "Building $(TARGET_DESCRIPTION)" $(BUILD_LOG_PIPE_SIMPLE)
|
||||
$(PRINTF) "Building $(TARGET_DESCRIPTION)\n" $(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)
|
||||
@@ -164,15 +333,14 @@ main: $(INIT_TARGETS) create-make-helpers
|
||||
# treat it as NOT using jobs at all.
|
||||
( cd $(TOPDIR) && \
|
||||
$(NICE) $(MAKE) $(MAKE_ARGS) $(OUTPUT_SYNC_FLAG) \
|
||||
$(if $(JOBS), -j $(JOBS)) \
|
||||
$(if $(JOBS), -j $(JOBS)) \
|
||||
-f make/Main.gmk $(USER_MAKE_VARS) \
|
||||
$(PARALLEL_TARGETS) $(COMPARE_BUILD_MAKE) $(BUILD_LOG_PIPE) || \
|
||||
( exitcode=$$? && \
|
||||
$(ECHO) "" $(BUILD_LOG_PIPE_SIMPLE) && \
|
||||
$(ECHO) "ERROR: Build failed for $(TARGET_DESCRIPTION) (exit code $$exitcode)" \
|
||||
$(PRINTF) "\nERROR: Build failed for $(TARGET_DESCRIPTION) (exit code $$exitcode) \n" \
|
||||
$(BUILD_LOG_PIPE_SIMPLE) && \
|
||||
cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -j 1 -f make/Init.gmk \
|
||||
on-failure ; \
|
||||
HAS_SPEC=true on-failure ; \
|
||||
exit $$exitcode ) )
|
||||
$(call CleanupJavacServer)
|
||||
$(call StopGlobalTimer)
|
||||
@@ -181,35 +349,31 @@ main: $(INIT_TARGETS) create-make-helpers
|
||||
if test -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error ; then \
|
||||
exit 1 ; \
|
||||
fi
|
||||
$(ECHO) "Finished building $(TARGET_DESCRIPTION)" $(BUILD_LOG_PIPE_SIMPLE)
|
||||
$(PRINTF) "Finished building $(TARGET_DESCRIPTION)\n" $(BUILD_LOG_PIPE_SIMPLE)
|
||||
$(call ReportProfileTimes)
|
||||
endif
|
||||
|
||||
on-failure:
|
||||
on-failure:
|
||||
$(call CleanupJavacServer)
|
||||
$(call StopGlobalTimer)
|
||||
$(call ReportBuildTimes)
|
||||
$(call PrintFailureReports)
|
||||
$(call PrintBuildLogFailures)
|
||||
$(call ReportProfileTimes)
|
||||
$(ECHO) "HELP: Run 'make doctor' to diagnose build problems."
|
||||
$(ECHO) ""
|
||||
$(PRINTF) "HELP: Run 'make doctor' to diagnose build problems.\n\n"
|
||||
ifneq ($(COMPARE_BUILD), )
|
||||
$(call CleanupCompareBuild)
|
||||
endif
|
||||
|
||||
# Support targets for COMPARE_BUILD, used for makefile development
|
||||
pre-compare-build:
|
||||
# Support targets for COMPARE_BUILD, used for makefile development
|
||||
pre-compare-build:
|
||||
$(call WaitForJavacServerFinish)
|
||||
$(call PrepareCompareBuild)
|
||||
|
||||
post-compare-build:
|
||||
post-compare-build:
|
||||
$(call WaitForJavacServerFinish)
|
||||
$(call CleanupCompareBuild)
|
||||
$(call CompareBuildDoComparison)
|
||||
|
||||
.PHONY: main on-failure pre-compare-build post-compare-build
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
.PHONY: print-targets print-modules reconfigure main on-failure
|
||||
endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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
|
||||
@@ -23,114 +23,396 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeIncludeStart.gmk
|
||||
ifeq ($(INCLUDE), true)
|
||||
|
||||
################################################################################
|
||||
# This file contains helper functions for Init.gmk.
|
||||
# It is divided in two parts, depending on if a SPEC is present or not
|
||||
# (HAS_SPEC is true or not).
|
||||
################################################################################
|
||||
|
||||
# Define basic logging setup
|
||||
BUILD_LOG := $(OUTPUTDIR)/build.log
|
||||
BUILD_PROFILE_LOG := $(OUTPUTDIR)/build-profile.log
|
||||
ifndef _INITSUPPORT_GMK
|
||||
_INITSUPPORT_GMK := 1
|
||||
|
||||
BUILD_LOG_PIPE := > >($(TEE) -a $(BUILD_LOG)) 2> >($(TEE) -a $(BUILD_LOG) >&2) && wait
|
||||
# Use this for simple echo/printf commands that are never expected to print
|
||||
# to stderr.
|
||||
BUILD_LOG_PIPE_SIMPLE := | $(TEE) -a $(BUILD_LOG)
|
||||
ifeq ($(HAS_SPEC), )
|
||||
|
||||
# Setup the build environment to match the requested specification on
|
||||
# level of reproducible builds
|
||||
define SetupReproducibleBuild
|
||||
ifeq ($$(SOURCE_DATE), updated)
|
||||
# For static values of SOURCE_DATE (not "updated"), these are set in spec.gmk
|
||||
export SOURCE_DATE_EPOCH := $$(shell $$(DATE) +"%s")
|
||||
export SOURCE_DATE_ISO_8601 := $$(call EpochToISO8601, $$(SOURCE_DATE_EPOCH))
|
||||
# COMMA is defined in spec.gmk, but that is not included yet
|
||||
COMMA := ,
|
||||
|
||||
# Include the corresponding closed file, if present.
|
||||
ifneq ($(CUSTOM_MAKE_DIR), )
|
||||
-include $(CUSTOM_MAKE_DIR)/InitSupport.gmk
|
||||
endif
|
||||
endef
|
||||
|
||||
# Parse COMPARE_BUILD into COMPARE_BUILD_*
|
||||
# Syntax: COMPARE_BUILD=CONF=<configure options>:PATCH=<patch file>:
|
||||
# MAKE=<make targets>:COMP_OPTS=<compare script options>:
|
||||
# COMP_DIR=<compare script base dir>|<default>:
|
||||
# FAIL=<bool>
|
||||
# If neither CONF or PATCH is given, assume <default> means CONF if it
|
||||
# begins with "--", otherwise assume it means PATCH.
|
||||
# MAKE and COMP_OPTS can only be used with CONF and/or PATCH specified.
|
||||
# If any value contains "+", it will be replaced by space.
|
||||
# FAIL can be set to false to have the return value of compare be ignored.
|
||||
define ParseCompareBuild
|
||||
ifneq ($$(COMPARE_BUILD), )
|
||||
COMPARE_BUILD_OUTPUTDIR := $(WORKSPACE_ROOT)/build/compare-build/$(CONF_NAME)
|
||||
COMPARE_BUILD_FAIL := true
|
||||
##############################################################################
|
||||
# Helper functions for the initial part of Init.gmk, before the spec file is
|
||||
# loaded. Most of these functions provide parsing and setting up make options
|
||||
# from the command-line.
|
||||
##############################################################################
|
||||
|
||||
ifneq ($$(findstring :, $$(COMPARE_BUILD)), )
|
||||
$$(foreach part, $$(subst :, , $$(COMPARE_BUILD)), \
|
||||
$$(if $$(filter PATCH=%, $$(part)), \
|
||||
$$(eval COMPARE_BUILD_PATCH = $$(strip $$(patsubst PATCH=%, %, $$(part)))) \
|
||||
) \
|
||||
$$(if $$(filter CONF=%, $$(part)), \
|
||||
$$(eval COMPARE_BUILD_CONF = $$(strip $$(subst +, , $$(patsubst CONF=%, %, $$(part))))) \
|
||||
) \
|
||||
$$(if $$(filter MAKE=%, $$(part)), \
|
||||
$$(eval COMPARE_BUILD_MAKE = $$(strip $$(subst +, , $$(patsubst MAKE=%, %, $$(part))))) \
|
||||
) \
|
||||
$$(if $$(filter COMP_OPTS=%, $$(part)), \
|
||||
$$(eval COMPARE_BUILD_COMP_OPTS = $$(strip $$(subst +, , $$(patsubst COMP_OPTS=%, %, $$(part))))) \
|
||||
) \
|
||||
$$(if $$(filter COMP_DIR=%, $$(part)), \
|
||||
$$(eval COMPARE_BUILD_COMP_DIR = $$(strip $$(subst +, , $$(patsubst COMP_DIR=%, %, $$(part))))) \
|
||||
) \
|
||||
$$(if $$(filter FAIL=%, $$(part)), \
|
||||
$$(eval COMPARE_BUILD_FAIL = $$(strip $$(subst +, , $$(patsubst FAIL=%, %, $$(part))))) \
|
||||
) \
|
||||
$$(if $$(filter NODRYRUN=%, $$(part)), \
|
||||
$$(eval COMPARE_BUILD_NODRYRUN = $$(strip $$(subst +, , $$(patsubst NODRYRUN=%, %, $$(part))))) \
|
||||
) \
|
||||
)
|
||||
else
|
||||
# Separate handling for single field case, to allow for spaces in values.
|
||||
ifneq ($$(filter PATCH=%, $$(COMPARE_BUILD)), )
|
||||
COMPARE_BUILD_PATCH = $$(strip $$(patsubst PATCH=%, %, $$(COMPARE_BUILD)))
|
||||
else ifneq ($$(filter CONF=%, $$(COMPARE_BUILD)), )
|
||||
COMPARE_BUILD_CONF = $$(strip $$(subst +, , $$(patsubst CONF=%, %, $$(COMPARE_BUILD))))
|
||||
else ifneq ($$(filter --%, $$(COMPARE_BUILD)), )
|
||||
# Assume CONF if value begins with --
|
||||
COMPARE_BUILD_CONF = $$(strip $$(subst +, , $$(COMPARE_BUILD)))
|
||||
# Make control variables, handled by Init.gmk
|
||||
INIT_CONTROL_VARIABLES += LOG CONF CONF_NAME SPEC JOBS TEST_JOBS CONF_CHECK \
|
||||
COMPARE_BUILD JTREG GTEST MICRO TEST_OPTS TEST_VM_OPTS TEST_DEPS
|
||||
|
||||
# All known make control variables
|
||||
MAKE_CONTROL_VARIABLES := $(INIT_CONTROL_VARIABLES) TEST JDK_FILTER SPEC_FILTER
|
||||
|
||||
# Define a simple reverse function.
|
||||
# Should maybe move to MakeBase.gmk, but we can't include that file now.
|
||||
reverse = \
|
||||
$(if $(strip $(1)), $(call reverse, $(wordlist 2, $(words $(1)), $(1)))) \
|
||||
$(firstword $(1))
|
||||
|
||||
# The variable MAKEOVERRIDES contains variable assignments from the command
|
||||
# line, but in reverse order to what the user entered.
|
||||
# The '§' <=> '\ 'dance is needed to keep values with space in them connected.
|
||||
COMMAND_LINE_VARIABLES := $(subst §,\ , $(call reverse, $(subst \ ,§,$(MAKEOVERRIDES))))
|
||||
|
||||
# A list like FOO="val1" BAR="val2" containing all user-supplied make
|
||||
# variables that we should propagate.
|
||||
# The '§' <=> '\ 'dance is needed to keep values with space in them connected.
|
||||
USER_MAKE_VARS := $(subst §,\ , $(filter-out $(addsuffix =%, $(INIT_CONTROL_VARIABLES)), \
|
||||
$(subst \ ,§,$(MAKEOVERRIDES))))
|
||||
|
||||
# Setup information about available configurations, if any.
|
||||
ifneq ($(CUSTOM_ROOT), )
|
||||
build_dir = $(CUSTOM_ROOT)/build
|
||||
else
|
||||
build_dir = $(topdir)/build
|
||||
endif
|
||||
all_spec_files = $(wildcard $(build_dir)/*/spec.gmk)
|
||||
# Extract the configuration names from the path
|
||||
all_confs = $(patsubst %/spec.gmk, %, $(patsubst $(build_dir)/%, %, $(all_spec_files)))
|
||||
|
||||
# Check for unknown command-line variables
|
||||
define CheckControlVariables
|
||||
command_line_variables := $$(strip $$(foreach var, \
|
||||
$$(subst \ ,_,$$(MAKEOVERRIDES)), \
|
||||
$$(firstword $$(subst =, , $$(var)))))
|
||||
unknown_command_line_variables := $$(strip \
|
||||
$$(filter-out $$(MAKE_CONTROL_VARIABLES), $$(command_line_variables)))
|
||||
ifneq ($$(unknown_command_line_variables), )
|
||||
$$(info Note: Command line contains non-control variables:)
|
||||
$$(foreach var, $$(unknown_command_line_variables), $$(info * $$(var)=$$($$(var))))
|
||||
$$(info Make sure it is not mistyped, and that you intend to override this variable.)
|
||||
$$(info 'make help' will list known control variables.)
|
||||
$$(info )
|
||||
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
|
||||
# MAKEFLAGS only indicate -j if read in a recipe (!)
|
||||
$$(topdir)/make/Init.gmk: .FORCE
|
||||
$$(if $$(findstring --jobserver, $$(MAKEFLAGS)), \
|
||||
$$(info Error: 'make -jN' is not supported, use 'make JOBS=N') \
|
||||
$$(error Cannot continue) \
|
||||
)
|
||||
.FORCE:
|
||||
.PHONY: .FORCE
|
||||
endef
|
||||
|
||||
# Check that the CONF_CHECK option is valid and set up handling
|
||||
define ParseConfCheckOption
|
||||
ifeq ($$(CONF_CHECK), )
|
||||
# Default behavior is fail
|
||||
CONF_CHECK := fail
|
||||
else ifneq ($$(filter-out auto fail ignore, $$(CONF_CHECK)), )
|
||||
$$(info Error: CONF_CHECK must be one of: auto, fail or ignore.)
|
||||
$$(error Cannot continue)
|
||||
endif
|
||||
endef
|
||||
|
||||
define ParseConfAndSpec
|
||||
ifneq ($$(origin SPEC), undefined)
|
||||
# We have been given a SPEC, check that it works out properly
|
||||
ifneq ($$(origin CONF), undefined)
|
||||
# We also have a CONF argument. We can't have both.
|
||||
$$(info Error: Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
|
||||
$$(error Cannot continue)
|
||||
endif
|
||||
ifneq ($$(origin CONF_NAME), undefined)
|
||||
# We also have a CONF_NAME argument. We can't have both.
|
||||
$$(info Error: Cannot use CONF_NAME=$$(CONF_NAME) and SPEC=$$(SPEC) at the same time. Choose one.)
|
||||
$$(error Cannot continue)
|
||||
endif
|
||||
ifeq ($$(wildcard $$(SPEC)), )
|
||||
$$(info Error: Cannot locate spec.gmk, given by SPEC=$$(SPEC).)
|
||||
$$(error Cannot continue)
|
||||
endif
|
||||
ifeq ($$(filter /%, $$(SPEC)), )
|
||||
# If given with relative path, make it absolute
|
||||
SPECS := $$(CURDIR)/$$(strip $$(SPEC))
|
||||
else
|
||||
# Otherwise assume patch file
|
||||
COMPARE_BUILD_PATCH = $$(strip $$(COMPARE_BUILD))
|
||||
SPECS := $$(SPEC)
|
||||
endif
|
||||
|
||||
# For now, unset this SPEC variable.
|
||||
override SPEC :=
|
||||
else
|
||||
# Use spec.gmk files in the build output directory
|
||||
ifeq ($$(all_spec_files), )
|
||||
ifneq ($(CUSTOM_ROOT), )
|
||||
$$(info Error: No configurations found for $$(CUSTOM_ROOT).)
|
||||
else
|
||||
$$(info Error: No configurations found for $$(topdir).)
|
||||
endif
|
||||
$$(info Please run 'bash configure' to create a configuration.)
|
||||
$$(info )
|
||||
$$(error Cannot continue)
|
||||
endif
|
||||
|
||||
ifneq ($$(origin CONF_NAME), undefined)
|
||||
ifneq ($$(origin CONF), undefined)
|
||||
# We also have a CONF argument. We can't have both.
|
||||
$$(info Error: Cannot use CONF=$$(CONF) and CONF_NAME=$$(CONF_NAME) at the same time. Choose one.)
|
||||
$$(error Cannot continue)
|
||||
endif
|
||||
matching_conf := $$(strip $$(filter $$(CONF_NAME), $$(all_confs)))
|
||||
ifeq ($$(matching_conf), )
|
||||
$$(info Error: No configurations found matching CONF_NAME=$$(CONF_NAME).)
|
||||
$$(info Available configurations in $$(build_dir):)
|
||||
$$(foreach var, $$(all_confs), $$(info * $$(var)))
|
||||
$$(error Cannot continue)
|
||||
else ifneq ($$(words $$(matching_conf)), 1)
|
||||
$$(info Error: Matching more than one configuration CONF_NAME=$$(CONF_NAME).)
|
||||
$$(info Available configurations in $$(build_dir):)
|
||||
$$(foreach var, $$(all_confs), $$(info * $$(var)))
|
||||
$$(error Cannot continue)
|
||||
else
|
||||
$$(info Building configuration '$$(matching_conf)' (matching CONF_NAME=$$(CONF_NAME)))
|
||||
endif
|
||||
# Create a SPEC definition. This will contain the path to exactly one spec file.
|
||||
SPECS := $$(build_dir)/$$(matching_conf)/spec.gmk
|
||||
else ifneq ($$(origin CONF), undefined)
|
||||
# User have given a CONF= argument.
|
||||
ifeq ($$(CONF), )
|
||||
# If given CONF=, match all configurations
|
||||
matching_confs := $$(strip $$(all_confs))
|
||||
else
|
||||
# Otherwise select those that contain the given CONF string
|
||||
ifeq ($$(patsubst !%,,$$(CONF)), )
|
||||
# A CONF starting with ! means we should negate the search term
|
||||
matching_confs := $$(strip $$(foreach var, $$(all_confs), \
|
||||
$$(if $$(findstring $$(subst !,,$$(CONF)), $$(var)), ,$$(var))))
|
||||
else
|
||||
matching_confs := $$(strip $$(foreach var, $$(all_confs), \
|
||||
$$(if $$(findstring $$(CONF), $$(var)), $$(var))))
|
||||
endif
|
||||
ifneq ($$(filter $$(CONF), $$(matching_confs)), )
|
||||
# If we found an exact match, use that
|
||||
matching_confs := $$(CONF)
|
||||
# Don't repeat this output on make restarts caused by including
|
||||
# generated files.
|
||||
ifeq ($$(MAKE_RESTARTS), )
|
||||
$$(info Using exact match for CONF=$$(CONF) (other matches are possible))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($$(matching_confs), )
|
||||
$$(info Error: No configurations found matching CONF=$$(CONF).)
|
||||
$$(info Available configurations in $$(build_dir):)
|
||||
$$(foreach var, $$(all_confs), $$(info * $$(var)))
|
||||
$$(error Cannot continue)
|
||||
else
|
||||
# Don't repeat this output on make restarts caused by including
|
||||
# generated files.
|
||||
ifeq ($$(MAKE_RESTARTS), )
|
||||
ifeq ($$(words $$(matching_confs)), 1)
|
||||
ifneq ($$(findstring $$(LOG_LEVEL), info debug trace), )
|
||||
$$(info Building configuration '$$(matching_confs)' (matching CONF=$$(CONF)))
|
||||
endif
|
||||
else
|
||||
$$(info Building these configurations (matching CONF=$$(CONF)):)
|
||||
$$(foreach var, $$(matching_confs), $$(info * $$(var)))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Create a SPEC definition. This will contain the path to one or more spec.gmk files.
|
||||
SPECS := $$(addsuffix /spec.gmk, $$(addprefix $$(build_dir)/, $$(matching_confs)))
|
||||
else
|
||||
# No CONF or SPEC given, check the available configurations
|
||||
ifneq ($$(words $$(all_spec_files)), 1)
|
||||
$$(info Error: No CONF given, but more than one configuration found.)
|
||||
$$(info Available configurations in $$(build_dir):)
|
||||
$$(foreach var, $$(all_confs), $$(info * $$(var)))
|
||||
$$(info Please retry building with CONF=<config pattern> (or SPEC=<spec file>).)
|
||||
$$(info )
|
||||
$$(error Cannot continue)
|
||||
endif
|
||||
|
||||
# We found exactly one configuration, use it
|
||||
SPECS := $$(strip $$(all_spec_files))
|
||||
endif
|
||||
endif
|
||||
ifneq ($$(COMPARE_BUILD_PATCH), )
|
||||
ifneq ($$(wildcard $$(WORKSPACE_ROOT)/$$(COMPARE_BUILD_PATCH)), )
|
||||
# Assume relative path, if file exists
|
||||
COMPARE_BUILD_PATCH := $$(wildcard $$(WORKSPACE_ROOT)/$$(COMPARE_BUILD_PATCH))
|
||||
else ifeq ($$(wildcard $$(COMPARE_BUILD_PATCH)), )
|
||||
$$(error Patch file $$(COMPARE_BUILD_PATCH) does not exist)
|
||||
endef
|
||||
|
||||
# Extract main targets from Main.gmk using the spec provided in $2.
|
||||
#
|
||||
# Param 1: FORCE = force generation of main-targets.gmk or LAZY = do not force.
|
||||
# Param 2: The SPEC file to use.
|
||||
define DefineMainTargets
|
||||
|
||||
# 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
|
||||
|
||||
ifeq ($$(MAKE_RESTARTS), )
|
||||
# Only do this if make has not been restarted, and if we do not force it.
|
||||
ifeq ($(strip $1), FORCE)
|
||||
$$(shell rm -f $$(main_targets_file))
|
||||
endif
|
||||
ifneq ($$(COMPARE_BUILD_NODRYRUN), true)
|
||||
PATCH_DRY_RUN := $$(shell cd $$(WORKSPACE_ROOT) && $$(PATCH) --dry-run -p1 < $$(COMPARE_BUILD_PATCH) > /dev/null 2>&1 || $$(ECHO) FAILED)
|
||||
ifeq ($$(PATCH_DRY_RUN), FAILED)
|
||||
$$(error Patch file $$(COMPARE_BUILD_PATCH) does not apply cleanly)
|
||||
endif
|
||||
|
||||
$$(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_LOG_VARS) \
|
||||
create-main-targets-include )
|
||||
|
||||
# Now include main-targets.gmk. This will define ALL_MAIN_TARGETS.
|
||||
-include $$(main_targets_file)
|
||||
endef
|
||||
|
||||
define PrintConfCheckFailed
|
||||
@echo ' '
|
||||
@echo "Please rerun configure! Easiest way to do this is by running"
|
||||
@echo "'make reconfigure'."
|
||||
@echo "This behavior may also be changed using CONF_CHECK=<ignore|auto>."
|
||||
@echo ' '
|
||||
endef
|
||||
|
||||
else # $(HAS_SPEC)=true
|
||||
##############################################################################
|
||||
# Helper functions for the 'main' target. These functions assume a single,
|
||||
# proper and existing SPEC is included.
|
||||
##############################################################################
|
||||
|
||||
include $(TOPDIR)/make/common/MakeBase.gmk
|
||||
|
||||
# Define basic logging setup
|
||||
BUILD_LOG := $(OUTPUTDIR)/build.log
|
||||
BUILD_PROFILE_LOG := $(OUTPUTDIR)/build-profile.log
|
||||
|
||||
BUILD_LOG_PIPE := > >($(TEE) -a $(BUILD_LOG)) 2> >($(TEE) -a $(BUILD_LOG) >&2) && wait
|
||||
# Use this for simple echo/printf commands that are never expected to print
|
||||
# to stderr.
|
||||
BUILD_LOG_PIPE_SIMPLE := | $(TEE) -a $(BUILD_LOG)
|
||||
|
||||
ifneq ($(CUSTOM_ROOT), )
|
||||
topdir = $(CUSTOM_ROOT)
|
||||
else
|
||||
topdir = $(TOPDIR)
|
||||
endif
|
||||
|
||||
# Setup the build environment to match the requested specification on
|
||||
# level of reproducible builds
|
||||
define SetupReproducibleBuild
|
||||
ifeq ($$(SOURCE_DATE), updated)
|
||||
# For static values of SOURCE_DATE (not "updated"), these are set in spec.gmk
|
||||
export SOURCE_DATE_EPOCH := $$(shell $$(DATE) +"%s")
|
||||
export SOURCE_DATE_ISO_8601 := $$(call EpochToISO8601, $$(SOURCE_DATE_EPOCH))
|
||||
endif
|
||||
endef
|
||||
|
||||
# Parse COMPARE_BUILD into COMPARE_BUILD_*
|
||||
# Syntax: COMPARE_BUILD=CONF=<configure options>:PATCH=<patch file>:
|
||||
# MAKE=<make targets>:COMP_OPTS=<compare script options>:
|
||||
# COMP_DIR=<compare script base dir>|<default>:
|
||||
# FAIL=<bool>
|
||||
# If neither CONF or PATCH is given, assume <default> means CONF if it
|
||||
# begins with "--", otherwise assume it means PATCH.
|
||||
# MAKE and COMP_OPTS can only be used with CONF and/or PATCH specified.
|
||||
# If any value contains "+", it will be replaced by space.
|
||||
# FAIL can be set to false to have the return value of compare be ignored.
|
||||
define ParseCompareBuild
|
||||
ifneq ($$(COMPARE_BUILD), )
|
||||
COMPARE_BUILD_OUTPUTDIR := $(topdir)/build/compare-build/$(CONF_NAME)
|
||||
COMPARE_BUILD_FAIL := true
|
||||
|
||||
ifneq ($$(findstring :, $$(COMPARE_BUILD)), )
|
||||
$$(foreach part, $$(subst :, , $$(COMPARE_BUILD)), \
|
||||
$$(if $$(filter PATCH=%, $$(part)), \
|
||||
$$(eval COMPARE_BUILD_PATCH = $$(strip $$(patsubst PATCH=%, %, $$(part)))) \
|
||||
) \
|
||||
$$(if $$(filter CONF=%, $$(part)), \
|
||||
$$(eval COMPARE_BUILD_CONF = $$(strip $$(subst +, , $$(patsubst CONF=%, %, $$(part))))) \
|
||||
) \
|
||||
$$(if $$(filter MAKE=%, $$(part)), \
|
||||
$$(eval COMPARE_BUILD_MAKE = $$(strip $$(subst +, , $$(patsubst MAKE=%, %, $$(part))))) \
|
||||
) \
|
||||
$$(if $$(filter COMP_OPTS=%, $$(part)), \
|
||||
$$(eval COMPARE_BUILD_COMP_OPTS = $$(strip $$(subst +, , $$(patsubst COMP_OPTS=%, %, $$(part))))) \
|
||||
) \
|
||||
$$(if $$(filter COMP_DIR=%, $$(part)), \
|
||||
$$(eval COMPARE_BUILD_COMP_DIR = $$(strip $$(subst +, , $$(patsubst COMP_DIR=%, %, $$(part))))) \
|
||||
) \
|
||||
$$(if $$(filter FAIL=%, $$(part)), \
|
||||
$$(eval COMPARE_BUILD_FAIL = $$(strip $$(subst +, , $$(patsubst FAIL=%, %, $$(part))))) \
|
||||
) \
|
||||
$$(if $$(filter NODRYRUN=%, $$(part)), \
|
||||
$$(eval COMPARE_BUILD_NODRYRUN = $$(strip $$(subst +, , $$(patsubst NODRYRUN=%, %, $$(part))))) \
|
||||
) \
|
||||
)
|
||||
else
|
||||
# Separate handling for single field case, to allow for spaces in values.
|
||||
ifneq ($$(filter PATCH=%, $$(COMPARE_BUILD)), )
|
||||
COMPARE_BUILD_PATCH = $$(strip $$(patsubst PATCH=%, %, $$(COMPARE_BUILD)))
|
||||
else ifneq ($$(filter CONF=%, $$(COMPARE_BUILD)), )
|
||||
COMPARE_BUILD_CONF = $$(strip $$(subst +, , $$(patsubst CONF=%, %, $$(COMPARE_BUILD))))
|
||||
else ifneq ($$(filter --%, $$(COMPARE_BUILD)), )
|
||||
# Assume CONF if value begins with --
|
||||
COMPARE_BUILD_CONF = $$(strip $$(subst +, , $$(COMPARE_BUILD)))
|
||||
else
|
||||
# Otherwise assume patch file
|
||||
COMPARE_BUILD_PATCH = $$(strip $$(COMPARE_BUILD))
|
||||
endif
|
||||
endif
|
||||
ifneq ($$(COMPARE_BUILD_PATCH), )
|
||||
ifneq ($$(wildcard $$(topdir)/$$(COMPARE_BUILD_PATCH)), )
|
||||
# Assume relative path, if file exists
|
||||
COMPARE_BUILD_PATCH := $$(wildcard $$(topdir)/$$(COMPARE_BUILD_PATCH))
|
||||
else ifeq ($$(wildcard $$(COMPARE_BUILD_PATCH)), )
|
||||
$$(error Patch file $$(COMPARE_BUILD_PATCH) does not exist)
|
||||
endif
|
||||
ifneq ($$(COMPARE_BUILD_NODRYRUN), true)
|
||||
PATCH_DRY_RUN := $$(shell cd $$(topdir) && $$(PATCH) --dry-run -p1 < $$(COMPARE_BUILD_PATCH) > /dev/null 2>&1 || $$(ECHO) FAILED)
|
||||
ifeq ($$(PATCH_DRY_RUN), FAILED)
|
||||
$$(error Patch file $$(COMPARE_BUILD_PATCH) does not apply cleanly)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq ($$(COMPARE_BUILD_FAIL), true)
|
||||
COMPARE_BUILD_IGNORE_RESULT := || true
|
||||
endif
|
||||
endif
|
||||
ifneq ($$(COMPARE_BUILD_FAIL), true)
|
||||
COMPARE_BUILD_IGNORE_RESULT := || true
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
endef
|
||||
|
||||
# Prepare for a comparison rebuild
|
||||
define PrepareCompareBuild
|
||||
# Prepare for a comparison rebuild
|
||||
define PrepareCompareBuild
|
||||
$(ECHO) "Preparing for comparison rebuild"
|
||||
# Apply patch, if any
|
||||
$(if $(COMPARE_BUILD_PATCH), cd $(WORKSPACE_ROOT) && $(PATCH) -p1 < $(COMPARE_BUILD_PATCH))
|
||||
$(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(PATCH) -p1 < $(COMPARE_BUILD_PATCH))
|
||||
# Move the first build away temporarily
|
||||
$(RM) -r $(WORKSPACE_ROOT)/build/.compare-build-temp
|
||||
$(MKDIR) -p $(WORKSPACE_ROOT)/build/.compare-build-temp
|
||||
$(MV) $(OUTPUTDIR) $(WORKSPACE_ROOT)/build/.compare-build-temp
|
||||
$(RM) -r $(topdir)/build/.compare-build-temp
|
||||
$(MKDIR) -p $(topdir)/build/.compare-build-temp
|
||||
$(MV) $(OUTPUTDIR) $(topdir)/build/.compare-build-temp
|
||||
# Restore an old compare-build, or create a new compare-build directory.
|
||||
if test -d $(COMPARE_BUILD_OUTPUTDIR); then \
|
||||
$(MV) $(COMPARE_BUILD_OUTPUTDIR) $(OUTPUTDIR); \
|
||||
@@ -140,23 +422,23 @@ define PrepareCompareBuild
|
||||
# Re-run configure with the same arguments (and possibly some additional),
|
||||
# must be done after patching.
|
||||
( cd $(CONFIGURE_START_DIR) && PATH="$(ORIGINAL_PATH)" \
|
||||
$(BASH) $(WORKSPACE_ROOT)/configure $(CONFIGURE_COMMAND_LINE) $(COMPARE_BUILD_CONF))
|
||||
endef
|
||||
$(BASH) $(topdir)/configure $(CONFIGURE_COMMAND_LINE) $(COMPARE_BUILD_CONF))
|
||||
endef
|
||||
|
||||
# Cleanup after a compare build
|
||||
define CleanupCompareBuild
|
||||
# Cleanup after a compare build
|
||||
define CleanupCompareBuild
|
||||
# If running with a COMPARE_BUILD patch, reverse-apply it, but continue
|
||||
# even if that fails (can happen with removed files).
|
||||
$(if $(COMPARE_BUILD_PATCH), cd $(WORKSPACE_ROOT) && $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH) || true)
|
||||
$(if $(COMPARE_BUILD_PATCH), cd $(topdir) && $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH) || true)
|
||||
# Move this build away and restore the original build
|
||||
$(MKDIR) -p $(WORKSPACE_ROOT)/build/compare-build
|
||||
$(MKDIR) -p $(topdir)/build/compare-build
|
||||
$(MV) $(OUTPUTDIR) $(COMPARE_BUILD_OUTPUTDIR)
|
||||
$(MV) $(WORKSPACE_ROOT)/build/.compare-build-temp/$(CONF_NAME) $(OUTPUTDIR)
|
||||
$(RM) -r $(WORKSPACE_ROOT)/build/.compare-build-temp
|
||||
endef
|
||||
$(MV) $(topdir)/build/.compare-build-temp/$(CONF_NAME) $(OUTPUTDIR)
|
||||
$(RM) -r $(topdir)/build/.compare-build-temp
|
||||
endef
|
||||
|
||||
# Do the actual comparison of two builds
|
||||
define CompareBuildDoComparison
|
||||
# Do the actual comparison of two builds
|
||||
define CompareBuildDoComparison
|
||||
# Compare first and second build. Ignore any error code from compare.sh.
|
||||
$(ECHO) "Comparing between comparison rebuild (this/new) and baseline (other/old)"
|
||||
$(if $(COMPARE_BUILD_COMP_DIR), \
|
||||
@@ -166,17 +448,16 @@ define CompareBuildDoComparison
|
||||
+(cd $(COMPARE_BUILD_OUTPUTDIR) && ./compare.sh --diffs $(COMPARE_BUILD_COMP_OPTS) \
|
||||
-o $(OUTPUTDIR) $(COMPARE_BUILD_IGNORE_RESULT)) \
|
||||
)
|
||||
endef
|
||||
endef
|
||||
|
||||
define PrintFailureReports
|
||||
define PrintFailureReports
|
||||
$(if $(filter none, $(LOG_REPORT)), , \
|
||||
$(RM) $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log ; \
|
||||
$(if $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log), \
|
||||
( \
|
||||
$(ECHO) "" ; \
|
||||
$(ECHO) "=== Output from failing command(s) repeated here ===" ; \
|
||||
$(PRINTF) "\n=== Output from failing command(s) repeated here ===\n" ; \
|
||||
$(foreach logfile, $(sort $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log)), \
|
||||
$(ECHO) "* For target $(notdir $(basename $(logfile))):" ; \
|
||||
$(PRINTF) "* For target $(notdir $(basename $(logfile))):\n" ; \
|
||||
$(if $(filter all, $(LOG_REPORT)), \
|
||||
$(GREP) -v -e "^Note: including file:" < $(logfile) || true ; \
|
||||
, \
|
||||
@@ -186,120 +467,116 @@ define PrintFailureReports
|
||||
fi ; \
|
||||
) \
|
||||
) \
|
||||
$(ECHO) "" ; \
|
||||
$(ECHO) "* All command lines available in $(MAKESUPPORT_OUTPUTDIR)/failure-logs." ; \
|
||||
$(ECHO) "=== End of repeated output ===" ; \
|
||||
$(PRINTF) "\n* All command lines available in $(MAKESUPPORT_OUTPUTDIR)/failure-logs.\n" ; \
|
||||
$(PRINTF) "=== End of repeated output ===\n" ; \
|
||||
) >> $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log \
|
||||
) \
|
||||
)
|
||||
endef
|
||||
endef
|
||||
|
||||
define PrintBuildLogFailures
|
||||
define PrintBuildLogFailures
|
||||
$(if $(filter none, $(LOG_REPORT)), , \
|
||||
if $(GREP) -q "recipe for target .* failed" $(BUILD_LOG) 2> /dev/null; then \
|
||||
$(ECHO) "" ; \
|
||||
$(ECHO) "=== Make failed targets repeated here ===" ; \
|
||||
$(PRINTF) "\n=== Make failed targets repeated here ===\n" ; \
|
||||
$(GREP) "recipe for target .* failed" $(BUILD_LOG) ; \
|
||||
$(ECHO) "=== End of repeated output ===" ; \
|
||||
$(ECHO) "" ; \
|
||||
$(ECHO) "HELP: Try searching the build log for the name of the first failed target." ; \
|
||||
$(PRINTF) "=== End of repeated output ===\n" ; \
|
||||
$(PRINTF) "\nHELP: Try searching the build log for the name of the first failed target.\n" ; \
|
||||
else \
|
||||
$(ECHO) "" ; \
|
||||
$(ECHO) "No indication of failed target found." ; \
|
||||
$(ECHO) "HELP: Try searching the build log for '] Error'." ; \
|
||||
$(PRINTF) "\nNo indication of failed target found.\n" ; \
|
||||
$(PRINTF) "HELP: Try searching the build log for '] Error'.\n" ; \
|
||||
fi >> $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log ; \
|
||||
$(CAT) $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log \
|
||||
)
|
||||
endef
|
||||
endef
|
||||
|
||||
define RotateLogFiles
|
||||
define RotateLogFiles
|
||||
$(RM) $(BUILD_LOG).old 2> /dev/null && \
|
||||
$(MV) $(BUILD_LOG) $(BUILD_LOG).old 2> /dev/null || true
|
||||
$(if $(findstring true, $(LOG_PROFILE_TIMES_FILE)), \
|
||||
$(RM) $(BUILD_PROFILE_LOG).old 2> /dev/null && \
|
||||
$(MV) $(BUILD_PROFILE_LOG) $(BUILD_PROFILE_LOG).old 2> /dev/null || true \
|
||||
)
|
||||
endef
|
||||
endef
|
||||
|
||||
# Failure logs are only supported for "parallel" main targets, not the
|
||||
# (trivial) sequential make targets (such as clean and reconfigure),
|
||||
# since the failure-logs directory creation will conflict with clean.
|
||||
# We also make sure the javatmp directory exists, which is needed if a java
|
||||
# process (like javac) is using java.io.tmpdir.
|
||||
define PrepareFailureLogs
|
||||
# Failure logs are only supported for "parallel" main targets, not the
|
||||
# (trivial) sequential make targets (such as clean and reconfigure),
|
||||
# since the failure-logs directory creation will conflict with clean.
|
||||
# We also make sure the javatmp directory exists, which is needed if a java
|
||||
# process (like javac) is using java.io.tmpdir.
|
||||
define PrepareFailureLogs
|
||||
$(RM) -r $(MAKESUPPORT_OUTPUTDIR)/failure-logs 2> /dev/null && \
|
||||
$(MKDIR) -p $(MAKESUPPORT_OUTPUTDIR)/failure-logs
|
||||
$(MKDIR) -p $(JAVA_TMP_DIR)
|
||||
$(RM) $(MAKESUPPORT_OUTPUTDIR)/exit-with-error 2> /dev/null
|
||||
endef
|
||||
endef
|
||||
|
||||
# Remove any javac server logs and port files. This
|
||||
# prevents a new make run to reuse the previous servers.
|
||||
define PrepareJavacServer
|
||||
# Remove any javac server logs and port files. This
|
||||
# prevents a new make run to reuse the previous servers.
|
||||
define PrepareJavacServer
|
||||
$(if $(JAVAC_SERVER_DIR), \
|
||||
$(RM) -r $(JAVAC_SERVER_DIR) 2> /dev/null && \
|
||||
$(MKDIR) -p $(JAVAC_SERVER_DIR) \
|
||||
)
|
||||
endef
|
||||
endef
|
||||
|
||||
define CleanupJavacServer
|
||||
define CleanupJavacServer
|
||||
[ -f $(JAVAC_SERVER_DIR)/server.port ] && $(ECHO) Stopping javac server && \
|
||||
$(TOUCH) $(JAVAC_SERVER_DIR)/server.port.stop; true
|
||||
endef
|
||||
endef
|
||||
|
||||
ifeq ($(call isBuildOs, windows), true)
|
||||
# On windows we need to synchronize with the javac server to be able to
|
||||
# move or remove the build output directory. Since we have no proper
|
||||
# synchronization process, wait for a while and hope it helps. This is only
|
||||
# used by build comparisons.
|
||||
ifeq ($(call isBuildOs, windows), true)
|
||||
# On windows we need to synchronize with the javac server to be able to
|
||||
# move or remove the build output directory. Since we have no proper
|
||||
# synchronization process, wait for a while and hope it helps. This is only
|
||||
# used by build comparisons.
|
||||
define WaitForJavacServerFinish
|
||||
$(if $(JAVAC_SERVER_DIR), \
|
||||
sleep 5 \
|
||||
)
|
||||
endef
|
||||
else
|
||||
define WaitForJavacServerFinish
|
||||
endef
|
||||
endif
|
||||
endef
|
||||
else
|
||||
define WaitForJavacServerFinish
|
||||
endef
|
||||
endif
|
||||
|
||||
##############################################################################
|
||||
# Functions for timers
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
# Functions for timers
|
||||
##############################################################################
|
||||
|
||||
# Store the build times in this directory.
|
||||
BUILDTIMESDIR := $(OUTPUTDIR)/make-support/build-times
|
||||
# Store the build times in this directory.
|
||||
BUILDTIMESDIR = $(OUTPUTDIR)/make-support/build-times
|
||||
|
||||
# Record starting time for build of a sub repository.
|
||||
define RecordStartTime
|
||||
# Record starting time for build of a sub repository.
|
||||
define RecordStartTime
|
||||
$(DATE) '+%Y %m %d %H %M %S' | $(AWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_start_$(strip $1) && \
|
||||
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_start_$(strip $1)_human_readable
|
||||
endef
|
||||
endef
|
||||
|
||||
# Record ending time and calculate the difference and store it in a
|
||||
# easy to read format. Handles builds that cross midnight. Expects
|
||||
# that a build will never take 24 hours or more.
|
||||
define RecordEndTime
|
||||
# Record ending time and calculate the difference and store it in a
|
||||
# easy to read format. Handles builds that cross midnight. Expects
|
||||
# that a build will never take 24 hours or more.
|
||||
define RecordEndTime
|
||||
$(DATE) '+%Y %m %d %H %M %S' | $(AWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_end_$(strip $1)
|
||||
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_end_$(strip $1)_human_readable
|
||||
$(ECHO) `$(CAT) $(BUILDTIMESDIR)/build_time_start_$(strip $1)` `$(CAT) $(BUILDTIMESDIR)/build_time_end_$(strip $1)` $1 | \
|
||||
$(AWK) '{ F=$$7; T=$$14; if (F > T) { T+=3600*24 }; D=T-F; H=int(D/3600); \
|
||||
M=int((D-H*3600)/60); S=D-H*3600-M*60; printf("%02d:%02d:%02d %s\n",H,M,S,$$15); }' \
|
||||
> $(BUILDTIMESDIR)/build_time_diff_$(strip $1)
|
||||
endef
|
||||
endef
|
||||
|
||||
define StartGlobalTimer
|
||||
define StartGlobalTimer
|
||||
$(RM) -r $(BUILDTIMESDIR) 2> /dev/null && \
|
||||
$(MKDIR) -p $(BUILDTIMESDIR) && \
|
||||
$(call RecordStartTime,TOTAL)
|
||||
endef
|
||||
endef
|
||||
|
||||
define StopGlobalTimer
|
||||
define StopGlobalTimer
|
||||
$(call RecordEndTime,TOTAL)
|
||||
endef
|
||||
endef
|
||||
|
||||
# Find all build_time_* files and print their contents in a list sorted
|
||||
# on the name of the sub repository.
|
||||
define ReportBuildTimes
|
||||
# Find all build_time_* files and print their contents in a list sorted
|
||||
# on the name of the sub repository.
|
||||
define ReportBuildTimes
|
||||
$(PRINTF) $(LOG_INFO) -- \
|
||||
"----- Build times -------\nStart %s\nEnd %s\n%s\n%s\n-------------------------\n" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_start_TOTAL_human_readable`" \
|
||||
@@ -308,20 +585,119 @@ define ReportBuildTimes
|
||||
$(XARGS) $(CAT) | $(SORT) -k 2`" \
|
||||
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`" \
|
||||
$(BUILD_LOG_PIPE_SIMPLE)
|
||||
endef
|
||||
|
||||
define ReportProfileTimes
|
||||
$(if $(findstring true, $(LOG_PROFILE_TIMES_LOG)), \
|
||||
[ ! -f $(BUILD_PROFILE_LOG) ] || \
|
||||
{ $(ECHO) Begin $(notdir $(BUILD_PROFILE_LOG)) && \
|
||||
$(CAT) $(BUILD_PROFILE_LOG) && \
|
||||
$(ECHO) End $(notdir $(BUILD_PROFILE_LOG)); \
|
||||
} \
|
||||
$(BUILD_LOG_PIPE_SIMPLE)
|
||||
)
|
||||
endef
|
||||
|
||||
endif # HAS_SPEC
|
||||
|
||||
# Look for a given option in the LOG variable, and if found, set a variable
|
||||
# and remove the option from the LOG variable
|
||||
# $1: The option to look for
|
||||
# $2: The variable to set to "true" if the option is found
|
||||
define ParseLogOption
|
||||
ifneq ($$(findstring $1, $$(LOG)), )
|
||||
override $2 := true
|
||||
# First try to remove ",<option>" if it exists, otherwise just remove "<option>"
|
||||
LOG_STRIPPED := $$(subst $1,, $$(subst $$(COMMA)$$(strip $1),, $$(LOG)))
|
||||
# We might have ended up with a leading comma. Remove it. Need override
|
||||
# since LOG is set from the command line.
|
||||
override LOG := $$(strip $$(patsubst $$(COMMA)%, %, $$(LOG_STRIPPED)))
|
||||
endif
|
||||
endef
|
||||
|
||||
define ReportProfileTimes
|
||||
$(if $(findstring true, $(LOG_PROFILE_TIMES_LOG)), \
|
||||
[ ! -f $(BUILD_PROFILE_LOG) ] || \
|
||||
{ $(ECHO) Begin $(notdir $(BUILD_PROFILE_LOG)) && \
|
||||
$(CAT) $(BUILD_PROFILE_LOG) && \
|
||||
$(ECHO) End $(notdir $(BUILD_PROFILE_LOG)); \
|
||||
} \
|
||||
$(BUILD_LOG_PIPE_SIMPLE)
|
||||
)
|
||||
# Look for a given option with an assignment in the LOG variable, and if found,
|
||||
# set a variable to that value and remove the option from the LOG variable
|
||||
# $1: The option to look for
|
||||
# $2: The variable to set to the value of the option, if found
|
||||
define ParseLogValue
|
||||
ifneq ($$(findstring $1=, $$(LOG)), )
|
||||
# Make words of out comma-separated list and find the one with opt=val
|
||||
value := $$(strip $$(subst $$(strip $1)=,, $$(filter $$(strip $1)=%, $$(subst $$(COMMA), , $$(LOG)))))
|
||||
override $2 := $$(value)
|
||||
# First try to remove ",<option>" if it exists, otherwise just remove "<option>"
|
||||
LOG_STRIPPED := $$(subst $$(strip $1)=$$(value),, \
|
||||
$$(subst $$(COMMA)$$(strip $1)=$$(value),, $$(LOG)))
|
||||
# We might have ended up with a leading comma. Remove it. Need override
|
||||
# since LOG is set from the command line.
|
||||
override LOG := $$(strip $$(patsubst $$(COMMA)%, %, $$(LOG_STRIPPED)))
|
||||
endif
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
|
||||
endif # include guard
|
||||
include MakeIncludeEnd.gmk
|
||||
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
|
||||
$$(eval $$(call ParseLogOption, nofile, LOG_NOFILE))
|
||||
|
||||
# If "cmdline" is present, print all executes "important" command lines.
|
||||
$$(eval $$(call ParseLogOption, cmdlines, LOG_CMDLINES))
|
||||
|
||||
# If "report" is present, use non-standard reporting options at build failure.
|
||||
$$(eval $$(call ParseLogValue, report, LOG_REPORT))
|
||||
ifneq ($$(LOG_REPORT), )
|
||||
ifeq ($$(filter $$(LOG_REPORT), none all default), )
|
||||
$$(info Error: LOG=report has invalid value: $$(LOG_REPORT).)
|
||||
$$(info Valid values: LOG=report=<none>|<all>|<default>)
|
||||
$$(error Cannot continue)
|
||||
endif
|
||||
endif
|
||||
|
||||
# If "profile-to-log" is present, write shell times in build log
|
||||
$$(eval $$(call ParseLogOption, profile-to-log, LOG_PROFILE_TIMES_LOG))
|
||||
|
||||
# If "profile" is present, write shell times in separate log file
|
||||
# IMPORTANT: $(ParseLogOption profile-to-log) should go first. Otherwise
|
||||
# parsing of 'LOG=debug,profile-to-log,nofile' ends up in the following error:
|
||||
# Error: LOG contains unknown option or log level: debug-to-log.
|
||||
$$(eval $$(call ParseLogOption, profile, LOG_PROFILE_TIMES_FILE))
|
||||
|
||||
# Treat LOG=profile-to-log as if it were LOG=profile,profile-to-log
|
||||
LOG_PROFILE_TIMES_FILE := $$(firstword $$(LOG_PROFILE_TIMES_FILE) $$(LOG_PROFILE_TIMES_LOG))
|
||||
|
||||
override LOG_LEVEL := $$(LOG)
|
||||
|
||||
ifeq ($$(LOG_LEVEL), )
|
||||
# Set LOG to "warn" as default if not set
|
||||
override LOG_LEVEL := warn
|
||||
endif
|
||||
|
||||
ifeq ($$(LOG_LEVEL), warn)
|
||||
override MAKE_LOG_FLAGS := -s
|
||||
else ifeq ($$(LOG_LEVEL), info)
|
||||
override MAKE_LOG_FLAGS := -s
|
||||
else ifeq ($$(LOG_LEVEL), debug)
|
||||
override MAKE_LOG_FLAGS :=
|
||||
else ifeq ($$(LOG_LEVEL), trace)
|
||||
override MAKE_LOG_FLAGS :=
|
||||
else
|
||||
$$(info Error: LOG contains unknown option or log level: $$(LOG).)
|
||||
$$(info LOG can be <level>[,<opt>[...]] where <opt> is nofile | cmdlines | profile | profile-to-log)
|
||||
$$(info and <level> is warn | info | debug | trace)
|
||||
$$(error Cannot continue)
|
||||
endif
|
||||
endef
|
||||
|
||||
MAKE_LOG_VARS = $(foreach v, \
|
||||
LOG_LEVEL LOG_NOFILE LOG_CMDLINES LOG_REPORT LOG_PROFILE_TIMES_LOG \
|
||||
LOG_PROFILE_TIMES_FILE, \
|
||||
$v=$($v) \
|
||||
)
|
||||
|
||||
endif # _INITSUPPORT_GMK
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2024, 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
|
||||
@@ -23,9 +23,10 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
default: all
|
||||
|
||||
################################################################################
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include Execute.gmk
|
||||
include Modules.gmk
|
||||
@@ -57,4 +58,6 @@ TARGETS += $(jlink_interim_image)
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,13 +23,14 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
default: all
|
||||
|
||||
################################################################################
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include CopyFiles.gmk
|
||||
include JarArchive.gmk
|
||||
include JavaCompilation.gmk
|
||||
include JarArchive.gmk
|
||||
include TextFileProcessing.gmk
|
||||
|
||||
# This rule will be depended on due to the MANIFEST line
|
||||
@@ -77,7 +78,3 @@ $(eval $(call SetupJarArchive, BUILD_JRTFS_JAR, \
|
||||
))
|
||||
|
||||
all: $(BUILD_JRTFS_JAR)
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2019, 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
|
||||
@@ -23,9 +23,8 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
|
||||
################################################################################
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include CopyFiles.gmk
|
||||
include TextFileProcessing.gmk
|
||||
@@ -119,7 +118,3 @@ else # Not macosx
|
||||
endif # macosx
|
||||
|
||||
.PHONY: jdk-bundle jre-bundle bundles
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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
|
||||
@@ -24,41 +24,44 @@
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# This is the main makefile containing most actual top level targets.
|
||||
# This is the main makefile containing most actual top level targets. It needs
|
||||
# to be called with a SPEC file defined.
|
||||
################################################################################
|
||||
|
||||
# Declare ALL_TARGETS as an immediate variable. This variable is a list of all
|
||||
# valid top level targets. It's used to declare them all as PHONY and to
|
||||
# generate the -only targets.
|
||||
# Declare default target
|
||||
default:
|
||||
|
||||
ALL_TARGETS :=
|
||||
|
||||
DEFAULT_TARGET := default-target
|
||||
|
||||
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
|
||||
ifeq ($(wildcard $(SPEC)), )
|
||||
$(error Main.gmk needs SPEC set to a proper spec.gmk)
|
||||
endif
|
||||
|
||||
include Modules.gmk
|
||||
# Now load the spec
|
||||
include $(SPEC)
|
||||
|
||||
# Load the vital tools for all the makefiles.
|
||||
include $(TOPDIR)/make/common/MakeBase.gmk
|
||||
include $(TOPDIR)/make/common/Modules.gmk
|
||||
include $(TOPDIR)/make/common/FindTests.gmk
|
||||
|
||||
include $(TOPDIR)/make/MainSupport.gmk
|
||||
|
||||
# Are we requested to ignore dependencies?
|
||||
ifneq ($(findstring -only, $(MAKECMDGOALS)), )
|
||||
DEPS := none
|
||||
endif
|
||||
|
||||
# Declare ALL_TARGETS as an immediate variable. This variable is a list of all
|
||||
# valid top level targets. It's used to declare them all as PHONY and to
|
||||
# generate the -only targets.
|
||||
ALL_TARGETS :=
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, Main.gmk))
|
||||
|
||||
# All modules for the current target platform.
|
||||
ALL_MODULES := $(call FindAllModules)
|
||||
|
||||
################################################################################
|
||||
################################################################################
|
||||
#
|
||||
# Recipes for all targets. Only recipes, dependencies are declared later.
|
||||
@@ -353,14 +356,6 @@ $(eval $(call SetupTarget, vscode-project-ccls, \
|
||||
DEPS := compile-commands, \
|
||||
))
|
||||
|
||||
################################################################################
|
||||
# IDEA IntelliJ projects
|
||||
|
||||
$(eval $(call SetupTarget, idea-gen-config, \
|
||||
MAKEFILE := ide/idea/jdk/IdeaGenConfig, \
|
||||
ARGS := IDEA_OUTPUT="$(IDEA_OUTPUT)" MODULES="$(MODULES)", \
|
||||
))
|
||||
|
||||
################################################################################
|
||||
# Build demos targets
|
||||
|
||||
@@ -417,14 +412,12 @@ $(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=$(BOOTCYCLE_SPEC) main
|
||||
LOG_PREFIX="[bootcycle] " JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
|
||||
else
|
||||
$(call LogWarn, Boot cycle build disabled when cross compiling)
|
||||
endif
|
||||
@@ -461,9 +454,9 @@ $(eval $(call SetupTarget, symbols-image, \
|
||||
TARGET := symbols, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTarget, static-launchers, \
|
||||
$(eval $(call SetupTarget, static-launcher, \
|
||||
MAKEFILE := StaticLibs, \
|
||||
TARGET := static-launchers, \
|
||||
TARGET := static-launcher, \
|
||||
DEPS := hotspot-static-libs static-libs, \
|
||||
))
|
||||
|
||||
@@ -761,17 +754,6 @@ $(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, \
|
||||
@@ -883,12 +865,6 @@ $(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, \
|
||||
@@ -1014,7 +990,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 java.base-launchers
|
||||
jdk.compiler-gendata: jdk.compiler-launchers
|
||||
jdk.javadoc-gendata: jdk.compiler-launchers
|
||||
endif
|
||||
|
||||
@@ -1290,7 +1266,7 @@ ifeq ($(call isTargetOs, macosx), true)
|
||||
legacy-images: mac-legacy-jre-bundle
|
||||
endif
|
||||
|
||||
static-exploded-image: static-launchers exploded-image
|
||||
static-exploded-image: static-launcher exploded-image
|
||||
|
||||
# These targets build the various documentation images
|
||||
docs-jdk-image: docs-jdk
|
||||
@@ -1306,8 +1282,7 @@ 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-setup-aot
|
||||
test-image-lib test-image-lib-native
|
||||
|
||||
ifneq ($(JVM_TEST_IMAGE_TARGETS), )
|
||||
# If JVM_TEST_IMAGE_TARGETS is externally defined, use it instead of the
|
||||
@@ -1356,7 +1331,7 @@ ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-static-libs \
|
||||
# Traditional targets typically run by users.
|
||||
# These can be considered aliases for the targets now named by a more
|
||||
# "modern" naming scheme.
|
||||
default-target: $(DEFAULT_MAKE_TARGET)
|
||||
default: $(DEFAULT_MAKE_TARGET)
|
||||
jdk: exploded-image
|
||||
images: product-images
|
||||
docs: docs-image
|
||||
@@ -1391,6 +1366,7 @@ ALL_TARGETS += $(RUN_TEST_TARGETS) run-test exploded-run-test check \
|
||||
test-hotspot-jtreg test-hotspot-jtreg-native test-hotspot-gtest \
|
||||
test-jdk-jtreg-native test-docs
|
||||
|
||||
################################################################################
|
||||
################################################################################
|
||||
#
|
||||
# Clean targets
|
||||
@@ -1407,7 +1383,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
|
||||
@@ -1496,12 +1472,13 @@ print-tests:
|
||||
|
||||
create-main-targets-include:
|
||||
$(call LogInfo, Generating main target list)
|
||||
$(call MakeDir, $(MAKESUPPORT_OUTPUTDIR))
|
||||
@$(ECHO) ALL_MAIN_TARGETS := $(sort $(ALL_TARGETS)) > \
|
||||
$(MAKESUPPORT_OUTPUTDIR)/main-targets.gmk
|
||||
|
||||
################################################################################
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, Main-post.gmk))
|
||||
|
||||
.PHONY: $(ALL_TARGETS)
|
||||
|
||||
FRC: # Force target
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,13 +23,13 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeIncludeStart.gmk
|
||||
ifeq ($(INCLUDE), true)
|
||||
|
||||
################################################################################
|
||||
# This file contains helper functions for Main.gmk.
|
||||
################################################################################
|
||||
|
||||
ifndef _MAINSUPPORT_GMK
|
||||
_MAINSUPPORT_GMK := 1
|
||||
|
||||
# Setup make rules for creating a top-level target.
|
||||
# Parameter 1 is the name of the rule. This name is used as variable prefix.
|
||||
#
|
||||
@@ -58,76 +58,76 @@ endef
|
||||
|
||||
define CleanDocs
|
||||
@$(PRINTF) "Cleaning docs ..."
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/docs
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/javadoc
|
||||
$(RM) -r $(IMAGES_OUTPUTDIR)/docs
|
||||
@$(ECHO) " done"
|
||||
@$(PRINTF) " done\n"
|
||||
endef
|
||||
|
||||
# Cleans the dir given as $1
|
||||
define CleanDir
|
||||
@$(PRINTF) "Cleaning %s build artifacts ..." "$(strip $1)"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning $(strip $1) build artifacts ..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
($(CD) $(OUTPUTDIR) && $(RM) -r $1)
|
||||
@$(ECHO) " done"
|
||||
@$(PRINTF) " done\n"
|
||||
endef
|
||||
|
||||
define CleanSupportDir
|
||||
@$(PRINTF) "Cleaning %s build artifacts ..." "$(strip $1)"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning $(strip $1) build artifacts ..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/$(strip $1)
|
||||
@$(ECHO) " done"
|
||||
@$(PRINTF) " done\n"
|
||||
endef
|
||||
|
||||
define CleanMakeSupportDir
|
||||
@$(PRINTF) "Cleaning %s make support artifacts ..." "$(strip $1)"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning $(strip $1) make support artifacts ..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
$(RM) -r $(MAKESUPPORT_OUTPUTDIR)/$(strip $1)
|
||||
@$(ECHO) " done"
|
||||
@$(PRINTF) " done\n"
|
||||
endef
|
||||
|
||||
define CleanTest
|
||||
@$(PRINTF) "Cleaning test %s ..." "$(strip $1)"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning test $(strip $1) ..."
|
||||
@$(PRINTF) "\n" $(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
|
||||
@$(ECHO) " done"
|
||||
@$(PRINTF) " done\n"
|
||||
endef
|
||||
|
||||
define Clean-gensrc
|
||||
@$(PRINTF) "Cleaning gensrc %s..." "$(if $1,for $(strip $1) )"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning gensrc $(if $1,for $(strip $1) )..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/gensrc/$(strip $1)
|
||||
@$(ECHO) " done"
|
||||
@$(PRINTF) " done\n"
|
||||
endef
|
||||
|
||||
define Clean-java
|
||||
@$(PRINTF) "Cleaning java %s..." "$(if $1,for $(strip $1) )"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning java $(if $1,for $(strip $1) )..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
$(RM) -r $(JDK_OUTPUTDIR)/modules/$(strip $1)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/special_classes/$(strip $1)
|
||||
$(ECHO) " done"
|
||||
$(PRINTF) "Cleaning headers %s..." "$(if $1,for $(strip $1) )"
|
||||
$(PRINTF) " done\n"
|
||||
$(PRINTF) "Cleaning headers $(if $1,for $(strip $1)) ..."
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/headers/$(strip $1)
|
||||
@$(ECHO) " done"
|
||||
@$(PRINTF) " done\n"
|
||||
endef
|
||||
|
||||
define Clean-native
|
||||
@$(PRINTF) "Cleaning native %s..." "$(if $1,for $(strip $1) )"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning native $(if $1,for $(strip $1) )..."
|
||||
@$(PRINTF) "\n" $(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)
|
||||
@$(ECHO) " done"
|
||||
@$(PRINTF) " done\n"
|
||||
endef
|
||||
|
||||
define Clean-include
|
||||
@$(PRINTF) "Cleaning include %s..." "$(if $1,for $(strip $1) )"
|
||||
@$(ECHO) "" $(LOG_DEBUG)
|
||||
@$(PRINTF) "Cleaning include $(if $1,for $(strip $1) )..."
|
||||
@$(PRINTF) "\n" $(LOG_DEBUG)
|
||||
$(RM) -r $(SUPPORT_OUTPUTDIR)/modules_include/$(strip $1)
|
||||
@$(ECHO) " done"
|
||||
@$(PRINTF) " done\n"
|
||||
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.
|
||||
@@ -218,5 +218,4 @@ endef
|
||||
|
||||
################################################################################
|
||||
|
||||
endif # include guard
|
||||
include MakeIncludeEnd.gmk
|
||||
endif # _MAINSUPPORT_GMK
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 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
|
||||
@@ -23,10 +23,8 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeIncludeStart.gmk
|
||||
ifeq ($(INCLUDE), true)
|
||||
|
||||
################################################################################
|
||||
ifndef _MODULE_TOOLS_GMK
|
||||
_MODULE_TOOLS_GMK := 1
|
||||
|
||||
include JavaCompilation.gmk
|
||||
|
||||
@@ -51,7 +49,4 @@ TOOL_ADD_PACKAGES_ATTRIBUTE := $(BUILD_JAVA) $(JAVA_FLAGS_SMALL_BUILDJDK) \
|
||||
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \
|
||||
build.tools.jigsaw.AddPackagesAttribute
|
||||
|
||||
################################################################################
|
||||
|
||||
endif # include guard
|
||||
include MakeIncludeEnd.gmk
|
||||
endif # _MODULE_TOOLS_GMK
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2024, 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
|
||||
@@ -23,34 +23,27 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
|
||||
################################################################################
|
||||
# This makefile is called from Main.gmk, through a macro in MakeHelpers.gmk
|
||||
# and wraps calls to makefiles for specific modules and build phases. Having
|
||||
# this wrapper reduces the need for boilerplate code. It also provides
|
||||
# opportunity for automatic copying of files to an interim exploded runnable
|
||||
# image.
|
||||
################################################################################
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include CopyFiles.gmk
|
||||
include Modules.gmk
|
||||
|
||||
MODULE_SRC := $(TOPDIR)/src/$(MODULE)
|
||||
|
||||
################################################################################
|
||||
# Include module specific build settings
|
||||
# All makefiles should add the targets to be built to this variable.
|
||||
TARGETS :=
|
||||
|
||||
THIS_SNIPPET := $(call GetModuleSnippetName, $(MAKEFILE_PREFIX))
|
||||
|
||||
ifneq ($(wildcard $(THIS_SNIPPET)), )
|
||||
include MakeSnippetStart.gmk
|
||||
|
||||
# Include the file being wrapped.
|
||||
include $(THIS_SNIPPET)
|
||||
|
||||
include MakeSnippetEnd.gmk
|
||||
endif
|
||||
# Include the file being wrapped.
|
||||
include $(MAKEFILE_PREFIX).gmk
|
||||
|
||||
ifeq ($(MAKEFILE_PREFIX), Lib)
|
||||
# We need to keep track of what libraries are generated/needed by this
|
||||
@@ -135,12 +128,8 @@ $(eval $(call SetupCopyFiles, COPY_CONF, \
|
||||
))
|
||||
|
||||
ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true)
|
||||
TARGETS := $(filter $(MAKESUPPORT_OUTPUTDIR)/compile-commands/%, $(TARGETS))
|
||||
all: $(filter $(MAKESUPPORT_OUTPUTDIR)/compile-commands/%, $(TARGETS))
|
||||
else
|
||||
TARGETS += $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB) \
|
||||
all: $(TARGETS) $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB) \
|
||||
$(COPY_INCLUDE) $(COPY_CMDS) $(COPY_MAN) $(COPY_CONF) $(LINK_LIBS_TO_LIB)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
|
||||
224
make/PreInit.gmk
224
make/PreInit.gmk
@@ -1,224 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# This file is the earliest part of the build bootstrap process (not counting
|
||||
# Makefile that includes it). Its main responsibility is to figure out what
|
||||
# configuration to use and pick up the corresponding SPEC file. It will then
|
||||
# call Init.gmk with this SPEC for further bootstrapping.
|
||||
################################################################################
|
||||
|
||||
# This must be the first rule
|
||||
default:
|
||||
.PHONY: default
|
||||
|
||||
# Inclusion of this pseudo-target will cause make to execute this file
|
||||
# serially, regardless of -j.
|
||||
.NOTPARALLEL:
|
||||
|
||||
IS_PREINIT_ENV := true
|
||||
|
||||
# Include our helper functions.
|
||||
include $(TOPDIR)/make/PreInitSupport.gmk
|
||||
include $(TOPDIR)/make/common/LogUtils.gmk
|
||||
|
||||
# Here are "global" targets, i.e. targets that can be executed without having
|
||||
# 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)
|
||||
|
||||
# Extract non-global targets that require a spec file.
|
||||
CALLED_SPEC_TARGETS := $(filter-out $(ALL_GLOBAL_TARGETS), $(CALLED_TARGETS))
|
||||
|
||||
# If we have only global targets, or if we are called with -qp (assuming an
|
||||
# external part, e.g. bash completion, is trying to understand our targets),
|
||||
# we will skip SPEC location and the sanity checks.
|
||||
ifeq ($(CALLED_SPEC_TARGETS), )
|
||||
SKIP_SPEC := true
|
||||
endif
|
||||
ifeq ($(findstring p, $(MAKEFLAGS))$(findstring q, $(MAKEFLAGS)), pq)
|
||||
SKIP_SPEC := true
|
||||
endif
|
||||
|
||||
ifneq ($(SKIP_SPEC), true)
|
||||
|
||||
############################################################################
|
||||
# This is the common case: we have been called from the command line by the
|
||||
# user with a target that should be delegated to Main.gmk, so we need to
|
||||
# figure out a proper SPEC and call Init.gmk with it.
|
||||
############################################################################
|
||||
|
||||
# Basic checks on environment and command line.
|
||||
$(eval $(call CheckControlVariables))
|
||||
$(eval $(call CheckInvalidMakeFlags))
|
||||
|
||||
# Check that CONF_CHECK is valid.
|
||||
$(eval $(call ParseConfCheckOption))
|
||||
|
||||
# Check that the LOG given is valid, and set LOG_LEVEL, LOG_NOFILE,
|
||||
# MAKE_LOG_VARS and MAKE_LOG_FLAGS.
|
||||
$(eval $(call ParseLogLevel))
|
||||
|
||||
# After this SPECS contain 1..N spec files (otherwise ParseConfAndSpec fails).
|
||||
$(eval $(call ParseConfAndSpec))
|
||||
|
||||
# Extract main targets from Main.gmk using the spec(s) provided. In theory,
|
||||
# with multiple specs, we should find the intersection of targets provided
|
||||
# by all specs, but we approximate this by an arbitrary spec from the list.
|
||||
# This will setup ALL_MAIN_TARGETS.
|
||||
$(eval $(call DefineMainTargets, FORCE, $(firstword $(SPECS))))
|
||||
|
||||
# Separate called targets depending on type.
|
||||
INIT_TARGETS := $(filter $(ALL_INIT_TARGETS), $(CALLED_SPEC_TARGETS))
|
||||
MAIN_TARGETS := $(filter $(ALL_MAIN_TARGETS), $(CALLED_SPEC_TARGETS))
|
||||
SEQUENTIAL_TARGETS := $(filter dist-clean clean%, $(MAIN_TARGETS))
|
||||
PARALLEL_TARGETS := $(filter-out $(SEQUENTIAL_TARGETS), $(MAIN_TARGETS))
|
||||
|
||||
MAKE_INIT_ARGS := $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common
|
||||
|
||||
# The spec files depend on the autoconf source code. This check makes sure
|
||||
# the configuration is up to date after changes to configure.
|
||||
$(SPECS): $(wildcard $(TOPDIR)/make/autoconf/*) \
|
||||
$(if $(CUSTOM_CONFIG_DIR), $(wildcard $(CUSTOM_CONFIG_DIR)/*)) \
|
||||
$(addprefix $(TOPDIR)/make/conf/, version-numbers.conf branding.conf) \
|
||||
$(if $(CUSTOM_CONF_DIR), $(wildcard $(addprefix $(CUSTOM_CONF_DIR)/, \
|
||||
version-numbers.conf branding.conf)))
|
||||
ifeq ($(CONF_CHECK), fail)
|
||||
@echo Error: The configuration is not up to date for \
|
||||
"'$(lastword $(subst /, , $(dir $@)))'."
|
||||
$(call PrintConfCheckFailed)
|
||||
@exit 2
|
||||
else ifeq ($(CONF_CHECK), auto)
|
||||
@echo Note: The configuration is not up to date for \
|
||||
"'$(lastword $(subst /, , $(dir $@)))'."
|
||||
@( cd $(TOPDIR) && \
|
||||
$(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk SPEC=$@ \
|
||||
reconfigure )
|
||||
else ifeq ($(CONF_CHECK), ignore)
|
||||
# Do nothing
|
||||
endif
|
||||
|
||||
# Do not let make delete spec files even if aborted while doing a reconfigure
|
||||
.PRECIOUS: $(SPECS)
|
||||
|
||||
# Unless reconfigure is explicitly called, let all main targets depend on
|
||||
# the spec files to be up to date.
|
||||
ifeq ($(findstring reconfigure, $(INIT_TARGETS)), )
|
||||
$(MAIN_TARGETS): $(SPECS)
|
||||
endif
|
||||
|
||||
make-info:
|
||||
ifneq ($(findstring $(LOG_LEVEL), info debug trace), )
|
||||
$(info Running make as '$(strip $(MAKE) $(MFLAGS) \
|
||||
$(COMMAND_LINE_VARIABLES) $(MAKECMDGOALS))')
|
||||
endif
|
||||
|
||||
MAKE_INIT_MAIN_TARGET_ARGS := \
|
||||
USER_MAKE_VARS="$(USER_MAKE_VARS)" MAKE_LOG_FLAGS=$(MAKE_LOG_FLAGS) \
|
||||
$(MAKE_LOG_VARS) \
|
||||
INIT_TARGETS="$(INIT_TARGETS)" \
|
||||
SEQUENTIAL_TARGETS="$(SEQUENTIAL_TARGETS)" \
|
||||
PARALLEL_TARGETS="$(PARALLEL_TARGETS)"
|
||||
|
||||
# Now the init and main targets will be called, once for each SPEC. The
|
||||
# recipe will be run once for every target specified, but we only want to
|
||||
# execute the recipe a single time, hence the TARGET_DONE with a dummy
|
||||
# command if true.
|
||||
# The COMPARE_BUILD part implements special support for makefile development.
|
||||
$(ALL_INIT_TARGETS) $(ALL_MAIN_TARGETS): make-info
|
||||
@$(if $(TARGET_DONE), \
|
||||
true \
|
||||
, \
|
||||
( cd $(TOPDIR) && \
|
||||
$(foreach spec, $(SPECS), \
|
||||
$(MAKE) $(MAKE_INIT_ARGS) -j 1 -f $(TOPDIR)/make/Init.gmk \
|
||||
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) TOPDIR_ALT=$(TOPDIR) \
|
||||
COMPARE_BUILD="$(COMPARE_BUILD)" \
|
||||
pre-compare-build && \
|
||||
$(MAKE) $(MAKE_INIT_ARGS) -j 1 -f $(TOPDIR)/make/Init.gmk \
|
||||
SPEC=$(spec) TOPDIR_ALT=$(TOPDIR) \
|
||||
COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" \
|
||||
$(MAKE_INIT_MAIN_TARGET_ARGS) main && \
|
||||
$(MAKE) $(MAKE_INIT_ARGS) -f $(TOPDIR)/make/Init.gmk \
|
||||
SPEC=$(spec) TOPDIR_ALT=$(TOPDIR) \
|
||||
COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" \
|
||||
post-compare-build && \
|
||||
) \
|
||||
) true ) \
|
||||
$(eval TARGET_DONE=true) \
|
||||
)
|
||||
|
||||
.PHONY: $(ALL_MAIN_TARGETS) $(ALL_INIT_TARGETS)
|
||||
|
||||
else # SKIP_SPEC=true
|
||||
|
||||
############################################################################
|
||||
# We have only global targets, or are called with -pq (from command
|
||||
# completion). In this case we might not even have a configuration at all, but
|
||||
# still need to handle the situation gracefully even if there is no SPEC file.
|
||||
############################################################################
|
||||
|
||||
ifeq ($(wildcard $(SPEC)), )
|
||||
# If we have no SPEC provided, we will just make a "best effort" target list.
|
||||
# First try to grab any available pre-existing main-targets.gmk.
|
||||
main_targets_file := $(firstword $(wildcard $(build_dir)/*/make-support/main-targets.gmk))
|
||||
ifneq ($(main_targets_file), )
|
||||
# Extract the SPEC that corresponds to this main-targets.gmk file.
|
||||
SPEC := $(patsubst %/make-support/main-targets.gmk, %/spec.gmk, $(main_targets_file))
|
||||
else
|
||||
# None found, pick an arbitrary SPEC for which to generate a file
|
||||
SPEC := $(firstword $(all_spec_files))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard $(SPEC)), )
|
||||
$(eval $(call DefineMainTargets, LAZY, $(SPEC)))
|
||||
else
|
||||
# If we have no configurations we can not provide any main targets.
|
||||
ALL_MAIN_TARGETS :=
|
||||
endif
|
||||
|
||||
ALL_TARGETS := $(sort $(ALL_GLOBAL_TARGETS) $(ALL_MAIN_TARGETS) $(ALL_INIT_TARGETS))
|
||||
|
||||
# Just list all our targets.
|
||||
$(ALL_TARGETS):
|
||||
|
||||
.PHONY: $(ALL_TARGETS)
|
||||
|
||||
endif # $(SKIP_SPEC)!=true
|
||||
|
||||
################################################################################
|
||||
@@ -1,292 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Helper functions for PreInit.gmk, the initial part of initialization before
|
||||
# the SPEC file is loaded. Most of these functions provide parsing and setting
|
||||
# up make options from the command-line.
|
||||
################################################################################
|
||||
|
||||
# Include the corresponding closed file, if present.
|
||||
ifneq ($(CUSTOM_MAKE_DIR), )
|
||||
-include $(CUSTOM_MAKE_DIR)/PreInitSupport-pre.gmk
|
||||
endif
|
||||
|
||||
# COMMA is defined in spec.gmk, but that is not included yet
|
||||
COMMA := ,
|
||||
|
||||
# Essential control variables that are handled by PreInit.gmk or Init.gmk
|
||||
INIT_CONTROL_VARIABLES := LOG CONF CONF_NAME SPEC JOBS CONF_CHECK ALLOW \
|
||||
COMPARE_BUILD
|
||||
|
||||
# All known make control variables; these are handled in other makefiles
|
||||
MAKE_CONTROL_VARIABLES += JDK_FILTER SPEC_FILTER \
|
||||
TEST TEST_JOBS JTREG GTEST MICRO TEST_OPTS TEST_VM_OPTS TEST_DEPS
|
||||
|
||||
ALL_CONTROL_VARIABLES := $(INIT_CONTROL_VARIABLES) $(MAKE_CONTROL_VARIABLES)
|
||||
|
||||
# Define a simple reverse function.
|
||||
# Should maybe move to MakeBase.gmk, but we can't include that file now.
|
||||
reverse = \
|
||||
$(if $(strip $(1)), $(call reverse, $(wordlist 2, $(words $(1)), $(1)))) \
|
||||
$(firstword $(1))
|
||||
|
||||
# The variable MAKEOVERRIDES contains variable assignments from the command
|
||||
# line, but in reverse order to what the user entered.
|
||||
# The '§' <=> '\ 'dance is needed to keep values with space in them connected.
|
||||
COMMAND_LINE_VARIABLES := $(subst §,\ , $(call reverse, $(subst \ ,§,$(MAKEOVERRIDES))))
|
||||
|
||||
# A list like FOO="val1" BAR="val2" containing all user-supplied make
|
||||
# variables that we should propagate.
|
||||
# The '§' <=> '\ 'dance is needed to keep values with space in them connected.
|
||||
# This explicit propagation is needed to avoid problems with characters that needs
|
||||
# escaping.
|
||||
USER_MAKE_VARS := $(subst §,\ , $(filter-out $(addsuffix =%, $(ALL_CONTROL_VARIABLES)), \
|
||||
$(subst \ ,§,$(MAKEOVERRIDES))))
|
||||
|
||||
# Setup information about available configurations, if any.
|
||||
ifneq ($(CUSTOM_ROOT), )
|
||||
build_dir := $(CUSTOM_ROOT)/build
|
||||
else
|
||||
build_dir := $(TOPDIR)/build
|
||||
endif
|
||||
all_spec_files := $(wildcard $(build_dir)/*/spec.gmk)
|
||||
# Extract the configuration names from the path
|
||||
all_confs := $(patsubst %/spec.gmk, %, $(patsubst $(build_dir)/%, %, $(all_spec_files)))
|
||||
|
||||
# Check for unknown command-line variables
|
||||
define CheckControlVariables
|
||||
command_line_variables := $$(strip $$(foreach var, \
|
||||
$$(subst \ ,_,$$(MAKEOVERRIDES)), \
|
||||
$$(firstword $$(subst =, , $$(var)))))
|
||||
allowed_command_line_variables := $$(strip $$(subst $$(COMMA), , $$(ALLOW)))
|
||||
unknown_command_line_variables := $$(strip \
|
||||
$$(filter-out $$(ALL_CONTROL_VARIABLES) $$(allowed_command_line_variables), \
|
||||
$$(command_line_variables)))
|
||||
ifneq ($$(unknown_command_line_variables), )
|
||||
$$(info Note: Command line contains non-control variables:)
|
||||
$$(foreach var, $$(unknown_command_line_variables), $$(info * $$(var)=$$($$(var))))
|
||||
$$(info Make sure it is not mistyped, and that you intend to override this variable.)
|
||||
$$(info 'make help' will list known control variables.)
|
||||
$$(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
|
||||
# MAKEFLAGS only indicate -j if read in a recipe (!)
|
||||
$$(TOPDIR)/make/PreInit.gmk: .FORCE
|
||||
$$(if $$(findstring --jobserver, $$(MAKEFLAGS)), \
|
||||
$$(info Error: 'make -jN' is not supported, use 'make JOBS=N') \
|
||||
$$(error Cannot continue) \
|
||||
)
|
||||
.FORCE:
|
||||
.PHONY: .FORCE
|
||||
endef
|
||||
|
||||
# Check that the CONF_CHECK option is valid and set up handling
|
||||
define ParseConfCheckOption
|
||||
ifeq ($$(CONF_CHECK), )
|
||||
# Default behavior is fail
|
||||
CONF_CHECK := fail
|
||||
else ifneq ($$(filter-out auto fail ignore, $$(CONF_CHECK)), )
|
||||
$$(info Error: CONF_CHECK must be one of: auto, fail or ignore.)
|
||||
$$(error Cannot continue)
|
||||
endif
|
||||
endef
|
||||
|
||||
define ParseConfAndSpec
|
||||
ifneq ($$(origin SPEC), undefined)
|
||||
# We have been given a SPEC, check that it works out properly
|
||||
ifneq ($$(origin CONF), undefined)
|
||||
# We also have a CONF argument. We can't have both.
|
||||
$$(info Error: Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
|
||||
$$(error Cannot continue)
|
||||
endif
|
||||
ifneq ($$(origin CONF_NAME), undefined)
|
||||
# We also have a CONF_NAME argument. We can't have both.
|
||||
$$(info Error: Cannot use CONF_NAME=$$(CONF_NAME) and SPEC=$$(SPEC) at the same time. Choose one.)
|
||||
$$(error Cannot continue)
|
||||
endif
|
||||
ifeq ($$(wildcard $$(SPEC)), )
|
||||
$$(info Error: Cannot locate spec.gmk, given by SPEC=$$(SPEC).)
|
||||
$$(error Cannot continue)
|
||||
endif
|
||||
ifeq ($$(filter /%, $$(SPEC)), )
|
||||
# If given with relative path, make it absolute
|
||||
SPECS := $$(CURDIR)/$$(strip $$(SPEC))
|
||||
else
|
||||
SPECS := $$(SPEC)
|
||||
endif
|
||||
|
||||
# For now, unset this SPEC variable.
|
||||
override SPEC :=
|
||||
else
|
||||
# Use spec.gmk files in the build output directory
|
||||
ifeq ($$(all_spec_files), )
|
||||
ifneq ($(CUSTOM_ROOT), )
|
||||
$$(info Error: No configurations found for $$(CUSTOM_ROOT).)
|
||||
else
|
||||
$$(info Error: No configurations found for $$(TOPDIR).)
|
||||
endif
|
||||
$$(info Please run 'bash configure' to create a configuration.)
|
||||
$$(info )
|
||||
$$(error Cannot continue)
|
||||
endif
|
||||
|
||||
ifneq ($$(origin CONF_NAME), undefined)
|
||||
ifneq ($$(origin CONF), undefined)
|
||||
# We also have a CONF argument. We can't have both.
|
||||
$$(info Error: Cannot use CONF=$$(CONF) and CONF_NAME=$$(CONF_NAME) at the same time. Choose one.)
|
||||
$$(error Cannot continue)
|
||||
endif
|
||||
matching_conf := $$(strip $$(filter $$(CONF_NAME), $$(all_confs)))
|
||||
ifeq ($$(matching_conf), )
|
||||
$$(info Error: No configurations found matching CONF_NAME=$$(CONF_NAME).)
|
||||
$$(info Available configurations in $$(build_dir):)
|
||||
$$(foreach var, $$(all_confs), $$(info * $$(var)))
|
||||
$$(error Cannot continue)
|
||||
else ifneq ($$(words $$(matching_conf)), 1)
|
||||
$$(info Error: Matching more than one configuration CONF_NAME=$$(CONF_NAME).)
|
||||
$$(info Available configurations in $$(build_dir):)
|
||||
$$(foreach var, $$(all_confs), $$(info * $$(var)))
|
||||
$$(error Cannot continue)
|
||||
else
|
||||
$$(info Building configuration '$$(matching_conf)' (matching CONF_NAME=$$(CONF_NAME)))
|
||||
endif
|
||||
# Create a SPEC definition. This will contain the path to exactly one spec file.
|
||||
SPECS := $$(build_dir)/$$(matching_conf)/spec.gmk
|
||||
else ifneq ($$(origin CONF), undefined)
|
||||
# User have given a CONF= argument.
|
||||
ifeq ($$(CONF), )
|
||||
# If given CONF=, match all configurations
|
||||
matching_confs := $$(strip $$(all_confs))
|
||||
else
|
||||
# Otherwise select those that contain the given CONF string
|
||||
ifeq ($$(patsubst !%,,$$(CONF)), )
|
||||
# A CONF starting with ! means we should negate the search term
|
||||
matching_confs := $$(strip $$(foreach var, $$(all_confs), \
|
||||
$$(if $$(findstring $$(subst !,,$$(CONF)), $$(var)), ,$$(var))))
|
||||
else
|
||||
matching_confs := $$(strip $$(foreach var, $$(all_confs), \
|
||||
$$(if $$(findstring $$(CONF), $$(var)), $$(var))))
|
||||
endif
|
||||
ifneq ($$(filter $$(CONF), $$(matching_confs)), )
|
||||
ifneq ($$(word 2, $$(matching_confs)), )
|
||||
# Don't repeat this output on make restarts caused by including
|
||||
# generated files.
|
||||
ifeq ($$(MAKE_RESTARTS), )
|
||||
$$(info Using exact match for CONF=$$(CONF) (other matches are possible))
|
||||
endif
|
||||
endif
|
||||
# If we found an exact match, use that
|
||||
matching_confs := $$(CONF)
|
||||
endif
|
||||
endif
|
||||
ifeq ($$(matching_confs), )
|
||||
$$(info Error: No configurations found matching CONF=$$(CONF).)
|
||||
$$(info Available configurations in $$(build_dir):)
|
||||
$$(foreach var, $$(all_confs), $$(info * $$(var)))
|
||||
$$(error Cannot continue)
|
||||
else
|
||||
# Don't repeat this output on make restarts caused by including
|
||||
# generated files.
|
||||
ifeq ($$(MAKE_RESTARTS), )
|
||||
ifeq ($$(words $$(matching_confs)), 1)
|
||||
ifneq ($$(findstring $$(LOG_LEVEL), info debug trace), )
|
||||
$$(info Building configuration '$$(matching_confs)' (matching CONF=$$(CONF)))
|
||||
endif
|
||||
else
|
||||
$$(info Building these configurations (matching CONF=$$(CONF)):)
|
||||
$$(foreach var, $$(matching_confs), $$(info * $$(var)))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Create a SPEC definition. This will contain the path to one or more spec.gmk files.
|
||||
SPECS := $$(addsuffix /spec.gmk, $$(addprefix $$(build_dir)/, $$(matching_confs)))
|
||||
else
|
||||
# No CONF or SPEC given, check the available configurations
|
||||
ifneq ($$(words $$(all_spec_files)), 1)
|
||||
$$(info Error: No CONF given, but more than one configuration found.)
|
||||
$$(info Available configurations in $$(build_dir):)
|
||||
$$(foreach var, $$(all_confs), $$(info * $$(var)))
|
||||
$$(info Please retry building with CONF=<config pattern> (or SPEC=<spec file>).)
|
||||
$$(info )
|
||||
$$(error Cannot continue)
|
||||
endif
|
||||
|
||||
# We found exactly one configuration, use it
|
||||
SPECS := $$(strip $$(all_spec_files))
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
# Extract main targets from Main.gmk using the spec provided in $2.
|
||||
#
|
||||
# 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 $$(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.
|
||||
ifeq ($(strip $1), FORCE)
|
||||
$$(shell rm -f $$(main_targets_file))
|
||||
endif
|
||||
endif
|
||||
|
||||
$$(main_targets_file):
|
||||
@( cd $$(TOPDIR) && \
|
||||
$$(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 )
|
||||
|
||||
# Now include main-targets.gmk. This will define ALL_MAIN_TARGETS.
|
||||
-include $$(main_targets_file)
|
||||
endef
|
||||
|
||||
define PrintConfCheckFailed
|
||||
@echo ' '
|
||||
@echo "Please rerun configure! Easiest way to do this is by running"
|
||||
@echo "'make reconfigure'."
|
||||
@echo "This behavior may also be changed using CONF_CHECK=<ignore|auto>."
|
||||
@echo ' '
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,12 +23,16 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
################################################################################
|
||||
# This makefile generates the "release" file into the exploded image. Jlink is
|
||||
# then responsible for using this as the base for release files in each linked
|
||||
# image.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
BASE_RELEASE_FILE := $(JDK_OUTPUTDIR)/release
|
||||
@@ -81,4 +85,10 @@ TARGETS += $(BASE_RELEASE_FILE)
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
$(eval $(call IncludeCustomExtension, ReleaseFile.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all default
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2024, 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
|
||||
@@ -23,10 +23,10 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
|
||||
################################################################################
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include FindTests.gmk
|
||||
|
||||
# We will always run multiple tests serially
|
||||
@@ -71,6 +71,9 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
endif
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, RunTests.gmk))
|
||||
################################################################################
|
||||
|
||||
# This is the JDK that we will test
|
||||
@@ -105,8 +108,8 @@ ifneq ($(wildcard $(JTREG_FAILURE_HANDLER)), )
|
||||
#
|
||||
endif
|
||||
|
||||
GTEST_LAUNCHER_DIRS := $(patsubst %/gtestLauncher$(EXECUTABLE_SUFFIX), %, \
|
||||
$(wildcard $(TEST_IMAGE_DIR)/hotspot/gtest/*/gtestLauncher$(EXECUTABLE_SUFFIX)))
|
||||
GTEST_LAUNCHER_DIRS := $(patsubst %/gtestLauncher, %, \
|
||||
$(wildcard $(TEST_IMAGE_DIR)/hotspot/gtest/*/gtestLauncher))
|
||||
GTEST_VARIANTS := $(strip $(patsubst $(TEST_IMAGE_DIR)/hotspot/gtest/%, %, \
|
||||
$(GTEST_LAUNCHER_DIRS)))
|
||||
|
||||
@@ -115,7 +118,6 @@ 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
|
||||
@@ -204,9 +206,8 @@ $(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 JVMTI_STRESS_AGENT \
|
||||
MAX_MEM RUN_PROBLEM_LISTS RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT \
|
||||
AOT_JDK MANUAL $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
|
||||
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), \
|
||||
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
|
||||
EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS \
|
||||
$(CUSTOM_JTREG_STRING_KEYWORDS), \
|
||||
@@ -509,7 +510,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) \
|
||||
@@ -520,7 +521,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
|
||||
|
||||
@@ -529,33 +530,21 @@ define SetupRunGtestTestBody
|
||||
$$(call LogWarn, Test report is stored in $$(strip \
|
||||
$$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR))))
|
||||
$$(if $$(wildcard $$($1_RESULT_FILE)), \
|
||||
$$(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_TOTAL := $$(shell $$(AWK) '/==========.* tests? from .* \
|
||||
test (cases?|suites?) ran/ { print $$$$2 }' $$($1_RESULT_FILE))) \
|
||||
$$(if $$($1_TOTAL), , $$(eval $1_TOTAL := 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_RUN) - $$($1_PASSED) - $$($1_FAILED) - $$($1_GTEST_SKIPPED))) \
|
||||
$$(eval $1_TOTAL := $$(shell \
|
||||
$$(EXPR) $$($1_RUN) + $$($1_GTEST_DISABLED))) \
|
||||
$$(EXPR) $$($1_TOTAL) - $$($1_PASSED) - $$($1_FAILED))) \
|
||||
, \
|
||||
$$(eval $1_PASSED := 0) \
|
||||
$$(eval $1_FAILED := 0) \
|
||||
$$(eval $1_ERROR := 1) \
|
||||
$$(eval $1_SKIPPED := 0) \
|
||||
$$(eval $1_TOTAL := 1) \
|
||||
)
|
||||
|
||||
@@ -584,8 +573,6 @@ define SetMicroValue
|
||||
else
|
||||
ifneq ($3, )
|
||||
$1_$2 := $3
|
||||
else
|
||||
$1_$2 :=
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
@@ -644,7 +631,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) \
|
||||
@@ -655,7 +642,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
|
||||
|
||||
@@ -681,7 +668,6 @@ define SetupRunMicroTestBody
|
||||
$$(eval $1_ERROR := 1) \
|
||||
$$(eval $1_TOTAL := 1) \
|
||||
)
|
||||
$$(eval $1_SKIPPED := 0)
|
||||
|
||||
$1: run-test-$1 parse-test-$1
|
||||
|
||||
@@ -712,87 +698,63 @@ 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_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
|
||||
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
|
||||
|
||||
# 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_JAVA_TOOL_OPTS := $$(addprefix -J, $$($1_VM_OPTIONS))
|
||||
|
||||
$$($1_AOT_JDK_CACHE): $$(JDK_IMAGE_DIR)/release
|
||||
$$(call MakeDir, $$($1_AOT_JDK_OUTPUT_DIR))
|
||||
$$(call MakeDir, $$($1_TEST_SUPPORT_DIR)/aot)
|
||||
|
||||
ifeq ($$($1_TRAINING), onestep)
|
||||
$(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 \
|
||||
))
|
||||
)
|
||||
|
||||
$$(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) \
|
||||
)
|
||||
$$(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 \
|
||||
))
|
||||
|
||||
else
|
||||
$$(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)
|
||||
|
||||
$$(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
|
||||
$$(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) \
|
||||
))
|
||||
|
||||
$1_AOT_TARGETS += $$($1_AOT_JDK_CACHE)
|
||||
|
||||
endef
|
||||
|
||||
|
||||
SetupRunJtregTest = $(NamedParamsMacroTemplate)
|
||||
define SetupRunJtregTestBody
|
||||
$1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1
|
||||
@@ -853,7 +815,7 @@ define SetupRunJtregTestBody
|
||||
JTREG_RETRY_COUNT ?= 0
|
||||
JTREG_REPEAT_COUNT ?= 0
|
||||
JTREG_REPORT ?= files
|
||||
JTREG_AOT_JDK ?= none
|
||||
JTREG_AOT_JDK ?= false
|
||||
|
||||
ifneq ($$(JTREG_RETRY_COUNT), 0)
|
||||
ifneq ($$(JTREG_REPEAT_COUNT), 0)
|
||||
@@ -863,29 +825,14 @@ 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)
|
||||
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
|
||||
$$(addprefix $$($1_TEST_ROOT)/, ProblemList-$$(JTREG_TEST_THREAD_FACTORY).txt) \
|
||||
$$(addprefix $$($1_TEST_ROOT)/, ProblemList-$$(JTREG_TEST_THREAD_FACTORY).txt) \
|
||||
))
|
||||
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
|
||||
@@ -906,18 +853,12 @@ define SetupRunJtregTestBody
|
||||
# version of the JDK.
|
||||
$1_JTREG_BASIC_OPTIONS += -$$($1_JTREG_TEST_MODE) \
|
||||
-verbose:$$(JTREG_VERBOSE) -retain:$$(JTREG_RETAIN) \
|
||||
-concurrency:$$($1_JTREG_JOBS) \
|
||||
-concurrency:$$($1_JTREG_JOBS) -timeoutFactor:$$(JTREG_TIMEOUT_FACTOR) \
|
||||
-vmoption:-XX:MaxRAMPercentage=$$($1_JTREG_MAX_RAM_PERCENTAGE) \
|
||||
-vmoption:-Dtest.boot.jdk="$$(BOOT_JDK)" \
|
||||
-vmoption:-Djava.io.tmpdir="$$($1_TEST_TMP_DIR)"
|
||||
|
||||
$1_JTREG_BASIC_OPTIONS += -ignore:quiet
|
||||
|
||||
ifeq ($$(JTREG_MANUAL), true)
|
||||
$1_JTREG_BASIC_OPTIONS += -manual
|
||||
else
|
||||
$1_JTREG_BASIC_OPTIONS += -automatic
|
||||
endif
|
||||
$1_JTREG_BASIC_OPTIONS += -automatic -ignore:quiet
|
||||
|
||||
# Make it possible to specify the JIB_DATA_DIR for tests using the
|
||||
# JIB Artifact resolver
|
||||
@@ -945,6 +886,12 @@ 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
|
||||
@@ -952,7 +899,6 @@ 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)), )
|
||||
@@ -968,11 +914,6 @@ 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 \
|
||||
@@ -985,11 +926,6 @@ 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)
|
||||
@@ -1009,12 +945,13 @@ define SetupRunJtregTestBody
|
||||
endif
|
||||
endif
|
||||
|
||||
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))
|
||||
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))
|
||||
|
||||
$1_JTREG_BASIC_OPTIONS += -vmoption:-XX:AOTCache="$$($1_AOT_JDK_CACHE)"
|
||||
endif
|
||||
|
||||
@@ -1032,7 +969,6 @@ 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)
|
||||
@@ -1061,8 +997,7 @@ define SetupRunJtregTestBody
|
||||
$1_COMMAND_LINE := \
|
||||
for i in {0..$$(JTREG_RETRY_COUNT)}; do \
|
||||
if [ "$$$$i" != 0 ]; then \
|
||||
$$(ECHO) ""; \
|
||||
$$(ECHO) "Retrying Jtreg run. Attempt: $$$$i"; \
|
||||
$$(PRINTF) "\nRetrying Jtreg run. Attempt: $$$$i\n"; \
|
||||
fi; \
|
||||
$$($1_COMMAND_LINE); \
|
||||
if [ "`$$(CAT) $$($1_EXITCODE)`" = "0" ]; then \
|
||||
@@ -1075,12 +1010,10 @@ define SetupRunJtregTestBody
|
||||
ifneq ($$(JTREG_REPEAT_COUNT), 0)
|
||||
$1_COMMAND_LINE := \
|
||||
for i in {1..$$(JTREG_REPEAT_COUNT)}; do \
|
||||
$$(ECHO) ""; \
|
||||
$$(ECHO) "Repeating Jtreg run: $$$$i out of $$(JTREG_REPEAT_COUNT)"; \
|
||||
$$(PRINTF) "\nRepeating Jtreg run: $$$$i out of $$(JTREG_REPEAT_COUNT)\n"; \
|
||||
$$($1_COMMAND_LINE); \
|
||||
if [ "`$$(CAT) $$($1_EXITCODE)`" != "0" ]; then \
|
||||
$$(ECHO) ""; \
|
||||
$$(ECHO) "Failures detected, no more repeats."; \
|
||||
$$(PRINTF) "\nFailures detected, no more repeats.\n"; \
|
||||
break; \
|
||||
fi; \
|
||||
done
|
||||
@@ -1091,9 +1024,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, \
|
||||
$$(COV_ENVIRONMENT) $$($1_COMMAND_LINE) \
|
||||
)
|
||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/jtreg, ( \
|
||||
$$(COV_ENVIRONMENT) $$($1_COMMAND_LINE) \
|
||||
))
|
||||
|
||||
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/text/stats.txt
|
||||
|
||||
@@ -1101,65 +1034,23 @@ 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_AND_RUNTIME_SKIPPED := $$(shell $$(AWK) '{ gsub(/[,;]/, ""); \
|
||||
$$(eval $1_PASSED := $$(shell $$(AWK) '{ gsub(/[,;]/, ""); \
|
||||
for (i=1; i<=NF; i++) { if ($$$$i == "passed:") \
|
||||
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \
|
||||
$$(if $$($1_PASSED_AND_RUNTIME_SKIPPED), , $$(eval $1_PASSED_AND_RUNTIME_SKIPPED := 0)) \
|
||||
$$(if $$($1_PASSED), , $$(eval $1_PASSED := 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) + $$($1_SKIPPED))) \
|
||||
$$(EXPR) $$($1_PASSED) + $$($1_FAILED) + $$($1_ERROR))) \
|
||||
, \
|
||||
$$(eval $1_PASSED_AND_RUNTIME_SKIPPED := 0) \
|
||||
$$(eval $1_PASSED := 0) \
|
||||
$$(eval $1_RUNTIME_SKIPPED := 0) \
|
||||
$$(eval $1_SKIPPED := 0) \
|
||||
$$(eval $1_FAILED := 0) \
|
||||
$$(eval $1_ERROR := 1) \
|
||||
$$(eval $1_TOTAL := 1) \
|
||||
@@ -1211,12 +1102,14 @@ 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
|
||||
@@ -1227,7 +1120,6 @@ 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 \
|
||||
))
|
||||
@@ -1261,7 +1153,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' '_')) \
|
||||
$(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \
|
||||
$(eval ALL_TEST_IDS += $(TEST_ID)) \
|
||||
$(if $(call UseCustomTestHandler, $(test)), \
|
||||
$(eval $(call SetupRunCustomTest, $(TEST_ID), \
|
||||
@@ -1337,28 +1229,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 %5s %2s\n" " " \
|
||||
TEST TOTAL PASS FAIL ERROR SKIP " "
|
||||
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5s %5s %5s %5s %2s\n" " " \
|
||||
TEST TOTAL PASS FAIL ERROR " "
|
||||
$(foreach test, $(TESTS_TO_RUN), \
|
||||
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
|
||||
$(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \
|
||||
$(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \
|
||||
$(ECHO) >> $(TEST_LAST_IDS) $(TEST_ID) $(NEWLINE) \
|
||||
$(eval NAME_PATTERN := $(shell $(ECHO) $(test) | $(TR) -c '\n' '_')) \
|
||||
$(eval NAME_PATTERN := $(shell $(ECHO) $(test) | $(TR) -c '\n' '[_*1000]')) \
|
||||
$(if $(filter __________________________________________________%, $(NAME_PATTERN)), \
|
||||
$(eval TEST_NAME := ) \
|
||||
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s\n" " " "$(test)" $(NEWLINE) \
|
||||
, \
|
||||
$(eval TEST_NAME := $(test)) \
|
||||
) \
|
||||
$(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) $($(TEST_ID)_SKIPPED) "<<" $(NEWLINE) \
|
||||
$(eval TEST_FAILURE := true) \
|
||||
, \
|
||||
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %5d %2s\n" \
|
||||
$(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) $($(TEST_ID)_SKIPPED) " " $(NEWLINE) \
|
||||
$($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) " " $(NEWLINE) \
|
||||
, \
|
||||
$(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) \
|
||||
$(eval TEST_FAILURE := true) \
|
||||
) \
|
||||
)
|
||||
$(ECHO) >> $(TEST_SUMMARY) ==============================
|
||||
@@ -1384,14 +1276,12 @@ 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) $(JCOV_VM_OPTS) -jar $(JCOV_HOME)/lib/jcov.jar Grabber -v -t \
|
||||
$(JAVA) -Xmx4g -jar $(JCOV_HOME)/lib/jcov.jar Grabber -v -t \
|
||||
$(JCOV_IMAGE_DIR)/template.xml -o $(JCOV_RESULT_FILE) \
|
||||
1>$(JCOV_GRABBER_LOG) 2>&1 &
|
||||
|
||||
@@ -1404,10 +1294,6 @@ 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
|
||||
@@ -1415,12 +1301,11 @@ ifeq ($(TEST_OPTS_JCOV), true)
|
||||
|
||||
jcov-gen-report: jcov-stop-grabber
|
||||
$(call LogWarn, Generating JCov report ...)
|
||||
$(call ExecuteWithLog, $(JCOV_SUPPORT_DIR)/run-jcov-repgen, \
|
||||
$(JAVA) $(JCOV_VM_OPTS) -jar $(JCOV_HOME)/lib/jcov.jar RepGen -sourcepath \
|
||||
$(JAVA) -Xmx4g -jar $(JCOV_HOME)/lib/jcov.jar RepGen -sourcepath \
|
||||
`$(ECHO) $(TOPDIR)/src/*/share/classes/ | $(TR) ' ' ':'` -fmt html \
|
||||
$(JCOV_MODULES_FILTER) $(JCOV_FILTERS) \
|
||||
$(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
|
||||
@@ -1440,7 +1325,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) $(JCOV_VM_OPTS) -jar $(JCOV_HOME)/lib/jcov.jar \
|
||||
$(JAVA) -Xmx4g -jar $(JCOV_HOME)/lib/jcov.jar \
|
||||
DiffCoverage -replaceDiff "src/.*/classes/:" -all \
|
||||
$(JCOV_RESULT_FILE) $(JCOV_SOURCE_DIFF) > \
|
||||
$(JCOV_DIFF_COVERAGE_REPORT)
|
||||
@@ -1468,8 +1353,4 @@ endif
|
||||
|
||||
all: run-test
|
||||
|
||||
.PHONY: $(TARGETS)
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
.PHONY: default all $(TARGETS)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -24,11 +24,9 @@
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Initial bootstrapping, copied and stripped down from Makefile and PreInit.gmk.
|
||||
# Initial bootstrapping, copied and stripped down from Makefile and Init.gmk
|
||||
################################################################################
|
||||
|
||||
IS_PREINIT_ENV := true
|
||||
|
||||
# In Cygwin, the MAKE variable gets prepended with the current directory if the
|
||||
# make executable is called using a Windows mixed path (c:/cygwin/bin/make.exe).
|
||||
ifneq ($(findstring :, $(MAKE)), )
|
||||
@@ -59,7 +57,7 @@ TOPDIR := $(strip $(patsubst %/make/, %, $(dir $(makefile_path))))
|
||||
define SetupVariable
|
||||
ifeq ($$($1), )
|
||||
ifeq ($2, )
|
||||
$$(info Error: Prebuilt variable $1 is missing, needed for test-prebuilt)
|
||||
$$(info Error: Prebuilt variable $1 is missing, needed for run-tests-prebuilt)
|
||||
$$(error Cannot continue.)
|
||||
else ifeq ($2, OPTIONAL)
|
||||
ifneq ($$(findstring $$(LOG), info debug trace), )
|
||||
@@ -137,9 +135,10 @@ $(eval $(call SetupVariable,JIB_JAR,OPTIONAL))
|
||||
# can include the prebuilt spec file ourselves, without an ephemeral spec
|
||||
# wrapper. This is required so we can include MakeBase which is needed for
|
||||
# CreateNewSpec.
|
||||
include $(TOPDIR)/make/PreInitSupport.gmk
|
||||
include $(TOPDIR)/make/common/LogUtils.gmk
|
||||
HAS_SPEC :=
|
||||
include $(TOPDIR)/make/InitSupport.gmk
|
||||
|
||||
$(eval $(call CheckDeprecatedEnvironment))
|
||||
$(eval $(call CheckInvalidMakeFlags))
|
||||
$(eval $(call ParseLogLevel))
|
||||
|
||||
@@ -217,9 +216,9 @@ else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
else ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
NUM_CORES := $(NUMBER_OF_PROCESSORS)
|
||||
MEMORY_SIZE := $(shell \
|
||||
$(EXPR) `powershell -Command \
|
||||
"(Get-CimInstance Win32_ComputerSystem).TotalPhysicalMemory" \
|
||||
| $(SED) 's/\\r//g' ` / 1024 / 1024 \
|
||||
$(EXPR) `wmic computersystem get totalphysicalmemory -value \
|
||||
| $(GREP) = | $(SED) 's/\\r//g' \
|
||||
| $(CUT) -d "=" -f 2-` / 1024 / 1024 \
|
||||
)
|
||||
endif
|
||||
ifeq ($(NUM_CORES), )
|
||||
@@ -246,7 +245,7 @@ endif
|
||||
# Now we can include additional custom support.
|
||||
# This might define CUSTOM_NEW_SPEC_LINE
|
||||
ifneq ($(CUSTOM_MAKE_DIR), )
|
||||
include $(CUSTOM_MAKE_DIR)/RunTestsPrebuilt-pre.gmk
|
||||
include $(CUSTOM_MAKE_DIR)/RunTestsPrebuilt.gmk
|
||||
endif
|
||||
|
||||
NEW_SPEC := $(OUTPUTDIR)/run-test-spec.gmk
|
||||
@@ -296,10 +295,13 @@ test-prebuilt:
|
||||
# is unfortunately not available at this point.
|
||||
$(call MakeDir, $(MAKESUPPORT_OUTPUTDIR)/failure-logs)
|
||||
@$(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 GenerateFindTests.gmk
|
||||
@cd $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test \
|
||||
# The lazy initialization of the cache file in FindTests.gmk does not
|
||||
# always work with RunTests.gmk. To guarantee that the jtreg test groups
|
||||
# are always found and parsed, call FindTests.gmk stand alone once
|
||||
# before calling RunTests.gmk.
|
||||
@cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -f make/common/FindTests.gmk \
|
||||
SPEC=$(SPEC) FINDTESTS_STAND_ALONE=true
|
||||
@cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -f make/RunTests.gmk run-test \
|
||||
TEST="$(TEST)"
|
||||
|
||||
test-prebuilt-with-exit-code: test-prebuilt
|
||||
|
||||
@@ -63,7 +63,7 @@ TEST_JOBS ?= 0
|
||||
|
||||
# Use hard-coded values for java flags (one size, fits all!)
|
||||
JAVA_FLAGS := -Duser.language=en -Duser.country=US
|
||||
JAVA_FLAGS_BIG := -Xms64M -Xmx2048M
|
||||
JAVA_FLAGS_BIG := -Xms64M -Xmx1600M
|
||||
JAVA_FLAGS_SMALL := -XX:+UseSerialGC -Xms32M -Xmx512M -XX:TieredStopAtLevel=1
|
||||
BUILDJDK_JAVA_FLAGS_SMALL := -Xms32M -Xmx512M -XX:TieredStopAtLevel=1
|
||||
BUILD_JAVA_FLAGS := $(JAVA_FLAGS_BIG)
|
||||
@@ -176,19 +176,3 @@ 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2024, 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
|
||||
@@ -23,7 +23,10 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, SourceRevision-pre.gmk))
|
||||
|
||||
################################################################################
|
||||
# Keep track of what source revision is used to create the build, by creating
|
||||
@@ -35,7 +38,6 @@ include MakeFileStart.gmk
|
||||
# bundle. As a part of creating this source bundle, the current SCM revisions of
|
||||
# all repos will be stored in a file in the top dir, which is then used when
|
||||
# creating the tracker file.
|
||||
################################################################################
|
||||
|
||||
STORED_SOURCE_REVISION := $(TOPDIR)/.src-rev
|
||||
|
||||
@@ -55,7 +57,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)
|
||||
@@ -154,6 +156,10 @@ endif
|
||||
|
||||
################################################################################
|
||||
|
||||
$(eval $(call IncludeCustomExtension, SourceRevision-post.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
store-source-revision: $(STORE_SOURCE_REVISION_TARGET)
|
||||
|
||||
create-source-revision-tracker: $(CREATE_SOURCE_REVISION_TRACKER_TARGET)
|
||||
@@ -161,7 +167,3 @@ create-source-revision-tracker: $(CREATE_SOURCE_REVISION_TRACKER_TARGET)
|
||||
FRC: # Force target
|
||||
|
||||
.PHONY: store-source-revision create-source-revision-tracker
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2024, 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
|
||||
@@ -23,15 +23,15 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
default: all
|
||||
|
||||
################################################################################
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include CopyFiles.gmk
|
||||
include DebugInfoUtils.gmk
|
||||
include Modules.gmk
|
||||
include modules/LauncherCommon.gmk
|
||||
include Execute.gmk
|
||||
|
||||
################################################################################
|
||||
#
|
||||
@@ -48,8 +48,8 @@ ifneq ($(word 2, $(wildcard $(HOTSPOT_STATIC_LIB_PATH))), )
|
||||
endif
|
||||
|
||||
# Find all modules with static libraries
|
||||
STATIC_LIB_MODULES := $(sort $(patsubst $(SUPPORT_OUTPUTDIR)/modules_static-libs/%, \
|
||||
%, $(wildcard $(SUPPORT_OUTPUTDIR)/modules_static-libs/*)))
|
||||
STATIC_LIB_MODULES := $(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.
|
||||
@@ -67,12 +67,10 @@ else ifeq ($(call isTargetOs, windows), true)
|
||||
BROKEN_STATIC_LIBS += splashscreen
|
||||
# libsspi_bridge has name conflicts with sunmscapi
|
||||
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
|
||||
# These libs define DllMain which conflict with Hotspot
|
||||
BROKEN_STATIC_LIBS += awt dt_shmem dt_socket
|
||||
# These libs are dependent on any of the above disabled libs
|
||||
BROKEN_STATIC_LIBS += fontmanager jawt lcms net nio
|
||||
endif
|
||||
|
||||
$(foreach module, $(STATIC_LIB_MODULES), \
|
||||
@@ -100,104 +98,35 @@ EXTERNAL_LIBS := $(strip $(shell $(CAT) $(LIB_FLAGS_FILES) | \
|
||||
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
STATIC_LIBS := $(addprefix -force_load$(SPACE), $(STATIC_LIB_FILES))
|
||||
STANDARD_LIBS += -lstdc++
|
||||
else ifeq ($(call isTargetOs, linux), true)
|
||||
STATIC_LIBS := -Wl,--export-dynamic -Wl,--whole-archive $(STATIC_LIB_FILES) -Wl,--no-whole-archive
|
||||
STANDARD_LIBS := -l:libstdc++.a
|
||||
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, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
|
||||
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++, \
|
||||
LIBS := $(STATIC_LIBS) $(EXTERNAL_LIBS) $(STANDARD_LIBS), \
|
||||
OUTPUT_DIR := $(STATIC_LAUNCHER_OUTPUT_DIR), \
|
||||
OBJECT_DIR := $(STATIC_LAUNCHER_OUTPUT_DIR), \
|
||||
))
|
||||
|
||||
$(java): $(STATIC_LIB_FILES)
|
||||
ifeq ($(call isTargetOs, aix), true)
|
||||
$(java): $(STATIC_LIB_EXPORT_FILES)
|
||||
endif
|
||||
|
||||
TARGETS += $(java)
|
||||
|
||||
JAVA_LAUNCHER := $(BUILD_LAUNCHER_java_TARGET)
|
||||
|
||||
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)))))
|
||||
static-launcher: $(java)
|
||||
|
||||
################################################################################
|
||||
#
|
||||
@@ -239,73 +168,25 @@ TARGETS += $(copy-from-jdk-image)
|
||||
|
||||
$(copy-from-jdk-image): | static-jdk-info
|
||||
|
||||
$(eval $(call SetupCopyFiles, copy-static-launchers, \
|
||||
FILES := $(JAVA_LAUNCHER) $(RELAUNCHERS), \
|
||||
$(eval $(call SetupCopyFiles, copy-static-launcher, \
|
||||
FILES := $(JAVA_LAUNCHER), \
|
||||
DEST := $(STATIC_JDK_IMAGE_DIR)/bin, \
|
||||
))
|
||||
|
||||
TARGETS += $(copy-static-launchers)
|
||||
TARGETS += $(copy-static-launcher)
|
||||
|
||||
$(eval $(call SetupCopyFiles, copy-static-launchers-debuginfo, \
|
||||
$(eval $(call SetupCopyFiles, copy-static-launcher-debuginfo, \
|
||||
SRC := $(STATIC_LAUNCHER_OUTPUT_DIR), \
|
||||
DEST := $(STATIC_JDK_IMAGE_DIR)/bin, \
|
||||
FILES := $(call FindDebuginfoFiles, $(STATIC_LAUNCHER_OUTPUT_DIR)), \
|
||||
))
|
||||
|
||||
TARGETS += $(copy-static-launchers-debuginfo)
|
||||
TARGETS += $(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)
|
||||
static-jdk-image: $(copy-from-jdk-image) $(copy-static-launcher) $(copy-static-launcher-debuginfo)
|
||||
|
||||
TARGETS += static-jdk-image
|
||||
|
||||
.PHONY: static-launchers static-jdk-image
|
||||
all: $(TARGETS)
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
.PHONY: all static-launcher static-jdk-image
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,12 +23,13 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
|
||||
################################################################################
|
||||
# This makefile creates an image of the optional static versions of certain JDK
|
||||
# libraries.
|
||||
################################################################################
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include CopyFiles.gmk
|
||||
include Modules.gmk
|
||||
@@ -37,6 +38,8 @@ ALL_MODULES = $(call FindAllModules)
|
||||
|
||||
################################################################################
|
||||
|
||||
TARGETS :=
|
||||
|
||||
ifneq ($(filter static-libs-image, $(MAKECMDGOALS)), )
|
||||
IMAGE_DEST_DIR = $(STATIC_LIBS_IMAGE_DIR)/lib
|
||||
else ifneq ($(filter static-libs-graal-image, $(MAKECMDGOALS)), )
|
||||
@@ -69,9 +72,11 @@ ifneq ($(filter static-libs-image, $(MAKECMDGOALS)), )
|
||||
)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
static-libs-image: $(HOTSPOT_VARIANT_STATIC_LIBS_TARGETS) $(STATIC_LIBS_TARGETS)
|
||||
static-libs-graal-image: $(STATIC_LIBS_TARGETS)
|
||||
|
||||
################################################################################
|
||||
all: $(TARGETS)
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
.PHONY: all
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2017, 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
|
||||
@@ -23,7 +23,13 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, TestImage-pre.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -48,8 +54,4 @@ TARGETS += $(BUILD_INFO_PROPERTIES) $(README)
|
||||
prepare-test-image: $(TARGETS)
|
||||
all: prepare-test-image
|
||||
|
||||
.PHONY: prepare-test-image
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
.PHONY: default all prepare-test-image
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 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
|
||||
@@ -23,10 +23,8 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeIncludeStart.gmk
|
||||
ifeq ($(INCLUDE), true)
|
||||
|
||||
################################################################################
|
||||
ifndef _TOOLS_HOTSPOT_GMK
|
||||
_TOOLS_HOTSPOT_GMK := 1
|
||||
|
||||
include JavaCompilation.gmk
|
||||
|
||||
@@ -46,5 +44,4 @@ TOOL_JFR_GEN := $(JAVA_SMALL) -cp $(HOTSPOT_TOOLS_OUTPUTDIR) \
|
||||
|
||||
################################################################################
|
||||
|
||||
endif # include guard
|
||||
include MakeIncludeEnd.gmk
|
||||
endif # _TOOLS_HOTSPOT_GMK
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,13 +23,14 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeIncludeStart.gmk
|
||||
ifeq ($(INCLUDE), true)
|
||||
|
||||
################################################################################
|
||||
ifndef _TOOLS_GMK
|
||||
_TOOLS_GMK := 1
|
||||
|
||||
include JavaCompilation.gmk
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, Tools.gmk))
|
||||
|
||||
################################################################################
|
||||
# To avoid reevaluating the compilation setup for the tools each time this file
|
||||
# is included, the actual compilation is handled by CompileTools.gmk. The
|
||||
@@ -78,9 +79,6 @@ 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.GenerateCaseFolding
|
||||
|
||||
TOOL_MAKEZIPREPRODUCIBLE = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.makezipreproducible.MakeZipReproducible
|
||||
|
||||
@@ -130,9 +128,6 @@ 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.
|
||||
@@ -142,5 +137,7 @@ PANDOC_HTML_MANPAGE_FILTER := $(BUILDTOOLS_OUTPUTDIR)/manpages/pandoc-html-manpa
|
||||
|
||||
################################################################################
|
||||
|
||||
endif # include guard
|
||||
include MakeIncludeEnd.gmk
|
||||
# Hook to include the corresponding custom post file, if present.
|
||||
$(eval $(call IncludeCustomExtension, ToolsJdk-post.gmk))
|
||||
|
||||
endif # _TOOLS_GMK
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# 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
|
||||
@@ -23,10 +23,11 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
|
||||
################################################################################
|
||||
# This must be the first rule
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
|
||||
################################################################################
|
||||
@@ -36,13 +37,9 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_LANGTOOLS, \
|
||||
COMPILER := bootjdk, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||
SRC := $(TOPDIR)/make/langtools/tools, \
|
||||
INCLUDES := compileproperties flagsgenerator propertiesparser, \
|
||||
INCLUDES := compileproperties propertiesparser, \
|
||||
COPY := .properties, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes, \
|
||||
))
|
||||
|
||||
all: $(BUILD_TOOLS_LANGTOOLS)
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2017, 2019, 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
|
||||
@@ -23,14 +23,17 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include ProcessMarkdown.gmk
|
||||
|
||||
################################################################################
|
||||
# This makefile updates the generated build html documentation.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
include ProcessMarkdown.gmk
|
||||
|
||||
ifeq ($(ENABLE_PANDOC), false)
|
||||
$(info No pandoc executable was detected by configure)
|
||||
$(error Cannot continue)
|
||||
@@ -52,4 +55,10 @@ TARGETS += $(md_docs)
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
$(eval $(call IncludeCustomExtension, UpdateBuildDocs.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all default
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2024, 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
|
||||
@@ -23,7 +23,15 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
################################################################################
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
include CopyFiles.gmk
|
||||
include Execute.gmk
|
||||
|
||||
################################################################################
|
||||
# This file is responsible for updating the generated sleef source code files
|
||||
@@ -32,9 +40,6 @@ include MakeFileStart.gmk
|
||||
# updated from upstream.
|
||||
################################################################################
|
||||
|
||||
include CopyFiles.gmk
|
||||
include Execute.gmk
|
||||
|
||||
ifneq ($(COMPILE_TYPE), cross)
|
||||
$(error Only cross-compilation of libsleef is currently supported)
|
||||
endif
|
||||
@@ -81,8 +86,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), \
|
||||
WORKING_DIR := $(SLEEF_SOURCE_DIR), \
|
||||
COMMAND := $(CMAKE) -S . -B $(SLEEF_NATIVE_BUILD_DIR), \
|
||||
COMMAND := cd $(SLEEF_SOURCE_DIR) && $(CMAKE) -S . -B \
|
||||
$(SLEEF_NATIVE_BUILD_DIR), \
|
||||
))
|
||||
|
||||
TARGETS := $(sleef_native_config)
|
||||
@@ -91,8 +96,8 @@ $(eval $(call SetupExecute, sleef_native_build, \
|
||||
INFO := Building native sleef, \
|
||||
DEPS := $(sleef_native_config), \
|
||||
OUTPUT_DIR := $(SLEEF_NATIVE_BUILD_DIR), \
|
||||
WORKING_DIR := $(SLEEF_SOURCE_DIR), \
|
||||
COMMAND := $(CMAKE) --build $(SLEEF_NATIVE_BUILD_DIR) -j, \
|
||||
COMMAND := cd $(SLEEF_SOURCE_DIR) && $(CMAKE) --build \
|
||||
$(SLEEF_NATIVE_BUILD_DIR) -j, \
|
||||
))
|
||||
|
||||
TARGETS := $(sleef_native_build)
|
||||
@@ -101,8 +106,8 @@ $(eval $(call SetupExecute, sleef_cross_config, \
|
||||
INFO := Configuring cross-compiling sleef build, \
|
||||
DEPS := $(sleef_native_build), \
|
||||
OUTPUT_DIR := $(SLEEF_CROSS_BUILD_DIR), \
|
||||
WORKING_DIR := $(SLEEF_SOURCE_DIR), \
|
||||
COMMAND := $(CMAKE) -S . -B $(SLEEF_CROSS_BUILD_DIR) \
|
||||
COMMAND := cd $(SLEEF_SOURCE_DIR) && $(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 +121,8 @@ $(eval $(call SetupExecute, sleef_cross_build, \
|
||||
INFO := Building cross-compiling sleef, \
|
||||
DEPS := $(sleef_cross_config), \
|
||||
OUTPUT_DIR := $(SLEEF_NATIVE_BUILD_DIR), \
|
||||
WORKING_DIR := $(SLEEF_SOURCE_DIR), \
|
||||
COMMAND := $(CMAKE) --build $(SLEEF_CROSS_BUILD_DIR) -j, \
|
||||
COMMAND := cd $(SLEEF_SOURCE_DIR) && $(CMAKE) --build \
|
||||
$(SLEEF_CROSS_BUILD_DIR) -j, \
|
||||
))
|
||||
|
||||
TARGETS := $(sleef_cross_build)
|
||||
@@ -143,4 +148,6 @@ TARGETS := $(copy_generated_sleef_source)
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all default
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2024, 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
|
||||
@@ -23,7 +23,15 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
################################################################################
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include Execute.gmk
|
||||
include JdkNativeCompilation.gmk
|
||||
include ToolsJdk.gmk
|
||||
|
||||
################################################################################
|
||||
# This file is responsible for extracting the x11 native struct offsets to
|
||||
@@ -35,10 +43,6 @@ include MakeFileStart.gmk
|
||||
# GensrcX11Wrappers.gmk to generate the Java code during the build.
|
||||
################################################################################
|
||||
|
||||
include Execute.gmk
|
||||
include JdkNativeCompilation.gmk
|
||||
include $(TOPDIR)/make/ToolsJdk.gmk
|
||||
|
||||
ifeq ($(COMPILE_TYPE), cross)
|
||||
$(error It is not possible to update the x11wrappers when cross-compiling)
|
||||
endif
|
||||
@@ -104,4 +108,6 @@ TARGETS += $(run_wrappergen) wrapper-information
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all default
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2024, 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
|
||||
@@ -23,10 +23,10 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
|
||||
################################################################################
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include ZipArchive.gmk
|
||||
|
||||
################################################################################
|
||||
@@ -100,4 +100,6 @@ endif
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: default all
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2024, 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
|
||||
@@ -23,16 +23,19 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
include MakeFileStart.gmk
|
||||
|
||||
################################################################################
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include Modules.gmk
|
||||
include ZipArchive.gmk
|
||||
|
||||
SRC_ZIP_WORK_DIR := $(SUPPORT_OUTPUTDIR)/src
|
||||
$(if $(filter $(TOPDIR)/%, $(SUPPORT_OUTPUTDIR)), $(eval SRC_ZIP_BASE := $(TOPDIR)), $(eval SRC_ZIP_BASE := $(SUPPORT_OUTPUTDIR)))
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, ZipSource.gmk))
|
||||
|
||||
################################################################################
|
||||
# Create the directory structure for src.zip using symlinks.
|
||||
# <module>/<package>/<file>.java
|
||||
@@ -92,8 +95,8 @@ zip: $(SRC_ZIP_SRCS)
|
||||
|
||||
TARGETS += zip
|
||||
|
||||
.PHONY: zip
|
||||
|
||||
################################################################################
|
||||
|
||||
include MakeFileEnd.gmk
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: default all zip
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2014, 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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,25 +75,18 @@ 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
|
||||
|
||||
# We get the top-level directory from the supporting wrappers.
|
||||
BASIC_WINDOWS_VERIFY_DIR($TOPDIR, source)
|
||||
orig_topdir="$TOPDIR"
|
||||
UTIL_FIXUP_PATH(TOPDIR)
|
||||
AC_MSG_CHECKING([for top-level directory])
|
||||
AC_MSG_RESULT([$TOPDIR])
|
||||
if test "x$TOPDIR" != "x$orig_topdir"; then
|
||||
AC_MSG_WARN([Your top dir was originally represented as $orig_topdir,])
|
||||
AC_MSG_WARN([but after rewriting it became $TOPDIR.])
|
||||
AC_MSG_WARN([This typically means you have characters like space in the path, which can cause all kind of trouble.])
|
||||
fi
|
||||
AC_SUBST(TOPDIR)
|
||||
|
||||
if test "x$CUSTOM_ROOT" != x; then
|
||||
@@ -134,33 +127,17 @@ 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
|
||||
# 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.])
|
||||
AC_MSG_WARN([C.UTF-8 locale not found, using C locale])
|
||||
LOCALE_USED=C
|
||||
fi
|
||||
else
|
||||
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])
|
||||
AC_MSG_WARN([locale command not not found, using C locale])
|
||||
LOCALE_USED=C
|
||||
fi
|
||||
|
||||
export LC_ALL=$LOCALE_USED
|
||||
@@ -210,8 +187,17 @@ 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_TOOLCHAIN_PROGS(XCODEBUILD, xcodebuild)
|
||||
UTIL_LOOKUP_PROGS(XCODEBUILD, xcodebuild)
|
||||
if test "x$XCODEBUILD" != x; then
|
||||
XCODEBUILD_OUTPUT=`"$XCODEBUILD" -version 2>&1`
|
||||
if test $? -ne 0; then
|
||||
@@ -339,11 +325,21 @@ 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)]
|
||||
@@ -352,14 +348,6 @@ 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)
|
||||
|
||||
AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
|
||||
[Point to a nonstandard Visual Studio installation location on Windows by
|
||||
specifying any existing directory 2 or 3 levels below the installation
|
||||
root.])]
|
||||
)
|
||||
|
||||
if test "x$with_xcode_path" != x; then
|
||||
if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
|
||||
UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],
|
||||
@@ -404,21 +392,11 @@ 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$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
|
||||
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
|
||||
# We are running configure from the src root.
|
||||
# Create a default ./build/target-variant-debuglevel output root.
|
||||
if test "x${CONF_NAME}" = x; then
|
||||
@@ -439,12 +417,7 @@ 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
|
||||
[ 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
|
||||
CONF_NAME=`$ECHO $CONFIGURE_START_DIR | $SED -e "s!^${TOPDIR}/build/!!"`
|
||||
fi
|
||||
OUTPUTDIR="$CONFIGURE_START_DIR"
|
||||
AC_MSG_RESULT([in current directory])
|
||||
@@ -570,6 +543,9 @@ 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -57,7 +57,6 @@ 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)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
@@ -107,6 +106,9 @@ 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)
|
||||
@@ -207,14 +209,29 @@ AC_DEFUN([BASIC_CHECK_GNU_MAKE],
|
||||
UTIL_SETUP_TOOL(MAKE,
|
||||
[
|
||||
# Try our hardest to locate a correct version of GNU make
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(CHECK_GMAKE, gmake)
|
||||
UTIL_LOOKUP_PROGS(CHECK_GMAKE, gmake)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_GMAKE", [gmake in PATH])
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(CHECK_MAKE, make)
|
||||
UTIL_LOOKUP_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
|
||||
@@ -363,7 +380,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\|uutils"`
|
||||
check_date=`$DATE --version 2>&1 | $GREP "GNU\|BusyBox"`
|
||||
if test "x$check_date" != x; then
|
||||
AC_MSG_RESULT([yes])
|
||||
IS_GNU_DATE=yes
|
||||
@@ -453,15 +470,7 @@ 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="$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"
|
||||
PANDOC_MARKDOWN_FLAG="markdown-smart"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -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"
|
||||
FIXPATH_ARGS="-e $PATHTOOL -p $WINENV_PREFIX_ARG -r ${WINENV_ROOT//\\/\\\\} -t $WINENV_TEMP_DIR -c $CMD -q"
|
||||
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"
|
||||
-c $CMD -q"
|
||||
$ECHO > $OUTPUTDIR/fixpath '#!/bin/bash'
|
||||
$ECHO >> $OUTPUTDIR/fixpath export PATH='"[$]PATH:'$PATH'"'
|
||||
$ECHO >> $OUTPUTDIR/fixpath $FIXPATH_CMDLINE '"[$]@"'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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,13 +180,11 @@ 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)
|
||||
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"
|
||||
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"
|
||||
fi
|
||||
if test "x$BINARY" != x; then
|
||||
# So there is a java(c) binary, it might be part of a JDK.
|
||||
@@ -395,9 +393,11 @@ 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_VERSION=`$ECHO $DEFAULT_ACCEPTABLE_BOOT_VERSIONS \
|
||||
OLDEST_BOOT_JDK=`$ECHO $DEFAULT_ACCEPTABLE_BOOT_VERSIONS \
|
||||
| $TR " " "\n" | $SORT -n | $HEAD -n1`
|
||||
AC_SUBST(OLDEST_BOOT_JDK_VERSION)
|
||||
# -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)
|
||||
|
||||
# Check if the boot jdk is 32 or 64 bit
|
||||
if $JAVA -version 2>&1 | $GREP -q "64-Bit"; then
|
||||
@@ -408,6 +408,27 @@ 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
|
||||
])
|
||||
|
||||
@@ -423,8 +444,13 @@ 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])
|
||||
|
||||
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])
|
||||
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
|
||||
|
||||
# Finally append user provided options to allow them to override.
|
||||
UTIL_ADD_JVM_ARG_IF_OK([$USER_BOOT_JDK_OPTIONS],boot_jdk_jvmargs,[$JAVA])
|
||||
@@ -571,9 +597,10 @@ 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@:>@])])
|
||||
|
||||
EXTERNAL_BUILDJDK_PATH=""
|
||||
CREATE_BUILDJDK=false
|
||||
EXTERNAL_BUILDJDK=false
|
||||
BUILD_JDK_FOUND="no"
|
||||
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
|
||||
@@ -581,15 +608,40 @@ AC_DEFUN([BOOTJDK_SETUP_BUILD_JDK],
|
||||
AC_MSG_NOTICE([Found potential Build JDK using configure arguments])
|
||||
fi
|
||||
])
|
||||
if test "x$BUILD_JDK_FOUND" != "xyes"; then
|
||||
EXTERNAL_BUILDJDK=true
|
||||
else
|
||||
if test "x$COMPILE_TYPE" = "xcross"; then
|
||||
BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
|
||||
BUILD_JDK_FOUND=yes
|
||||
CREATE_BUILDJDK=true
|
||||
AC_MSG_CHECKING([for Build JDK])
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Could not find a suitable 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])
|
||||
fi
|
||||
EXTERNAL_BUILDJDK_PATH="$BUILD_JDK"
|
||||
fi
|
||||
|
||||
AC_SUBST(EXTERNAL_BUILDJDK_PATH)
|
||||
# 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)
|
||||
])
|
||||
|
||||
# The docs-reference JDK is used to run javadoc for the docs-reference targets.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -44,3 +44,7 @@ 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, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2023, 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/msys CPUs
|
||||
echo $OUT | grep -e "-pc-cygwin" > /dev/null 2> /dev/null
|
||||
# Test and fix cygwin on x86_64
|
||||
echo $OUT | grep 86-pc-cygwin > /dev/null 2> /dev/null
|
||||
if test $? != 0; then
|
||||
echo $OUT | grep -e "-pc-mingw" > /dev/null 2> /dev/null
|
||||
echo $OUT | grep 86-pc-mingw > /dev/null 2> /dev/null
|
||||
fi
|
||||
if test $? = 0; then
|
||||
case `echo $PROCESSOR_IDENTIFIER | cut -f1 -d' '` in
|
||||
@@ -64,10 +64,6 @@ 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,7 +1,7 @@
|
||||
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
|
||||
#
|
||||
# Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2013, 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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,8 +75,7 @@ AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
|
||||
FOUND_MEM=yes
|
||||
elif test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
# Windows, but without cygwin
|
||||
MEMORY_SIZE=`powershell -Command \
|
||||
"(Get-CimInstance Win32_ComputerSystem).TotalPhysicalMemory" | $SED 's/\\r//g' `
|
||||
MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
|
||||
MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
|
||||
FOUND_MEM=yes
|
||||
fi
|
||||
@@ -162,7 +161,12 @@ AC_DEFUN([BPERF_SETUP_CCACHE],
|
||||
# Check if ccache is available
|
||||
CCACHE_AVAILABLE=true
|
||||
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(CCACHE, ccache)
|
||||
OLD_PATH="$PATH"
|
||||
if test "x$TOOLCHAIN_PATH" != x; then
|
||||
PATH=$TOOLCHAIN_PATH:$PATH
|
||||
fi
|
||||
UTIL_LOOKUP_PROGS(CCACHE, ccache)
|
||||
PATH="$OLD_PATH"
|
||||
|
||||
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/compare-logger.sh $OUTPUTDIR/compare.log $BASH "$REAL_COMPARE_SCRIPT" "$@"
|
||||
$BASH $TOPDIR/make/scripts/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, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -49,9 +49,7 @@ fi
|
||||
export CONFIG_SHELL=$BASH
|
||||
export _as_can_reexec=no
|
||||
|
||||
# Save user's current locale, but make sure all future shell commands are
|
||||
# executed with the C locale
|
||||
export USER_LOCALE=$LC_ALL
|
||||
# Make sure all shell commands are executed with the C locale
|
||||
export LC_ALL=C
|
||||
|
||||
if test "x$CUSTOM_CONFIG_DIR" != x; then
|
||||
@@ -366,7 +364,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 ECHO=echo )
|
||||
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $generated_script PRINTF=printf )
|
||||
|
||||
cat <<EOT
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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,6 +174,9 @@ 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
|
||||
|
||||
@@ -221,9 +224,6 @@ 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,12 +259,11 @@ 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
|
||||
|
||||
################################################################################
|
||||
#
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user