diff --git a/.github/actions/get-gtest/action.yml b/.github/actions/get-gtest/action.yml index 5de2b10cd32..d38d33eabd8 100644 --- a/.github/actions/get-gtest/action.yml +++ b/.github/actions/get-gtest/action.yml @@ -49,6 +49,6 @@ runs: - name: 'Export path to where GTest is installed' id: path-name run: | - # Export the path - echo 'path=gtest' >> $GITHUB_OUTPUT + # Export the absolute path + echo "path=`pwd`/gtest" >> $GITHUB_OUTPUT shell: bash diff --git a/.github/actions/get-jtreg/action.yml b/.github/actions/get-jtreg/action.yml index 78a3a4c9edd..4bb671d25d1 100644 --- a/.github/actions/get-jtreg/action.yml +++ b/.github/actions/get-jtreg/action.yml @@ -49,6 +49,6 @@ runs: - name: 'Export path to where JTReg is installed' id: path-name run: | - # Export the path - echo 'path=jtreg/installed' >> $GITHUB_OUTPUT + # Export the absolute path + echo "path=`pwd`/jtreg/installed" >> $GITHUB_OUTPUT shell: bash diff --git a/.github/actions/upload-bundles/action.yml b/.github/actions/upload-bundles/action.yml index 4e974ae58ba..30f4ac03c1e 100644 --- a/.github/actions/upload-bundles/action.yml +++ b/.github/actions/upload-bundles/action.yml @@ -32,6 +32,9 @@ inputs: debug-suffix: description: 'File name suffix denoting debug level, possibly empty' required: false + bundle-suffix: + description: 'Bundle name suffix, possibly empty' + required: false runs: using: composite @@ -75,7 +78,7 @@ runs: - name: 'Upload bundles artifact' uses: actions/upload-artifact@v4 with: - name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }} + name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.bundle-suffix }} path: bundles retention-days: 1 if: steps.bundles.outputs.bundles-found == 'true' diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index b1d4278f8b4..101668b2bd5 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -61,6 +61,9 @@ on: make-arguments: required: false type: string + bundle-suffix: + required: false + type: string jobs: build-linux: @@ -71,10 +74,6 @@ jobs: fail-fast: false matrix: debug-level: ${{ fromJSON(inputs.debug-levels) }} - include: - - debug-level: debug - flags: --with-debug-level=fastdebug - suffix: -debug steps: - name: 'Checkout the JDK source' @@ -118,7 +117,7 @@ jobs: run: > bash configure --with-conf-name=${{ inputs.platform }} - ${{ matrix.flags }} + ${{ matrix.debug-level == 'debug' && '--with-debug-level=fastdebug' || '' }} --with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA} --with-boot-jdk=${{ steps.bootjdk.outputs.path }} --with-jtreg=${{ steps.jtreg.outputs.path }} @@ -133,17 +132,14 @@ jobs: - name: 'Build' id: build uses: ./.github/actions/do-build - env: - # Only build static-libs-bundles for release builds. - # For debug builds, building static-libs often exceeds disk space. - STATIC_LIBS: ${{ matrix.debug-level == 'release' && 'static-libs-bundles' }} with: - make-target: '${{ inputs.make-target }} ${STATIC_LIBS} ${{ inputs.make-arguments }}' + make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}' platform: ${{ inputs.platform }} - debug-suffix: '${{ matrix.suffix }}' + debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}" - name: 'Upload bundles' uses: ./.github/actions/upload-bundles with: platform: ${{ inputs.platform }} - debug-suffix: '${{ matrix.suffix }}' + debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}" + bundle-suffix: ${{ inputs.bundle-suffix }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 210d53be658..8dce1d214dc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -225,6 +225,43 @@ jobs: make-arguments: ${{ github.event.inputs.make-arguments }} 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-image' + # 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 }} + # It currently doesn't produce any bundles, but probably will do in + # the future. + bundle-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 }} + # 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: name: linux-cross-compile needs: prepare @@ -325,17 +362,6 @@ jobs: bootjdk-platform: linux-x64 runs-on: ubuntu-22.04 - test-macos-x64: - name: macos-x64 - needs: - - build-macos-x64 - uses: ./.github/workflows/test.yml - with: - platform: macos-x64 - bootjdk-platform: macos-x64 - runs-on: macos-13 - xcode-toolset-version: '14.3.1' - test-macos-aarch64: name: macos-aarch64 needs: diff --git a/.gitignore b/.gitignore index b57addfccc9..2d82e0d943c 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ NashornProfile.txt /.cache /.gdbinit /.lldbinit +**/core.[0-9]* diff --git a/.jcheck/conf b/.jcheck/conf index beb280d1a04..6ab5c2d64c2 100644 --- a/.jcheck/conf +++ b/.jcheck/conf @@ -36,6 +36,6 @@ pattern=^([124-8][0-9]{6}): (\S.*)$ 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|).* +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\. diff --git a/Makefile b/Makefile index ebe52d5d7f2..751574e9620 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -24,8 +24,9 @@ # ### -### This file is just a very small wrapper needed to run the real make/Init.gmk. -### It also performs some sanity checks on make. +### 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. ### # The shell code below will be executed on /usr/bin/make on Solaris, but not in GNU Make. @@ -58,7 +59,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 -include $(topdir)/make/Init.gmk +# ... and then we can include the real makefile to bootstrap the build +include $(TOPDIR)/make/PreInit.gmk diff --git a/bin/idea.sh b/bin/idea.sh index c85ae294454..eb37964f396 100644 --- a/bin/idea.sh +++ b/bin/idea.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -99,7 +99,7 @@ if [ "$VERBOSE" = "true" ] ; then echo "idea template dir: $IDEA_TEMPLATE" fi -cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I $MAKE_DIR/.. idea MAKEOVERRIDES= OUT=$IDEA_OUTPUT/env.cfg MODULES="$*" $CONF_ARG || exit 1 +cd $TOP ; make idea-gen-config ALLOW=IDEA_OUTPUT,MODULES IDEA_OUTPUT=$IDEA_OUTPUT MODULES="$*" $CONF_ARG || exit 1 cd $SCRIPT_DIR . $IDEA_OUTPUT/env.cfg diff --git a/doc/hotspot-style.html b/doc/hotspot-style.html index 0305bfeca03..7e7f4de3629 100644 --- a/doc/hotspot-style.html +++ b/doc/hotspot-style.html @@ -207,23 +207,38 @@ the simple "getter".

JTReg Tests