Commit Graph
5137 Commits
Author SHA1 Message Date
Mike Hommey 4290b6b425 Bug 1575375 - Fix mozpath.match with python 3.7. r=nalexander
Python 3.7 changed what it escapes with re.escape. Adapt mozpath.match
to account for this.

Differential Revision: https://phabricator.services.mozilla.com/D42750
2019-08-21 03:12:36 +00:00
Mike Hommey cfb1d56f3e Bug 844509 - Don't create a separate unicode version of the build config. r=nalexander
Now that the configuration comes in without bytes strings, there is no
need to convert it anymore.

Differential Revision: https://phabricator.services.mozilla.com/D42631
2019-08-20 22:05:24 +00:00
Mike Hommey 85761d142b Bug 844509 - Don't encode the configuration that configure passes to config_status. r=nalexander
With bug 1575135, we ensure nothing gets out of the configure sandbox
as a bytes string. We can thus now avoid the encode() pass in
configure.py. We still need, however, to normalize the configuration
so that it doesn't contain unexpected types, and conformning to what
indented_repr does to the configuration in config.status.

While here, convert some obj.iteritems() to six.iteritems(obj).
And remove the now unused encode function.

Differential Revision: https://phabricator.services.mozilla.com/D42630
2019-08-20 22:22:14 +00:00
Mike Hommey 6c1f586158 Bug 844509 - Don't encode environment in get_cmd_output and old_configure. r=nalexander
The configure sandbox has wrapped subprocess methods to add its own
encoded environment if none is provided, since bug 1520394. It only
makes sense that it normalizes the environment that comes in too,
avoiding caller in the configure sandbox to have to do it themselves.

OTOH, and while we're here, none of get_cmd_output, old_configure or the
sandbox were actually using the right encoding for this conversion, so
fix the configure sandbox to use the right one, and make it stop using
encode(), which does deep recursion that is not necessary here, and that
I'm trying to remove entirely.

Also while here, remove an unused import of encode().

Differential Revision: https://phabricator.services.mozilla.com/D42608
2019-08-20 22:12:23 +00:00
Razvan Maries 7d9714b299 Backed out 2 changesets (bug 1562686) as per glandium's request. CLOSED TREE
Backed out changeset 0ce37eda652a (bug 1562686)
Backed out changeset fe7b9445e1d3 (bug 1562686)
2019-08-22 02:43:16 +03:00
Mike Hommey b258408df5 Bug 1560700 - Change how the rust target is derived from the build system target. r=froydnj
There are a few problems with the strategy currently used to find the
rust target. For example, we don't find a target for arm freebsd, and we
pick the wrong target for armel linux. Both are related to how things
currently work when multiple targets have the same (cpu, endianness,
os).

So, to derive the rust target, we now use a more fine-grained approach.

Differential Revision: https://phabricator.services.mozilla.com/D41481
2019-08-21 23:22:24 +00:00
Mike Shal 0da9880839 Bug 1575678 - Emit sorted PerSourceFlags; r=nalexander
The order that PerSourceFlags are emitted can vary if the srcdir is
changed. By sorting them we can make sure that the backend.mk files are
consistent regardless of srcdir.

Differential Revision: https://phabricator.services.mozilla.com/D42965
2019-08-21 22:21:52 +00:00
Mike Hommey 96b2f630c4 Bug 1575420 - Replace MOZ_WIDGET_TOOLKIT value of "gtk3" with "gtk". r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D42765
2019-08-21 12:25:42 +00:00
Dustin J. Mitchell cffcf3eb29 Bug 1562686 - revert remaining unnecessary bit of bug 1187245; r=glandium
Depends on D41454

Differential Revision: https://phabricator.services.mozilla.com/D42644
2019-08-21 03:32:05 +00:00
Sylvestre Ledru 8cad86666c Bug 1575249 - Ride along: remove +x permissions on source files r=Ehsan
Depends on D42672

Differential Revision: https://phabricator.services.mozilla.com/D42673
2019-08-21 09:57:03 +00:00
Mike Hommey f45e64cf17 Bug 1575135 - Make configure complain on non-unicode strings. r=nalexander
Make it a hard error when the sandbox returns non-unicode strings.
This should help quickly catch any remaining non-unicode string that
are not caught by automation.

