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

2275 Коммитов

Автор SHA1 Сообщение Дата
Carsten "Tomcat" Book f36d230b1f Merge mozilla-central to mozilla-inbound 2016-08-08 12:03:06 +02:00
Mike Hommey 50a4467ec3 Bug 1282256 - Make MozbuildObject.resolve_config_guess an instance method. r=gps
The last use that didn't have an existing instance was just removed.

--HG--
extra : rebase_source : 81f99e8a8d8046c9741e8a27072a6c4773fa7292
2016-08-04 13:43:47 +09:00
Mike Hommey e6fb85ebb3 Bug 1282256 - Make MozbuildObject.resolve_mozconfig_topobjdir an instance method. r=gps
The only use that didn't have an existing instance was just removed.

--HG--
extra : rebase_source : 47891a9bd5c6ecef31d8a2c7053c1ae8efe36fa5
2016-08-04 13:41:57 +09:00
Mike Hommey ad5e3fa4c4 Bug 1282256 - Remove MozbuildObject._config_guess. r=gps
Back when it was added, it was used, but it is not anymore, outside
test_base.py.

--HG--
extra : rebase_source : f0b9a4dab2985e89e9950eda774ae853c7de764c
2016-08-04 10:07:56 +09:00
Mike Hommey 6168f0df5b Bug 1282256 - Avoid loading mozconfig in MozbuildObject.from_environment. r=gps
We've been reading the mozconfig in MozbuildObject.from_environment to
check whether the mozconfig topobjdir matches the detected topobjdir.

Since bug 1278415, everything using the buildconfig python module now
calls MozbuildObject.from_environment, which reads the mozconfig. A lot
of things to that during the build. But none of them actually need the
data from the mozconfig, and the topobjdir match test has been breaking
things randomly on multiple occasions.

The topobjdir match test, however, really only needs to happen once:
when a mach command starts. So we can move the test to MachCommandBase,
where it belongs, and anything actively using MozbuildObject.mozconfig
will have the mozconfig read, but everything else won't.

On a Linux64 opt build, this brings down the number of times the
mozconfig is read during `mach build` from 979 to 9.

--HG--
extra : rebase_source : 6b340f1fcf73a3c3987033c37f8f14ef06a44f04
2016-08-04 11:17:41 +09:00
Phil Ringnalda d88f9174f3 Merge m-i to m-c, a=merge 2016-08-06 23:34:37 -07:00
Axel Hecht dc1f52c0e4 bug 1292557, update compare-locales to 1.1, r=flod
Notable changes:

Bug 1238150 - Don't consider trailing comments as junk
Bug 1292215 - Drop Junk entities from merged content, more tests

MozReview-Commit-ID: IkJMxBByHxK

--HG--
extra : rebase_source : 345944601d9d8f4d4c3d30445be05deb8acd99f7
2016-08-05 15:48:21 +02: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
Mike Hommey 81dfda1e3a Bug 1292046 - Add language to the compiler namespace. r=chmanchester
--HG--
extra : rebase_source : 3a8b2c87ec44272990eb4c799759df11115a40dd
2016-08-04 16:24:29 +09:00
Nathan Froyd f7fb6722a6 Bug 1231764 - part 6 - build rust code via cargo; r=chmanchester
This patch is really two separate changes.

The first change is that rust crates are large, standalone entities that
may contain multitudes of source files.  It therefore doesn't make sense
to keep them in SOURCES, as we have been doing.  Moving to use cargo
will require a higher-level approach, which suggests that we need a
different, higher-level representation for Rust sources in the build
system.

The representation here is to have the build system refer to things
defined in Cargo.toml files as the entities dealt with in the build
system, and let Cargo deal with the details of actually building things.
This approach means that adding a new crate to an existing library just
requires editing Rust and Cargo.toml files, rather than dealing with
moz.build, which seems more natural to Rust programmers.  By having the
source files for libraries (and binaries in subsequent iterations of
this support) checked in to the tree, we can also take advantage of
Cargo.lock files.

The second is that we switch the core build system over to building via
cargo, rather than invoking rustc directly.

