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

248 Коммитов

Автор SHA1 Сообщение Дата
Mitchell Hentges c1f770eddb Bug 1727561: Tweak an exception's log level r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D123777
2021-08-31 15:38:40 +00:00
Mitchell Hentges fe7e7e5b9b Bug 1727561: Log exception in `bootstrap_toolchain_tasks()` r=firefox-build-system-reviewers,nalexander
This will ensure that recoverable failures in task-definition work won't
be hidden.

Differential Revision: https://phabricator.services.mozilla.com/D123638
2021-08-25 16:11:02 +00:00
Andi-Bogdan Postelnicu 0ac52aa9d7 Bug 1725125 - Make a hybrid build system combining non-unified with unified. CLOSED TREE
By hybrid unified system we understand a system that encapsulates modules that are built in the unified mode
but also other modules, like `dom/Animation`, as an example, in the non unified environment.

This approach is desirable since we already have most of the modules transitioned to the non unified system but there are
still some that are not yet compatible, but in the long term this will be done by each module owner and can be also tested
locally using the build system.

If a module can't be built outside the unified method it's `moz.build` config file needs to have `REQUIRES_UNIFIED_BUILD = False`

To also enable this we need to have a flag from `mozconfig`, like:

```
ac_add_options --disable-unified-build
```

Differential Revision: https://phabricator.services.mozilla.com/D122328
2021-08-25 11:21:42 +00:00
Narcis Beleuzu 50dd0540cd Backed out changeset 29d7e91fe721 (bug 1725125) for plain Bp-hybrid bustages 2021-08-25 14:42:09 +03:00
Andi-Bogdan Postelnicu 4b8a4fc95a Bug 1725125 - Make a hybrid build system combining non-unified with unified r=firefox-build-system-reviewers,mhentges,glandium
By hybrid unified system we understand a system that encapsulates modules that are built in the unified mode
but also other modules, like `dom/Animation`, as an example, in the non unified environment.

This approach is desirable since we already have most of the modules transitioned to the non unified system but there are
still some that are not yet compatible, but in the long term this will be done by each module owner and can be also tested
locally using the build system.

If a module can't be built outside the unified method it's `moz.build` config file needs to have `REQUIRES_UNIFIED_BUILD = False`

To also enable this we need to have a flag from `mozconfig`, like:

```
ac_add_options --disable-unified-build
```

Differential Revision: https://phabricator.services.mozilla.com/D122328
2021-08-25 10:46:18 +00:00
Mike Hommey b5fdfe98af Bug 1725855 - Don't default to system-zlib on macOS. r=firefox-build-system-reviewers,andi
pkg-config is not available by default on macOS, and we might as well
avoid configure defaults that may require it.

Differential Revision: https://phabricator.services.mozilla.com/D122794
2021-08-17 09:38:24 +00:00
Mike Hommey 170547001c Bug 1725092 - Change how --enable/disable-gtest-in-build is handled. r=firefox-build-system-reviewers,andi
So that --enable-gtest-in-build works in local builds.

Differential Revision: https://phabricator.services.mozilla.com/D122312
2021-08-11 05:45:06 +00:00
Mike Hommey dda1875bdd Bug 1721514 - Add a few more debugging logs about configure bootstrap. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D120416
2021-07-21 21:00:13 +00:00
Mike Hommey 5ac51ef77d Bug 1720806 - Avoid multiple calls to toolchain_task_definitions during configure. r=firefox-build-system-reviewers,mhentges
Bug 1692137 added code that would end up calling
toolchain_task_definitions twice, once for each of host and target.
With the recent changes from bug 1719229, that is not useful anymore.
We also don't need the toolchain prefixes for toolchains on unsupported
hosts (which were useful before bug 1719229 for the target sysroots).

Differential Revision: https://phabricator.services.mozilla.com/D120044
2021-07-16 20:59:35 +00:00
Mike Hommey 162f9b6800 Bug 1719229 - Rename the bootstrappable sysroot toolchains. r=firefox-build-system-reviewers,andi
In cross-compilation setups (x86_64 host, i686 or aarch64 target), we're
going to need two sysroots. Obviously, we need the sysroot paths to be
different in that case, so the sysroot path themselves need to contain
some distinctive name, and we'll use the `target.toolchain` name for
that (the target triplet with the vendor/machine stripped out).

Because the path name needs to be reflected in the artifact name as well
as the toolchain name, we also change them.

And because the current prefix in the toolchain name is now redundant
with the suffix, we remove the prefix, and allow the bootstrapping
mechanism to try toolchains without the prefix.

Differential Revision: https://phabricator.services.mozilla.com/D119846
2021-07-14 08:54:43 +00:00
Mike Hommey 8da6bc9f03 Bug 1719229 - Don't replace _ with - in toolchain names to bootstrap. r=firefox-build-system-reviewers,andi
This was originally done to avoid renaming the dump_syms toolchain, but
is going to cause problems for the next change.