Differential Revision: https://phabricator.services.mozilla.com/D42607
2019-08-20 21:31:34 +00:00
Mike Hommey 93d4662d9a Bug 1575135 - Make configure sandbox open() look more like python 3's. r=nalexander
As a consequence, we can replace the encoded_open function that did the
same in an opt-in manner.

Differential Revision: https://phabricator.services.mozilla.com/D42605
2019-08-21 04:44:43 +00:00
Mike Hommey c14b8ea320 Bug 1575135 - Use functions from util.configure instead of subprocess.*. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D42603
2019-08-20 16:42:16 +00:00
Mike Hommey 519a3cd43c Bug 1575135 - Fix mock_pkg_config failure case. r=nalexander
It only happens when things go badly, which is why it doesn't cause
problems, but when moving things around, triggering the error, we
currently get a formatting error rather than the actual error.

Differential Revision: https://phabricator.services.mozilla.com/D42602
2019-08-20 16:42:06 +00:00
Mike Hommey 61f6cede41 Bug 1575135 - Define whether the system encoding is mbcs or utf-8 once. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D42601
2019-08-20 16:40:24 +00:00
Bogdan Tara 4f137970b4 Backed out 8 changesets (bug 1569046, bug 1210157) for flake8 failure on base.py CLOSED TREE
Backed out changeset eec9458e553d (bug 1210157)
Backed out changeset 06d452ac1d16 (bug 1210157)
Backed out changeset 0f5311bbd75b (bug 1210157)
Backed out changeset 975727f55b82 (bug 1569046)
Backed out changeset a65032b442bc (bug 1210157)
Backed out changeset 25aef37f3556 (bug 1210157)
Backed out changeset 5d26b3d7d4a0 (bug 1210157)
Backed out changeset f044d6116869 (bug 1210157)
2019-08-21 00:14:49 +03:00
Māris Fogels 2062c1991b Bug 1210157 - Fix Python 3 issues in mozboot.gentoo and mozboot.archlinux r=firefox-build-system-reviewers,mshal
Fix some library calls and syntax that are required to support Python 3.

Depends on D39364

Differential Revision: https://phabricator.services.mozilla.com/D39365
2019-07-30 20:14:18 +00:00
Māris Fogels 8628e58b36 Bug 1210157 - Make bootstrap.py work with Python 3.5+ and Python 2.7 r=firefox-build-system-reviewers,mshal
Make bootstrap.py compatible with both Python 3.5+ and Python 2.7. Remove
Python 2.6 support as Python 2.6 is no longer supported in the Firefox source
tree.

Differential Revision: https://phabricator.services.mozilla.com/D39364
2019-08-12 17:08:14 +00:00
Māris Fogels 8bd372ffae Bug 1210157 - Add a --debug option to bootstrap.py r=nalexander
Add an option to run bootstrap.py with '--debug'. This will print full
tracebacks if the bootstrap process encounters an uncaught exception. It should
be useful for developers who are working on the bootstrap code as well as users
when writing bug reports.

Depends on D39362

Differential Revision: https://phabricator.services.mozilla.com/D39363
2019-08-13 20:41:30 +00:00
Māris Fogels 27a6a0e229 Bug 1569046 - Add Python 3 support to mozboot.osx r=firefox-build-system-reviewers,mshal
Make the mozboot.osx module work with Python 3 in addition to
Python 2.7.

Differential Revision: https://phabricator.services.mozilla.com/D39560
2019-08-13 20:41:30 +00:00
Māris Fogels 870d5602db Bug 1210157 - Add Python 3 support to mozboot Android toolchain bootstrap r=nalexander
Support installing the android development toolchain with Python 3 as well as
Python 2.7.

Depends on D39361

Differential Revision: https://phabricator.services.mozilla.com/D39362
2019-08-13 20:41:30 +00:00
Māris Fogels bd4a433feb Bug 1210157 - Add Python 3 support to the mozboot Debian bootstrapper r=firefox-build-system-reviewers,mshal
Add support for Python 3 and Python 2.7 to the Debian-based linux distro
bootstrap routines.

