Skip to content

Commit

Permalink
Merge branch 'sapmachine17' into pr-jdk-17.0.14+4
Browse files Browse the repository at this point in the history
  • Loading branch information
RealCLanger committed Nov 21, 2024
2 parents d0949c8 + c78999e commit c3ca3b6
Show file tree
Hide file tree
Showing 147 changed files with 19,425 additions and 108 deletions.
9 changes: 5 additions & 4 deletions .github/actions/upload-bundles/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ runs:
id: bundles
run: |
# 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)"
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)"
# SapMachine 2020-11-04: Adapt bundle names
jdk_bundle_zip="$(ls build/*/bundles/sapmachine-jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
jdk_bundle_tar_gz="$(ls build/*/bundles/sapmachine-jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
symbols_bundle="$(ls build/*/bundles/sapmachine-jdk-*_bin${{ inputs.debug-suffix }}-symbols.tar.gz 2> /dev/null || true)"
tests_bundle="$(ls build/*/bundles/sapmachine-jdk-*_bin-tests${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
mkdir bundles
Expand Down
4 changes: 4 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The description of this pull request goes here.

fixes #Issue

19 changes: 14 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,18 @@
# questions.
#

name: 'OpenJDK GHA Sanity Checks'
# SapMachine 2022-06-22: Change the name of the GitHub Action
name: 'SapMachine GHA Sanity Checks'

