Skip to content

Commit

Permalink
Backed out 7 changesets (bug 1289641) for causing Python failures. CL…
Browse files Browse the repository at this point in the history
…OSED TREE

Backed out changeset 0c1cedebf915 (bug 1289641)
Backed out changeset 575732020bd2 (bug 1289641)
Backed out changeset 55b68a71e03a (bug 1289641)
Backed out changeset 0b16a05aa405 (bug 1289641)
Backed out changeset acbff13b91b3 (bug 1289641)
Backed out changeset 2645367da7cb (bug 1289641)
Backed out changeset 8b22a8ec44fe (bug 1289641)
  • Loading branch information
Butkovits Atila committed Apr 12, 2022
1 parent 15510f9 commit 59ebe1f
Show file tree
Hide file tree
Showing 63 changed files with 629 additions and 2,855 deletions.
5 changes: 4 additions & 1 deletion browser/config/mozconfigs/win32/common-win32
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ if test `uname -s` = Linux; then

# Configure expects executables for check_prog, so set the relevant files
# as executable on the first evaluation of the mozconfig where they exist.
if [ -d "${VSPATH}" -a ! -x "${VSPATH}/VC/bin/Hostx64/x86/cl.exe" ]; then
find "${VSPATH}" -type f -name \*.exe -exec chmod +x {} \;
fi
export UPX="${MOZ_FETCHES_DIR}/upx-3.95-win64/upx.exe"
if [ -f "${UPX}" ]; then
chmod +x "${UPX}"
fi
mk_add_options "export PATH=${VC_PATH}/bin/hostx64/x86:${PATH}"
mk_add_options "export PATH=${VSPATH}/VC/bin/Hostx64/x86:${PATH}"

unset VC_PATH

Expand Down
7 changes: 5 additions & 2 deletions browser/config/mozconfigs/win64-aarch64/common-win64
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ if test `uname -s` = Linux; then

# Configure expects executables for check_prog, so set the relevant files
# as executable on the first evaluation of the mozconfig where they exist.
if [ -d "${VSPATH}" -a ! -x "${VSPATH}/VC/bin/Hostx64/arm64/cl.exe" ]; then
find "${VSPATH}" -type f -name \*.exe -exec chmod +x {} \;
fi
export UPX="${MOZ_FETCHES_DIR}/upx-3.95-win64/upx.exe"
if [ -f "${UPX}" ]; then
chmod +x "${UPX}"
fi
mk_add_options "export PATH=${VC_PATH}/bin/hostx64/arm64:${PATH}"
mk_add_options "export WINEPATH=${VC_PATH}/bin/hostx64/x64"
mk_add_options "export PATH=${VSPATH}/VC/bin/Hostx64/arm64:${PATH}"
mk_add_options "export WINEPATH=${VSPATH}/VC/bin/Hostx64/x64"

unset VC_PATH

Expand Down
5 changes: 4 additions & 1 deletion browser/config/mozconfigs/win64/common-win64
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ if test `uname -s` = Linux; then

# Configure expects executables for check_prog, so set the relevant files
# as executable on the first evaluation of the mozconfig where they exist.
if [ -d "${VSPATH}" -a ! -x "${VSPATH}/VC/bin/Hostx64/x64/cl.exe" ]; then
find "${VSPATH}" -type f -name \*.exe -exec chmod +x {} \;
fi
export UPX="${MOZ_FETCHES_DIR}/upx-3.95-win64/upx.exe"
if [ -f "${UPX}" ]; then
chmod +x "${UPX}"
fi
mk_add_options "export PATH=${VC_PATH}/bin/hostx64/x64:${PATH}"
mk_add_options "export PATH=${VSPATH}/VC/bin/Hostx64/x64:${PATH}"

unset VC_PATH

Expand Down
11 changes: 11 additions & 0 deletions browser/config/tooltool-manifests/vs2017-15.9.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"version": "Visual Studio 2017 15.9.6 / SDK 10.0.17134.0",
"size": 490015895,
"visibility": "internal",
"digest": "91d08703a8ce39f6f53ccecc7c7b6f57e1b571ddb5d1eb4dd9260e52580566c35a4bed39ad366fd60ca60ebf5c06f0f00561bba5cd631826511f2872a3d2dcd5",
"algorithm": "sha512",
"filename": "vs2017_15.9.6.zip",
"unpack": true
}
]
53 changes: 38 additions & 15 deletions build/docs/toolchains.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,21 +132,44 @@ attempt was made to work around it, but `more work is needed`_.
Windows
=======