Differential Revision: https://phabricator.services.mozilla.com/D39361
2019-08-06 21:20:36 +00:00
Māris Fogels fc2aa82abb Bug 1210157 - Add Python 3 support to mozboot.base and mozboot.bootstrap r=firefox-build-system-reviewers,mshal
Add support for both Python 3 and Python 2.7 to the mozboot.base and
mozboot.bootstrap modules.  Remove legacy Python 2.6 code or mark it for later
removal.

Depends on D39359

Differential Revision: https://phabricator.services.mozilla.com/D39360
2019-07-30 21:07:50 +00:00
Māris Fogels 24726f5a03 Bug 1210157 - Use unicode_literals in all mozboot modules r=firefox-build-system-reviewers,mshal
Add unicode_literals to all mozboot module __future__ statements to support
running the modules under Python 3.  Remove comments about unicode_literals and
Python 2.6 support as Python 2.6 is no longer supported in tree.

Differential Revision: https://phabricator.services.mozilla.com/D39359
2019-08-13 20:16:31 +00:00
Mike Hommey 861f846e09 Bug 1574402 - Avoid repeated OS_LIBS and USE_LIBS from gyp_reader. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D42275
2019-08-16 21:23:47 +00:00
Mike Hommey bff92401f4 Bug 1573566 - Add target/host-objects targets to build objects. r=froydnj
Make the target and host targets depend on those, and flatten the
dependencies.

That is, instead of chains like:
  browser/app/target: mozglue/build/target
  mozglue/build/target: memory/build/target

we now have:
  browser/app/target: browser/app/target-objects \
                      mozglue/build/target-objects \
                      memory/build/target-objects

Which means Make can feel free to build the object files in browser/app
before building other dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D42252
2019-08-16 17:25:05 +00:00
Mike Hommey b36cca5a94 Bug 1573566 - Undo bug 1573314 and bug 1572046. r=froydnj
With the addition of toolkit/library/build because of the rust
shenanigans, bug 1573314 and bug 1572046 don't do anything useful
anymore. We're going to do something better anyways.

Differential Revision: https://phabricator.services.mozilla.com/D42251
2019-08-16 14:39:54 +00:00
Mike Hommey 1f2654f1f8 Bug 1573566 - Make host libraries more like static libraries. r=froydnj
HostLibrary is always an expand lib. HostRustLibrary is always a
non-expand lib. But we currently rely on type checking to figure that
out, rather than an attribute, like for StaticLibrary. Doing that
simplifies existing and upcoming code.

Differential Revision: https://phabricator.services.mozilla.com/D42250
2019-08-16 14:39:20 +00:00
Mike Hommey 45f5c40136 Bug 1573566 - Make rust libraries more like normal libraries. r=froydnj
Apart from the need to link them last, they don't actually need to be
treated any different from normal static libraries.

Differential Revision: https://phabricator.services.mozilla.com/D42249
2019-08-16 14:39:02 +00:00
Mike Hommey 57828f2dae Bug 1573566 - Don't make HostRustLibrary indirectly inherit from StaticLibrary. r=froydnj
So that isinstance(foo, StaticLibrary) doesn't end up being true for
HostRustLibrary. Instead, it now inherits from HostLibrary.

Differential Revision: https://phabricator.services.mozilla.com/D42248
2019-08-16 14:35:36 +00:00
Mike Hommey a5e47ea29f Bug 1573566 - Fully check that two Rust libraries aren't being linked to the same binary. r=froydnj
The existing check is no thorough enough: it only checks that multiple
Rust libraries are not directly linked to the same binary, but that's
not enough. In fact, until the change prior to this one, this was
happening to xul-gtest, and without that change, this is what configure
would now have to say:

  Cannot link the following Rust libraries into the "xul-gtest" library:
    - gkrust-gtest
    - gkrust
  Only one is allowed.

This only ended up not being a problem because the backend somehow works
around the problem, which it shouldn't have to do.

