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

51 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey a154421f99 Bug 1740042 - Use llvm-readelf instead of readelf when available. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D130949
2021-11-23 02:28:18 +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 e7f8314703 Bug 1693717 - Remove paths_have_priority argument to check_prog. r=firefox-build-system-reviewers,andi,sheehan,mhentges
It hasn't been used since bug 1482435.

Differential Revision: https://phabricator.services.mozilla.com/D105715
2021-02-22 22:20:42 +00:00
Mitchell Hentges e370b9e0e8 Bug 1677994: Clarify that configure executes progs without using shell r=firefox-build-system-reviewers,dmajor,glandium
Some distros include flags when they specify the location of a binary,
such as: `XARGS=xargs -r`.
This was confusing in `configure`, since:
* We require that environment variables contain only path
  overrides (without flags).
* The error message thrown when configure chokes was unclear: "why
  would `$ xargs -r` fail?"

This patch should make our "path-only" requirement more clear.

Differential Revision: https://phabricator.services.mozilla.com/D100044
2021-01-04 15:18:33 +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 663eefb54e Bug 1624535 - Make check_prog(allow_missing=depends(...)) work. r=froydnj
For consistency with e.g. pkg_check_modules.

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

--HG--
extra : moz-landing-system : lando
2020-03-26 00:19:31 +00:00
Mike Hommey 5da778f6e4 Bug 1617147 - Stop setting check_prog result to : for missing programs. r=nalexander,rstewart
This was cargo culted from the autoconf equivalent, and while it makes a
command that does "$(PROG) foo" work because it becomes ": foo", that
may or may not actually be a desirable outcome.

OTOH, we do have some places where there are some "ifdef PROG" that are
just plain wrong when PROG is always actually set.

One place I do know that does check if the value is not ":" is for
OBJCOPY, which is still set from autoconf.

All in all, looking at all the check_prog(allow_missing=True) we have in
python configure, it doesn't seem anything is checking for ":", and that
doesn't seem like the right status quo.

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

--HG--
extra : moz-landing-system : lando
2020-03-05 21:52:10 +00:00
Ricky Stewart 39e4717ac8 Bug 1607512 - mozbuild/test/configure/test_checks_configure.py supports Python 3 r=ahal,mars
Differential Revision: https://phabricator.services.mozilla.com/D58970

--HG--
extra : moz-landing-system : lando
2020-01-10 21:05:03 +00:00
Coroiu Cristina c9e1368a0f Backed out 5 changesets (bug 1607345, bug 1607284, bug 1607512, bug 1563797, bug 1607503) for flake8 failure at python/mozbuild/mozbuild/configure/__init__.py on a CLOSED TREE
Backed out changeset 8dab339bab78 (bug 1607512)
Backed out changeset 1c5880c1c459 (bug 1607503)
Backed out changeset 42a69c5056b0 (bug 1607345)
Backed out changeset 431cb34ec6b0 (bug 1607284)
Backed out changeset 9837631a9c71 (bug 1563797)
2020-01-10 22:59:13 +02:00
Ricky Stewart 54449c6d0e Bug 1607512 - mozbuild/test/configure/test_checks_configure.py supports Python 3 r=ahal,mars
Differential Revision: https://phabricator.services.mozilla.com/D58970

--HG--
extra : moz-landing-system : lando
2020-01-08 16:14:03 +00:00
Cosmin Sabou 4b7060c540 Backed out changeset f593f5a5bfa3 (bug 1555346) for build bustages on llvm-profdata. CLOSED TREE 2019-05-29 19:14:25 +03:00
Nathan Froyd 74a42ff95b Bug 1555346 - require llvm-profdata when using pgo with clang{,-cl}; r=dmajor
Detecting problems earlier is better than detecting them later.

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