We also clean up a number of leftover things from the Old Way of doing
things.  A number of tests are added to confirm that we'll only permit
crates to be built that have dependencies in-tree.
2016-08-06 00:49:26 -04:00
Nathan Froyd ef91835e00 Bug 1231764 - part 4 - add pytoml to the virtualenv; r=chmanchester
We need to parse Cargo.toml files from moz.build to determine crate
package names.
2016-08-06 00:49:26 -04:00
Nathan Froyd eb1514a4c1 Bug 1231764 - part 3 - rename RustRlibLibrary to RustCrate; r=chmanchester
rlibs are going to be less important once we start building with cargo:
the focus will move to crates instead, so that's what we should call the
moz.build object.
2016-08-06 00:49:26 -04:00
Nathan Froyd 63d290c934 Bug 1231764 - part 2 - pass the srcdir of an rlib in the moz.build object; r=chmanchester 2016-08-06 00:49:26 -04:00
Nathan Froyd 4fb1a7545d Bug 1231764 - part 0 - only link librul once; r=chmanchester
Through an oversight, we listed librul.a twice when linking libxul: once
as part of the "objects" we were linking, and once as a static library.
This duplication is unnecessary and would cause problems later when we
try to generate librul.a via cargo, as cargo will put it someplace
different from where we expect and the two names will conflict.  Let's
have rules.mk be the single source of truth for how librul.a is named,
and then the code to link libxul can simply refer to that name.
2016-08-06 00:49:26 -04:00
Timothy Guan-tin Chien 1f59a0d6b9 Bug 1292407 - Make artifact install call git with cwd equal to topsrcdir, r=nalexander
MozReview-Commit-ID: 9clWaG40qSL

--HG--
extra : transplant_source : %B4%BB%A7%D9x%1A%84%7C%16%C9%E2O/%C0%CB%97%1F%EA%9CQ
2016-08-05 14:41:34 +08:00
Wes Kocher 9605851be0 Backed out 7 changesets (bug 1231764) for apparently causing linux debug wpt bustage
Backed out changeset 4b71272c92cf (bug 1231764)
Backed out changeset 234d8a930afa (bug 1231764)
Backed out changeset f9b204c2f5a7 (bug 1231764)
Backed out changeset f933119e57e4 (bug 1231764)
Backed out changeset e3af0b1d3473 (bug 1231764)
Backed out changeset 643b03aae1dd (bug 1231764)
Backed out changeset a945dbf63410 (bug 1231764)

--HG--
extra : rebase_source : e71360fa4b5e3e74859c82e74e183e13e6211c4c
2016-08-03 16:27:06 -07:00
Nathan Froyd 6b2618fb44 Bug 1231764 - part 6 - build rust code via cargo; r=chmanchester
This patch is really two separate changes.

The first change is that rust crates are large, standalone entities that
may contain multitudes of source files.  It therefore doesn't make sense
to keep them in SOURCES, as we have been doing.  Moving to use cargo
will require a higher-level approach, which suggests that we need a
different, higher-level representation for Rust sources in the build
system.

The representation here is to have the build system refer to things
defined in Cargo.toml files as the entities dealt with in the build
system, and let Cargo deal with the details of actually building things.
This approach means that adding a new crate to an existing library just
requires editing Rust and Cargo.toml files, rather than dealing with
moz.build, which seems more natural to Rust programmers.  By having the
source files for libraries (and binaries in subsequent iterations of
this support) checked in to the tree, we can also take advantage of
Cargo.lock files.

The second is that we switch the core build system over to building via
cargo, rather than invoking rustc directly.

We also clean up a number of leftover things from the Old Way of doing
things.  A number of tests are added to confirm that we'll only permit
crates to be built that have dependencies in-tree.
2016-08-03 19:40:41 -04:00
Nathan Froyd eb4063d257 Bug 1231764 - part 4 - add pytoml to the virtualenv; r=chmanchester
We need to parse Cargo.toml files from moz.build to determine crate
package names.
2016-08-03 19:40:41 -04:00
Nathan Froyd be1a17c817 Bug 1231764 - part 3 - rename RustRlibLibrary to RustCrate; r=chmanchester
rlibs are going to be less important once we start building with cargo:
the focus will move to crates instead, so that's what we should call the
moz.build object.
2016-08-03 19:40:41 -04:00
Nathan Froyd c94c59b23b Bug 1231764 - part 2 - pass the srcdir of an rlib in the moz.build object; r=chmanchester 2016-08-03 19:40:41 -04:00
Nathan Froyd a79d68b929 Bug 1231764 - part 0 - only link librul once; r=chmanchester
Through an oversight, we listed librul.a twice when linking libxul: once
as part of the "objects" we were linking, and once as a static library.
This duplication is unnecessary and would cause problems later when we
try to generate librul.a via cargo, as cargo will put it someplace
different from where we expect and the two names will conflict.  Let's
have rules.mk be the single source of truth for how librul.a is named,
and then the code to link libxul can simply refer to that name.
2016-08-03 19:40:41 -04:00
Jan Beich 534b53feca Bug 1290647 - FreeBSD bootstrap: Drop pkg_add(1) support as it reached EOL downstream. r=glandium
MozReview-Commit-ID: 36Yn6n5bOeQ

--HG--
extra : transplant_source : %C8E%AC%85%A4%A4%A4%7D%DDMz%95%02%FE%D7_%973%04%16
2016-07-30 06:09:54 +00:00
Jan Beich 138edf609e Bug 1290647 - FreeBSD bootstrap: Add watchman (kqueue) for fsmonitor like bug 1231989. r=glandium
MozReview-Commit-ID: 36Yn6n5bOeQ

