forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backed out 6 changesets (bug 1738845, bug 1773223, bug 1760484) for c…
…ausing multiple failures CLOSED TREE Backed out changeset e759ac4fb646 (bug 1773223) Backed out changeset 20c541be9a37 (bug 1760484) Backed out changeset 653d2024a187 (bug 1738845) Backed out changeset fd9540114bfd (bug 1773223) Backed out changeset f24f3dfa49aa (bug 1773223) Backed out changeset 11f3375a4a70 (bug 1773223)
- Loading branch information
smolnar
committed
Jun 21, 2022
1 parent
a8774c5
commit feea995
Showing
446 changed files
with
1,492,039 additions
and
8,679 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- | ||
# vim: set filetype=python: | ||
# 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/. | ||
|
||
gn_vars = {} | ||
|
||
if CONFIG['MOZ_DEBUG']: | ||
gn_vars['is_debug'] = True | ||
else: | ||
gn_vars['is_debug'] = False | ||
|
||
os = CONFIG['OS_TARGET'] | ||
|
||
if CONFIG['MOZ_X11']: | ||
gn_vars['use_x11'] = True | ||
elif os == "Linux": | ||
# Only set use_x11 explicitly to false on Linux for no-x11 variants | ||
gn_vars['use_x11'] = False | ||
|
||
flavors = { | ||
'WINNT': 'win', | ||
'Android': 'android', | ||
'Linux': 'linux', | ||
'Darwin': 'mac' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' else 'ios', | ||
'SunOS': 'solaris', | ||
'GNU/kFreeBSD': 'freebsd', | ||
'DragonFly': 'dragonfly', | ||
'FreeBSD': 'freebsd', | ||
'NetBSD': 'netbsd', | ||
'OpenBSD': 'openbsd', | ||
} | ||
gn_vars['target_os'] = flavors.get(os) | ||
|
||
arches = { | ||
'x86_64': 'x64', | ||
'aarch64': 'arm64', | ||
} | ||
|
||
gn_vars['host_cpu'] = arches.get(CONFIG['HOST_CPU_ARCH'], CONFIG['HOST_CPU_ARCH']) | ||
gn_vars['target_cpu'] = arches.get(CONFIG['CPU_ARCH'], CONFIG['CPU_ARCH']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
dom/media/webrtc/third_party_build/gn-configs/fixup_json.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env python3 | ||
# 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/. | ||
import os | ||
import re | ||
import sys | ||
|
||
|
||
def main(): | ||
# Check and retrieve command-line arguments | ||
if len(sys.argv) != 2: | ||
print(__doc__) | ||
sys.exit(1) # Return a non-zero value to indicate abnormal termination | ||
filein = sys.argv[1] | ||
|
||
if not os.path.isfile(filein): | ||
print("error: {} does not exist".format(filein)) | ||
sys.exit(1) | ||
|
||
f = open(filein, "r") | ||
file = f.read() | ||
|
||
# In practice, almost all of the entries in the cflags section have no affect | ||
# on the moz.build output files when running ./mach build-backend -b GnMozbuildWriter | ||
# There are few exceptions which do: -msse2, -mavx2, -mfma, -fobjc-arc | ||
# However, since we're really concerned about removing differences between development | ||
# machines, we only need remove the reference to osx sdk. Removing it doesn't change | ||
# the generated moz.build files and makes diffs much easier to see. | ||
file = re.sub( | ||
r' *"-isysroot",\n *".*/Contents/Developer/Platforms/MacOSX\.platform/Developer/SDKs/' | ||
'MacOSX([0-9]+\.[0-9]+)?\.sdk",\n', | ||
r"", | ||
file, | ||
) | ||
f.close() | ||
|
||
f = open(filein, "w") | ||
f.write(file) | ||
f.close() | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
82 changes: 82 additions & 0 deletions
82
dom/media/webrtc/third_party_build/gn-configs/generate-gn-build-files.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
#!/bin/bash | ||
|
||
# Print an Error message if `set -eE` causes the script to exit due to a failed command | ||
trap 'echo "*** ERROR *** $? $LINENO Generation did not complete successfully!"' ERR | ||
|
||
# If DEBUG_GEN is set all commands should be printed as they are executed | ||
if [ ! "x$DEBUG_GEN" = "x" ]; then | ||
set -x | ||
fi | ||
|
||
if [ "x$GN" = "x" ]; then | ||
echo "GN is not defined, see README.md" | ||
exit | ||
fi | ||
|
||
if [ -f $GN ]; then | ||
echo "GN is $GN" | ||
else | ||
echo "Path $GN is not found, see README.md" | ||
exit | ||
fi | ||
|
||
# After this point: | ||
# * eE: All commands should succede. | ||
# * u: All variables should be defined before use. | ||
# * o pipefail: All stages of all pipes should succede. | ||
set -eEuo pipefail | ||
|
||
SYS_NAME=`uname` | ||
|
||
# Check for modified files and abort if present. | ||
MODIFIED_FILES=`hg status --modified --added --exclude "**/moz.build" --exclude "dom/media/webrtc/third_party_build/**.json"` | ||
if [ "x$MODIFIED_FILES" = "x" ]; then | ||
# Completely clean the mercurial checkout before proceeding | ||
hg update -C -r . | ||
hg purge | ||
else | ||
echo "There are modified files in the checkout. Cowardly aborting!" | ||
echo "$MODIFIED_FILES" | ||
exit 1 | ||
fi | ||
|
||
CONFIG_DIR=dom/media/webrtc/third_party_build/gn-configs | ||
echo "CONFIG_DIR is $CONFIG_DIR" | ||
|
||
export MOZ_OBJDIR=$(mktemp -d -p . obj-XXXXXXXXXX) | ||
./mach configure | ||
if [ ! -d $MOZ_OBJDIR ]; then | ||
echo "Expected build output directory $MOZ_OBJDIR is missing" | ||
exit 1 | ||
fi | ||
./mach build-backend -b GnConfigGen --verbose | tee $MOZ_OBJDIR/build-backend.log | ||
cp $MOZ_OBJDIR/third_party/libwebrtc/gn-output/*.json $CONFIG_DIR | ||
|
||
# run some fixup (mostly removing dev-machine dependent info) on json files | ||
for THIS_CONFIG in $CONFIG_DIR/*.json | ||
do | ||
echo "fixup file: $THIS_CONFIG" | ||
./$CONFIG_DIR/fixup_json.py $THIS_CONFIG | ||
done | ||
|
||
# The symlinks are no longer needed after generating the .json files. | ||
if [ -L third_party/libwebrtc/buildtools ]; then | ||
rm third_party/libwebrtc/buildtools | ||
else | ||
rm -rf third_party/libwebrtc/buildtools | ||
fi | ||
|
||
if [ -L third_party/libwebrtc/buildtools ]; then | ||
rm third_party/libwebrtc/.git | ||
else | ||
rm -rf third_party/libwebrtc/.git | ||
fi | ||
|
||
# After all the json files are generated they are used to generate moz.build files. | ||
echo "Building moz.build files from gn json files" | ||
./mach build-backend -b GnMozbuildWriter --verbose | ||
|
||
rm -rf $MOZ_OBJDIR | ||
|
||
echo | ||
echo "Done generating gn build files. You should now be able to build with ./mach build" |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.