The ``build/vs/generate_yaml.py`` and ``build/vs/pack_vs.py`` scripts are
used to manage and build Windows toolchain archives containing Visual
Studio executables, SDKs, etc.

The ``build/vs/generate_yaml.py`` script is used to generate one of the
YAML files used in the relevant toolchain task. The exact command line
used to generate the file is stored in the header of the YAML file itself.
Each YAML file records the necessary downloads from Microsoft servers to
install the required Visual Studio components given on the command line.

The ``build/vs/pack_vs.py`` script takes a YAML file as input and generates
the corresponding toolchain artifact.

Both scripts should be run via ``mach python``.

The ``build/windows_toolchain.py`` script is used to build and manage
Windows toolchain archives containing Visual Studio executables, SDKs,
etc.

The way Firefox build automation works is an archive containing the
toolchain is produced and uploaded to an internal Mozilla server. The
build automation will download, verify, and extract this archive before
building. The archive is self-contained so machines don't need to install
Visual Studio, SDKs, or various other dependencies. Unfortunately,
Microsoft's terms don't allow Mozilla to distribute this archive
publicly. However, the same tool can be used to create your own copy.

Configuring Your System
-----------------------

It is **highly** recommended to perform this process on a fresh installation
of Windows 7 or 10 (such as in a VM). Installing all updates through
Windows Update is not only acceptable - it is encouraged. Although it
shouldn't matter.

Next, install Visual Studio 2017 Community. The download link can be found
at https://www.visualstudio.com/vs/community/.
Be sure to follow these install instructions:

1. Choose a ``Custom`` installation and click ``Next``
2. Select ``Programming Languages`` -> ``Visual C++`` (make sure all sub items are
selected)
3. Under ``Windows and Web Development`` uncheck everything except
``Universal Windows App Development Tools`` and the items under it
(should be ``Tools (1.3.1)...`` and the ``Windows 10 SDK``).

Once Visual Studio 2017 Community has been installed, from a checkout
of mozilla-central, run something like the following to produce a ZIP
archive::

$ ./mach python build/windows_toolchain.py create-zip vs2017_15.9.6

The produced archive will be the argument to ``create-zip`` + ``.zip``.

Firefox for Android with Gradle
===============================
Expand Down
3 changes: 1 addition & 2 deletions build/moz.configure/checks.configure
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ def check_prog(
input=None,
allow_missing=False,
paths=None,
allow_spaces=False,
bootstrap=None,
when=None,
validate=None,
Expand Down Expand Up @@ -191,7 +190,7 @@ def check_prog(

for prog in value or progs:
log.debug("%s: Looking for %s", var.lower(), quote(prog))
result = find_program(prog, paths, allow_spaces)
result = find_program(prog, paths)
if validate and result and not validate(result):
log.debug("%s: %s found but didn't work", var.lower(), quote(result))
continue
Expand Down
10 changes: 3 additions & 7 deletions build/moz.configure/util.configure
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ normalize_path = normalize_path()
@imports(_from="os", _import="pathsep")
@imports(_from="os", _import="environ")
@imports(_from="mozfile", _import="which")
def find_program(file, paths=None, allow_spaces=False):
def find_program(file, paths=None):
# The following snippet comes from `which` itself, with a slight
# modification to use lowercase extensions, because it's confusing rustup
# (on top of making results not really appealing to the eye).
Expand All @@ -184,9 +184,7 @@ def find_program(file, paths=None, allow_spaces=False):

if is_absolute_or_relative(file):
path = which(os.path.basename(file), path=os.path.dirname(file), exts=exts)
if not allow_spaces:
return normalize_path(path) if path else None
return normsep(path)
return normalize_path(path) if path else None

if paths:
if not isinstance(paths, (list, tuple)):
Expand All @@ -197,9 +195,7 @@ def find_program(file, paths=None, allow_spaces=False):
paths = pathsep.join(paths)

path = which(file, path=paths, exts=exts)
if not allow_spaces:
return normalize_path(path) if path else None
return normsep(path)
return normalize_path(path) if path else None


@imports("os")
Expand Down
55 changes: 0 additions & 55 deletions build/vs/generate_yaml.py

This file was deleted.

69 changes: 0 additions & 69 deletions build/vs/pack_vs.py

This file was deleted.

Loading

0 comments on commit 59ebe1f

Please sign in to comment.