Граф коммитов

199 Коммитов

Автор SHA1 Сообщение Дата
Ricky Stewart fbc6c5a60f Bug 1667892 - Move search for `wget` binary from `old-configure` to Python `configure` r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D91645
2020-09-30 15:37:21 +00:00
Ricky Stewart bbfa258584 Bug 1656993: Create and require by default global `virtualenv`s in `~/.mozbuild` for `mach` r=mhentges,ahal
In two different places we've been encountering issues regarding 1) how we configure the system Python environment and 2) how the system Python environment relates to the `virtualenv`s that we use for building, testing, and other dev tasks. Specifically:

1. With the push to use `glean` for telemetry in `mach`, we are requiring (or rather, strongly encouraging) the `glean_sdk` Python package to be installed with bug 1651424. `mach bootstrap` upgrades the library using your system Python 3 in bug 1654607. We can't vendor it due to the package containing native code. Since we generally vendor all code required for `mach` to function, requiring that the system Python be configured with a certain version of `glean` is an unfortunate change.

2. The build uses the vendored `glean_parser` for a number of build tasks. Since the vendored `glean_parser` conflicts with the globally-installed `glean_sdk` package, we had to add special ad-hoc handling to allow us to circumvent this conflict in bug 1655781.

3. We begin to rely more and more on the `zstandard` package during build tasks, this package again being one that we can't vendor due to containing native code. Bug 1654994 contained more ad-hoc code which subprocesses out from the build system's `virtualenv` to the SYSTEM `python3` binary, assuming that the system `python3` has `zstandard` installed.

As we rely more on `glean_sdk`, `zstandard`, and other packages that are not vendorable, we need to settle on a standard model for how `mach`, the build process, and other `mach` commands that may make their own `virtualenv`s work in the presence of unvendorable packages.

With that in mind, this patch does all the following:

1. Separate out the `mach` `virtualenv_packages` from the in-build `virtualenv_packages`. Refactor the common stuff into `common_virtualenv_packages.txt`. Add functionality to the `virtualenv_packages` manifest parsing to allow the build `virtualenv` to "inherit" from the parent by pointing to the parent's `site-packages`. The `in-virtualenv` feature from bug 1655781 is no longer necessary, so delete it.

2. Add code to `bootstrap`, as well as a new `mach` command `create-mach-environment` to create `virtualenv`s in `~/.mozbuild`.

3. Add code to `mach` to dispatch either to the in-`~/.mozbuild` `virtualenv`s (or to the system Python 3 for commands which cannot run in the `virtualenv`s, namely `bootstrap` and `create-mach-environment`).

4. Remove the "add global argument" feature from `mach`. It isn't used and conflicts with (3).

5. Remove the `--print-command` feature from `mach` which is obsoleted by these changes.

This has the effect of allowing us to install packages that cannot be vendored into a "common" place (namely the global `~/.mozbuild` `virtualenv`s) and use those from the build without requiring us to hit the network. Miscellaneous implementation notes:

1. We allow users to force running `mach` with the system Python if they like. For now it doesn't make any sense to require 100% of people to create these `virtualenv`s when they're allowed to continue on with the old behavior if they like. We also skip this in CI.

2. We needed to duplicate the global-argument logic into the `mach` script to allow for the dispatch behavior. This is something we avoided with the Python 2 -> Python 3 migration with the `--print-command` feature, justifying its use by saying it was only temporarily required until all `mach` commands were running with Python 3. With this change, we'll need to be able to determine the `mach` command from the shell script for the forseeable future, and committing to this forever with the cost that `--print-command` incurs (namely `mach` startup time, an additional .4s on my machine) didn't seem worth it to me. It's not a ton of duplicated code.

Differential Revision: https://phabricator.services.mozilla.com/D85916
2020-08-17 17:21:02 +00:00
Mike Hommey 8357809511 Bug 1647780 - Don't strip less when profiling is enabled. r=froydnj
Upon reflection, we probably don't need the extra symbols anymore. Back
when we reduced the amount of stripping when enabling profiling, the
profiler wasn't able to download symbols on its own. It now is able to
do so, on all platforms.

As the stripping happens at packaging time, this doesn't change anything
for mach run on local builds.