--HG--
extra : moz-landing-system : lando
2019-05-29 15:59:18 +00:00
Dan Mosedale f1eec975a7 Bug 1482676 - configure should prefer .mozbuild copy of node
MozReview-Commit-ID: 91F4Z8GljkV
2018-08-13 09:24:56 -07:00
Sylvestre Ledru 816ba0c177 Bug 1406668 - Make build/moz.configure/*.configure compliant to the pep8 format + add to the list of directories to check r=glandium
MozReview-Commit-ID: 89NxxGUVjHV

--HG--
extra : rebase_source : 278ceb2d7d31da086216288bd54688fe25faa03b
2017-10-12 15:22:59 +02:00
Sebastian Hengst 3980c1732a Backed out changeset 4dc78384cb58 (bug 1406668) for flake8 linting failures. r=backout
--HG--
extra : rebase_source : 20f93207038c76e2804f255e4ebfdd5e03a8f7cc
2017-10-12 15:08:35 +02:00
Sylvestre Ledru a102c9f46a Bug 1406668 - Make build/moz.configure/*.configure compliant to the pep8 format + add to the list of directories to check r=glandium
MozReview-Commit-ID: 89NxxGUVjHV

--HG--
extra : rebase_source : 658301cb32e9c042cd1931456e4e7b8f475900bd
2017-10-11 16:28:29 +02:00
Sebastian Hengst 7a40cdf1bb Backed out changeset b526011049ee (bug 1406668) for linting failures. r=backout
--HG--
extra : amend_source : fe8373f9572300c7fd090f529c6957fbf905d9ef
2017-10-12 14:41:28 +02:00
Sylvestre Ledru 4e4de3339f Bug 1406668 - Make build/moz.configure/*.configure compliant to the pep8 format + add to the list of directories to check r=glandium
MozReview-Commit-ID: 89NxxGUVjHV

--HG--
extra : rebase_source : 3d22007ea6793961e7031603efe58cdc66e3c6c9
2017-10-11 16:28:29 +02:00
Mike Hommey 0cdaafffc5 Bug 1374727 - Apply check_prog's `when` to more of what it "expands" to. r=chmanchester
check_prog, when used with a `when` argument, doesn't work the same way
as putting it under a `with only_when()` block, while it should. The
difference comes from the fact that `with only_when()` applies the
`when` to every option and depends used in the block (which check_prog
calls a bunch of).

So, we "manually" apply the `when` to all option and depends in
check_prog. An alternative solution would be to put the whole function
under a `with only_when()` block, but that would mean reindenting the
whole function.

Either way, as a consequence, this requires the `when` to have a
dependency on --help for "non-trivial" functions, which fortunately,
there's only one of.

--HG--
extra : rebase_source : d91eca9e303c7062394d92a526983714ef3e612f
2017-06-21 07:19:33 +09:00
Mike Hommey 6ddaf5ad21 Bug 1316956 - Add a when argument to check_prog. r=chmanchester
--HG--
extra : rebase_source : ce5167bbceb31e554857cba940e72181a5fa361b
2017-05-13 07:12:56 +09:00
Mike Hommey 563880df0e Bug 1363585 - Forbid boolean operations on @depends functions. r=chmanchester
Doing something like "not foo" when foo is a @depends function is never
going to do what the user expects, while not necessarily leading to an
error (like, when used in set_config).

It is better to have an error in those cases where it's expected not to
work, at the expense of making templates a little more verbose, rather
than silently do something the user is not expecting.

--HG--
extra : rebase_source : 87ba80eccc5606322f6dd185d5cb5fc88471e51b
2017-05-10 11:35:22 +09:00
Mike Hommey 4eba7db364 Bug 1293579 - Use the new `dependable` function in a few places. r=chmanchester
--HG--
extra : rebase_source : 7062361fdb8e61b43a4044a3a7b1bf04f6ef3143
2016-08-09 15:55:10 +09:00
Mike Hommey afa6c4d5f3 Bug 1292046 - Add a check that the compiler works with -c out of the box. r=chmanchester
The base compiler check in python configure does some preprocessing,
which ensures the compiler works to some extent. Autoconf used to have
a more complete test, doing a compile/link. We do have plenty of tests
afterwards that do that anyways, but it's better if we fail early if
the toolchain fails somehow.

This refactors try_compile such that the *_compiler variable themselves
can be used to trigger compiler tests. Eventually, we'll want something
similar for preprocessing and possibly other invocations.

This also removes similar tests from build/autoconf/toolchain.m4.

--HG--
extra : rebase_source : c60d1d6e39b6bd2a377516687affd9b8932ebc12
2016-08-04 15:51:47 +09:00
Wes Kocher e2fcb18843 Backed out 2 changesets (bug 1292046) for android build failures a=backout
Backed out changeset 3263785341f2 (bug 1292046)
Backed out changeset a1b9e1631661 (bug 1292046)
2016-08-04 14:22:54 -07:00
Mike Hommey 94fe17e0c2 Bug 1292046 - Add a check that the compiler works with -c out of the box. r=chmanchester
The base compiler check in python configure does some preprocessing,
which ensures the compiler works to some extent. Autoconf used to have
a more complete test, doing a compile/link. We do have plenty of tests
afterwards that do that anyways, but it's better if we fail early if
the toolchain fails somehow.

This refactors try_compile such that the *_compiler variable themselves
can be used to trigger compiler tests. Eventually, we'll want something
similar for preprocessing and possibly other invocations.

This also removes similar tests from build/autoconf/toolchain.m4 and
old-configure.in.

--HG--
extra : rebase_source : 4f6f84e5ad220386e9edf82d19cc2cd6c1f4c43e
2016-08-04 15:51:47 +09:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Chris Manchester 463051b415 Bug 1267454 - Add a parameter to find_program and check_prog to allow searching the given paths instead of $PATH. r=glandium
MozReview-Commit-ID: F3lke9Q5rRR
2016-05-12 11:55:57 -07:00
Mike Hommey fb65986e09 Bug 1264482 - Fake an arbitrary __name__ in sandboxed global. r=ted 2016-04-19 15:09:37 +09:00
Mike Hommey c0808e5f6d Bug 1262087 - Make the @checking callback not alter the behavior for bools. r=chmanchester 2016-04-06 07:25:26 +09:00
Mike Hommey 9bf72e6993 Bug 1256573 - Switch moz.configure to use @imports instead of @advanced. r=nalexander 2016-03-30 07:07:53 +09:00
Mike Hommey 6eee113ee8 Bug 1259960 - Make check_prog more flexible about the list of programs it will check. r=chmanchester 2016-03-30 07:07:42 +09:00
Mike Hommey 028ebf69ff Bug 1259960 - Make check_prog more flexible about the input it receives. r=chmanchester 2016-03-30 07:07:40 +09:00
Mike Hommey 18a002cd83 Bug 1259960 - Allow to pass a string to check_prog to describe what is being looked for. r=chmanchester
So far, we've been using the lowercase of the variable name, but it's
not enough for some special cases. Those special cases could do their
own business, but then, they'd have to duplicate 90% of check_prog,
which is less desirable.
2016-03-30 07:07:38 +09:00
Mike Hommey cbf367717b Bug 1257516 - Make check_prog opt-in to the queued debug log messages. r=ted 2016-03-30 07:07:13 +09:00
Mike Hommey a2c9191daf Bug 1257516 - Add a unit test for check_prog(). r=ted
At the same time, shell quote the result it prints if it needs to be.
2016-03-30 07:00:22 +09:00
Mike Hommey 47d916d8f0 Bug 1257516 - Expose a sandboxed logger to moz.configure and use it. r=ted
This removes the warn() function and makes the die() function use the logger
instead of print.
2016-03-30 07:00:03 +09:00
Mike Hommey 96b6664c24 Bug 1257516 - Rename error() to die() and make it take arguments like the logging module. r=ted 2016-03-30 06:59:44 +09:00
Mike Hommey 3b84619fff Bug 1259620 - Add an optional formatting callback to @checking. r=gps 2016-03-26 07:17:51 +09:00
Mike Hommey 8a90d1c8e4 Bug 1259352 - Always fail check_prog if an explicit value was given on the command line or environment. r=ted 2016-03-25 06:54:35 +09:00
Mike Hommey 7cd6c430c1 Bug 1257823 - Move set_config() to the global scope. r=nalexander
The way set_config is set currently makes it difficult to introspect
moz.configure files to know what configuration items are being set,
because they're hidden in the control flow of functions.

This makes some of the moz.configure more convoluted, but this is why
there are templates, and we can improve the recurring cases afterwards.
2016-03-24 09:04:28 +09:00
Mike Hommey 2ee885572e Bug 1258785 - Return a None value when check_prog doesn't find a program. r=ted 2016-03-23 13:24:49 +09:00
Ted Mielczarek 8f2baa8e8b bug 1257542 - check_prog template should sanity check that progs is not a string. r=glandium
In Python parens around an expression without a trailing comma is not a tuple,
so ('foo') == 'foo'. This is really easy to screw up with check_progs, which
coerces progs to a list and would give you ['f','o','o'] in this case. This
patch enforces that the progs argument is a tuple or list and errors if it
is not.

MozReview-Commit-ID: 7BJZuF9B8D5

--HG--
extra : rebase_source : 5db9a6b4bb9ef7195c2513407810093bff5e9174
extra : amend_source : f67ab46c2ac00a2a95cfc67e9763ac12b690ac14
2016-03-17 11:04:12 -04:00
Mike Hommey b7f92d8834 Bug 1257413 - Fix check_prog() to properly fail when program is missing after bug 1256568. r=gps 2016-03-17 14:07:27 +09:00
Mike Hommey 896fa3fd26 Followup for bug 1256568 - Improve the help message for options check_prog adds. r=gps 2016-03-16 10:55:10 +09:00
Mike Hommey 986945d9e4 Bug 1256568 - Move doxygen, zip, unzip, xargs, rpmbuild, genisoimage and dsymutil detection to moz.configure. r=gps 2016-03-15 16:40:15 +09:00
Mike Hommey 254313370d Bug 1256568 - Move perl detection to moz.configure. r=gps 2016-03-15 16:40:15 +09:00