on:
push:
branches-ignore:
- master
- pr/*
# SapMachine 2020-11-04: Ignore sapmachine branch
- sapmachine17
# SapMachine 2020-11-04: Trigger on pull request
pull_request:
branches:
- sapmachine17
workflow_dispatch:
inputs:
platforms:
Expand All @@ -55,6 +60,8 @@ jobs:

select:
name: 'Select platforms'
# SapMachine 2022-06-23: On 'pull_request' we only want to run GHA if the PR comes from a remote repo. Otherwise we have the run on 'push' already as a check.
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}
runs-on: ubuntu-22.04
outputs:
linux-x64: ${{ steps.include.outputs.linux-x64 }}
Expand All @@ -79,7 +86,8 @@ jobs:
function check_platform() {
if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
input='${{ github.event.inputs.platforms }}'
elif [[ $GITHUB_EVENT_NAME == push ]]; then
# SapMachine 2022-06-24: Also handle 'pull_request' event.
elif [[ $GITHUB_EVENT_NAME == push ]] || [[ $GITHUB_EVENT_NAME == pull_request ]]; then
if [[ '${{ !secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then
# If JDK_SUBMIT_FILTER is set, and this is not a "submit/" branch, don't run anything
>&2 echo 'JDK_SUBMIT_FILTER is set and not a "submit/" branch'
Expand Down Expand Up @@ -318,7 +326,8 @@ jobs:
remove-bundles:
name: 'Remove bundle artifacts'
runs-on: ubuntu-22.04
if: always()
# SapMachine 2022-06-23: On 'pull_request' we only want to run GHA if the PR comes from a remote repo. Otherwise we have the run on 'push' already as a check.
if: ${{ github.event_name != 'pull_request' || github.repository != 'SAP/SapMachine' }}
needs:
- build-linux-x64
- build-linux-x86-hs
Expand Down
52 changes: 40 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,46 @@
# Welcome to OpenJDK 17 Updates!
[![Github All Releases](https://img.shields.io/github/downloads/sap/sapmachine/total.svg?label=Downloads)](https://sap.github.io/SapMachine/#download) [![DockerPulls](https://img.shields.io/docker/pulls/_/sapmachine?label=Docker%20Pulls)](https://hub.docker.com/_/sapmachine)

The JDK 17 Updates project uses two GitHub repositories.
Updates are continuously developed in the repository [jdk17u-dev](https://github.com/openjdk/jdk17u-dev). This is the repository usually targeted by contributors.
The [jdk17u](https://github.com/openjdk/jdk17u) repository is used for rampdown of the update releases of jdk17u and only accepts critical changes that must make the next release during rampdown. (You probably do not want to target jdk17u).
<img align="right" width=350 src="https://sap.github.io/SapMachine/assets/images/logo_circular.svg">

For more OpenJDK 17 updates specific information such as timelines and contribution guidelines see the [project wiki page](https://wiki.openjdk.org/display/JDKUpdates/JDK+17u/).
# [](#SapMachine) SapMachine
This project contains a downstream version of the [OpenJDK](http://openjdk.java.net/) project. It is used to build and maintain a SAP supported version of OpenJDK for SAP customers and partners who wish to use OpenJDK to run their applications.

We want to stress that this is clearly a "*friendly fork*". SAP is committed to ensuring the continued success of the Java platform. SAP is:

For build instructions please see the
[online documentation](https://openjdk.java.net/groups/build/doc/building.html),
or either of these files:
* A member of the [JCP Executive committee](https://jcp.org/en/participation/committee) since 2001 and recently served in the [JSR 379 (Java SE 9)](https://www.jcp.org/en/jsr/detail?id=379), [JSR 383 (Java SE 18.3)](https://www.jcp.org/en/jsr/detail?id=383), [JSR 384 (Java SE 11)](https://www.jcp.org/en/jsr/detail?id=384), [JSR 386 (Java SE 12)](https://www.jcp.org/en/jsr/detail?id=386), [JSR 388 (Java SE 13)](https://www.jcp.org/en/jsr/detail?id=388), [JSR 389 (Java SE 14)](https://www.jcp.org/en/jsr/detail?id=389), [JSR 390 (Java SE 15)](https://www.jcp.org/en/jsr/detail?id=390), [JSR 391 (Java SE 16)](https://www.jcp.org/en/jsr/detail?id=391) and [JSR 392 (Java SE 17)](https://www.jcp.org/en/jsr/detail?id=392) Expert Groups.

- [doc/building.html](doc/building.html) (html version)
- [doc/building.md](doc/building.md) (markdown version)
* Among the biggest external contributors to the OpenJDK project (see fix ratio for [Java 11](https://blogs.oracle.com/java-platform-group/building-jdk-11-together), [12](https://blogs.oracle.com/java-platform-group/the-arrival-of-java-12), [13](https://blogs.oracle.com/java-platform-group/the-arrival-of-java-13), [14](https://blogs.oracle.com/java-platform-group/the-arrival-of-java-14), [15](https://blogs.oracle.com/java-platform-group/the-arrival-of-java-15), [16](https://inside.java/2021/03/16/the-arrival-of-java16/), [17](https://inside.java/2021/09/14/the-arrival-of-java17/)).

See <https://openjdk.java.net/> for more information about
the OpenJDK Community and the JDK.
* Leading the [OpenJDK 17 updates project](https://wiki.openjdk.java.net/display/JDKUpdates/JDK+17u) and heavily supporting the [OpenJDK 11 updates project](https://wiki.openjdk.java.net/display/JDKUpdates/JDK11u).

* Leading the [PowerPC/AIX porting project](http://openjdk.java.net/projects/ppc-aix-port/).

* Contributing as many of our features as possible to the OpenJDK project and keep the diff of this project as small as possible.


## Downloads

Check out the [Download](https://sap.github.io/SapMachine/#download) section on [https://sapmachine.io](https://sapmachine.io).

## Documentation
Check out our [FAQ's](https://github.com/SAP/SapMachine/wiki/Frequently-Asked-Questions) and [wikipages](https://github.com/SAP/SapMachine/wiki) for information about:
* [Installation](https://github.com/SAP/SapMachine/wiki/Installation) and [Docker Images](https://github.com/SAP/SapMachine/wiki/Docker-Images)
* [Certifications and Java Compatibility](https://github.com/SAP/SapMachine/wiki/Certification-and-Java-Compatibility)
* [SapMachine Development Process](https://github.com/SAP/SapMachine/wiki/SapMachine-Development-Process)

## Have an issue?
If it's SapMachine specific please let us know by filing a [new issue](https://github.com/SAP/SapMachine/issues/new).

Please notice that the SapMachine [issue tracker](https://github.com/SAP/SapMachine/issues) is mainly used internally by the SapMachine team to organize its work (i.e. sync with upstream, downporting fixes, add SapMachine specific features, etc.).

General VM/JDK bugs are maintained directly in the [OpenJDK Bug System](https://bugs.openjdk.java.net/). You can open a SapMachine issue with a reference to an open or resolved OpenJDK bug if you want us to resolve the issue or downport the fix to a specific SapMachine version. If you find a general VM/JDK bug in SapMachine and don't have write access to the OpenJDK Bug System you can open an issue here and we'll take care to open a corresponding OpenJDK bug for it.

Every SapMachine release contains at least all the fixes of the corresponding OpenJDK release it is based on. You can easily find the OpenJDK base version by looking at the [SapMachine version string](https://github.com/SAP/SapMachine/wiki/Differences-between-SapMachine-and-OpenJDK#version-numbers).

You can find the [Differences between SapMachine and OpenJDK](https://github.com/SAP/SapMachine/wiki/Differences-between-SapMachine-and-OpenJDK) and the [Features Contributed by SAP](https://github.com/SAP/SapMachine/wiki/Features-Contributed-by-SAP) in the [SapMachine Wiki](https://github.com/SAP/SapMachine/wiki).

## Contributing
We currently do not accept external contributions for this project. If you want to improve the code or fix a bug please consider contributing directly to the upstream [OpenJDK](http://openjdk.java.net/contribute/) project. Our repositories will be regularly synced with the upstream project so any improvements in the upstream OpenJDK project will directly become visible in our project as well.

## License
This project is run under the same licensing terms as the upstream OpenJDK project. Please see the [LICENSE](LICENSE) file in the top-level directory for more information.
4 changes: 2 additions & 2 deletions make/Bundles.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
else
JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR)
JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR)
JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER)
JRE_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)
JDK_BUNDLE_SUBDIR := sapmachine-jdk-$(VERSION_NUMBER)
JRE_BUNDLE_SUBDIR := sapmachine-jre-$(VERSION_NUMBER)
ifneq ($(DEBUG_LEVEL), release)
JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
Expand Down
38 changes: 37 additions & 1 deletion make/Images.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ ALL_MODULES := $(call FindAllModules)

$(eval $(call ReadImportMetaData))

# SapMachine 2021-09-24: add jcmd to JRE
JRE_MODULES += $(filter $(ALL_MODULES), $(BOOT_MODULES) \
$(PLATFORM_MODULES) jdk.jdwp.agent)
$(PLATFORM_MODULES) jdk.jdwp.agent jdk.jcmd)
JDK_MODULES += $(ALL_MODULES)

JRE_MODULES_LIST := $(call CommaList, $(JRE_MODULES))
Expand Down Expand Up @@ -230,6 +231,41 @@ ifeq ($(GCOV_ENABLED), true)

endif

################################################################################
# SapMachine 2024-09-13: Async profiler import

ifeq ($(call isTargetOs, linux macosx)+$(ASYNC_PROFILER_IMPORT_ENABLED), true+true)

$(eval $(call SetupCopyFiles, COPY_ASYNC_PROFILER_BIN_TO_JDK, \
SRC := $(ASYNC_PROFILER_IMPORT_PATH), \
DEST := $(JDK_IMAGE_DIR), \
FILES := bin/asprof lib/libasyncProfiler$(SHARED_LIBRARY_SUFFIX), \
MACRO := install-file-and-sign, \
))

$(eval $(call SetupCopyFiles, COPY_ASYNC_PROFILER_BIN_TO_JRE, \
SRC := $(ASYNC_PROFILER_IMPORT_PATH), \
DEST := $(JRE_IMAGE_DIR), \
FILES := bin/asprof lib/libasyncProfiler$(SHARED_LIBRARY_SUFFIX), \
MACRO := install-file-and-sign, \
))

$(eval $(call SetupCopyFiles, COPY_ASYNC_PROFILER_TO_JDK, \
SRC := $(ASYNC_PROFILER_IMPORT_PATH), \
DEST := $(JDK_IMAGE_DIR), \
FILES := lib/async-profiler.jar lib/converter.jar legal/async/CHANGELOG.md legal/async/LICENSE legal/async/README.md, \
))

$(eval $(call SetupCopyFiles, COPY_ASYNC_PROFILER_TO_JRE, \
SRC := $(ASYNC_PROFILER_IMPORT_PATH), \
DEST := $(JRE_IMAGE_DIR), \
FILES := lib/async-profiler.jar lib/converter.jar legal/async/CHANGELOG.md legal/async/LICENSE legal/async/README.md, \
))

JDK_TARGETS += $(COPY_ASYNC_PROFILER_BIN_TO_JDK) $(COPY_ASYNC_PROFILER_TO_JDK)
JRE_TARGETS += $(COPY_ASYNC_PROFILER_BIN_TO_JRE) $(COPY_ASYNC_PROFILER_TO_JRE)
endif

################################################################################
# Debug symbols
# Since debug symbols are not included in the jmod files, they need to be copied
Expand Down
7 changes: 6 additions & 1 deletion make/MacBundles.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ ifeq ($(call isTargetOs, macosx), true)

MACOSX_PLIST_SRC := $(TOPDIR)/make/data/bundle

BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_SHORT)
# SapMachine 2023-06-24: ea bundles should have build number in CFBundleName
ifeq ($(VERSION_PRE), ea)
BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_STRING)
else
BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_SHORT)
endif
BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_STRING)
ifeq ($(COMPANY_NAME), N/A)
BUNDLE_VENDOR := UNDEFINED
Expand Down
15 changes: 15 additions & 0 deletions make/autoconf/jdk-options.m4
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,21 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
fi
AC_SUBST(COPYRIGHT_YEAR)
# SapMachine 2024-09-13: import async profiler binaries
AC_ARG_WITH(async-profiler-import-path, [AS_HELP_STRING([--with-async-profiler-import-path],
[Set import path for downloaded async profiler binaries])])
if test "x$with_async_profiler_import_path" != x; then
ASYNC_PROFILER_IMPORT_PATH="$with_async_profiler_import_path"
if test -f "$ASYNC_PROFILER_IMPORT_PATH/bin/asprof"; then
ASYNC_PROFILER_IMPORT_ENABLED=true
AC_MSG_NOTICE([asprof exists, enabling async-profiler import])
else
AC_MSG_ERROR([async-profiler import path was set, but asprof was not found])
fi
fi
AC_SUBST(ASYNC_PROFILER_IMPORT_PATH)
AC_SUBST(ASYNC_PROFILER_IMPORT_ENABLED)
# Override default library path
AC_ARG_WITH([jni-libpath], [AS_HELP_STRING([--with-jni-libpath],
[override default JNI library search path])])
Expand Down
34 changes: 19 additions & 15 deletions make/autoconf/spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,10 @@ CACERTS_SRC=@CACERTS_SRC@
# Enable unlimited crypto policy
UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@

# SapMachine 2024-09-13: import async profiler binaries
ASYNC_PROFILER_IMPORT_PATH=@ASYNC_PROFILER_IMPORT_PATH@
ASYNC_PROFILER_IMPORT_ENABLED=@ASYNC_PROFILER_IMPORT_ENABLED@

GCOV_ENABLED=@GCOV_ENABLED@
JCOV_ENABLED=@JCOV_ENABLED@
JCOV_HOME=@JCOV_HOME@
Expand Down Expand Up @@ -910,16 +914,16 @@ GRAAL_BUILDER_IMAGE_SUBDIR := graal-builder-jdk
GRAAL_BUILDER_IMAGE_DIR := $(IMAGES_OUTPUTDIR)/$(GRAAL_BUILDER_IMAGE_SUBDIR)

# Macosx bundles directory definitions
JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle
JRE_MACOSX_BUNDLE_SUBDIR=jre-bundle
JDK_MACOSX_BUNDLE_SUBDIR_SIGNED=jdk-bundle-signed
JRE_MACOSX_BUNDLE_SUBDIR_SIGNED=jre-bundle-signed
JDK_MACOSX_BUNDLE_SUBDIR=sapmachine-jdk-bundle
JRE_MACOSX_BUNDLE_SUBDIR=sapmachine-jre-bundle
JDK_MACOSX_BUNDLE_SUBDIR_SIGNED=sapmachine-jdk-bundle-signed
JRE_MACOSX_BUNDLE_SUBDIR_SIGNED=sapmachine-jre-bundle-signed
JDK_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR)
JRE_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR)
JDK_MACOSX_BUNDLE_DIR_SIGNED=$(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR_SIGNED)
JRE_MACOSX_BUNDLE_DIR_SIGNED=$(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR_SIGNED)
JDK_MACOSX_BUNDLE_TOP_DIR=jdk-$(VERSION_NUMBER).jdk
JRE_MACOSX_BUNDLE_TOP_DIR=jre-$(VERSION_NUMBER).jre
JDK_MACOSX_BUNDLE_TOP_DIR=sapmachine-jdk-$(VERSION_NUMBER).jdk
JRE_MACOSX_BUNDLE_TOP_DIR=sapmachine-jre-$(VERSION_NUMBER).jre
JDK_MACOSX_CONTENTS_SUBDIR=$(JDK_MACOSX_BUNDLE_TOP_DIR)/Contents
JRE_MACOSX_CONTENTS_SUBDIR=$(JRE_MACOSX_BUNDLE_TOP_DIR)/Contents
JDK_MACOSX_CONTENTS_DIR=$(JDK_MACOSX_BUNDLE_DIR)/$(JDK_MACOSX_CONTENTS_SUBDIR)
Expand All @@ -937,16 +941,16 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
else
JDK_BUNDLE_EXTENSION := tar.gz
endif
JDK_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
JRE_BUNDLE_NAME := jre-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
JDK_SYMBOLS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz
TEST_DEMOS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests-demos$(DEBUG_PART).tar.gz
TEST_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests$(DEBUG_PART).tar.gz
DOCS_JDK_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
JDK_BUNDLE_NAME := sapmachine-jdk-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
JRE_BUNDLE_NAME := sapmachine-jre-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
JDK_SYMBOLS_BUNDLE_NAME := sapmachine-jdk-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz
TEST_DEMOS_BUNDLE_NAME := sapmachine-jdk-$(BASE_NAME)_bin-tests-demos$(DEBUG_PART).tar.gz
TEST_BUNDLE_NAME := sapmachine-jdk-$(BASE_NAME)_bin-tests$(DEBUG_PART).tar.gz
DOCS_JDK_BUNDLE_NAME := sapmachine-jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
DOCS_JAVASE_BUNDLE_NAME := javase-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
DOCS_REFERENCE_BUNDLE_NAME := jdk-reference-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
STATIC_LIBS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-static-libs$(DEBUG_PART).tar.gz
JCOV_BUNDLE_NAME := jdk-jcov-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
DOCS_REFERENCE_BUNDLE_NAME := sapmachine-jdk-reference-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
STATIC_LIBS_BUNDLE_NAME := sapmachine-jdk-$(BASE_NAME)_bin-static-libs$(DEBUG_PART).tar.gz
JCOV_BUNDLE_NAME := sapmachine-jdk-jcov-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)

JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_BUNDLE_NAME)
JRE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JRE_BUNDLE_NAME)
Expand Down
24 changes: 24 additions & 0 deletions make/common/MakeBase.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,35 @@ ifeq ($(call isTargetOs, macosx), true)
$(XATTR) -cs '$(call DecodeSpace, $@)'; \
fi
endef

# SapMachine 2024-09-13: import async profiler binaries
ifeq ($(MACOSX_CODESIGN_MODE), disabled)
define install-file-and-sign
$(install-file)
$(ECHO) No Async profiler codesigning, codesign mode is $(MACOSX_CODESIGN_MODE)
endef
else
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
CODESIGN_APOPTS="$(MACOSX_CODESIGN_IDENTITY)" --timestamp --options runtime
else ifeq ($(MACOSX_CODESIGN_MODE), debug)
CODESIGN_APOPTS=-
PLIST_APOPT=-debug
endif
define install-file-and-sign
$(install-file)
$(CODESIGN) --remove-signature '$(call DecodeSpace, $@)'
$(CODESIGN) -f -s $(CODESIGN_APOPTS) --entitlements $(TOPDIR)/make/data/macosxsigning/default$(PLIST_APOPT).plist '$(call DecodeSpace, $@)'
endef
endif
else
define install-file
$(call MakeTargetDir)
$(CP) -fP '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'
endef
# SapMachine 2024-09-13: import async profiler binaries
define install-file-and-sign
$(install-file)
endef
endif

# Variant of install file that does not preserve symlinks
Expand Down
2 changes: 2 additions & 0 deletions make/common/modules/LauncherCommon.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,11 @@ define SetupBuildLauncherBody
ifeq ($(STATIC_BUILD), true)
$1_LDFLAGS += -exported_symbols_list \
$(SUPPORT_OUTPUTDIR)/build-static/exported.symbols
# SapMachine 2024-02-16: Add dt_filesocket implementation
$1_LIBS += \
$$(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_libs/java.base -name "*.a") \
$(SUPPORT_OUTPUTDIR)/modules_libs/jdk.jdwp.agent/libdt_socket.a \
$(SUPPORT_OUTPUTDIR)/modules_libs/jdk.jdwp.agent/libdt_filesocket.a \
$(SUPPORT_OUTPUTDIR)/modules_libs/jdk.jdwp.agent/libjdwp.a \
$(SUPPORT_OUTPUTDIR)/native/java.base/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX) \
-framework CoreFoundation \
Expand Down
Loading

0 comments on commit c3ca3b6

Please sign in to comment.