Backed out changeset 3457f931cf65 (bug 1722437) for causing OS X AArch64 build bustage. CLOSED TREE

This commit is contained in:
Sandor Molnar 2021-07-30 23:16:15 +03:00
parent 01917ee5ce
commit 9137cd9ae2
3 changed files with 31 additions and 4 deletions

View File

@ -1,6 +1,5 @@
# This file is sourced by the nightly, beta, and release mozconfigs.
. $topsrcdir/build/mozconfig.wasm-sandboxing
. $topsrcdir/build/macosx/mozconfig.common
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}

View File

@ -218,7 +218,6 @@ macosx64-aarch64-devedition/opt:
- linux64-cctools-port
- linux64-clang-macosx-cross
- macosx64-sdk-11.0
- wasi-sysroot
macosx64-devedition/opt:
description: "MacOS X Dev Edition Universal"
@ -477,7 +476,6 @@ macosx64-aarch64-shippable/opt:
- linux64-cctools-port
- linux64-clang-macosx-cross
- macosx64-sdk-11.0
- wasi-sysroot
macosx64-shippable/opt:
description: "MacOS X Universal"

View File

@ -5,7 +5,9 @@
import argparse
import os
import six
import sys
import buildconfig
import mozpack.path as mozpath
from mozpack.packager.formats import (
FlatFormatter,
JarFormatter,
@ -23,6 +25,34 @@ from mozpack.packager.unpack import UnpackFinder
from mozpack.unify import UnifiedBuildFinder
# At the moment, rlbox is not supported on aarch64, so we need to allow
# the files to be missing on the aarch64 half of the build. This also
# means the precomplete file doesn't match, and we want to keep the x86_64
# version which contains the extra lines for the wasm libs.
WASM_LIBS = ("Contents/MacOS/librlbox.dylib",)
class UnifiedBuildFinderWasmHack(UnifiedBuildFinder):
def unify_file(self, path, file1, file2):
if path in WASM_LIBS:
# When this assert hits, it means rlbox is supported on aarch64,
# and this override, as well as precomplete below, can be removed.
assert not file2
return file1
if file1 and file2 and path == "Contents/Resources/precomplete":
# Check that the only differences are because of the missing wasm libs.
wasm_lines = ['remove "{}"\n'.format(l).encode("utf-8") for l in WASM_LIBS]
content1 = [
l
for l in file1.open().readlines()
if not any(x == l for x in wasm_lines)
]
content2 = file2.open().readlines()
if content1 == content2:
return file1
return super(UnifiedBuildFinderWasmHack, self).unify_file(path, file1, file2)
def main():
parser = argparse.ArgumentParser(
description="Merge two builds of a Gecko-based application into a Universal build"
@ -44,7 +74,7 @@ def main():
app1_finder = UnpackFinder(FileFinder(options.app1, find_executables=True))
app2_finder = UnpackFinder(FileFinder(options.app2, find_executables=True))
app_finder = UnifiedBuildFinder(app1_finder, app2_finder)
app_finder = UnifiedBuildFinderWasmHack(app1_finder, app2_finder)
copier = FileCopier()
compress = min(app1_finder.compressed, JAR_DEFLATED)