Differential Revision: https://phabricator.services.mozilla.com/D42247
2019-08-16 21:47:56 +00:00
Andrew Halberstadt 4dc545ec34 Bug 1568277 - [taskgraph] Split optimize strategies out into a separate file r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D40203
2019-08-16 14:25:47 +00:00
Andreas Tolfsen 386393b8bb bug 1540655: mozbuild: add puppeteer test flavor; r=firefox-build-system-reviewers,chmanchester
The Puppeteer test flavour are functional tests for the CDP-based
Puppeteer library from Google, that we want to run against our
implementation of CDP for Firefox.

They are distinct from the Firefox Puppeteer tests based on Marionette.

Differential Revision: https://phabricator.services.mozilla.com/D37012
2019-08-16 12:58:19 +00:00
Mike Hommey 9711e14288 Bug 1573435 - Use toolchain fetches for source-test builds. r=nalexander
While here, use GECKO_PATH instead of $HOME/checkouts/gecko.

Differential Revision: https://phabricator.services.mozilla.com/D41889
2019-08-15 11:21:51 +09:00
Ciure Andrei 46d4171cde Backed out 11 changesets (bug 1540655) for test_resolve.py perma failures CLOSED TREE
Backed out changeset 1a23d770d8a1 (bug 1540655)
Backed out changeset 641a7cb25298 (bug 1540655)
Backed out changeset 73236f81da44 (bug 1540655)
Backed out changeset 8d7bad30be46 (bug 1540655)
Backed out changeset bb012df3018b (bug 1540655)
Backed out changeset 8c67b494e207 (bug 1540655)
Backed out changeset c0a80d37576d (bug 1540655)
Backed out changeset 939ce2afcf0b (bug 1540655)
Backed out changeset 3b3a2a9fbc8b (bug 1540655)
Backed out changeset b96dede008ad (bug 1540655)
Backed out changeset 997d1568d944 (bug 1540655)
2019-08-14 18:53:36 +03:00
Andreas Tolfsen 6d0f72b089 bug 1540655: mozbuild: add puppeteer test flavor; r=firefox-build-system-reviewers,chmanchester
The Puppeteer test flavour are functional tests for the CDP-based
Puppeteer library from Google, that we want to run against our
implementation of CDP for Firefox.

They are distinct from the Firefox Puppeteer tests based on Marionette.

Differential Revision: https://phabricator.services.mozilla.com/D37012
2019-08-14 14:58:04 +00:00
Henrik Skupin dca7d95991 Bug 1573406 - Remove every trace of Firefox UI update tests. r=webdriver-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D41834
2019-08-14 11:08:45 +00:00
Nicholas Nethercote 2c80ddd069 Bug 1573080 - Supporting indenting of directives in preprocessor.py. r=glandium
Depends on D41494

Differential Revision: https://phabricator.services.mozilla.com/D41495
2019-08-13 22:18:55 +00:00
J.C. Jones 826e1599ce Bug 1573662 - Rename sanctions test routines to make it easier to add new ones r=keeler
1) Multipurpose-ing the TLSServer specialization to `SanctionsTestServer`
2) Renaming the `security/manager/ssl/tests/unit/test_symantec_apple_google` folder of certs to `test_sanctions`
3) Prepend a `symantec-` to the start of all relevant certs in the new `test_sanctions` folder
4) Renaming the existing xpcshell test to `test_sanctions_symantec_apple_google.js`

Differential Revision: https://phabricator.services.mozilla.com/D39942
2019-08-13 20:59:17 +00:00
Mike Hommey 3a02387025 Bug 1573314 - Add a dependency between 'target-shared' and 'target' targets in the same directory. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D41685
2019-08-13 03:00:43 +00:00
Axel Hecht 17ab09e582 Bug 1321281, add test framework for Fluent migration recipes, r=flod,ahal
Basic test infrastructure for Fluent migration recipes, automate creating
a reference from recipe data, and running the recipe dry and wet.

There are no hard failures for diffs, as it might just be OK.

