Skip to content

Commit 7ed7ea4

Browse files
committed
Merge branch 'sapmachine17' into pr-jdk-17.0.14+1
2 parents 70a227f + 3a20ceb commit 7ed7ea4

File tree

147 files changed

+19439
-104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+19439
-104
lines changed

.github/actions/upload-bundles/action.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ runs:
4141
id: bundles
4242
run: |
4343
# Rename bundles to consistent names
44-
jdk_bundle_zip="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
45-
jdk_bundle_tar_gz="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
46-
symbols_bundle="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}-symbols.tar.gz 2> /dev/null || true)"
47-
tests_bundle="$(ls build/*/bundles/jdk-*_bin-tests${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
44+
# SapMachine 2020-11-04: Adapt bundle names
45+
jdk_bundle_zip="$(ls build/*/bundles/sapmachine-jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
46+
jdk_bundle_tar_gz="$(ls build/*/bundles/sapmachine-jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
47+
symbols_bundle="$(ls build/*/bundles/sapmachine-jdk-*_bin${{ inputs.debug-suffix }}-symbols.tar.gz 2> /dev/null || true)"
48+
tests_bundle="$(ls build/*/bundles/sapmachine-jdk-*_bin-tests${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
4849
4950
mkdir bundles
5051

.github/pull_request_template.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The description of this pull request goes here.
2+
3+
fixes #Issue
4+

.github/workflows/main.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,18 @@
2323
# questions.
2424
#
2525

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

