Skip to content

Commit

Permalink
8264224: Add macosx-aarch64 to Oracle build configurations
Browse files Browse the repository at this point in the history
Reviewed-by: serb, erikj
  • Loading branch information
vidmik committed Apr 13, 2021
1 parent f4e6395 commit 008fc75
Showing 1 changed file with 41 additions and 16 deletions.
57 changes: 41 additions & 16 deletions make/conf/jib-profiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ var getJibProfilesCommon = function (input, data) {

// List of the main profile names used for iteration
common.main_profile_names = [
"linux-x64", "linux-x86", "macosx-x64",
"linux-x64", "linux-x86", "macosx-x64", "macosx-aarch64",
"windows-x64", "windows-x86", "windows-aarch64",
"linux-aarch64", "linux-arm32", "linux-ppc64le", "linux-s390x"
];
Expand Down Expand Up @@ -396,7 +396,7 @@ var getJibProfilesCommon = function (input, data) {
};
};

common.boot_jdk_version = "15";
common.boot_jdk_version = (input.build_os == 'macosx' && input.build_cpu == 'aarch64') ? "16" : "15";
common.boot_jdk_build_number = "36";
common.boot_jdk_home = input.get("boot_jdk", "install_path") + "/jdk-"
+ common.boot_jdk_version
Expand Down Expand Up @@ -447,6 +447,14 @@ var getJibProfilesProfiles = function (input, common, data) {
"SETFILE=/usr/bin/SetFile"),
},

"macosx-aarch64": {
target_os: "macosx",
target_cpu: "aarch64",
dependencies: ["devkit", "gtest"],
configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
"--with-macosx-version-max=11.00.00"),
},

"windows-x64": {
target_os: "windows",
target_cpu: "x64",
Expand Down Expand Up @@ -557,7 +565,7 @@ var getJibProfilesProfiles = function (input, common, data) {
});

// Generate -gcov profiles
[ "linux-aarch64", "linux-x64", "macosx-x64" ].forEach(function (name) {
[ "linux-aarch64", "linux-x64", "macosx-x64", "macosx-aarch64" ].forEach(function (name) {
var gcovName = name + "-gcov";
profiles[gcovName] = clone(profiles[name]);
profiles[gcovName].default_make_targets = ["product-bundles", "test-bundles"];
Expand Down Expand Up @@ -646,7 +654,7 @@ var getJibProfilesProfiles = function (input, common, data) {
});

// JCov profiles build JCov-instrumented JDK image based on images provided through dependencies.
[ "linux-aarch64", "linux-x64", "macosx-x64", "windows-x64" ]
[ "linux-aarch64", "linux-x64", "macosx-x64", "macosx-aarch64", "windows-x64" ]
.forEach(function (name) {
var jcovName = name + "-jcov";
profiles[jcovName] = clone(common.main_profile_base);
Expand Down Expand Up @@ -675,6 +683,10 @@ var getJibProfilesProfiles = function (input, common, data) {
platform: "osx-x64",
jdk_subdir: "jdk-" + data.version + ".jdk/Contents/Home",
},
"macosx-aarch64": {
platform: "osx-aarch64",
jdk_subdir: "jdk-" + data.version + ".jdk/Contents/Home",
},
"windows-x64": {
platform: "windows-x64",
jdk_suffix: "zip",
Expand Down Expand Up @@ -842,7 +854,7 @@ var getJibProfilesProfiles = function (input, common, data) {
});

// Artifacts of JCov profiles
[ "linux-aarch64", "linux-x64", "macosx-x64", "windows-x64" ]
[ "linux-aarch64", "linux-x64", "macosx-x64", "macosx-aarch64", "windows-x64" ]
.forEach(function (name) {
var o = artifactData[name]
var jdk_subdir = (o.jdk_subdir != null ? o.jdk_subdir : "jdk-" + data.version);
Expand All @@ -862,7 +874,7 @@ var getJibProfilesProfiles = function (input, common, data) {
});

// Artifacts of gcov (native-code-coverage) profiles
[ "linux-aarch64", "linux-x64", "macosx-x64" ].forEach(function (name) {
[ "linux-aarch64", "linux-x64", "macosx-x64", "macosx-aarch64" ].forEach(function (name) {
var o = artifactData[name]
var pf = o.platform
var jdk_subdir = (o.jdk_subdir != null ? o.jdk_subdir : "jdk-" + data.version);
Expand Down Expand Up @@ -1066,13 +1078,18 @@ var getJibProfilesDependencies = function (input, common) {
boot_jdk_platform = "windows-" + input.build_cpu;
boot_jdk_ext = ".zip";
}

var makeBinDir = (input.build_os == "windows"
? input.get("gnumake", "install_path") + "/cygwin/bin"
: input.get("gnumake", "install_path") + "/bin");

var dependencies = {
boot_jdk: {
var boot_jdk;
if (boot_jdk_platform == 'osx-aarch64') {
boot_jdk = {
organization: common.organization,
ext: "tar.gz",
module: "jdk-macosx_aarch64",
revision: "16+1.0-beta1",
configure_args: "--with-boot-jdk=" + common.boot_jdk_home,
environment_path: common.boot_jdk_home + "/bin"
}
} else {
boot_jdk = {
server: "jpg",
product: "jdk",
version: common.boot_jdk_version,
Expand All @@ -1081,7 +1098,15 @@ var getJibProfilesDependencies = function (input, common) {
+ boot_jdk_platform + "_bin" + boot_jdk_ext,
configure_args: "--with-boot-jdk=" + common.boot_jdk_home,
environment_path: common.boot_jdk_home + "/bin"
},
}
}

var makeBinDir = (input.build_os == "windows"
? input.get("gnumake", "install_path") + "/cygwin/bin"
: input.get("gnumake", "install_path") + "/bin");

var dependencies = {
boot_jdk: boot_jdk,

devkit: {
organization: common.organization,
Expand All @@ -1103,8 +1128,8 @@ var getJibProfilesDependencies = function (input, common) {
lldb: {
organization: common.organization,
ext: "tar.gz",
module: "devkit-macosx_x64",
revision: "Xcode11.3.1-MacOSX10.15+1.1",
module: "devkit-macosx" + (input.build_cpu == "x64" ? "_x64" : ""),
revision: (input.build_cpu == "x64" ? "Xcode11.3.1-MacOSX10.15+1.1" : devkit_platform_revisions[devkit_platform])
},

cups: {
Expand Down

1 comment on commit 008fc75

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.