Differential Revision: https://phabricator.services.mozilla.com/D86666
2020-08-11 23:42:37 +00:00
Mike Hommey ffcff8cdcf Bug 1651680 - Support --enable-strip/--enable-install-strip on mingw. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D86649
2020-08-11 02:53:34 +00:00
Mike Hommey c9ae9101aa Bug 1651680 - Replace PKG_SKIP_STRIP with PKG_STRIP. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D86648
2020-08-11 02:44:17 +00:00
Razvan Maries 6d82f7f1a0 Backed out 2 changesets (bug 1651680) for L10n bustages. CLOSED TREE
Backed out changeset 09a5f4dcd92a (bug 1651680)
Backed out changeset 13a881966dda (bug 1651680)
2020-08-11 05:40:47 +03:00
Mike Hommey 99910cc0ff Bug 1651680 - Support --enable-strip/--enable-install-strip on mingw. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D86649
2020-08-11 00:08:49 +00:00
Mike Hommey 6714f1ec83 Bug 1651680 - Replace PKG_SKIP_STRIP with PKG_STRIP. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D86648
2020-08-11 00:07:02 +00:00
Nick Alexander 9d1281ef52 Bug 1641291 - Part 1: Allow cross-compiling from host macOS -> Windows target. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D77117
2020-07-07 02:13:35 +00:00
Coroiu Cristina 3cce853af2 Backed out 4 changesets (bug 1641291) for build bustages and SM failures on a CLOSED TREE
Backed out changeset 9c0a44614576 (bug 1641291)
Backed out changeset 0dcf604b880e (bug 1641291)
Backed out changeset d830bee40b5c (bug 1641291)
Backed out changeset fe38c82c2dad (bug 1641291)
2020-06-03 22:09:52 +03:00
Nick Alexander 916d838f9c Bug 1641291 - Part 1: Allow cross-compiling from host macOS -> Windows target. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D77117
2020-06-03 18:18:15 +00:00
Mike Hommey 623e778ff2 Bug 1641786 - Move --with-debug-label to python configure. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D77414
2020-05-29 12:17:24 +00:00
Mike Hommey 313131917e Bug 1641775 - Move --with-system-nspr to python configure. r=firefox-build-system-reviewers,rstewart
Versions of NSPR >= 4.10 come with a pkg-config file. We currently
depend on 4.9.2 for spidermonkey, but much more recent versions for
Firefox. 4.10 is less than a year newer than 4.9.2, and 4.10 is 7 years
old, so bumping the requirement to 4.10 is not really a big deal.

With the use of pkg-config, --with-nspr-cflags and --with-nspr-libs are
not needed.

None of the AC_TRY_COMPILE tests were any useful because
PR_STATIC_ASSERT and PR_UINT64 have been when we look for them since
4.8.6 and 4.9 respectively.

Differential Revision: https://phabricator.services.mozilla.com/D77412
2020-05-29 17:11:27 +00:00
Mike Hommey eba22e2279 Bug 1641760 - Move --with-system-zlib to python configure. r=froydnj
As all versions of zlib >= 1.2.3.1 have a pkg-config file, and 1.2.3.1
is close to 14 years old, let's drop 1.2.3 and just use pkg-config, which
simplifies what we need to do dramatically.

Differential Revision: https://phabricator.services.mozilla.com/D77404
2020-05-29 20:59:00 +00:00
Mike Hommey a97c7ebfe7 Bug 1640578 - Remove --disable-install-strip from mac mozconfigs. r=froydnj
The need for --disable-install-strip in the mac mozconfigs comes from a
discrepancy in how stripping is handled between platforms. On Windows,
there is no stripping. On non-Mac unix, `strip` removes local symbols as
well as debug info and debug symbols. On Mac, it actually removes too
much, and one has to pass flags to remove both local symbols (`-x`) and
debug symbols (`-S`). Debug info is already in a separate file
(`.dSYM`).