--HG--
extra : transplant_source : %E0%8Fbb%1AX8%A0%FE%80%0Db%C4%F3%85%C9%E6%C8%15z
2016-07-30 06:09:54 +00:00
Jan Beich a562e7c4ec Bug 1290647 - FreeBSD bootstrap: Prefer GCC if base Clang is too old after bug 1286204. r=glandium
MozReview-Commit-ID: 36Yn6n5bOeQ

--HG--
extra : transplant_source : FT%8F%90%1D%F86%81%A6%A1%E0%8CM%12%A6%F6%17_%CF%E7
2016-07-30 06:09:54 +00:00
Jan Beich fb7e6844d2 Bug 1290647 - FreeBSD bootstrap: Allow non-interactive install after bug 1151834. r=glandium
MozReview-Commit-ID: 36Yn6n5bOeQ

--HG--
extra : transplant_source : I%D4%D3%19%F9%ABv%1B%08%C4%B0F%D7%1C%BB%DA%18%0A%5C%C7
2016-07-30 06:09:54 +00:00
Jan Beich c705130fec Bug 1290647 - FreeBSD bootstrap: GNU tar is required for ./mach package. r=glandium
MozReview-Commit-ID: 36Yn6n5bOeQ

--HG--
extra : transplant_source : %9F0%B0%84%F2%EC1%E4M%0E%AA%B7%05U0.x%A6%E4%3D
2016-07-30 06:09:54 +00:00
Jan Beich a5309daec2 Bug 1290647 - DragonFly bootstrap: Recent versions have unzip(1) in base system. r=glandium
MozReview-Commit-ID: 36Yn6n5bOeQ

--HG--
extra : transplant_source : %27h%3A%82%F0%28%5E%00%1F%8D%C3%B5%95%A1%E4%C7t4%E5%1F
2016-07-30 06:09:54 +00:00
Jan Beich 7b316204ad Bug 1290647 - Add gconf2 to more platforms with bootstrap after bug 1167201. r=glandium
MozReview-Commit-ID: 36Yn6n5bOeQ

--HG--
extra : transplant_source : %B5%1F%06MW%DF%A8%FA%D8%7B%E5%20%E8%DC%B1%24%D2%AF%7B%ED
2016-07-30 06:09:54 +00:00
Mike Hommey da40819e21 Bug 1290040 - Make find_program return short paths automatically when paths contain spaces on Windows. r=gps
Also fake enough of ctypes to keep the configure unit tests passing
after these changes.
2016-08-02 13:20:44 +09:00
Mike Hommey 318ded3048 Bug 1289949 - Make mozpack.path properly handle paths on mingw python. r=gps
Mingw python has a different os.path setup from native python, and has
os.sep and os.altsep reversed. In that case, the normsep function was
doing the wrong thing, leading to all sorts of problems.

While fixing this, also ensure the corresponding unit test covers this
peculiarity, even when running under the native win32 python.

--HG--
extra : rebase_source : 8fb18e0d4dc669c1d7e069f73fc44c22d419d43c
2016-07-28 18:50:57 +09:00
Ehsan Akhgari 926b72001b Bug 1281968 - Include the flags passed through CC/CXX in ./mach compileflags; r=gps 2016-07-28 15:12:12 -04:00
Mike Hommey e6ea4a5bfe Bug 1195748 - Make mach clobber never auto-log. r=gps
This never was a problem since auto-logging was broken on Windows, but
having mach clobber auto-log is a problem on Windows since it tries to
remove the log file while itself has it open, which fails.

--HG--
extra : rebase_source : 6da9f3e6148c201eade01d4598ce9c4becd051a0
2016-07-27 16:29:02 +09:00
Mike Hommey 6283835342 Bug 1195748 - Fix mach auto-logging on Windows. r=gps
We were relying on the log manager's terminal to know whether we're
running on a terminal to turn on auto-logging, but the log manager's
terminal is always None on Windows because blessings imports curses,
which doesn't work on Windows.

So instead, just use a plain os.isatty() call.

The same problem also applies to the show-log command to trigger the
pager (less). At the same time, fix the environment setting for LESS,
as on Windows, unicode literals are not allowed in the environment.

--HG--
extra : rebase_source : 1462849608c8cb86afcb080184efb50caf6d2f9e
2016-07-27 13:42:18 +09:00
Carsten "Tomcat" Book 7293066753 merge mozilla-inbound to mozilla-central a=merge 2016-07-27 16:35:44 +02:00
Iris Hsiao bb2d612158 Backed out changeset 2141360b4137 (bug 1288425) for build bustage 2016-07-27 10:59:10 +08:00
Andrew Halberstadt 18f9c226a5 Bug 1288425 - Make sure we skip invalid extensions when linting with --rev or --workdir, r=smacleod
Some linters, such as flake8, will lint invalid file extensions if you explicitly pass them in. E.g,
|flake8 foobar.js| will result in flake8 attempting to lint a JS file. This is a problem because passing
in files explicitly is exactly what the --rev/--workdir options do. If a developer modifies a JS file
then runs |mach lint -l flake8 -w|, that JS file will get linted.

