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

36 Коммитов

Автор SHA1 Сообщение Дата
Mike Shal 3ce3aba1c7 Bug 1593948 - Touch clobber in configure.py instead of clobber.py; r=firefox-build-system-reviewers,chmanchester
If configure is invoked manually, clobber.py is bypassed and the CLOBBER
file doesn't get touched. The clobber check in Makefile.in gets
triggered causing the build to stop.

Moving the objdir/CLOBBER file creation into configure.py should cause
it to be created regardless of how configure is invoked.

Depends on D53290

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

--HG--
extra : moz-landing-system : lando
2019-11-19 21:49:13 +00:00
Mike Hommey ad930b523d Bug 844509 - Always encode config.status as utf-8. r=nalexander
Now that there is no bytes strings in it, we don't need to store
config.status in the system encoding to keep those valid. Moreover, the
system encoding is lossy, which utf-8 is not.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 21:26:32 +00:00
Mike Hommey 621ee253e1 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

--HG--
extra : moz-landing-system : lando
2019-08-20 22:22:14 +00:00
Mike Hommey d097494bcc 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

--HG--
extra : moz-landing-system : lando
2019-08-20 21:31:34 +00:00
Mike Hommey cc52fc2e1a Bug 1575135 - Define whether the system encoding is mbcs or utf-8 once. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D42601

--HG--
extra : moz-landing-system : lando
2019-08-20 16:40:24 +00:00
Justin Wood 7a37d64346 Bug 1559975 - Make configure.py lint with 'py2' and 'py3' r=catlee
Depends on D36090

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

--HG--
extra : moz-landing-system : lando
2019-07-08 17:34:09 +00:00
Justin Wood 38c14ef720 Bug 1547730 - Add six to path when running configure. r=glandium
This is necessary for any attempt at @import('six') or doing any similar py2+py3 work
in the configure sandbox.

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

--HG--
extra : moz-landing-system : lando
2019-05-28 14:23:35 +00:00
Mike Hommey 2ead86b7c1 Bug 1528241 - Add a trace mode to python configure that logs internal values. r=chmanchester
Differential Revision: https://phabricator.services.mozilla.com/D19940
2019-02-20 07:46:22 +09:00
Mike Hommey 889bc79f27 Bug 1520394 - Don't invoke js subconfigure as a separate process. r=nalexander
Since js configure is also python configure, we can actually create
a ConfigureSandbox directly, with the right environment and arguments.

Depends on D16668

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

--HG--
extra : moz-landing-system : lando
2019-01-16 23:42:12 +00:00
Chris Manchester 636b4fc4c0 Bug 1461836 - Write out complete configure dependencies from configure for consumption by make and non-make backends. r=mshal
MozReview-Commit-ID: 792seCZ2rs1

--HG--
extra : rebase_source : e6450cd2947e2fd55085a2af469535421bc07bfb
2018-05-21 14:01:50 -07:00
Mike Shal 642a32a948 Bug 1461795 - Use FileAvoidWrite when writing mozinfo.json; r=chmanchester
Since MozbuildObject.from_environment() reads from mozinfo.json, tup
picks up that file as a dependency for anything that imports buildconfig
(eg: all generated files). Using FileAvoidWrite when creating
mozinfo.json will help avoid unnecessary work after re-running configure
in the tup backend.

MozReview-Commit-ID: EEOPQYJA1MV

--HG--
extra : rebase_source : 136a0579090776dc55ea5cee870574f13cc27c58
2018-05-14 17:30:21 -04:00
Gregory Szorc 0bd6f6c942 Bug 1412460 - Don't write make variables in configure.d; r=mshal
So the file can be more easily consumed without this variable defined.

MozReview-Commit-ID: DF3ASwx4SZP