For profiling reasons, we do ship e.g. nightlies with local symbols but
not debug info or symbols (or at least that's the intent). On Windows,
again, nothing to do. On non-Mac unix, we pass `--strip-debug` to
`strip` so that it keeps local symbols. That's where the discrepancy
comes in for Mac: the build system doesn't handle this at all, so the
mozconfigs contain --disable-install-strip to avoid stripping.

The build system should be doing what it's expected to be doing from the
start, without mozconfigs opting into anything.

AFAIK, we only really need the local symbols, so we can `strip -S` on
Mac when profiling is enabled, rather than `strip -x -S`. This also
significantly reduces the size of the installer for nightlies.

And while we're here, move the logic out of old-configure and into
python configure.

Differential Revision: https://phabricator.services.mozilla.com/D76789
2020-05-27 01:42:07 +00:00
Mike Hommey 6ba1065508 Bug 1639815 - Move --enable-strip and --enable-install-strip to python configure. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D76291
2020-05-21 23:51:58 +00:00
Mike Hommey 711ffb4939 Bug 1639815 - Move --disable-icf to python configure. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D76290
2020-05-21 22:38:47 +00:00
Mike Hommey 03b3bd5a35 Bug 1639815 - Move --enable-dtrace to python configure. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D76289
2020-05-21 22:38:47 +00:00
Bogdan Tara 0bff3c4d0b Backed out 7 changesets (bug 1639815) for --disable-install-strip related bustages CLOSED TREE
Backed out changeset 04a1388fc17d (bug 1639815)
Backed out changeset d48eea557b6d (bug 1639815)
Backed out changeset 6fba10f61bd2 (bug 1639815)
Backed out changeset cfb945f6c82f (bug 1639815)
Backed out changeset 16447c678749 (bug 1639815)
Backed out changeset 89475adf15b6 (bug 1639815)
Backed out changeset 94877a079054 (bug 1639815)
2020-05-22 01:33:22 +03:00
Mike Hommey 9725d351de Bug 1639815 - Move --enable-strip and --enable-install-strip to python configure. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D76291
2020-05-21 20:39:54 +00:00
Mike Hommey 1f62799146 Bug 1639815 - Move --disable-icf to python configure. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D76290
2020-05-21 10:13:48 +00:00
Mike Hommey 1304fec22e Bug 1639815 - Move --enable-dtrace to python configure. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D76289
2020-05-21 10:13:35 +00:00
Ricky Stewart 2ce561dd99 Bug 1635514 - Delete tup CI/configure stuff r=froydnj
This includes scripts that involve `tup`, jobs that build `tup` in automation, `tup.configure`, and related infrastructure and documentation.

Differential Revision: https://phabricator.services.mozilla.com/D73921
2020-05-05 18:34:16 +00:00
Mike Hommey 314c1a65a3 Bug 1626951 - Disable new pass manager on aarch64-windows builds without LTO. r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D69500

--HG--
extra : moz-landing-system : lando
2020-04-03 14:27:45 +00:00
Mike Hommey 5573726a45 Bug 1620980 - Fix Windows artifact builds after bug 1620165. r=froydnj
Both Wine and UPX are necessary when doing artifact builds.

Differential Revision: https://phabricator.services.mozilla.com/D66136

--HG--
extra : moz-landing-system : lando
2020-03-10 00:23:40 +00:00
Mike Hommey b1ef3b02cf Bug 1619504 - Make the build system look for wine64. r=dmajor
Wine64 is the version that supports 64-bits binaries as well as 32-bits.

Differential Revision: https://phabricator.services.mozilla.com/D65061

--HG--
extra : moz-landing-system : lando
2020-03-03 12:54:47 +00:00
Mike Hommey 01879b59e1 Bug 1618766 - Properly find and use MT on Windows cross-builds. r=froydnj
- Remove the separate option() for MT, because it dates back from when
  we needed `MT` not being an absolute path, but that hasn't been true
  since bug 1290040.

- Extend what was done in bug 1617794 to MT, although the long term move
  is to not rely on MT at all.

- Patch leftovers from bug 1613799.

Differential Revision: https://phabricator.services.mozilla.com/D64712

--HG--
extra : moz-landing-system : lando
2020-02-28 12:33:03 +00:00
Mike Hommey d747b65211 Bug 1617794 - Wrap Windows tools with Wine on cross builds. r=dmajor
Windows programs run via Wine don't like Unix absolute paths (they look
like command line arguments), so we need to use relative paths.

Mingw already run fxc2 via wine, but for some reason it doesn't care
about the Unix absolute paths. genshaders does need some adjustements to
run properly with the real fxc.

Now, on actual Windows, because the temporary directory where
tempfile.NamedTemporaryFile creates files by default is not necessarily
on the same drive as where the command runs from, a relative path can't
be constructed. So we also force the temporary file to be created in the
current (obj) directory.

There is no similar concern for other files because we only go from
objdir to srcdir, and the build system already doesn't support both
being on a separate drive.