Differential Revision: https://phabricator.services.mozilla.com/D119845
2021-07-14 08:54:42 +00:00
Mike Hommey 841e1d8a06 Bug 1717585 - Switch --enable-bootstrap on by default on central. r=firefox-build-system-reviewers,mhentges
As there are some things to solve first for the sysroot, we don't enable
the sysroot bootstrap unless --enable-bootstrap is given explicitly. The
default will still bootstrap everything else when building on central.

Differential Revision: https://phabricator.services.mozilla.com/D118450
2021-06-22 23:36:28 +00:00
Mike Hommey 9540e9a37c Bug 1716912 - Switch --enable-bootstrap on by default on Windows builds on central r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D118108
2021-06-22 02:16:47 +00:00
Emilio Cobos Álvarez 2a2dd88339 Bug 1717248 - Remove non-existing file from moz.configure. r=firefox-build-system-reviewers,nalexander
This fixes it for me. I believe this is right because the file it was inlined
into in D117711 is also on this list.

Differential Revision: https://phabricator.services.mozilla.com/D118277
2021-06-18 23:05:28 +00:00
Mike Hommey 83c4b6a318 Bug 1716911 - Switch --enable-bootstrap on by default on macos builds on central. r=firefox-build-system-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D118107
2021-06-17 04:59:42 +00:00
Butkovits Atila 4a58ea14fe Backed out changeset 5e287042c278 (bug 1716911) for causing failures at test_toolchain_configure.py. CLOSED TREE 2021-06-17 07:47:07 +03:00
Mike Hommey e6564e5935 Bug 1716911 - Switch --enable-bootstrap on by default on macos builds on central. r=firefox-build-system-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D118107
2021-06-17 03:45:56 +00:00
Nick Alexander 03b1e6ddba Bug 1714397 - Apply `mach lint --fix` to `/moz.configure`. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D116741
2021-06-03 18:04:23 +00:00
Mike Hommey c2908b2bf8 Bug 1712350 - Use the mozmake toolchain for CI Windows builds. r=firefox-build-system-reviewers,mhentges
As well as local builds with --enable-bootstrap.

Differential Revision: https://phabricator.services.mozilla.com/D116065
2021-05-27 22:27:25 +00:00
Mitchell Hentges fc799c0fab Bug 1706774: Add tools to VisualStudio backend exclusions r=firefox-build-system-reviewers,nalexander
"memory" and "tools/update-programs" do not require
the VisualStudio backend.

Differential Revision: https://phabricator.services.mozilla.com/D114651
2021-05-18 15:00:39 +00:00
Mike Hommey 8189f56cd9 Bug 1599574 - Avoid re-running clang-plugin tests. r=firefox-build-system-reviewers,andi,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D114320
2021-05-05 21:21:11 +00:00
Mike Hommey 6736f91ada Bug 1704580 - Move various rust-related configure items to rust.configure. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D112157
2021-04-20 00:33:58 +00:00
Mike Hommey b1f45b497d Bug 1697098 - Default to --enable-bootstrap for arm64 mac builds. r=firefox-build-system-reviewers,andi,sheehan,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D107601
2021-03-09 21:27:52 +00:00
Mike Hommey 1afcdbc6aa Bug 1693725 - Make --enable-bootstrap install missing toolchains. r=firefox-build-system-reviewers,andi,sheehan,mhentges
This means --enable-bootstrap now is the same as what
--enable-bootstrap=install currently does. --enable-bootstrap=install is at the
same time desupported.
We also remove --enable-bootstrap=update, which is not worth supporting.

Differential Revision: https://phabricator.services.mozilla.com/D105719
2021-02-24 02:13:10 +00:00
Mike Hommey 34ada26a0e Bug 1693723 - Avoid bootstrapping when an explicit path is given for tools. r=firefox-build-system-reviewers,mhentges
This changes things such that setting e.g. NASM=/usr/bin/nasm will avoid
bootstrapping nasm even when bootstrapping is enabled.

This is not applied to CC/CXX/HOST_CC/HOST_CXX because things are more
complicated.

This also simplifies how check_prog is called for a bootstrapped tool,
and avoids the repetition of when.

CBINDGEN handling needs the pattern being applied manually because it
currently doesn't use check_prog. Once --enable-bootstrap=install
becomes the default on developer builds, it will be possible to simplify
this.

Differential Revision: https://phabricator.services.mozilla.com/D105718
2021-02-24 02:01:33 +00:00
Mike Hommey dfb8c396a6 Bug 1693723 - Pass bootstrap path in one piece to bootstrap_{,search_}path. r=firefox-build-system-reviewers,andi,mhentges
It will make upcoming changes simpler.