To prevent this, mozlint needs to handle file extensions instead of relying on the underlying linter to
do it. This patch adds an "extensions" config option to the LINTER dict, and will filter these files out
as part of the 'filterpaths' steps.

MozReview-Commit-ID: KYhC6SEySC3

--HG--
extra : rebase_source : 46807a4913660f33e691b864c2c59c448902dfa5
2016-07-19 13:50:25 -04:00
Nick Alexander c6f2ef4d51 Bug 1268944 - Remove GeckoView packaging. r=chmanchester
The best kind of patch: bulk deletion.  This removes two separate but
similar build flags, and an unsupported integration piece.  The first
packaged Fennec's resources into an ill-defined GeckoView archive; the
second built on the first to produce an Android ARchive for external
consumption.  Neither of these artifacts are supported or have
consumers; in fact, they mislead potential consumers, since they're
known to be broken.  The Gradle build work under the --with-gradle
flag, and significant follow-up, is the path forward if Mozilla wants
to invest in packaging GeckoView on Android for external consumption.
That is, rather than hacking together AAR files, we'll use the
well-supported Gradle mechanisms for building and publishing such
libraries.

MozReview-Commit-ID: 4Z1jJ8z0cyJ

--HG--
extra : rebase_source : b8e65f39c286313fe8963bf3832d9b6977ef188f
2016-07-25 11:54:03 -07:00
Gregory Szorc 217ec4c7cc Bug 1288610 - Add functions for creating deterministic tar archives; r=ted
I have a need to create tar archives deterministically
and reproducibly. Since we already have similar functionality in
mozpack for producting zip/jar archives, I figured it made sense for
this functionality to live in mozpack.

I made the functionality as simple as possible: we only accept
files from the filesystem and the set of files must be known in
advance. No class to hold/buffer state: just a simple function
that takes a mapping of files and writes to a stream.

MozReview-Commit-ID: If0NTcA7wpc

--HG--
extra : rebase_source : 9cbea36347ba2840dd5bff9dffefd994a73a0725
2016-07-25 12:46:07 -07:00
Carsten "Tomcat" Book b9a6c687fa merge mozilla-inbound to mozilla-central a=merge 2016-07-25 15:50:41 +02:00
Mike Hommey cb0e41dd08 Bug 1288313 - Ensure the host and target compilers build for the right endianness. r=chmanchester
--HG--
extra : rebase_source : d47263faac601a0d1b5a89ac6e9d3d373f0b15a1
2016-07-21 08:24:45 +09:00
Geoff Brown 0d1fe4cb03 Bug 1288450 - Add min sdk version to mozinfo.json; r=ahal 2016-07-22 14:31:36 -06:00
Nathan Froyd ed6e02e2df Bug 1288795 - remove dead assignments in test_emitter.py; r=chmanchester
Prevailing style in the file for when read_topsrcdir is being tested for
exception-throwingness is to omit the assignment, so let's make
everything consistent.
2016-07-23 00:28:05 -04:00
Geoff Brown 813df3ea0e backout 69094e855e27 for mozinfo test failures 2016-07-22 09:31:09 -06:00
Geoff Brown e85a5267b7 Bug 1288450 - Add min sdk version to mozinfo.json; r=ahal 2016-07-22 08:18:49 -06:00
Mike Hommey 13244904c4 Bug 1288313 - Ensure the host and target compilers build for the right kernel. r=chmanchester
--HG--
extra : rebase_source : 654ec31f94befe4c966570229d15e9e9288ec82f
2016-04-26 15:38:45 +09:00
Mike Hommey ae1ab9803b Bug 1288313 - Ensure the host and target compilers build for the right CPU. r=chmanchester
And for GCC and clang, try to see if adding -m32, -m64 or --target
works if they don't.

--HG--
extra : rebase_source : 874bc2404a5ccc48e938bc7d9b2fe67ba625cb3e
2016-04-22 15:08:55 +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
Mike Hommey 7721a052bc Fixup for bug 1286204 - Update error message to reflect the change in clang requirement. r=me 2016-07-20 20:58:49 +09:00
Andrew Halberstadt d5b1ff9f2e Bug 1287834 - [mozlint] Fix regression preventing specific linters from being run, r=smacleod
MozReview-Commit-ID: KYhC6SEySC3

--HG--
extra : rebase_source : bce3e321f407b89d65f1491be74384c0ae171431
2016-07-19 11:50:33 -04:00