While here, flush stdout when the genshared script writes to it, so that
the messages are printed out immediately rather than randomly, later,
after output from subprocesses.

Differential Revision: https://phabricator.services.mozilla.com/D64294

--HG--
extra : moz-landing-system : lando
2020-02-27 04:42:57 +00:00
Thinker Li dbada9842d Bug 1609881 - Part 3: build the fork server for Linux & FreeBSD. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D61255

--HG--
extra : moz-landing-system : lando
2020-02-14 16:50:33 +00:00
Andreea Pavel 3dfe514f42 Backed out changeset 84184c894e33 (bug 1609881) for multiple failures e.g assertion failure StaticPrefList_layers.h on a CLOSED TREE 2020-02-12 21:05:21 +02:00
Thinker Li 8753b31c60 Bug 1609881 - Part 2: build the fork server for Linux & FreeBSD. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D61255

--HG--
extra : moz-landing-system : lando
2020-02-12 16:57:20 +00:00
Greg V 90233062e1 Bug 1607103 - Allow forkserver on FreeBSD r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D58729

--HG--
extra : moz-landing-system : lando
2020-01-16 11:26:45 +00:00
Thinker Li 7cfdf6a788 Bug 1470591 - Part 6: Create a fork server process. r=gsvelto
This patch make changes of Gecko infrastrutures to run a fork server
process.

 - ForkServerLauncher is a component, which creates a fork server
   process at XPCOM startup.

 - nsBrowserApp.cpp and related files have been chagned to start a
   fork server in a process.

 - Logging and nsTraceRefcnt were changed to make it work with the
   fork server.

Depends on D46883

Differential Revision: https://phabricator.services.mozilla.com/D46884

--HG--
extra : moz-landing-system : lando
2019-12-05 00:02:40 +00:00
Bogdan Tara 3732e1f17c Backed out 6 changesets (bug 1470591) for test_punycodeURIs & test_nsIProcess* crashes CLOSED TREE
Backed out changeset 3ca19f8f388e (bug 1470591)
Backed out changeset f80db6e63169 (bug 1470591)
Backed out changeset cbac2d7dfe42 (bug 1470591)
Backed out changeset daad4d736ec0 (bug 1470591)
Backed out changeset ca1b804d404a (bug 1470591)
Backed out changeset a10772f780f7 (bug 1470591)
2019-12-04 00:53:14 +02:00
Thinker Li 035717ac2d Bug 1470591 - Part 6: Create a fork server process. r=gsvelto
This patch make changes of Gecko infrastrutures to run a fork server
process.

 - ForkServerLauncher is a component, which creates a fork server
   process at XPCOM startup.

 - nsBrowserApp.cpp and related files have been chagned to start a
   fork server in a process.

 - Logging and nsTraceRefcnt were changed to make it work with the
   fork server.

Depends on D46883

Differential Revision: https://phabricator.services.mozilla.com/D46884

