Bug 1665754 - Setup an Apple silicon macos build. r=firefox-build-system-reviewers,dmajor

Baby steps. This adds an unsigned non-universal Apple silicon-only macos
build.

Differential Revision: https://phabricator.services.mozilla.com/D96339
This commit is contained in:
Mike Hommey 2020-11-10 08:46:22 +00:00
Родитель 5f83f09c93
Коммит af02c91f37
10 изменённых файлов: 160 добавлений и 1 удалений

Просмотреть файл

@ -0,0 +1,5 @@
. "$topsrcdir/browser/config/mozconfigs/macosx64-aarch64/common-opt"
ac_add_options --enable-official-branding
. "$topsrcdir/build/mozconfig.common.override"

Просмотреть файл

@ -0,0 +1,24 @@
# This file is sourced by the nightly, beta, and release mozconfigs.
. $topsrcdir/build/macosx/mozconfig.common
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
if test `uname -s` != Linux; then
APIKEYDIR="${APIKEYDIR:-${WORKSPACE}}"
else
APIKEYDIR="${APIKEYDIR:-/builds}"
fi
ac_add_options --with-google-location-service-api-keyfile=${APIKEYDIR}/gls-gapi.data
ac_add_options --with-google-safebrowsing-api-keyfile=${APIKEYDIR}/sb-gapi.data
ac_add_options --with-mozilla-api-keyfile=${APIKEYDIR}/mozilla-desktop-geoloc-api.key
# Needed to enable breakpad in application.ini
export MOZILLA_OFFICIAL=1
# Package js shell.
export MOZ_PACKAGE_JSSHELL=1
ac_add_options --target=aarch64-apple-darwin
export MACOS_SDK_DIR=/Applications/Xcode-12.2.Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk

Просмотреть файл

@ -0,0 +1,17 @@
. "$topsrcdir/browser/config/mozconfigs/macosx64-aarch64/common-opt"
ac_add_options --enable-instruments
# Cross-compiled builds fail when dtrace is enabled
if test `uname -s` != Linux; then
ac_add_options --enable-dtrace
fi
ac_add_options --with-branding=browser/branding/nightly
# STRIP_FLAGS is only valid for builds that strip; code coverage builds disable stripping
if [ -z "$NOSTRIP_BUILD" ] && [ -z "$USE_ARTIFACT" ]; then
ac_add_options STRIP_FLAGS=-S
fi
. "$topsrcdir/build/mozconfig.common.override"

Просмотреть файл

@ -0,0 +1,12 @@
# This make file should be identical to the beta mozconfig, apart from the
# safeguard below
. "$topsrcdir/browser/config/mozconfigs/macosx64-aarch64/common-opt"
ac_add_options --enable-official-branding
# safeguard against someone forgetting to re-set EARLY_BETA_OR_EARLIER in
# defines.sh during the beta cycle
export BUILDING_RELEASE=1
. "$topsrcdir/build/mozconfig.common.override"

Просмотреть файл

@ -29,3 +29,5 @@ fi
if [ -z "$CXX" ]; then
export CXX=clang++
fi
export DUMP_SYMS="$MOZ_FETCHES_DIR/dump_syms/dump_syms"

Просмотреть файл

@ -23,6 +23,7 @@ jobs-from:
- linux.yml
- linux-base-toolchains.yml
- macosx.yml
- macosx-native.yml
- windows.yml
- windows-mingw.yml

Просмотреть файл

@ -0,0 +1,47 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
---
job-defaults:
index:
product: firefox
worker-type: b-osx-1015
worker:
max-run-time: 7200
run:
using: mozharness
actions: [get-secrets, build]
script: "mozharness/scripts/fx_desktop_build.py"
macosx64-aarch64/opt:
description: "MacOS X Aarch64"
index:
job-name: macosx64-aarch64-opt
attributes:
skip-verify-test-packaging: true
treeherder:
platform: osx-aarch64/opt
symbol: B
tier: 1
worker:
env:
MOZ_AUTOMATION_PACKAGE_TESTS: "1"
PERFHERDER_EXTRA_OPTIONS: aarch64
run:
config:
- builds/releng_base_firefox.py
- builds/taskcluster_base_macosx.py
- taskcluster_nightly.py
secrets: true
extra-config:
disable_package_metrics: true
stage_platform: macosx64
mozconfig_platform: macosx64-aarch64
run-on-projects: ['integration']
fetches:
toolchain:
- macosx64-cbindgen
- macosx64-dump-syms
- macosx64-nasm
- macosx64-node
- macosx64-rust-nightly

Просмотреть файл

@ -146,6 +146,17 @@ win64-rust-1.47:
]
toolchain-alias: win64-rust
macosx64-rust-nightly:
treeherder:
symbol: TM(rust-nightly)
run:
arguments: [
'--channel', 'nightly-2020-11-09',
'--host', 'x86_64-apple-darwin',
'--target', 'x86_64-apple-darwin',
'--target', 'aarch64-apple-darwin',
]
mingw32-rust-1.47:
treeherder:
symbol: TMW(rust)

Просмотреть файл

@ -0,0 +1,40 @@
import os
config = {
"default_actions": [
"get-secrets",
"build",
],
"vcs_share_base": os.path.join(os.getcwd(), "checkouts", "hg-shared"),
"max_build_output_timeout": 60 * 80,
"env": {
"HG_SHARE_BASE_DIR": os.path.join(os.getcwd(), "checkouts", "hg-shared"),
"MOZBUILD_STATE_PATH": os.path.join(os.getcwd(), ".mozbuild"),
"MOZ_CRASHREPORTER_NO_REPORT": "1",
"MOZ_OBJDIR": "%(abs_obj_dir)s",
"TINDERBOX_OUTPUT": "1",
"WORKSPACE": "%(base_work_dir)s",
"PATH": "/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin",
},
"upload_env": {
"UPLOAD_PATH": os.path.join(os.getcwd(), "public", "build"),
},
"secret_files": [
{
"filename": "gls-gapi.data",
"secret_name": "project/releng/gecko/build/level-%(scm-level)s/gls-gapi.data",
"min_scm_level": 1,
},
{
"filename": "sb-gapi.data",
"secret_name": "project/releng/gecko/build/level-%(scm-level)s/sb-gapi.data",
"min_scm_level": 1,
},
{
"filename": "mozilla-desktop-geoloc-api.key",
"secret_name": "project/releng/gecko/build/level-%(scm-level)s/mozilla-desktop-geoloc-api.key",
"min_scm_level": 2,
"default": "try-build-has-no-secrets",
},
],
}

Просмотреть файл

@ -9,7 +9,7 @@ use rustc_version::{version, Version};
fn main() {
let ver = version().unwrap();
let mut bootstrap = false;
let max_oom_hook_version = Version::parse("1.49.0-alpha").unwrap();
let max_oom_hook_version = Version::parse("1.50.0-alpha").unwrap();
if ver >= Version::parse("1.28.0-alpha").unwrap() && ver < max_oom_hook_version {
println!("cargo:rustc-cfg=feature=\"oom_with_hook\"");