Differential Revision: https://phabricator.services.mozilla.com/D40200
2019-08-08 11:54:30 +00:00
Mike Hommey 52e58be22d Bug 1572046 - Build shared libraries in a separate target. r=nalexander
When a directory, like toolkit/library, builds both a static and a
shared library, and another, like toolkit/library/gtest, depends on the
static part, it currently needs to wait for the shared library to be
finished building, preventing both libraries being built in parallel.

By separating shared libraries to a different target, we allow more
parallelism to the build.

Differential Revision: https://phabricator.services.mozilla.com/D41099
2019-08-07 22:50:14 +00:00
Justin Wood c2a2b86998 Bug 1473498 - More support for py3. r=firefox-build-system-reviewers,mshal
This patch makes BuildEnvironmentNotFoundException a subclass of AttributeError as well, because hasattr in
python3 no longer catches all tracebacks but only AttributeError, and we use both hasattr and
BuildEnvironmentNotFoundException to guard against a handful of buildconfig variables in a few places
where it is OK to not have a buildenvironment.

We also use universal_newlines in real_host in init.configure (since I found
that fix while working on the AttributeError one) so that we get the right string type back from the process call

Lastly this patch also uses BytesIO for calling into a ReducedConfigureSandbox as its stdout and stderr pipes,
This ensures that related code handling the sandbox doesn't complain about getbuffer() missing in StringIO in py3.

Differential Revision: https://phabricator.services.mozilla.com/D36605
2019-08-06 21:26:54 +00:00
rdalal e50448439e Bug 1569330 - Disable telemetry check in Normandy recipe runner r=mythmon,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D39576
2019-08-06 23:54:34 +00:00
Mike Hommey c650772476 Bug 1571636 - Expose build resources data from automation builds as artifacts. r=nalexander
The build docker images need python-dev installed to build psutil, used
by the build resources monitor.

Differential Revision: https://phabricator.services.mozilla.com/D40781
2019-08-06 21:26:47 +00:00
Mike Hommey 18d19fea55 Bug 1571636 - Rename the build resources list file and allow it not to be a list. r=nalexander
The longer version is that this changes how the HTML viewer looks up
files. Instead of looking at a list file that contains a list of
build resources data, it now looks at a build_resources.json file that
either contains data directly, or a list of files containing data.

Differential Revision: https://phabricator.services.mozilla.com/D40780
2019-08-06 18:34:21 +00:00
Mike Hommey d8ae7833f7 Bug 1571636 - Make the build resources list file contain the full relative path to all resource files. r=nalexander
Rather than imply they should all be in the resources subdirectory.

Differential Revision: https://phabricator.services.mozilla.com/D40779
2019-08-06 21:20:29 +00:00
Mike Hommey 33c9e30464 Bug 1571636 - Get d3.js from https. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D40778
2019-08-06 18:26:53 +00:00
Nick Alexander 290a525bab Bug 1512487 - Part 2: Add "global" lint type. r=ahal
This patch adds a global lint that only runs when a file or directory
that matches their configuration (via `extensions` and `exclude`) has
been modified or specified.

Global lints never shard into chunks; they are, by definition global
(i.e., across the entire source tree) and act on all inputs in a
single invocation.  It's up to the global lint to manage command line
sizes, etc.  Since batching is handled by the lint type but sharding
is handled by the lint roller, there's a little abstraction leak so
that the lint type can control how its invocation is sharded: the
existing `batch` member is generalized from the existing `True` and
`False` to add a new `"global"` value which disables sharding.

Differential Revision: https://phabricator.services.mozilla.com/D35275
2019-08-02 20:34:09 +00:00
Nick Alexander 35050783dd Bug 1512487 - Part 1: Allow lints to inspect part of the build environment. r=ahal
This allows lints to "condition" themselves on having a build
environment or a specific build application.  It also adds the "name"
parameter, so that setup functions can be shared across lints.

`MozbuildObject` cannot be used as parameters to functions distributed
via multiprocessing, since they cannot be pickled (due, currently, to
internal terminal handles).  Therefore we extract just a few key
parts of the environment to expose.

Differential Revision: https://phabricator.services.mozilla.com/D35274
2019-08-02 20:30:02 +00:00