--HG--
extra : moz-landing-system : lando
2019-12-03 19:08:10 +00:00
Ricky Stewart d5eb7d0ea5 Bug 1594867 - Add moz.build/backend bits to specify files that should be built as a sandboxed wasm library r=firefox-build-system-reviewers,mshal
Add backend stuff to build sandboxed wasm libraries. (Don't actually update any moz.build files to consume this yet.)

Differential Revision: https://phabricator.services.mozilla.com/D54152

--HG--
extra : moz-landing-system : lando
2019-11-27 20:11:59 +00:00
Narcis Beleuzu e54b007827 Backed out changeset ed90ca2fb5a8 (bug 1585370) for toolchain bustages. CLOSED TREE 2019-10-12 06:29:06 +03:00
Tom Ritter 02ce94ed09 Bug 1585370 - Make NSIS a required component for builds r=dmajor
This reverts Bug 1355584 which made it optional for MinGW. We now use
it in MinGW so let's make it required again.

Differential Revision: https://phabricator.services.mozilla.com/D48883

--HG--
extra : moz-landing-system : lando
2019-10-12 02:51:45 +00:00
Makoto Kato d9a0f2a761 Bug 1580670 - Disable Visual Studio backend when building GeckoView on Windows. r=froydnj
It is unnecessary to generate backend file for Visual Studio when building
GeckoView on Windows hsot since it has already generated Android Studio backend.

Differential Revision: https://phabricator.services.mozilla.com/D46123

--HG--
extra : moz-landing-system : lando
2019-09-17 13:47:50 +00:00
Rob Lemley 1cb6343d9b Bug 1543220 - Enable building gtest xul for Thunderbird. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D45462

--HG--
extra : moz-landing-system : lando
2019-09-10 23:18:27 +00:00
Mike Hommey 1440a9cd78 Bug 1560340 - Only add confvars.sh as a dependency to config.status when it exists. r=chmanchester
Differential Revision: https://phabricator.services.mozilla.com/D35447

--HG--
extra : moz-landing-system : lando
2019-06-20 18:43:25 +00:00
Geoff Brown 895b4a76e6 Bug 1543323 - On Android, only build gtest tests archive on x86_64 builds; r=glandium
We only plan to run Android gtest in continuous integration on x86_64.
Given the impact on build times, I think it best to limit the gtest archive
builds to the variants where we will use it.

Differential Revision: https://phabricator.services.mozilla.com/D26936

--HG--
extra : moz-landing-system : lando
2019-04-12 00:17:45 +00:00
Geoff Brown 59465ef1a7 Bug 1532695 - Include target.gtest.tests.tar.gz in android builds; r=bc
Differential Revision: https://phabricator.services.mozilla.com/D26587

--HG--
extra : moz-landing-system : lando
2019-04-08 22:02:45 +00:00
Ciure Andrei 69999ad1dd Backed out changeset b1571c522183 (bug 1532695) for causing gtest/TestMozURL.cpp build busatges CLOSED TREE 2019-04-08 23:48:22 +03:00
Geoff Brown 535b871eab Bug 1532695 - Include target.gtest.tests.tar.gz in android builds; r=bc
Differential Revision: https://phabricator.services.mozilla.com/D26587

--HG--
extra : moz-landing-system : lando
2019-04-08 20:16:43 +00:00
Nick Alexander fbb2df205f Bug 1525968 - Make local development artifact builds on Android download full build symbols. r=froydnj
We produce two types of build symbol archives in automation:

- "crashreporter-symbols.zip" contains Breakpad-format .sym files
- "crashreporter-symbols-full.zip" contains Breakpad-format .sym files
  and compressed ELF debug symbol .dbg.gz files

Right now, `--enable-artifact-build-symbols` from Bug 1305502
downloads only "crashreporter-symbols.zip".

The Android Studio version of lldb, currently 7.0.0, doesn't support
Breakpad-format .sym files. It does support (uncompressed) ELF debug
symbols.  (Note that gdb isn't supported on Android and hasn't been for
some time.)

This makes ` --enable-artifact-build-symbols` download the full
symbols for Android builds that aren't in automation, to be useful for
debugging Android builds with lldb locally.

Differential Revision: https://phabricator.services.mozilla.com/D19091

--HG--
extra : moz-landing-system : lando
2019-03-27 22:37:40 +00:00
Mike Hommey c7e738d69d Bug 1535501 - Allow to get full crashreporter symbols on artifact builds. r=mshal
Differential Revision: https://phabricator.services.mozilla.com/D23605

--HG--
extra : moz-landing-system : lando
2019-03-15 21:56:14 +00:00
Rob Wu 13ae2321c8 Bug 1526249 - Look for llvm-objdump in toolchain path r=mshal
Differential Revision: https://phabricator.services.mozilla.com/D19140

--HG--
extra : moz-landing-system : lando
2019-03-11 15:16:53 +00:00
Mike Hommey ef3ad686ee Bug 1512504 - Remove support for MSVC. r=froydnj
Consequently, this removes:
- MOZ_LIBPRIO, which is now always enabled.
- non_msvc_compiler, which is now always true.
- The cl.py wrapper, since it's not used anymore.
- CL_INCLUDES_PREFIX, which was only used for the cl.py wrapper.
- NONASCII, which was only there to ensure CL_INCLUDES_PREFIX still
  worked in non-ASCII cases.

This however keeps a large part of detecting and configuring for MSVC,
because we still do need it for at least headers, libraries, and midl.

Depends on D19614

Differential Revision: https://phabricator.services.mozilla.com/D19615

--HG--
extra : moz-landing-system : lando
2019-02-14 21:45:27 +00:00
Razvan Maries f86459d5dc Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2019-02-05 18:59:13 +02:00