Differential Revision: https://phabricator.services.mozilla.com/D105717
2021-02-24 02:01:32 +00:00
Mike Hommey c4ae566143 Bug 1692416 - Allow --enable-bootstrap=install to look for aarch64 mac artifacts. r=firefox-build-system-reviewers,andi,dmajor
There aren't any currently, but it's coming in the following commits.

Differential Revision: https://phabricator.services.mozilla.com/D104975
2021-02-12 22:28:01 +00:00
Mike Hommey 5f86b697af Bug 1692137 - Allow local linux builds to use a bootstrapped sysroot. r=firefox-build-system-reviewers,andi,mhentges
Bug 1690930 added sysroots that can be bootstrapped. With this change,
we allow --enable-bootstrap=install to pull the right sysroot for the
configured target, and --enable-bootstrap to update it if it was already
there.

Differential Revision: https://phabricator.services.mozilla.com/D104797
2021-02-12 20:31:49 +00:00
Mike Hommey 571f8f5c17 Bug 1690712 - Allow --enable-bootstrap in all configurations. r=firefox-build-system-reviewers,mhentges
And make it prioritize the bootstrap directory over system paths.

Differential Revision: https://phabricator.services.mozilla.com/D103981
2021-02-09 22:01:25 +00:00
Mike Hommey 4da42ddfb5 Bug 1690454 - Allow configure --enable-bootstrap to optionally install instead of updating. r=firefox-build-system-reviewers,mhentges
We still default to updates only, though, because all the details of
only installing what's needed are not ironed out yet.

Differential Revision: https://phabricator.services.mozilla.com/D103865
2021-02-03 21:27:04 +00:00
Mike Hommey 21d7cbaac5 Bug 1687421 - Avoid error with --enable-bootstrap on platforms with no bootstrap artifacts. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D102259
2021-01-19 14:10:16 +00:00
Cosmin Sabou f6ebc1a8b7 Bug 1553230 - Fix mbu failures on configure/lint.py. r=glandium 2021-01-17 00:29:26 +02:00
Mike Hommey 66a79a59fe Bug 1553230 - Allow to opt-in to automatically update some bootstrapped toolchains. r=firefox-build-system-reviewers,nalexander,mhentges
This adds a --enable-bootstrap build flag that will automatically update
cbindgen, node, clang, sccache, nasm, wine, lucetc, dump_syms, pdbstr,
and winchecksec if they are already installed in ~/.mozbuild.

Eventually, we'll want to allow to install toolchains that weren't
already install, but one step at a time.

This explicitly doesn't cover rustc, which is its own can of worms, or
android-{ndk,sdk}, which are not installed via toolchain artifacts
currently.

Differential Revision: https://phabricator.services.mozilla.com/D101723
2021-01-15 22:15:51 +00:00
Mike Hommey 4ed35480e2 Bug 1686646 - Look for more tools in MOZ_FETCHES_DIR. r=firefox-build-system-reviewers,dmajor
This will allow to find them on automation without setting anything in
mozconfigs.

Differential Revision: https://phabricator.services.mozilla.com/D101720
2021-01-15 04:33:01 +00:00
Mike Hommey 758c53a631 Bug 1686646 - Automatically find tools in MOZ_FETCHES_DIR. r=firefox-build-system-reviewers,dmajor
When MOZ_FETCHES_DIR is set, use that instead of ~/.mozbuild. This will
allow to find them on automation without explicit mozconfig help.

Differential Revision: https://phabricator.services.mozilla.com/D101719
2021-01-15 04:33:00 +00:00
Mike Hommey 8362a57bed Bug 1686646 - Use more targeted search paths for each tool. r=firefox-build-system-reviewers,dmajor
Instead of adding all possible tool paths from ~/.mozbuild, we only
add the relevant paths for each of the tools we search for.

Differential Revision: https://phabricator.services.mozilla.com/D101718
2021-01-15 04:26:05 +00:00
Mike Hommey ea136c68b4 Bug 1686646 - Move --enable-release and DEVELOPER_OPTIONS to top-level moz.configure. r=firefox-build-system-reviewers,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D101713
2021-01-15 04:25:54 +00:00
David Major 8f8ea43ab6 Bug 1677742 - Followups for new pass manager LTO r=glandium
Code review followups for 1675600: Restrict the use of new pass manager during LTO to builds where we're using the new pass manager in general, and (on Windows) where lld-link is new enough to understand the flag.

Differential Revision: https://phabricator.services.mozilla.com/D97372
2020-11-21 02:13:04 +00:00
Mitchell Hentges 71aed98a29 Bug 1667170: Don't restrict symbol stripping for Android builds r=firefox-build-system-reviewers,glandium
Embedded symbols aren't useful for Android because:
* The associated Android tooling supports detached symbols
* The cost of the increased size is extra severe for mobile