--HG--
extra : rebase_source : 7d760a71c8f0fa389c2f31f1b383a1f298220545
2017-11-01 15:02:11 -07:00
Sylvestre Ledru 358507fde2 Bug 1406650 - Make build/*.py and a few other files flake8 compatible and add them to the list of files to check r=chmanchester
MozReview-Commit-ID: icmFJtbWdN

--HG--
extra : rebase_source : 7b2ef783822bcad7f955bad8cbd6cea6df588f92
2017-10-07 16:45:22 +02:00
Mike Shal 10d4a372fd Bug 1402012 - Create config.statusd directory; r=glandium
The config.statusd directory is created alongside config.status, which
contains the same information but is split across many files instead of
all in a single file. This allows the build system to track dependencies
on individual configure values.

MozReview-Commit-ID: 2DbwKCJuNSX

--HG--
extra : rebase_source : 8b6257fd9c75cff3e4b6513d69048c0e3fdda5f4
2017-08-18 10:41:50 -04:00
Chris Manchester 2d2292267f Bug 1316140 - Allow use of multiprocessing from config.status on windows. r=mshal
This generalizes the monkey-patching of the main module added
in bug 914563 to allow multiprocessing to be used from config.status
(which triggers the same bug as when it's used with `mach` as main).

MozReview-Commit-ID: AdOdpKzmbsp
2016-12-21 16:28:28 -08:00
Chris Manchester eb8660f21f Bug 1317778 - Emit a depfile with python configure dependencies so Make will know when to re-run configure. r=glandium
MozReview-Commit-ID: AuTHadY7KqO
2016-12-02 10:05:57 -08:00
Mike Hommey f97add6317 Bug 1296503 - Switch config.status to unicode literals. r=ted
Ironically, the first thing we do with those unicode literals is convert
them to byte strings because the build backends don't like them yet.
2016-08-24 07:32:52 +09:00
Mike Hommey ce060d48bf Bug 1257049 - Stop spawning a separate process for config.status from configure.py. r=gps
--HG--
extra : rebase_source : c3a76c32eaca7a9a192e239ac143174d599fb28c
2016-08-19 11:11:57 +09:00
Elias Probst fa561f244a Bug 1293234 - Use octal notation for permission modes in the build system; r=gps
As of Python 3, decimal notations of octal values for permission modes
are no longer permitted and will result in a `SyntaxError` exception
(`invalid token`).

Using the proper octal notation which is also Python 2.7 compatible will
fix this issue.

--HG--
extra : rebase_source : 2e897c51f04ad0ee69071f84b98df224f3af72d3
2016-08-08 13:45:17 +02:00
Gregory Szorc fedd3f734d Bug 1285860 - Add python/mozbuild at beginning of sys.path; r=glandium
We want local source directory paths to take precedence over system
paths so system installed packages don't get used.

MozReview-Commit-ID: FIZ0RxqZj78

--HG--
extra : rebase_source : e8d484ea0c8a0bdb1df10375317f6b2c349b9162
2016-07-11 10:42:11 -07:00
Mike Hommey 9607db6e29 Bug 1283052 - Remove some of the magic around mozconfig detection. r=gps
The mozconfig detection logic has bitten us on many occasions in the
past. The following changes are made to tentatively improve the
situation:

- The API is modified such that autodetection of the mozconfig has
  to be a conscious decision made by the caller, and not triggered
  any time there is no mozconfig given, which could be a conscious
  decision of the opposite.

- mozinfo.json now stores the actual mozconfig (or lack thereof) used
  during configure.

--HG--
extra : rebase_source : c7a632afd414f25daf7bbe7e1a66c3736c26e039
2016-07-08 08:43:17 +09:00
Mike Hommey 8a3b88f341 Bug 1278415 - Also write a mozinfo for js standalone builds. r=gps
Historically, a mozinfo for js standalone build has not been necessary,
but with the move towards a) having things work with mach and b)
buildconfig using the MozbuildObject.from_environment in next patch,
mozinfo becomes necessary (it's required for
MozbuildObject.from_environment to find the directory is an objdir).

Interestingly, hazard builds do both a js standalone build and a desktop
Firefox build at the same time, both of which are done with MOZCONFIG
set in the environment... with the Firefox mozconfig. The result of now
writing a mozinfo for js standalone builds is that in that case, they
end up with a reference to the mozconfig, which the build system then
reads, and finds a MOZ_OBJDIR, which then doesn't match the js
standalone build objdir. So for those builds, reset MOZCONFIG.
2016-06-16 11:43:23 +09:00
Mike Hommey c4eadb8455 Bug 1258618 - Serialize substs/configs and defines bools as '1' or '' in config.status. r=nalexander
This allows to use True and False as values given to
set_config/set_define in moz.configure files, while postponing having to
deal with the long tail of things depending on the values from substs
and defines.

Ideally, everything would handle the bools just fine, but there are too
many things involved to deal with this right now: scripts using
buildconfig.{substs,defines}, scripts using ConfigEnvironment (e.g.
process_define_files.py), ConfigEnvironment itself, etc.
2016-03-23 09:24:47 +09:00
Mike Hommey cec6eb6fbb Bug 1257468 - Replace tests on BUILDING_JS with tests on MOZ_BUILD_APP==js. r=nalexander
Now that MOZ_BUILD_APP is set to js when building js/src, we can
distinguish those builds with MOZ_BUILD_APP==js instead of BUILDING_JS.
Consequently, remove BUILDING_JS.
2016-03-22 11:09:42 +09:00
Mike Hommey 0ea268dc18 Backout changesets f5090987b7c6, 48a94777837d and a63437a74f7a (bug 1257468) for SM bustage on a CLOSED TREE 2016-03-22 08:27:28 +09:00
Mike Hommey 37d7b30422 Bug 1257468 - Replace tests on BUILDING_JS with tests on MOZ_BUILD_APP==js. r=nalexander
Now that MOZ_BUILD_APP is set to js when building js/src, we can
distinguish those builds with MOZ_BUILD_APP==js instead of BUILDING_JS.
Consequently, remove BUILDING_JS.
2016-03-22 08:05:00 +09:00
Mike Hommey c15884c85a Backout changeset 37f3e53ede1f (bug 1257049) because of bustage. 2016-03-16 11:22:43 +09:00
Mike Hommey 2891514755 Bug 1257049 - Stop spawning a separate process for config.status from configure.py. r=gps 2016-03-16 10:55:10 +09:00
Mike Hommey 4fa84e7822 Bug 1254884 - Make JSON serialization to config.status more readable as python. r=chmanchester 2016-03-16 08:26:47 +09:00
Mike Hommey 64851de576 Bug 1256574 - Make the part writing and executing config.status importable for c-c. r=gps 2016-03-16 07:12:53 +09:00
Mike Hommey 9ac013d5cf Bug 1253502 - Move python virtualenv initialization to moz.configure. r=gps 2016-03-08 15:41:32 +09:00
Mike Hommey 74b4506047 Bug 1253203 - Move parts of configure.py into sandboxed moz.configure. r=nalexander,r=chmanchester
This moves all the reading mozconfig, finding autoconf, refreshing the
old configure, and running the old configure into sandboxed
moz.configure. This effectively bootstraps the sandboxed python configure.
2016-03-08 15:41:32 +09:00
Mike Hommey 29758f5f42 Bug 1250297 - Make python configure output config.status instead of old-configure doing it. r=gps
The nice side effect is that now we can have actual dicts for defines
and substs from the start, which simplifies so things, although it
requires adjustments to some unit tests.
2016-03-08 15:41:32 +09:00
Mike Hommey 465a32ca37 Bug 1251210 - In configure.py, take AUTOCONF from mozconfig (mk_add_options) as well. r=ted
--HG--
extra : rebase_source : 592c96d335325178767192041c3ad3e28b58baf5
2016-02-26 02:49:03 +09:00
Mike Hommey b82e33004b Bug 1251210 - In configure.py, take AUTOCONF from the environment, if set there. r=ted
At the same time, remove the (useless and wrong) check for AUTOCONF in
old-configure.in (wrong because it very likely is picking autoconf > 2.5).

--HG--
extra : rebase_source : 4a17c9d92c9561ef221b1a300e0e6d48ca56862f
2016-02-26 02:08:29 +09:00
Mike Hommey 7df9087b2b Bug 1250294 - Make configure a Python script that invokes the old configure.sh. r=ted
--HG--
rename : js/src/configure.in => js/src/old-configure.in
rename : configure.in => old-configure.in
2016-02-25 07:22:33 +09:00