2829
on:
2930
push:
3031
branches-ignore:
31-
- master
32-
- pr/*
32+
# SapMachine 2020-11-04: Ignore sapmachine branch
33+
- sapmachine17
34+
# SapMachine 2020-11-04: Trigger on pull request
35+
pull_request:
36+
branches:
37+
- sapmachine17
3338
workflow_dispatch:
3439
inputs:
3540
platforms:
@@ -55,6 +60,8 @@ jobs:
5560

5661
select:
5762
name: 'Select platforms'
63+
# 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.
64+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}
5865
runs-on: ubuntu-22.04
5966
outputs:
6067
linux-x64: ${{ steps.include.outputs.linux-x64 }}
@@ -79,7 +86,8 @@ jobs:
7986
function check_platform() {
8087
if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
8188
input='${{ github.event.inputs.platforms }}'
82-
elif [[ $GITHUB_EVENT_NAME == push ]]; then
89+
# SapMachine 2022-06-24: Also handle 'pull_request' event.
90+
elif [[ $GITHUB_EVENT_NAME == push ]] || [[ $GITHUB_EVENT_NAME == pull_request ]]; then
8391
if [[ '${{ !secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then
8492
# If JDK_SUBMIT_FILTER is set, and this is not a "submit/" branch, don't run anything
8593
>&2 echo 'JDK_SUBMIT_FILTER is set and not a "submit/" branch'
@@ -316,7 +324,8 @@ jobs:
316324
remove-bundles:
317325
name: 'Remove bundle artifacts'
318326
runs-on: ubuntu-22.04
319-
if: always()
327+
# 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.
328+
if: ${{ github.event_name != 'pull_request' || github.repository != 'SAP/SapMachine' }}
320329
needs:
321330
- build-linux-x64
322331
- build-linux-x86-hs

README.md

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,46 @@
1-
# Welcome to the JDK!
1+
[![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)
22

3-
For build instructions please see the
4-
[online documentation](https://openjdk.java.net/groups/build/doc/building.html),
5-
or either of these files:
3+
<img align="right" width=350 src="https://sap.github.io/SapMachine/assets/images/logo_circular.svg">
64

7-
- [doc/building.html](doc/building.html) (html version)
8-
- [doc/building.md](doc/building.md) (markdown version)
5+
# [](#SapMachine) SapMachine
6+
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.
97

10-
See <https://openjdk.java.net/> for more information about
11-
the OpenJDK Community and the JDK.
8+
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:
9+
10+
* 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.
11+
12+
* 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/)).
13+
14+
* 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).
15+
16+
* Leading the [PowerPC/AIX porting project](http://openjdk.java.net/projects/ppc-aix-port/).
17+
18+
* Contributing as many of our features as possible to the OpenJDK project and keep the diff of this project as small as possible.
19+
20+
21+
## Downloads
22+
23+
Check out the [Download](https://sap.github.io/SapMachine/#download) section on [https://sapmachine.io](https://sapmachine.io).
24+
25+
## Documentation
26+
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:
27+
* [Installation](https://github.com/SAP/SapMachine/wiki/Installation) and [Docker Images](https://github.com/SAP/SapMachine/wiki/Docker-Images)
28+
* [Certifications and Java Compatibility](https://github.com/SAP/SapMachine/wiki/Certification-and-Java-Compatibility)
29+
* [SapMachine Development Process](https://github.com/SAP/SapMachine/wiki/SapMachine-Development-Process)
30+
31+
## Have an issue?
32+
If it's SapMachine specific please let us know by filing a [new issue](https://github.com/SAP/SapMachine/issues/new).
33+
34+
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.).
35+
36+
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.
37+
38+
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).
39+
40+
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).
41+
42+
## Contributing
43+
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.
44+
45+
## License
46+
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.

make/Bundles.gmk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
172172
else
173173
JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR)
174174
JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR)
175-
JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER)
176-
JRE_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)
175+
JDK_BUNDLE_SUBDIR := sapmachine-jdk-$(VERSION_NUMBER)
176+
JRE_BUNDLE_SUBDIR := sapmachine-jre-$(VERSION_NUMBER)
177177
ifneq ($(DEBUG_LEVEL), release)
178178
JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
179179
JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)

make/Images.gmk

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ ALL_MODULES := $(call FindAllModules)
4343

4444
$(eval $(call ReadImportMetaData))
4545

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

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

231232
endif
232233

234+
################################################################################
235+
# SapMachine 2024-09-13: Async profiler import
236+
237+
ifeq ($(call isTargetOs, linux macosx)+$(ASYNC_PROFILER_IMPORT_ENABLED), true+true)
238+
239+
$(eval $(call SetupCopyFiles, COPY_ASYNC_PROFILER_BIN_TO_JDK, \
240+
SRC := $(ASYNC_PROFILER_IMPORT_PATH), \
241+
DEST := $(JDK_IMAGE_DIR), \
242+
FILES := bin/asprof lib/libasyncProfiler$(SHARED_LIBRARY_SUFFIX), \
243+
MACRO := install-file-and-sign, \
244+
))
245+
246+
$(eval $(call SetupCopyFiles, COPY_ASYNC_PROFILER_BIN_TO_JRE, \
247+
SRC := $(ASYNC_PROFILER_IMPORT_PATH), \
248+
DEST := $(JRE_IMAGE_DIR), \
249+
FILES := bin/asprof lib/libasyncProfiler$(SHARED_LIBRARY_SUFFIX), \
250+
MACRO := install-file-and-sign, \
251+
))
252+
253+
$(eval $(call SetupCopyFiles, COPY_ASYNC_PROFILER_TO_JDK, \
254+
SRC := $(ASYNC_PROFILER_IMPORT_PATH), \
255+
DEST := $(JDK_IMAGE_DIR), \
256+
FILES := lib/async-profiler.jar lib/converter.jar legal/async/CHANGELOG.md legal/async/LICENSE legal/async/README.md, \
257+
))
258+
259+
$(eval $(call SetupCopyFiles, COPY_ASYNC_PROFILER_TO_JRE, \
260+
SRC := $(ASYNC_PROFILER_IMPORT_PATH), \
261+
DEST := $(JRE_IMAGE_DIR), \
262+
FILES := lib/async-profiler.jar lib/converter.jar legal/async/CHANGELOG.md legal/async/LICENSE legal/async/README.md, \
263+
))
264+
265+
JDK_TARGETS += $(COPY_ASYNC_PROFILER_BIN_TO_JDK) $(COPY_ASYNC_PROFILER_TO_JDK)
266+
JRE_TARGETS += $(COPY_ASYNC_PROFILER_BIN_TO_JRE) $(COPY_ASYNC_PROFILER_TO_JRE)
267+
endif
268+
233269
################################################################################
234270
# Debug symbols
235271
# Since debug symbols are not included in the jmod files, they need to be copied

make/MacBundles.gmk

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ ifeq ($(call isTargetOs, macosx), true)
3838

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

41-
BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_SHORT)
41+
# SapMachine 2023-06-24: ea bundles should have build number in CFBundleName
42+
ifeq ($(VERSION_PRE), ea)
43+
BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_STRING)
44+
else
45+
BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_SHORT)
46+
endif
4247
BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_STRING)
4348
ifeq ($(COMPANY_NAME), N/A)
4449
BUNDLE_VENDOR := UNDEFINED

make/autoconf/jdk-options.m4

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,21 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
238238
fi
239239
AC_SUBST(COPYRIGHT_YEAR)
240240
241+
# SapMachine 2024-09-13: import async profiler binaries
242+
AC_ARG_WITH(async-profiler-import-path, [AS_HELP_STRING([--with-async-profiler-import-path],
243+
[Set import path for downloaded async profiler binaries])])
244+
if test "x$with_async_profiler_import_path" != x; then
245+
ASYNC_PROFILER_IMPORT_PATH="$with_async_profiler_import_path"
246+
if test -f "$ASYNC_PROFILER_IMPORT_PATH/bin/asprof"; then
247+
ASYNC_PROFILER_IMPORT_ENABLED=true
248+
AC_MSG_NOTICE([asprof exists, enabling async-profiler import])
249+
else
250+
AC_MSG_ERROR([async-profiler import path was set, but asprof was not found])
251+
fi
252+
fi
253+
AC_SUBST(ASYNC_PROFILER_IMPORT_PATH)
254+
AC_SUBST(ASYNC_PROFILER_IMPORT_ENABLED)
255+
241256
# Override default library path
242257
AC_ARG_WITH([jni-libpath], [AS_HELP_STRING([--with-jni-libpath],
243258
[override default JNI library search path])])

make/autoconf/spec.gmk.in

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,10 @@ CACERTS_SRC=@CACERTS_SRC@
418418
# Enable unlimited crypto policy
419419
UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
420420

421+
# SapMachine 2024-09-13: import async profiler binaries
422+
ASYNC_PROFILER_IMPORT_PATH=@ASYNC_PROFILER_IMPORT_PATH@
423+
ASYNC_PROFILER_IMPORT_ENABLED=@ASYNC_PROFILER_IMPORT_ENABLED@
424+
421425
GCOV_ENABLED=@GCOV_ENABLED@
422426
JCOV_ENABLED=@JCOV_ENABLED@
423427
JCOV_HOME=@JCOV_HOME@
@@ -910,16 +914,16 @@ GRAAL_BUILDER_IMAGE_SUBDIR := graal-builder-jdk
910914
GRAAL_BUILDER_IMAGE_DIR := $(IMAGES_OUTPUTDIR)/$(GRAAL_BUILDER_IMAGE_SUBDIR)
911915

912916
# Macosx bundles directory definitions
913-
JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle
914-
JRE_MACOSX_BUNDLE_SUBDIR=jre-bundle
915-
JDK_MACOSX_BUNDLE_SUBDIR_SIGNED=jdk-bundle-signed
916-
JRE_MACOSX_BUNDLE_SUBDIR_SIGNED=jre-bundle-signed
917+
JDK_MACOSX_BUNDLE_SUBDIR=sapmachine-jdk-bundle
918+
JRE_MACOSX_BUNDLE_SUBDIR=sapmachine-jre-bundle
919+
JDK_MACOSX_BUNDLE_SUBDIR_SIGNED=sapmachine-jdk-bundle-signed
920+
JRE_MACOSX_BUNDLE_SUBDIR_SIGNED=sapmachine-jre-bundle-signed
917921
JDK_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR)
918922
JRE_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR)
919923
JDK_MACOSX_BUNDLE_DIR_SIGNED=$(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR_SIGNED)
920924
JRE_MACOSX_BUNDLE_DIR_SIGNED=$(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR_SIGNED)
921-
JDK_MACOSX_BUNDLE_TOP_DIR=jdk-$(VERSION_NUMBER).jdk
922-
JRE_MACOSX_BUNDLE_TOP_DIR=jre-$(VERSION_NUMBER).jre
925+
JDK_MACOSX_BUNDLE_TOP_DIR=sapmachine-jdk-$(VERSION_NUMBER).jdk
926+
JRE_MACOSX_BUNDLE_TOP_DIR=sapmachine-jre-$(VERSION_NUMBER).jre
923927
JDK_MACOSX_CONTENTS_SUBDIR=$(JDK_MACOSX_BUNDLE_TOP_DIR)/Contents
924928
JRE_MACOSX_CONTENTS_SUBDIR=$(JRE_MACOSX_BUNDLE_TOP_DIR)/Contents
925929
JDK_MACOSX_CONTENTS_DIR=$(JDK_MACOSX_BUNDLE_DIR)/$(JDK_MACOSX_CONTENTS_SUBDIR)
@@ -937,16 +941,16 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
937941
else
938942
JDK_BUNDLE_EXTENSION := tar.gz
939943
endif
940-
JDK_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
941-
JRE_BUNDLE_NAME := jre-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
942-
JDK_SYMBOLS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz
943-
TEST_DEMOS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests-demos$(DEBUG_PART).tar.gz
944-
TEST_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests$(DEBUG_PART).tar.gz
945-
DOCS_JDK_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
944+
JDK_BUNDLE_NAME := sapmachine-jdk-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
945+
JRE_BUNDLE_NAME := sapmachine-jre-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
946+
JDK_SYMBOLS_BUNDLE_NAME := sapmachine-jdk-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz
947+
TEST_DEMOS_BUNDLE_NAME := sapmachine-jdk-$(BASE_NAME)_bin-tests-demos$(DEBUG_PART).tar.gz
948+
TEST_BUNDLE_NAME := sapmachine-jdk-$(BASE_NAME)_bin-tests$(DEBUG_PART).tar.gz
949+
DOCS_JDK_BUNDLE_NAME := sapmachine-jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
946950
DOCS_JAVASE_BUNDLE_NAME := javase-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
947-
DOCS_REFERENCE_BUNDLE_NAME := jdk-reference-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
948-
STATIC_LIBS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-static-libs$(DEBUG_PART).tar.gz
949-
JCOV_BUNDLE_NAME := jdk-jcov-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
951+
DOCS_REFERENCE_BUNDLE_NAME := sapmachine-jdk-reference-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
952+
STATIC_LIBS_BUNDLE_NAME := sapmachine-jdk-$(BASE_NAME)_bin-static-libs$(DEBUG_PART).tar.gz
953+
JCOV_BUNDLE_NAME := sapmachine-jdk-jcov-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
950954

951955
JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_BUNDLE_NAME)
952956
JRE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JRE_BUNDLE_NAME)

make/common/MakeBase.gmk

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,35 @@ ifeq ($(call isTargetOs, macosx), true)
293293
$(XATTR) -cs '$(call DecodeSpace, $@)'; \
294294
fi
295295
endef
296+
297+
# SapMachine 2024-09-13: import async profiler binaries
298+
ifeq ($(MACOSX_CODESIGN_MODE), disabled)
299+
define install-file-and-sign
300+
$(install-file)
301+
$(ECHO) No Async profiler codesigning, codesign mode is $(MACOSX_CODESIGN_MODE)
302+
endef
303+
else
304+
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
305+
CODESIGN_APOPTS="$(MACOSX_CODESIGN_IDENTITY)" --timestamp --options runtime
306+
else ifeq ($(MACOSX_CODESIGN_MODE), debug)
307+
CODESIGN_APOPTS=-
308+
PLIST_APOPT=-debug
309+
endif
310+
define install-file-and-sign
311+
$(install-file)
312+
$(CODESIGN) --remove-signature '$(call DecodeSpace, $@)'
313+
$(CODESIGN) -f -s $(CODESIGN_APOPTS) --entitlements $(TOPDIR)/make/data/macosxsigning/default$(PLIST_APOPT).plist '$(call DecodeSpace, $@)'
314+
endef
315+
endif
296316
else
297317
define install-file
298318
$(call MakeTargetDir)
299319
$(CP) -fP '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'
300320
endef
321+
# SapMachine 2024-09-13: import async profiler binaries
322+
define install-file-and-sign
323+
$(install-file)
324+
endef
301325
endif
302326

303327
# Variant of install file that does not preserve symlinks

0 commit comments

Comments
 (0)