However, Linux/Mac tooling isn't as supportive of detached symbols,
and the extra size isn't as impactful.
So, fully remove symbols for Android (even in profile builds), but keep
'em for other platforms.

There was a previous solution to remove profile-specific strip logic
from moz.configure and to instead adjust mozconfigs to achieve
the desired stripping amount. As requested in bug 1667170, this
implements the above^ solution after rolling back those previous
changesets:
* fd891240a96a
* 2f2a6df81762
* bbc6744b3ca2
* f849afa84d90

Differential Revision: https://phabricator.services.mozilla.com/D96902
2020-11-17 15:59:30 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Mike Hommey 54f6141287 Bug 1671424 - Move configure execution from client.mk to `mach configure`. r=firefox-build-system-reviewers,rstewart
`mach configure` currently runs the equivalent to `make -f client.mk`.
This is history, and essentially does the following:
- Create `configure` and `js/src/configure` from `configure.in` and
`js/src/configure.in` respectively.
- Create the objdir.
- Run `configure` from the objdir.

The `configure` script is, nowadays, only really used as a means to set
OLD_CONFIGURE (and also for people who want to run `configure`,
literally, as in the `configure; make` workflow). `mach configure`
actually doesn't need it. Neither does recursing into `js/src` require
`js/src/configure`, since bug 1520340 (and now as of bug 1669633, we
don't even recurse).

Because configure.py can actually derive OLD_CONFIGURE on its own
(except for `js/src/configure`, but `mach configure` doesn't run that),
we don't really need `configure` for `mach configure`.

So all in all, we're at a point in history where it's straightforward to
just initiate configure.py from mach configure, so we just do that.

And in the hypothetical case where the `mach configure` code is somehow
running in python2, we get the mach virtualenv python3 and use it to
execute `configure.py`.

Differential Revision: https://phabricator.services.mozilla.com/D93741
2020-10-20 20:41:52 +00:00
Mike Hommey 5afb69830c Bug 1670156 - Use the same prefix/suffix for rust libraries on mingw builds. r=firefox-build-system-reviewers,dmajor
Rustc >= 1.44 changed the file names of the static libraries it
produces with -windows-gnu targets, to match that of mingw clang/gcc.

Considering we still build on 1.43, the best fix would be to derive the
prefix/suffix based on the version of rust, but that actually turns into
a hard-to-solve problem because of configure tests for bindgen also
depending on the prefix/suffix value to be known.

On the other hand, we're soon due to an update to 1.47, so the simpler
solution is to just push mingw builds to require 1.44 (settling for the
smallest upgrade possible for now) and to remove the split between C and
rust library prefix/suffixes.

Differential Revision: https://phabricator.services.mozilla.com/D93726
2020-10-16 16:06:19 +00:00
Narcis Beleuzu 9252175982 Backed out changeset e34634758f51 (bug 1671424) for bustages on configure.py . CLOSED TREE 2020-10-20 00:16:22 +03:00
Mike Hommey fcd16177c6 Bug 1671424 - Move configure execution from client.mk to `mach configure`. r=firefox-build-system-reviewers,rstewart
`mach configure` currently runs the equivalent to `make -f client.mk`.
This is history, and essentially does the following:
- Create `configure` and `js/src/configure` from `configure.in` and
`js/src/configure.in` respectively.
- Create the objdir.
- Run `configure` from the objdir.

The `configure` script is, nowadays, only really used as a means to set
OLD_CONFIGURE (and also for people who want to run `configure`,
literally, as in the `configure; make` workflow). `mach configure`
actually doesn't need it. Neither does recursing into `js/src` require
`js/src/configure`, since bug 1520340 (and now as of bug 1669633, we
don't even recurse).

Because configure.py can actually derive OLD_CONFIGURE on its own
(except for `js/src/configure`, but `mach configure` doesn't run that),
we don't really need `configure` for `mach configure`.

So all in all, we're at a point in history where it's straightforward to
just initiate configure.py from mach configure, so we just do that.

And in the hypothetical case where the `mach configure` code is somehow
running in python2, we get the mach virtualenv python3 and use it to
execute `configure.py`.

Differential Revision: https://phabricator.services.mozilla.com/D93741
2020-10-19 16:24:34 +00:00
Mike Hommey d3519998ac Bug 1520395 - Remove the python configure distinction between option and js_option. r=firefox-build-system-reviewers,andi,rstewart
Now that we don't recurse into the js python configure, we don't need to
have a special treatment for the options that need to be passed down to
that subconfigure, which is what js_option was for.

Differential Revision: https://phabricator.services.mozilla.com/D92727
2020-10-08 04:07:46 +00:00
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