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

2050 Коммитов

Автор SHA1 Сообщение Дата
Mike Shal 62ce34650a Bug 1293448 - Allow build backends to specify custom build commands; r=glandium
MozReview-Commit-ID: G6fICkYUDxd

--HG--
extra : rebase_source : c839919cae6683ce07cfaa9e701e7e9e50652040
2016-08-17 23:20:51 -04:00
Al Tsai 8f598a057d Bug 1297585 - Modify parameters for buildUrl to satisfy taskcluster changes. r=glandium 2016-09-01 15:02:09 +08:00
Mike Hommey 6070365bf2 Bug 1289946 - Work around preprocessor default defines in get_compiler_info(). r=gps
Some compilers on some platforms by default #define some of the values
we're using in the source we use in get_compiler_info(). Namely,
mingw-gcc #defines WINNT by default, and the WINNT in the source is then
replaced by 1, breaking the check.

The C preprocessor, fortunately, doesn't expand macros inside C strings.
So instead of `%KERNEL WINNT`, we output `%KERNEL "WINNT"`, and strip
out the double quotes. For good measure, we do this for all values in
the source used in get_compiler_info().

--HG--
extra : rebase_source : dd4cc2b8c3bf0cb508b09598706b74ccc12162be
2016-09-08 07:27:56 +09:00
Mike Shal 42ab09bca2 Bug 1297718 - Add config.status to sys.modules for dependency detection; r=glandium
MozReview-Commit-ID: J5WaTPYc0vJ
2016-08-26 10:04:07 -04:00
Henrik Skupin 1aa1a59ead Bug 1283919 - Move packaging of Marionette from make to the test archiver r=gps
MozReview-Commit-ID: AOQHcA46bCh

--HG--
extra : rebase_source : e313c669ad0ae999ecba954538572d22ae28b120
2016-08-17 13:43:51 +02:00
Henrik Skupin c2f0ef7c09 Bug 1283919 - Improve test package archiver for collecting files from directories referenced by a root manifest r=gps
MozReview-Commit-ID: EuGK3OS8XLj

--HG--
extra : rebase_source : 1a547d02d0da68fac3ca5401df36589357f0bbbe
2016-08-17 13:41:59 +02:00
Xidorn Quan a448b4c2d7 Bug 1298210 - Move remove objdir code into clobber.py so that autoclobber and clobber command share the same code. r=gps
MozReview-Commit-ID: 5X1AQac8Fqi

--HG--
extra : source : f6c73c140316b9d6a43b5864b5f36a2620d10b3a
2016-08-30 19:54:38 +10: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 31a17a020e Bug 1296503 - Add an indented_repr function to mozbuild.util. r=ted 2016-08-24 07:32:51 +09:00
Myk Melez 3050b7932b Bug 1296798 - set depth to chrome_src for refs in common.gypi; r=ted
MozReview-Commit-ID: EJTQNk6dbJ1
2016-08-23 14:58:27 -07:00
Myk Melez 1895887f26 Bug 1296798 - specify root_targets; r=ted
MozReview-Commit-ID: 6Ip87xChI8o
2016-08-23 14:58:23 -07:00
Mike Hommey b65bccd9ce Bug 1276003 - Move --enable-necko-protocols to python configure. r=chmanchester
--HG--
extra : rebase_source : 6187c1a382b240e2fa01f38f4c739000d5f177ce
2016-08-18 09:57:06 +09:00
Gregory Szorc 579fbb5cf2 Bug 1290201 - Don't clobber .mozbuild directory by default; r=ted
.mozbuild/last_log.json is opened by the process doing the deleting.
On Windows, you can't delete an opened file.

So stop clobbering the .mozbuild directory.

This directory only holds non-essential artifacts from mach/build
invocations. I don't think keeping it around will break anything.

MozReview-Commit-ID: 9b0AC2ywAAZ

--HG--
extra : rebase_source : 9236e3e282d1db2595e8b36353008bc98e2ae6cf
2016-08-19 11:11:48 -07:00
Mike Hommey 885b56f5f4 Bug 1296502 - Serialize lists when preparing a context for the preprocessor in build backends. r=gps
Some substs values are lists, and some CONFIGURE_SUBST_FILES use them,
and don't expect the substitution to use a pythonic expression of the
value. So serialize those lists.

--HG--
extra : rebase_source : 848962c326236607609bca2b92180c8f6f4ad079
2016-08-19 11:33:18 +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
Ryan VanderMeulen 01c4e8cc1b Merge inbound to m-c. a=merge 2016-08-19 09:52:53 -04:00
Gregory Szorc 4a0f2d02bc Bug 974281 - Do not clobber msvc directory by default; r=ted
The "remove_objdir" method has been rewritten to support partial
clobber. It still defaults to full clobber. But the "full" argument
can be passed as False to limit to a partial clobber where currently
the "msvc" directory (contains Visual Studio files) is not clobbered.

On Windows, there might be a regression with this change because
we'll be invoking N winrm.exe processes and new processes have
a non-trivial overhead on Windows. However, it is hopefully unlikely
that new processes are more overhead than deleting hundreds of thousands
of files.

MozReview-Commit-ID: 7yeMttztwic

--HG--
extra : rebase_source : 646992be199e1059f0b09cf8bed3334085293fe0
2016-03-11 15:11:33 -08:00
Gregory Szorc 303d2ef97a Bug 974281 - Use mozfile.remove since rmtree is deprecated; r=ted
My Python editor told me rmtree has been marked as deprecated. Use
mozfile.remove instead.

MozReview-Commit-ID: FYkXk1fnxvC

--HG--
extra : rebase_source : df392e8832e52501950f09acda208943c9e3d707
2016-03-11 15:08:54 -08:00
Wes Kocher 45575a7f86 Merge m-c to autoland, a=merge
a=release for the webidl hook for a comment-only change

--HG--
extra : amend_source : e590e515ab273d097f88b35be0e5c999502ebdf4
2016-08-16 22:07:30 -07:00
Wes Kocher 48b8d407c8 Merge inbound to central, a=merge
a=release to get around the webidl hook for a comment-only change

--HG--
extra : amend_source : f7e57101e1a25d3cf3536a256898ec2a21c54b38
2016-08-16 17:05:30 -07:00
Gregory Szorc 2562138ede Bug 1291944 - Verify makensis binary is 32-bits; r=glandium
This required implementing a utility function to resolve the binary
type. I used GetBinaryTypeW via ctypes because this seems the fastest.
I arbitrarily limited the function to testing 32-bit and 64-bit Windows
executables because hopefully those are the only executables we'll
ever encounter. We can expand the binary detection later, if needed.
This includes support for running on non-Windows platforms.

MozReview-Commit-ID: CYwyDWQrePc

--HG--
extra : rebase_source : 8fd7ca7f253d9e9e18d64784652a5ff934ad2272
2016-08-15 18:11:48 -07:00
Mike Hommey c6d1e73834 Bug 1294585 - Move --with-*-keyfile options to python configure. r=chmanchester 2016-08-16 08:32:51 +09:00
Gregory Szorc 46ad65f8b8 Bug 1293868 - Write mozinfo.json deterministically; r=glandium
And with indentation so it is easier for humans to read.

MozReview-Commit-ID: Kkd6vmfLNUf

--HG--
extra : rebase_source : 9f2b4ad2223f361dd6dd1ec9cdda71bd5a8560e3
2016-08-09 19:11:54 -07:00
Mike Shal 355501af0c Bug 1294510 - cleanup CompileDB backend; r=glandium
MozReview-Commit-ID: Lj4ahLzZJh9

--HG--
extra : rebase_source : 3a2ce98147327094b2a65429a64ee03b67ef0580
2016-08-11 15:50:31 -04:00
Wes Kocher a177bd0ff1 Merge m-c to inbound a=merge 2016-08-17 17:24:02 -07:00
Chris Manchester bea5e287fc Bug 1240134 - Fixup TarFinder test on Windows by closing the TarFile after the test. r=me
MozReview-Commit-ID: EbP4o5XLCeB
2016-08-17 16:12:14 -07:00
Chris Manchester b0b84a1928 Bug 1240134 - Incorporate the interfaces.xpt from downloaded artifacts instead of building XPIDL during an artifact build. r=glandium
MozReview-Commit-ID: 8oEyS1xLOwV
2016-08-17 15:02:31 -07:00
Chris Manchester 337f05f14a Bug 1240134 - Use the UnpackFinder when extracting from archives for an artifact build. r=glandium
MozReview-Commit-ID: C5Y9oC6ywwP
2016-08-17 15:02:31 -07:00
Chris Manchester a22526073a Bug 1240134 - Implement a TarFinder to facilitate extracting files from compressed Firefox archives. r=glandium
MozReview-Commit-ID: F4l8505bvwR
2016-08-17 15:02:31 -07:00
Chris Manchester 309a20b1c8 Bug 1240134 - Re-factor UnpackFinder to contain a Finder instance it delegates to rather than inheriting from FileFinder. r=glandium
MozReview-Commit-ID: LKYCROED06S
2016-08-17 15:02:31 -07:00
Wes Kocher 02224536e4 Merge m-c to autoland, a=merge 2016-08-10 16:56:26 -07:00
Mike Hommey 202b56d2fe Bug 1293840 - Determine HAVE_64BIT_BUILD from --target. r=chmanchester
Until now, HAVE_64BIT_BUILD was entirely determined by a compiler check.
But we didn't run the check on e.g. artifact builds, while relying on
its result for some non-compilation related things, leading to subtle
discrepancies.

This changes the configure check to derive HAVE_64BIT_BUILD from bitness
determined by the target CPU, and double checked with a compiler check.

--HG--
extra : rebase_source : 5dc0cf2369ed4457bdd9a15736a70265a771d919
2016-08-10 11:39:16 +09:00
Mike Hommey 93ac00658e Bug 1293837 - Change try_compile() to return True when the test passes. r=chmanchester
Currently, it returns either None or the contents of the compiler's stdout,
which is always expected to be an empty string, and is not very useful. So
instead, return True in the latter case.

--HG--
extra : rebase_source : ee69cdeab38d27178ce759591fb394da65e694ac
2016-08-10 10:00:43 +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
Mike Hommey 77ee4f3ce4 Bug 1292463 - Move MOZ_C{,XX}_SUPPORTS_WARNING to python configure. r=chmanchester 2016-08-10 10:50:01 +09:00
Mike Hommey 7a80b4e7ee Bug 1292463 - Rename compilechecks.configure and test_header_checks.py. r=chmanchester
to, respectively, compile-checks.configure and test_compile_checks.py.


--HG--
rename : build/moz.configure/compilechecks.configure => build/moz.configure/compile-checks.configure
2016-08-10 10:49:59 +09:00
Carsten "Tomcat" Book d9e0b4c565 merge mozilla-inbound to mozilla-central a=merge 2016-08-09 15:44:51 +02: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
Mike Hommey 6bdf5756ec Bug 1292046 - Add language to the compiler namespace. r=chmanchester
--HG--
extra : rebase_source : c258416a1cec59627e27d4f59e40f1425464f9c5
2016-08-04 16:24:29 +09:00
Mike Hommey 69e768cba4 Bug 1292439 - Use a fake _winreg module during tests. r=chmanchester
While on automation, there is no MSVC to find through the registry, the
story is different on local builds, and that can interfere with tests.

Specifically, it breaks test_toolchain_configure.py because it's not
expecting the registry to provide a valid path to an almost valid
compiler, and then fails because that compiler doesn't match the
expected target CPU.

And because build/moz.configure/toolchain.configure also affects the PATH
environment variable, subsequent tests end up failing even earlier
because executing the empty mozconfig with the modified environment then
fails because of the unicode value of PATH.

This change implements enough of _winreg to make the get_registry_values
function return nothing.

--HG--
extra : rebase_source : f70e40ddabaed1197f6cddce67832bb112f1969d
2016-08-05 14:16:35 +09:00
Mike Shal 035d0ca1a0 Bug 1293385 - Remove idls attribute from BackendMakeFile; r=gps
MozReview-Commit-ID: 4X9iIJArkYg

--HG--
extra : rebase_source : e31ff98109e0f25fadc6f17c685302a2252b214a
2016-08-05 13:23:44 -04: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
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 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
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 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
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
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
Mike Hommey 7df7b057ce Bug 1286204 - Require at least clang 3.6. r=froydnj
--HG--
extra : rebase_source : e49f87d8c7d47c48a23650fbbbbf0dafbccc209d
2016-07-08 16:38:55 +09:00
Carsten "Tomcat" Book a61e84c9f3 merge fx-team to mozilla-central a=merge 2016-07-17 09:16:38 +02:00
Xidorn Quan 41183dd2dc Bug 1287069 - Add --disable-e10s for mach run. r=gps, a=KWierso
MozReview-Commit-ID: 2rIEsYwxZj5

--HG--
extra : amend_source : a9ce0e812cf1fb43641e8bb6a608806a383210f9
extra : transplant_source : %EA%97%EC%EC%7Dc%E9%3C%01%93%A4%3F%95X%864R/%1B%96
2016-07-15 20:20:49 +10:00
Nathan Hakkakzadeh e5cc1aa101 Bug 1100925 - Vendored pylru 1.0.9 into mozilla-central. r=gps
This makes building on msys2 easier since its pip is broken.

MozReview-Commit-ID: 1hQHeu3BKOd

--HG--
extra : rebase_source : 5447d96893a502225980d1dab7b4f89b888ad661
2016-07-13 14:22:01 -07:00
Andrew Halberstadt d3c5539c81 Bug 1278890 - Add xpcshell support to test package mach environment, r=armenzg
This adds the 'xpcshell-test' command to the mach environment found in the test
package. This will allow developers to easily run xpcshell after checking out
and interactive worker.

MozReview-Commit-ID: fBAbfuG5XQ

--HG--
extra : rebase_source : 71077c9142f33843ed87d4bc4617a780f775939b
2016-07-13 10:55:37 -04:00
Nathan Hakkakzadeh 9a1951f28d Bug 1100925 - bin_path method of virtualenv.py in mozbuild now accurately detects if virtualenv is in a windows system. r=gps
Before bin_path would detect msys2 as if it were a windows system which would cause a virtualenv problem since the binaries should go in a /bin folder not a /Scripts folder for msys2.

Based on a patch by :vlad 89b21efe93

MozReview-Commit-ID: IyAukszHGmN

--HG--
extra : rebase_source : 9ada9cf61b76c85cf483ad8212c95d17070a7025
2016-06-02 12:26:47 -07:00
Nathan Hakkakzadeh 496b526e30 Bug 1100925 - Added mingw32-make to the list of possible makes. r=gps
Technically, this includes the mingw64 version of make, but it is still called mingw32-make when installed from pacman with msys2.

This is a necessary step to make Firefox build on a pure msys2 environment.

Also, unlike mozmake, because this make is installed from a package manager. It can be automatically updated.

MozReview-Commit-ID: EAN6xmIgYWd

--HG--
extra : rebase_source : 43fe0d4b35e91f1143ce2ea1d20f5f3c5f1f7c86
2016-05-31 15:47:37 -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
Gregory Szorc 5030a743a1 Bug 1186064 - Require Visual Studio 2015 Update 2; r=glandium
Per froydnj in bug 1186064 comment #23, "it makes sense to proceed with removing
MSVC 2013 support." This commit does that.

We also go a step further and require VS2015 Update 2 instead of just
update 1. This temporarily brings us down to just 1 officially supported
Visual Studio version. However, VS2015u3 was just released and is
unofficially supported.

Since MOZ_CRT is no longer set, references to it have been removed.

MozReview-Commit-ID: 8MUR6qLzQA5

--HG--
extra : rebase_source : 8f5061080a3d56dd484f9be03649fb65f0145f67
2016-07-06 09:01:38 -07:00
Wes Kocher a425a052c1 Backed out changeset d7f98208809f (bug 1186064) for breaking SM(pkg) jobs a=backout 2016-07-06 10:11:04 -07:00
Gregory Szorc 6e4d0edfbc Bug 1186064 - Require Visual Studio 2015 Update 2; r=glandium
Per froydnj in bug 1186064 comment #23, "it makes sense to proceed with removing
MSVC 2013 support." This commit does that.

We also go a step further and require VS2015 Update 2 instead of just
update 1. This temporarily brings us down to just 1 officially supported
Visual Studio version. However, VS2015u3 was just released and is
unofficially supported.

Since MOZ_CRT is no longer set, references to it have been removed.

MozReview-Commit-ID: 8MUR6qLzQA5

--HG--
extra : rebase_source : 22ab4f47661ead4995d0c5261104abfb02b82aa2
2016-07-06 09:01:38 -07:00
Gijs Kruitbosch 47178e3a6c Bug 1282420 - fix artifact builds so they don't depend on mach being invoked in the topsrcdir, r=chmanchester
MozReview-Commit-ID: BjgxYVI2se0
2016-06-27 14:42:38 +01:00
Gregory Szorc 71f937363c Bug 1294475 - Remove disabling of 8dot3 filenames; r=glandium
Since it conflicts with moz.configure which resolves shortnames since
parts of the build system don't like paths with spaces.

MozReview-Commit-ID: nJkRV4Nafo

--HG--
extra : rebase_source : 9f2db54ec38eb0f05b478b445c0a883ca69b0127
2016-08-16 10:04:20 -07:00
Ted Mielczarek f04fd21cff bug 1280220 - find_program should append an exe extension to absolute paths on Windows. r=glandium
MozReview-Commit-ID: 2gaLnL5x2zR

--HG--
extra : rebase_source : 9f5941bbfa73b75c903a64a9be257d205236778d
2016-06-16 12:05:12 +01:00
Mike Shal b7110a8a71 Bug 1275111 - Move artifact download/install into its own tier; r=glandium
This also fixes the issue of processing the artifacts twice in some
situations (bug 1275673). Note that the artifact download no longer
happens when a specific target is passed to 'mach build'.


MozReview-Commit-ID: Ktys6u3r1kG
2016-06-01 13:48:53 -04:00
Chris Manchester 4821b30b36 Bug 1278700 - Add missing libraries to Mac artifact builds to avoid failing in the packager when doing an artifact build on automation. r=mshal
MozReview-Commit-ID: 7wv57TcdLUR
2016-06-17 00:58:36 -07:00
Mike Hommey a4b157940a Bug 1278415 - Make the buildconfig module use MozbuildObject.from_environment. r=gps
The buildconfig module predates MozbuildObject.from_environment, and
it's about time to start factoring things out such that we only have
one way to get config.status data. This is step 1: making the
buildconfig module use MozbuildObject.from_environment.

Eventually, we'll want to remove the buildconfig module uses everywhere.
2016-06-16 11:43:35 +09:00
Mike Hommey 721ada9f07 Bug 1278415 - Ensure MOZ_CURRENT_PROJECT is set when running make directly in objdir. r=gps
The topobjdir-finding logic in mozbuild relies on MOZ_CURRENT_PROJECT
being set, and it's currently only set when going through client.mk.

On automation, during universal builds, make check is invoked directly
in one of the objdirs, so MOZ_CURRENT_PROJECT is not set. We've had
other similar problems in the past. Ensuring MOZ_CURRENT_PROJECT is set
in the objdir itself should reduce the risk of other such issues in the
future.
2016-06-16 11:43:30 +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
Justin D'Arcangelo 26ebe8e651 Bug 1272102 - FlyWeb Android UI. r=sebastian
--HG--
extra : amend_source : b1bac8800988d31790a64a293403336375e5effd
2016-06-08 21:37:06 -04:00
Chris AtLee e1b0b79d4d Bug 1275998 - L10n repacks should use the same compression settings for omni.ja as en-US r=glandium
MozReview-Commit-ID: DwuERh5MjX7

--HG--
extra : rebase_source : f447a41ebe48ab075327e0c0f8372d72976b6333
2016-05-27 08:37:09 -04:00
Carsten "Tomcat" Book 733eeabb87 Backed out changeset 6134b92d1b08 (bug 1277483) 2016-06-07 11:46:16 +02:00
Ms2ger dcb03a5c62 Bug 1277483 - Another followup to fix bustage. 2016-06-07 11:00:31 +02:00
Chris Manchester 6e0414ca1a Bug 1277841 - Use defines and substs from the artifact mach command instead of importing buildconfig in artifacts.py r=glandium
MozReview-Commit-ID: 8fMtTWR93Bw

--HG--
extra : rebase_source : f7e4b2057fea8ecbbcfe15b52226f4a15865e855
2016-06-06 16:14:21 -07:00
Mike Hommey a9067e9211 Bug 1244446 - Run automation build steps before postflight_all. r=gps,r=ted
Killing the sccache background daemon is part of postflight_all, but in
the current setup, postflight_all happens at the end of a "normal" build,
but we run automation build steps after that.

What happens then is that more compilations happen (gtests), which start
sccache again, but there's nothing to kill sccache again once this is
all done.

Now that the OSX universal builds postflight is gone, it is not
necessary for postflight_all to happen before the automation build steps.
So ensure postflight_all scripts happen last.

The downside of this change is that this now prevents sccache.log from
being uploaded, but we should probably send processed data to the graph
server instead.
2016-06-07 07:41:22 +09:00
Carsten "Tomcat" Book c51c48ac35 Backed out changeset 1d2c46c8c7c7 (bug 1244446) 2016-06-06 14:28:44 +02:00
Mike Hommey 8fdf97ddfe Bug 1244446 - Run automation build steps before postflight_all. r=gps,r=ted
Killing the sccache background daemon is part of postflight_all, but in
the current setup, postflight_all happens at the end of a "normal" build,
but we run automation build steps after that.

What happens then is that more compilations happen (gtests), which start
sccache again, but there's nothing to kill sccache again once this is
all done.

Now that the OSX universal builds postflight is gone, it is not
necessary for postflight_all to happen before the automation build steps.
So ensure postflight_all scripts happen last.

The downside of this change is that this now prevents sccache.log from
being uploaded, but we should probably send processed data to the graph
server instead.
2016-06-06 14:18:39 +09:00
Chris Manchester 79fb27c7a1 Bug 1274090 - Attempt to convert str objects containing non-ascii characters in Python configure rather than failing outright. r=glandium,gps
MozReview-Commit-ID: CxFqFXS7Dh9

--HG--
extra : rebase_source : cd5136461756248335245d433b579dd06d266c97
2016-05-31 10:34:05 -07:00
Chris Manchester c373236c7a Bug 1276037 - Update artifact builds to be able to find Linux taskcluster builds. r=mshal
MozReview-Commit-ID: 7ERnMW9xIwC

--HG--
extra : rebase_source : bb850a4d9366b67bb74420fde8b6e2772824ee14
2016-05-26 18:11:19 -07:00
Chris Manchester 726b97efc8 Bug 1269517 - Implement check_header in Python configure. r=glandium
MozReview-Commit-ID: 1AypZg3f79a
2016-07-26 15:27:19 -07:00
Chris Manchester 414823b805 Bug 1269517 - Implement try_compile for Python configure. r=glandium
MozReview-Commit-ID: AE7uRVneGXJ
2016-07-26 15:27:19 -07:00
Chris Manchester 46a1df138f Bug 1269517 - Outfit the configure tests' fake compiler to handle compilation calls. r=glandium
MozReview-Commit-ID: 80kwRjHUJb9
2016-07-26 15:27:19 -07:00
Carsten "Tomcat" Book f36d230b1f Merge mozilla-central to mozilla-inbound 2016-08-08 12:03:06 +02: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
Mike Hommey fa78b01aa0 Bug 1275419 - Add support for the --option=+a,-b kind of options in python configure. r=chmanchester 2016-05-26 21:29:56 +09:00
Stephen Pohl 15ea9c51d6 Bug 1275622 - Artifact builds busted due to updater name change on OSX. r=cmanchester 2016-05-25 12:07:52 -07:00
Gregory Szorc 2d6fb1ed77 Bug 1275297 - Create Visual Studio project files by default on Windows; r=glandium
Now that the VisualStudio backend will no-op if nothing has changed, it
should be safe to always run this backend.

On first run, backend generation takes ~3.5s on my machine. On subsequent run,
it takes ~1.5s. Wall time for a no-op config.status is now ~15.7s. We could like
make the Visual Studio backend faster by not writing so many project files.
But this would require consolidating libraries in moz.build files. And that's
out of scope for this change.

We drop the check for MSVS_VERSION because it won't always be defined on
MinGW/GCC builds. We simply default to "2015" if it isn't set.

MozReview-Commit-ID: 5W38HMGmcuV

--HG--
extra : rebase_source : 302d76277058819c115f3c2518b8cb2067971950
extra : source : 408319d87eacb28848efeab0346eb815440adade
2016-05-24 08:47:24 -07:00
Gregory Szorc dba3191147 Bug 1275297 - Write VisualStudioVersion to solution file; r=chmanchester
There is probably a way to dynamically retrieve the version. But rather
than take the chance we'd query the wrong thing, let's just parse the
version that Visual Studio writes to the solution file when saving it and
use it.

With this change, generating the VisualStudio build backend should not change
any files unless the build config has changed. This means we can generate
Visual Studio files at will without causing Visual Studio to complain
about the solution and other files changing and needing reloading.

MozReview-Commit-ID: 1udZ72SLEzP

--HG--
extra : rebase_source : d15bff5b30a021dc1180e48fb7bb0d6c84871b69
2016-05-24 08:21:41 -07:00
Gregory Szorc ef99842bf6 Bug 1275297 - Write MinimumVisualStudioVersion to solution file; r=chmanchester
Visual Studio will write this variable to an ancient Visual Studio
version (2010 I believe) if we don't specify it. Explicitly write the
variable to the minimum Visual Studio version we support.

MozReview-Commit-ID: 8Y0im48OM2G

--HG--
extra : rebase_source : 7b1f4cfe778c6258dce068b2aec8b6acd8e85102
2016-05-24 08:14:06 -07:00
Gregory Szorc 96ada3b958 Bug 1275297 - Use proper header in solution file; r=chmanchester
Upon further examination, VS2013 and VS2015 share the same file format
version. They also write the internal version number in a comment, not
the user-facing production version.

MozReview-Commit-ID: 92HB0pEzeI6

--HG--
extra : rebase_source : ebf00ae704ccd44415f8d7054359c87287734926
2016-05-24 07:58:25 -07:00
Gregory Szorc fb053cc0d2 Bug 1274444 - Check for null console before attempting to flash it; r=glandium
GetConsoleWindow() can return NULL. Previously, we may have passed a NULL
console reference into FlashWindowEx(). On my machine (when running in a
console), passing NULL doesn't seem to cause an error. But since we have
a report of this function hanging, it is quite possible it can cause
hangs in other scenarios. Since a NULL console won't result in any
notification, let's not call FlashWindowEx() when no console is available.

MozReview-Commit-ID: LrKX8weUkzX

--HG--
extra : rebase_source : 6c3fc724dbc038f6b51bbdc14d985202c47074e8
2016-05-20 14:22:38 -07:00
Gregory Szorc 8cddc84662 Bug 1260299 - Remove "experimental" label of Visual Studio files; r=chmanchester
The label has been there for years. It isn't really experimental.
The Visual Studio solution still leaves a lot to be desired. But
let's not scare people away by calling it experimental.

MozReview-Commit-ID: 7UvsbsKNnWw

--HG--
extra : rebase_source : a7d3f824859629297a782a0883ebf78af1d8fa70
2016-05-19 21:56:28 -07:00
Gregory Szorc 9ad306489c Bug 1260299 - Use FileAvoidWrite when writing Visual Studio files; r=chmanchester
By using self._write_file() and FileAvoidWrite, we avoid writing files
unless they change. This means that Visual Studio won't want you to
reload the solution and projects whenever the backend is generated.
This means you can regenerate the backend all you want and chances are
it won't disrupt your Visual Studio experience.

Since self._write_file() creates parent directories for us, we were
able to remove this code.

If you run `mach build-backend --diff` with this commit, output will
change. For reasons I don't understand, we were producing XML with
e.g. \r\r\n sequences. This patch appears to restore \r\n. How
we got \r\r I don't know because I can't find anywhere in the code
where that can occur. But this commit does appear to restore sanity.

Also, it appears modern versions of Visual Studio (perhaps only VS2015)
doesn't write your project files. When I initially implemented Visual
Studio project generation several years ago, as soon as you loaded
the solution and hit "Save All" Visual Studio would re-save your files
using a slightly different formatting (it did some gnarly things with
XML indentation). VS2015 doesn't do this. So your files on disk should
be unmodified for longer, making Visual Studio a more viable development
environment. Yay.

MozReview-Commit-ID: 7CSk0dsLOli

--HG--
extra : rebase_source : 3cd04ba8ffed8fc8880de66b1f4fce1f6300b51c
2016-05-19 21:11:36 -07:00
Gregory Szorc cff488fdeb Bug 1260299 - Allow _write_file to pass mode argument to FileAvoidWrite; r=chmanchester
Currently, self._write_file() instantiates FileAvoidWrite instances
with the default mode of 'rU' which uses universal newlines (\n).

Visual Studio project files use CRLF newlines. We want to use
self._write_file() in the Visual Studio backend (which predates
self._write_file). Prepare for this by passing the mode argument
through.

MozReview-Commit-ID: LHCUf3IrpJ8

--HG--
extra : rebase_source : be08d8e043ef625f8f846c38446e1430e072a665
2016-05-19 21:03:07 -07:00
Gregory Szorc 75c3a5c27e Bug 1260299 - Generate Visual Studio project files corresponding to current toolchain; r=chmanchester
If we're running VS2013, we generate VS2013 files. If we're running VS2015,
we generate VS2015 files. If we don't have a Visual Studio version
defined, refuse to generate project files (hopefully this doesn't
happen in the real world but I'm sure someone will complain if it does).

MozReview-Commit-ID: 5GdsbGmWPLB

--HG--
extra : rebase_source : 1a50c0fa5b7980ad25fb3ed3c1ec2c95f16996b6
2016-05-19 20:08:46 -07:00
Gregory Szorc 38070c5c36 Bug 1260299 - Support generating Visual Studio 2015 project files; r=chmanchester
Pretty straightforward.

MozReview-Commit-ID: ENYy9i34zCP

--HG--
extra : rebase_source : e9775d03f786350951db7f1ffd978c58f67beef6
2016-05-19 20:03:27 -07:00
Gregory Szorc 464f0e83c0 Bug 1260299 - Remove references to unsupported Visual Studio versions; r=chmanchester
We only support building with VS2013 and VS2015. Remove references
to older versions in the Visual Studio build backend.

MozReview-Commit-ID: 6QTSylqLwLF

--HG--
extra : rebase_source : d654f0e415dd5c1bfa1258633e26d467bea5535a
2016-05-19 19:59:11 -07:00
Ehsan Akhgari ab999b8a97 Bug 1272976 - Don't import anything from the mozwebidlcodegen module globally; r=gps
This import makes out-of-tree builds of SpiderMonkey depend on
dom/bindings/mozwebidlcodegen needlessly.
2016-05-17 21:38:42 -04:00
Ehsan Akhgari 7ee16b69bc Bug 1272975 - Don't import anything from the reftest module globally; r=gps
These imports make an out-of-tree build of SpiderMonkey depend on
the reftest module, which means SpiderMonkey implicitly depends on
layout/tools/reftest.
2016-05-17 21:38:39 -04:00
Gregory Szorc ba58598e13 Bug 1272768 - Teach `mach resource-usage` to load arbitrary URLs; r=chmanchester
Firefox automation now uploads resource usage JSON files as
job artifacts (see bug 1272202). Now that the build system
writes the same data format and `mach resource-usage` can
read this data format, let's teach `mach resource-usage`
to load arbitrary URLs. This allows people to view system
resource usage for arbitrary jobs in automation.

Currently, you have to look at Treeherder to find the URL to
the build-resources.json artifact. Perhaps in the future
we can make finding the URL easier. Or we could integrate
source resource viewing into Treeherder itself (this is
probably preferred).

This commit continues the tradition of `mach resource-usage`
being a hacked up mess. Instead of loading the URL in
the browser, we download the URL from Python then serve it
from the HTTP server running as part of `mach resource-usage`.
This is somewhat horrible. But it was easiest to implement.
It also conveniently bypasses any cross origin request
restrictions the browser may impose. So it is useful.

MozReview-Commit-ID: IR1Cfs7SrRN

--HG--
extra : rebase_source : b33231d482ca891c1b3331f472009518bf57f8c3
2016-05-12 17:01:36 -07:00
Gregory Szorc bb011ff361 Bug 1272768 - Use mozsystemmonitor for writing JSON; r=chmanchester
We currently have our own system monitor serialization in
building.py. It predates as_dict() from mozsystemmonitor. Let's
use the "upstream" data format so we only have a single format
to consume.

This change required updating the in-tree resource viewer to
be compatible with the new data format.

This commit stops short of getting rid of the existing
data massaging code in building.py. Another day perhaps.

MozReview-Commit-ID: 1OJrSiyJjMX

--HG--
extra : rebase_source : 9782b2164d1735ed0872fe8c1637204d5b3b1313
2016-05-17 13:49:42 -07:00
Chris Manchester 3eb90d9dd1 Bug 1269513 - Implement PKG_CHECK_MODULES equivalent in Python configure. r=glandium
MozReview-Commit-ID: mhFMEG0UXz
2016-05-17 14:40:03 -07:00
Chris Manchester 2a763b7273 Bug 1269513 - Add a helper for check_output in Python configure. r=glandium
MozReview-Commit-ID: H3IX5HLyJeu
2016-05-17 14:40:03 -07:00
Chris Manchester 0a11236205 Bug 1269513 - Make queue_debug a no-op if called from within a queue_debug block. r=glandium
MozReview-Commit-ID: 2GO8fV8HseU
2016-05-17 14:40:03 -07:00
Wes Kocher c85d7b355d Backed out 2 changesets (bug 1272768) for breaking builds in mozharness
Backed out changeset 5dcc540bd8c8 (bug 1272768)
Backed out changeset 580cb0cd5a96 (bug 1272768)
2016-05-16 11:38:03 -07:00
Gregory Szorc d897b3b204 Bug 1272768 - Teach `mach resource-usage` to load arbitrary URLs; r=chmanchester
Firefox automation now uploads resource usage JSON files as
job artifacts (see bug 1272202). Now that the build system
writes the same data format and `mach resource-usage` can
read this data format, let's teach `mach resource-usage`
to load arbitrary URLs. This allows people to view system
resource usage for arbitrary jobs in automation.

Currently, you have to look at Treeherder to find the URL to
the build-resources.json artifact. Perhaps in the future
we can make finding the URL easier. Or we could integrate
source resource viewing into Treeherder itself (this is
probably preferred).

This commit continues the tradition of `mach resource-usage`
being a hacked up mess. Instead of loading the URL in
the browser, we download the URL from Python then serve it
from the HTTP server running as part of `mach resource-usage`.
This is somewhat horrible. But it was easiest to implement.
It also conveniently bypasses any cross origin request
restrictions the browser may impose. So it is useful.

MozReview-Commit-ID: IR1Cfs7SrRN

--HG--
extra : rebase_source : 91f5f807c19643ac4d1edb8f6652110813f7e53f
2016-05-12 17:01:36 -07:00
Gregory Szorc 5b37de35f1 Bug 1272768 - Use mozsystemmonitor for writing JSON; r=chmanchester
We currently have our own system monitor serialization in
building.py. It predates as_dict() from mozsystemmonitor. Let's
use the "upstream" data format so we only have a single format
to consume.

This change required updating the in-tree resource viewer to
be compatible with the new data format.

This commit stops short of getting rid of the existing
data massaging code in building.py. Another day perhaps.

MozReview-Commit-ID: 1OJrSiyJjMX

--HG--
extra : rebase_source : b7c7824b84110f118223dc483b03398855fe9965
2016-05-13 13:31:43 -07:00
Mark Hammond fde8284626 Bug 1272544 - artifact builds with git now only consider the last 500 revisions rather than all revisions for the last 500 commits. r=chmanchester
MozReview-Commit-ID: 21Y4S5t952d

--HG--
extra : rebase_source : c447adf697f9924d6738c15ccb8c0e170fed31d3
2016-05-13 15:27:27 +10:00
Ben Kelly 8ddb26fdbe Bug 1272748 Expose --enable-sm-promise config setting in mozinfo.json. r=mshal 2016-05-13 13:00:16 -07:00
Chris Manchester 2f6600bc7f Bug 1257326 - Provide reasons for implied options when the caller provides an immediate value. r=glandium
MozReview-Commit-ID: A8IDPuwPqiP
2016-05-12 11:55:58 -07:00
Chris Manchester a0e5625c9a Bug 1257326 - Add a parameter to restrict accepted origins for an option in python configure. r=glandium
MozReview-Commit-ID: 4Cme7fvl1fN
2016-05-12 11:55:58 -07:00
Chris Manchester 2bc5c65931 Bug 1257326 - Respect origins set by any caller of CommandLineHelper.add. r=glandium
Origins will be set for any caller of CommandLineHelper.add, but will only
be propagated if args are added to extra_args. This results in an incorrect
origin recorded for mozconfig injected arguments.

MozReview-Commit-ID: 9mJCaNHyd5C
2016-05-12 11:55:57 -07:00
Chris Manchester e00bb9ee54 Bug 1267454 - Move java toolchain checks to Python configure. r=glandium
MozReview-Commit-ID: KEDkmJJsaUx
2016-05-12 11:55:57 -07:00
Chris Manchester f99b0b2bf5 Bug 1267454 - Allow passing kwargs to the mocked check_output in configure tests. r=glandium
MozReview-Commit-ID: BH3nUUI9nwn
2016-05-12 11:55:57 -07:00
Chris Manchester a91638058c Bug 1267454 - Set up a mock-able import for os.environ in configure tests. r=glandium
MozReview-Commit-ID: AtkkLC5xEip
2016-05-12 11:55:57 -07: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 e0898b3dc1 Bug 1270446 - Automatically add --target argument when unit test class has a TARGET attribute. r=chmanchester 2016-05-06 21:24:09 +09:00
Mike Hommey 4af7d047e9 Bug 1270446 - Make it easier to derive compiler results. r=chmanchester 2016-05-06 21:24:02 +09:00
Mike Hommey 645ca5540c Bug 1270446 - Simplify the fake compiler definitions. r=chmanchester
Originally, the changes to FakeCompiler allowing overlays was meant to
be used for compiler target platform, but it turns out the
simplifications this allows on the compiler definitions themselves are
nice.
2016-05-06 21:23:56 +09:00
Mike Hommey 44a58b6529 Bug 1270446 - Allow to combine multiple FakeCompiler definitions. r=chmanchester 2016-05-06 21:23:47 +09:00
Mike Hommey 56ec8ac8b6 Bug 1270446 - Move CompilerPreprocessor, FakeCompiler and their tests to a separate file. r=chmanchester
This makes the toolchain.configure tests more prominent in the file.
2016-05-06 21:23:40 +09:00
Mike Shal 16febf4398 Bug 1269787 - Use _pretty_path instead of full path for inputs; r=glandium
We use _pretty_path when specifying the targets of generated files, so
we need to use _pretty_path for the inputs as well. Otherwise make won't
know that they refer to the same file, and result in "No rule to make
target" errors.


MozReview-Commit-ID: JTdLFbkX1J0
2016-04-29 13:43:25 -04:00
Mike Shal 4bb82a657d Bug 1269787 - Choose tier for GENERATED_FILES based on extension; r=glandium
Some generated files will depend on other generated files, but still
need to be in the export tier because they are C++ headers.


MozReview-Commit-ID: AFvp92lF0xy
2016-04-29 13:41:41 -04:00
Mike Hommey 7c22cf4c1b Bug 1264609 - Derive HOST_CXX from CXX when it makes sense. r=ted 2016-05-04 06:34:38 +09:00
Luca Greco ef7f805759 Bug 1253697 - Support downloading debug artifact builds. r=nalexander
- enable debug artifact from a mozconfig file based on MOZ_DEBUG environment variable
- OSX debug artifact builds have 'mac64' instead of 'mac' into their file name
  (fix debug artifact build download on OSX)

MozReview-Commit-ID: 7kAvsTfwaCb

--HG--
extra : transplant_source : %E6v%25%B79M%02%7E%A9%8B%FF%24%03%D1%BDo%AB%0F%B49
2016-04-25 12:18:50 +02:00
Wes Kocher 20598f44f6 Backed out changesets baa6c68ec413,5b8583070c9e,2942bb31152c,dd2ad6863f53,c68772362633,c8db6695b991 (bug 1231981) a=backout
MozReview-Commit-ID: EoGyz071RoN

--HG--
extra : amend_source : 69d6593ae0a946ed6366513a2e186b43c7435440
extra : histedit_source : cdce5a0698d6e7996ae731cff56263abc202ae65%2Ca62e94bdb37fc3e9266884f283d732e61e0f4715
2016-04-27 10:24:37 -07:00
Matt Howell dc6cd002ef Bug 1267437 - Generate projects in the Visual Studio backend for every binary generated by the build; r=gps
MozReview-Commit-ID: 5d7jl5NJSNj

--HG--
extra : amend_source : 30420bf751feb9b7067aa1b9ad77bd8d04b1b3f2
2016-04-26 09:31:14 -07:00
Byron Campen [:bwc] a4e2b3e713 Bug 1231981 - Part 5: Install python packages we need in the virtualenv if not present. r=gps
MozReview-Commit-ID: 9PUHLMxHhQP

--HG--
extra : rebase_source : 5e863a5cf5d60c698d97c0f65070b89b2d8295bd
extra : source : 6848d362c947bf306b650cac7bb6a89981af474b
2016-03-16 15:40:17 -05:00
Gregory Szorc 0de1705927 Bug 1266999 - Stop writing XPT_NAME in backend.mk; r=glandium
It is unused and no longer serves a purpose.

MozReview-Commit-ID: ECzfSbqgA1z

--HG--
extra : rebase_source : 0e0104b42a73c2436b59f09732c27e78a2619ca1
2016-04-23 13:19:58 -07:00
Carsten "Tomcat" Book e9599aa66e Backed out changeset 5a0d061f7548 (bug 1231981) 2016-04-25 16:28:50 +02:00
Byron Campen [:bwc] c87769deb2 Bug 1231981 - Part 5: Install python packages we need in the virtualenv if not present. r=gps
MozReview-Commit-ID: 9PUHLMxHhQP

--HG--
extra : rebase_source : f7a4bcff98f436242167dac03cf58973be0e26e6
2016-03-16 15:40:17 -05:00
Mike Hommey 11908ff843 Bug 1266343 - Add unit tests for the toolchain checks. r=chmanchester 2016-04-22 09:04:05 +09:00
Mike Hommey 3b6aa4658f Bug 1266343 - Use an empty mozconfig from the source directory. r=chmanchester
When configure unit tests use an empty mozconfig, instead of creating an
empty temporary file, use an empty mozconfig from the source directory.
2016-04-22 09:03:38 +09:00
Mike Hommey 589f651a98 Bug 1266343 - Create a base class for configure tests, and use it for TestMozConfigure. r=chmanchester 2016-04-22 09:03:37 +09:00
Mike Hommey 44b5cc5dc5 Bug 1266343 - Extend the ConfigureTestSandbox to hook subprocess.Popen. r=chmanchester 2016-04-22 09:03:35 +09:00
Mike Hommey 9e530db748 Bug 1266343 - Move ConfigureTestSandbox to a common module for all configure tests. r=chmanchester 2016-04-22 09:03:31 +09:00
Mike Hommey 23548b6211 Bug 1266343 - Change FindProgramSandbox to override which.which instead of replacing find_program. r=chmanchester
Also make it more generic so that it can be reused for other tests.
2016-04-22 09:03:30 +09:00
Mike Hommey a3cf230161 Bug 1266343 - Change ConfigureSandbox._apply_imports such that it becomes easy to override imports in unit tests. r=chmanchester 2016-04-22 09:03:28 +09:00
Mike Hommey 24ce400759 Bug 1266343 - Avoid _apply_imports happening twice for the same function. r=chmanchester 2016-04-22 09:03:26 +09:00
Mike Hommey 24fc0c73b9 Bug 1266343 - Use mozbuild.util.exec_ in the various configure tests. r=chmanchester
Because some older python 2.7 versions throw bogus errors when using the
exec statement as a function, use the function we added in bug 1264831
everywhere we use exec in the various configure tests. It doesn't take
much to trigger them, and the following changes ends up doing exactly
that.
2016-04-22 09:03:24 +09:00
Nathan Froyd 82c6f5d7a7 Bug 1163224 - add build system support for multiple Rust crates; r=glandium
Our current build system support for Rust compiles any Rust crate into a
so-called staticlib, which is a static library (.a file) that includes
the Rust runtime. That staticlib is then linked into libxul. For
supporting multiple crates, this approach breaks down, as linking
multiple copies of the Rust runtime is going to fail.

For supporting multiple crates, the approach taken here is to compile
each crate into a so-called rlib, which is essentially a staticlib
without the Rust runtime linked in. The build system takes note of
every crate destined for linking with libxul (treating them like static
libraries generated from C/C++ files), and generates a super-crate,
whimsically named "rul", that is compiled as a staticlib (so as to
include the Rust runtime) and then linked into libxul. Thus only one
copy of the Rust runtime is included, and the Rust compiler can take
care of any inter-crate dependencies.

This patch currently only supports Rust code in shared libraries, not in
binaries.
2016-04-21 09:54:01 -04:00
Mike Hommey 66ab5aca5c Bug 1264482 - Use the EnumString type for the different values we get out of split_triplet. r=ted 2016-04-19 15:09:37 +09:00
Mike Hommey 3b84e5ed68 Bug 1264482 - Use the EnumString type for the compiler type. r=ted 2016-04-19 15:09:37 +09:00
Mike Hommey f586735fa8 Bug 1264482 - Add an enumeration-like string type with a limited set of possible values. r=ted 2016-04-19 15:09:37 +09: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 0037774d91 Bug 1265063 - Fix the shell quoting regexp to properly match backslashes. r=gps 2016-04-19 15:09:37 +09:00
Chris Manchester 108befa0c5 Bug 1264703 - Follow up: don't print unhandled BUILDSTATUS messages when running |./mach configure| r=gps
DONTBUILD

MozReview-Commit-ID: BzUnpqreYSb
2016-04-15 17:38:41 -07:00
Chris Manchester 7bc7322566 Bug 1264697 - Change the format of all-tests.json to reduce redundant data. r=gps
The format provided to the build system by the manifest parser is highly redundant:
every test lists all variables for that test, and many tests use a large
support-files entry in DEFAULT that ends up in individual test objects. This
patch stores these DEFAULTS per-manifest rather than per-test to save disk
space, resulting in about a ~22mb smaller all-tests.json file. The
in-memory representation of tests is not changed by this patch, as the defaults
are again propagated to individual tests as all-tests.json is read by the test
resolver.

MozReview-Commit-ID: CEJaevfS5s7
2016-04-15 17:20:04 -07:00
Chris Manchester 73cdc0519a Bug 1264817 - Traverse nspr and icu during disable compile environment builds now that we aren't using their build systems. r=glandium
This also allows us to use the in-tree icu data file for artifact builds.

MozReview-Commit-ID: 4FWd7PV4ONC
2016-04-15 09:17:40 -07:00
Mike Hommey 45128858a8 Bug 1264831 - Defer applying @imports until the function is actually called. r=gps 2016-04-15 18:56:08 +09:00
Mike Hommey 1537683537 Bug 1264831 - Work around issues with the exec statement in older python 2.7 versions. r=gps 2016-04-15 18:56:08 +09:00
Mike Hommey 1cc2a86d6d Bug 1264831 - Try to detect decorators declared in the sandbox and add some automatic @wraps. r=gps 2016-04-15 18:56:08 +09:00
Mike Hommey 5ac7830115 Bug 1264831 - Add a few presumably harmless builtins to the sandbox. r=gps
as well as os.path.normcase.
2016-04-15 18:56:08 +09:00
Mike Hommey f3054520af Bug 1260327 - Expose a MOZ_CONFIGURE_OPTIONS variable containing configure options. r=chmanchester 2016-04-15 08:14:05 +09:00
Mike Hommey e1dc6088a2 Bug 1260327 - Remove the --recheck option of config.status. r=chmanchester
With mozconfigs injecting options, it never really worked as intended.
2016-04-15 08:14:05 +09:00
Mike Hommey 9bb5221e5e Bug 1257448 - Don't emit an error on unknown implied options when their resolved value is None. r=nalexander
imply_option has no effect when the resolved value is None, so the same
logic can be applied when checking for unknown implied options.

This allows to imply options that may not always exist (because they are
in a configure file that is optionally included).

Ideally, it would be better not to do this, but until we have something
better than optionally included configure files for
--disable-compile-environment, this is a necessary evil.
2016-04-15 08:14:05 +09:00
Chris Manchester 6a21a3345a Bug 1256979 - Move MOZ_CHROME_FILE_FORMAT to Python configure. r=glandium
The config variable is re-named to avoid confusion, because it is not set by
--enable-chrome-format.

MozReview-Commit-ID: 37gvjGGSkRc
2016-04-14 12:26:38 -07:00
Mike Hommey 3098248f0e Bug 1256571 - Change the execution model of python configure. r=chmanchester
So far, everything was essentially executed at "declaration". This
made the sandbox code simpler, but to improve on the tooling around
python configure (for tests and introspection), we need to have more
flexibility, which executing everything at declaration doesn't give.

With this change, only @depends functions depending on --help, as
well as templates, are executed at the moment the moz.configure
files are included in the sandbox. The remainder is executed at the
end.
2016-04-14 07:29:42 +09:00
Mike Hommey f7fa631d45 Bug 1256571 - Allow ConfigureSandbox.run to not include a given file. r=chmanchester 2016-04-14 07:29:42 +09:00
Mike Hommey 9da99bc058 Bug 1256571 - Rename ConfigureSandbox.exec_file to include_file. r=chmanchester 2016-04-14 07:29:42 +09:00
Mike Hommey 6f3578276f Bug 1256571 - Move applying implied options to ConfigureSandbox._value_for(). r=chmanchester 2016-04-14 07:29:42 +09:00
Mike Hommey ee283cf2ee Bug 1256571 - Move running @depends functions to ConfigureSandbox._value_for(). r=chmanchester 2016-04-14 07:29:42 +09:00
Mike Hommey 5527cfee67 Bug 1256571 - Move Options handling to ConfigureSandbox._value_for(). r=chmanchester 2016-04-14 07:29:42 +09:00
Mike Hommey f4f04ae1c2 Bug 1256571 - Ensure consistent values for variables in closures. r=chmanchester 2016-04-14 07:29:42 +09:00
Mike Hommey dd20a01b39 Bug 1256571 - Delay resolving the reason for an implied option. r=chmanchester 2016-04-14 07:29:42 +09:00
Mike Hommey 56bbf297c7 Bug 1256571 - Add a generic method to get the results of Options and DependsFunctions. r=chmanchester
instead of manually reading the member variable containing the results.
2016-04-14 07:29:42 +09:00
Mike Hommey a1c0231f85 Bug 1256571 - Move resolving @depends dependencies to just before running the decorated function. r=chmanchester 2016-04-14 07:29:42 +09:00
Mike Hommey 6684d3c1ee Bug 1259382 - Make mozbuild.shellutil.quote more useful for e.g. creating printable command lines. r=ted 2016-04-13 17:11:36 +09:00
Mike Hommey 36a7c444e8 Bug 1263296 - Work around getpreferredencoding inconsistencies. r=gps
Whether it uses locale._parse_localename or nl_langinfo makes it have completely
different results in weird and/or widespread locale settings (LC_ALL=UTF-8 or
LC_ALL=C).
2016-04-13 06:54:22 +09:00
Mike Hommey 45c833afcb Bug 1254374 - Add various failure tests to test_configure.py. r=nalexander
At the same time, improve some of the failures handling paths.
2016-04-13 06:54:22 +09:00
Mike Hommey 5311ba292c Bug 1254374 - Add exception message checks to test_options.py. r=nalexander 2016-04-13 06:54:22 +09:00
Mike Hommey 77a8fe8505 Bug 1254374 - Remove TestConfigure.get_result. r=nalexander 2016-04-13 06:54:22 +09:00
Mike Hommey 03fcfe8491 Bug 1254374 - Remove the old TestConfigure.test_imports test. r=nalexander
It now duplicates the test added in bug 1256573, which is actually better.
2016-04-13 06:54:22 +09:00
Mike Shal 15969d8d22 Bug 1245701 - Allow absolute paths with wildcards in FINAL_TARGET_FILES; r=glandium
MozReview-Commit-ID: AnD0NeQrIpD

--HG--
extra : rebase_source : 0ddb0ecb7c44659493fe29d0523a4ddc721befe4
2016-04-05 17:40:31 -04:00
Chris Pearce 0bc89f86e9 Bug 1263506 - Ensure MOZ_GMP_PATH in gtests always has native dir separators. r=glandium
Without this, the GeckoMediaPlugin gtests fail, as the GMP stack is unable to
load GMPs from disk.

MozReview-Commit-ID: GGXdm2L5IF9
2016-04-12 16:12:19 +12:00
Chris Manchester 13b3496e7a Bug 1263436 - Show artifact build download progress by default. r=nalexander
MozReview-Commit-ID: 2kdEx87MRQm

--HG--
extra : rebase_source : 24490750a953dc9596118475d298a2115d66b3ad
2016-04-11 16:39:11 -07:00
Andreas Farre dc5d8fed7a Bug 1254313 - Log less when running mach run --debug within emacs. r=gps
Check if the INSIDE_EMACS environment variable is set and change the
log level to WARNING to not confuse the emacs/mi with logging messages.

MozReview-Commit-ID: 5AWZ6swGJsE

--HG--
extra : transplant_source : b%24%8Ff6%968%8A%02%E2%07%DD%C6Y9E%CB%7C.%E4
2016-04-11 11:20:52 -04:00
Chris Manchester 52083635d3 Bug 1261456 - Combine support-files listed in [DEFAULT] with any listed per-test rather than overriding. r=gps
This requires a change to how we process test manifests in the build system:
now, whenever we see a support file mentioned in a manifest, we require that
file isn't already in that test's support files, but if we see a support file
that was already seen in some other test, the entry is ignored, but it is not
an error. As a result of this change, several duplicate support-files entries
needed to be removed.

MozReview-Commit-ID: G0juyxzcaB8

--HG--
rename : testing/mozbase/manifestparser/tests/test_default_skipif.py => testing/mozbase/manifestparser/tests/test_default_overrides.py
2016-04-11 11:21:20 -07:00
Sebastian Hengst 364386e3cf Backed out changeset cb4b18566f30 and 7c4d19e3376f (bug 1163224) for build bustage. r=backout on a CLOSED TREE 2016-04-11 19:43:04 +02:00
Nathan Froyd 45af5cd66c Bug 1163224 - add build system support for multiple Rust crates; r=glandium
Our current build system support for Rust compiles any Rust crate into a
so-called staticlib, which is a static library (.a file) that includes
the Rust runtime.  That staticlib is then linked into libxul.  For
supporting multiple crates, this approach breaks down, as linking
multiple copies of the Rust runtime is going to fail.

For supporting multiple crates, the approach taken here is to compile
each crate into a so-called rlib, which is essentially a staticlib
without the Rust runtime linked in.  The build system takes note of
every crate destined for linking with libxul (treating them like static
libraries generated from C/C++ files), and generates a super-crate,
whimsically named "rul", that is compiled as a staticlib (so as to
include the Rust runtime) and then linked into libxul.  Thus only one
copy of the Rust runtime is included, and the Rust compiler can take
care of any inter-crate dependencies.

This patch currently only supports Rust code in shared libraries, not in
binaries.  The handling for the rul crate is placed in the common
backend, with a special hook for derived backends to handle shared
library objects.
2016-04-11 11:05:44 -05:00
George Wright e75c590407 Revert "Bug 1114647 - Rename "plugin-container" to "firefox-webcontent" and create a new executable target for Win32 called "firefox-plugin-container" r=ted,jhamer" because of widespread breakage due to whitelisted executable names in third parties
This reverts commit a94b5f861bd0d25043a3bb7a0c3128acf8c0b93a.


--HG--
rename : ipc/contentproc/firefox-webcontent.cpp => ipc/contentproc/plugin-container.cpp
2016-04-08 13:34:40 -04:00
Ryan VanderMeulen 76ab6cf240 Bug 1262207 - Add a nightly_build entry to mozinfo. r=ahal
--HG--
extra : rebase_source : 5ce90a4c5ac0dd6efe8eeca61a4ec2b90fe9b569
2016-04-06 12:04:29 -04:00
Mike Shal a1f020d488 Bug 1261283 - allow GENERATED_FILES to write to multiple outputs; r=glandium
MozReview-Commit-ID: DbBoZZnasTo
2016-04-01 10:38:22 -04: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 6878c848b4 Bug 1262087 - Use textwrap.dedent in test_checks_configure.py. r=chmanchester 2016-04-06 07:25:15 +09:00
Chris Manchester b5ce5e9f35 Bug 1262231 - Fix handling of ICU for artifact builds. r=nalexander
The data file is required as of bug 1239083.

MozReview-Commit-ID: XhETIoUYH8

--HG--
extra : rebase_source : 2d1200a72dadb3e0e8211fa58d3f07bc2453061f
2016-04-05 13:00:21 -07:00
Mike Hommey c977f50c17 Bug 1261018 - Make log.queue_debug output debug log when receiving an exception. r=ted 2016-04-05 07:16:44 +09:00
Mike Hommey 8155d8f286 Bug 1261235 - Handle non-ascii in configure logging. r=ted
When reading config.log, with old-configure output, we may get non-ascii
strings, but that currently fails because we're using plain open() to
read it. So use encoded_open() instead (which does the same job for
other files in the same script).

Because the build system can be encapsulated in mach, python configure
can have a pipe as stdout/stderr, and in that case, sys.stdout/stderr
have an ascii encoding, failing to print out anything that doesn't
fit in ascii, consequently failing to print the things we've read from
config.log. So reopen stdout and stderr with the right encoding in
the configure output handler.
2016-04-05 07:16:44 +09:00
Chris Manchester a7138cfc10 Bug 1242051 - Install test files to the objdir lazily rather than with each invocation of mach. r=gps
This moves test installation for test files out of the monolithic install
manifest for $objdir/_tests, and determines the test and support files
to install based on the object derived from all-tests.json. Additionally,
the files resulting from TEST_HARNESS_FILES are installed, as some tests
will depend on them.

As a result, the time to install tests when invoking the test runner will
scale with the number of tests requested to run rather than the entire set
of tests in the tree, resulting in significantly less overhead.

MozReview-Commit-ID: LeIrUVh1yD4
2016-04-04 14:56:52 -07:00
Chris Manchester fc15bfd0ee Bug 1242051 - Extract support files processing from the emitter. r=gps
This extracts the logic from the emitter that handles support files in ini
manifests to a seperate function in testing.py, so that this logic can be
re-used to determine how to install all the files necessary to run a particular
test fon the corresponding object in all-tests.json.

MozReview-Commit-ID: GSEhEGm09IL
2016-04-04 14:56:52 -07:00
Nick Alexander bc6d047594 Bug 1261438 - Generalize Android artifact package names. r=chmanchester
DONTBUILD NPOTB

If the target triple is noisy, let's just accept -arm and -i386
instead of being strict.  We can be more strict when things have
settled.

MozReview-Commit-ID: FDNJ3TuY51d

--HG--
extra : rebase_source : 3db70abe6818fbe0360406f20de899867232df02
extra : amend_source : d324c229b1713adb844407078d6cc4d00d84b56d
2016-04-01 14:28:42 -07:00
Wes Kocher 56b7127be0 Merge fx-team to central, a=merge
MozReview-Commit-ID: 8rupfWq5Wa6
2016-04-01 15:43:36 -07:00
Mike Shal 2176c3ac7f Bug 1259806 - Remove toolkit/components/ctypes/tests/Makefile.in; r=ted
MozReview-Commit-ID: EVCZVXukFQf
2016-03-25 14:25:17 -04:00
Carsten "Tomcat" Book e873a45f68 Merge mozilla-central to fx-team 2016-04-01 11:49:37 +02:00
Mike Hommey ad20b091b6 Bug 1260624 - Add support for simple comparisons of ReadOnlyNamespaces. r=ted 2016-04-01 09:43:26 +09:00
George Wright 5c454494ce Bug 1114647 - Rename "plugin-container" to "firefox-webcontent" and create a new executable target for Win32 called "firefox-plugin-container" r=ted,jhamer
--HG--
rename : ipc/app/module.ver => ipc/app/plugin-container/module.ver
rename : ipc/contentproc/plugin-container.cpp => ipc/contentproc/firefox-webcontent.cpp
2016-04-01 02:12:59 -04:00
Nick Alexander 9ab9fa5451 Bug 1260241 - Implement Fennec packaging in Python. r=glandium
A few notes:

* This doesn't accommodate general OMNIJAR_NAME definitions.  The
  current name (assets/omni.ja) is baked into the product in a few
  places, and is very unlikely to change, so we just error out if this
  isn't true.

* This makes the package-manifest.in file authoritative for what goes
  into assets/, libs/, and the APK root.  Previously,
  package-manifest.in wrote into assets/ and libs/ but
  upload-files-APK.mk also had a convoluted DIST_FILES filtering
  process to work through before a file actually made it into the APK.

* This is intentional about repackaging.  It simplifies the repackage
  step rather than trying to make unpackage-then-repackage the same as
  just package.  I pretty much never get repackaging correct the first
  time; this should help.  (I've manually tested it.)

* The ALREADY_SZIPPED during repackaging is subsumed by the previous
  check if UNPACKAGE is set.  The custom linker expects stored, not
  deflated, libraries, so there's some small legwork to accommodate
  that in mozjar.

MozReview-Commit-ID: JvVtIUSX685

--HG--
extra : rebase_source : fd8a9cfe3dc364d23b1065995db599f99e676e38
2016-03-28 20:01:07 -07:00
Nick Alexander 45f7d697fc Bug 1260241 - Pre: Add compress option to Jarrer.add. r=glandium
MozReview-Commit-ID: FWXeBOi9FTY

--HG--
extra : rebase_source : 290bb95e0d9133094c4bf4b99f04ccd3c598c6d8
2016-03-28 19:02:05 -07:00
Mike Hommey f6cb862439 Fixup test_check_configure after bug 1260066 on a CLOSED TREE. r=me 2016-03-30 08:36:32 +09:00
Mike Hommey 9d9550f0f5 Fixup bug 1256573 to work on buggy older python on a CLOSED TREE. r=me 2016-03-30 08:15:44 +09:00
Mike Hommey f1ed025e8b Bug 1260066 - Don't allow to use sandbox primitives from anywhere but global scope and templates. r=nalexander
The initial goal of templates was to provide a way to write shorter
constructs for some generic tasks during configure. But the limitations
of the sandbox and the properties of templates made them used for more
general functions.

Consequently, this led to templates having to be available from
anywhere, which, in turn, led to difficult to introspect constructs.
With bug 1257823, we've made almost everything use set_config and
similar functions from the global scope, but we don't enforce that
those primitives are only used at the global scope.

This change does that: it enforces that primitives are only used at
the global scope. Or in templates.

Now, since templates were used for other purposes than generic uses
of other primitives, we now allow non-template functions to be declared.
Those can be used everywhere, but don't have access to the sandbox
primitives.
2016-03-30 07:08:00 +09:00
Mike Hommey 2a7c335181 Bug 1256573 - Remove the @advanced primitive. r=nalexander 2016-03-30 07:07:55 +09:00
Mike Hommey 9877dc7b96 Bug 1256573 - Switch configure tests to use @imports instead of @advanced. r=nalexander 2016-03-30 07:07:52 +09:00
Mike Hommey abc3477a74 Bug 1256573 - Add a new @imports primitive that allows to import modules into the decorated functions. r=nalexander
Currently, we have @advanced, that gives the decorated functions access
to all the builtins and consequently, to the import statement.
That is a quite broad approach and doesn't allow to easily introspect
what functions are importing which modules.

This change introduces a new decorator that allows to import modules one
by one into the decorated functions.

Note: by the end of the change series, @advanced will be gone.
2016-03-30 07:07:50 +09:00
Mike Hommey 0ea59bc1a8 Bug 1256573 - Add missing primitives to the ConfigureSandbox documentation. r=nalexander
Not directly related, but since this bug is about to add another primitive...
2016-03-30 07:07:48 +09:00
Mike Hommey 943acf7e2b Bug 1259351 - Properly sandbox functions that are decorated with templates. r=nalexander 2016-03-30 07:07:47 +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 29c3394b1b Bug 1259960 - s/DummyFunction/DependsFunction/. r=chmanchester
While DummyFunction is descriptive of what the instances are (and they
can't even be called), the various uses of isintance(obj, DummyFunction)
are kind of confusing, especially when they are in moz.configure land
(and this bug is about to add another one).
2016-03-30 07:07:37 +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 97ea49f191 Bug 1257516 - Allow to assign Exceptions in the global scope. r=ted
But do not advertise it too much.
2016-03-30 07:06:26 +09:00
Mike Hommey c7b519d6df Bug 1257516 - Make the ConfigureOutputHandler keep some debug messages to print out when an error occurs. r=ted
The feature is made opt-in by using a context manager.
2016-03-30 07:06:20 +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 0e183bb384 Bug 1257516 - Allow the log_handle given to the virtualenv manager to be a file-like object. r=ted
subprocess functions doesn't directly take file-like objects, so add a
minimalistic wrapper to do the right thing instead of subprocess.call
when given a file-like object.
2016-03-30 07:00:12 +09:00
Mike Hommey ba80937ba0 Bug 1257516 - Send the debug output from our logger to config.log. r=ted
And since the file is also used for old-configure, close our handle on
the file before spawning old-configure, and make old-configure append
there instead of truncating the file.
2016-03-30 07:00:07 +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 c15e6d00c5 Bug 1257516 - Initialize a logger for the ConfigureSandbox, and use it for the help. r=ted 2016-03-30 06:59:59 +09:00
Mike Hommey e22a5082f7 Bug 1257516 - Add a file-like class that sends writes to a callback. r=ted 2016-03-30 06:59:37 +09:00
Mike Hommey cf67fa8b15 Bug 1257516 - Add a logging handler class to print out configure output on stdout/stderr. r=ted 2016-03-30 06:58:09 +09:00
Nicholas Nethercote 0f418f3874 Bug 1253512 (part 1) - Overhaul DMD's "sampling". r=erahm.
DMD currently uses a very hacky form of "sampling" by default to avoid
recording stack traces for all blocks. This makes DMD run faster than when it
records all stack traces.

This patch changes the sampling method used; in fact, it avoids "sampling" at
all. The existence of all heap blocks is now recorded exactly, but by default
we only record an allocation stack for each heap block if a Bernoulli trial
succeeds. This choice works well because getting the stack trace is ~100x
slower than recording the block's existence.

Overall, this approach is simpler and it also gives better output -- the choice
of which blocks to record allocation stacks for is mathematically sound, no
stack trace gets blamed for allocations it didn't do, and block counts and
sizes are now always exact.

Other specific things changed.

- All notion of sampling is removed from the various data structures.

- The --sample-below option is removed in favour of --stacks={partial,full}.

- The format of the JSON output file has changed.

- The names of various test files have changed to reflect concept changes.

--HG--
rename : memory/replace/dmd/test/full-empty-cumulative-expected.txt => memory/replace/dmd/test/complete-empty-cumulative-expected.txt
rename : memory/replace/dmd/test/full-empty-dark-matter-expected.txt => memory/replace/dmd/test/complete-empty-dark-matter-expected.txt
rename : memory/replace/dmd/test/full-empty-live-expected.txt => memory/replace/dmd/test/complete-empty-live-expected.txt
rename : memory/replace/dmd/test/full-unsampled1-dark-matter-expected.txt => memory/replace/dmd/test/complete-full1-dark-matter-expected.txt
rename : memory/replace/dmd/test/full-unsampled1-live-expected.txt => memory/replace/dmd/test/complete-full1-live-expected.txt
rename : memory/replace/dmd/test/full-unsampled2-cumulative-expected.txt => memory/replace/dmd/test/complete-full2-cumulative-expected.txt
rename : memory/replace/dmd/test/full-unsampled2-dark-matter-expected.txt => memory/replace/dmd/test/complete-full2-dark-matter-expected.txt
rename : memory/replace/dmd/test/full-sampled-live-expected.txt => memory/replace/dmd/test/complete-partial-live-expected.txt
extra : rebase_source : 47d287405dc5e9075f08addaba49e879c2c6e23f
2016-02-24 14:42:22 +11:00
Mike Hommey 272cfa7a49 Bug 1259683 - Don't make imply_option() do anything when --help is on the command line. r=nalexander
This also adds the same tests that exist for set_config and set_define
and that would have caught the `configure --help` breakage this change
fixes.
2016-03-26 10:34:29 +09:00
Mike Hommey 2651933d3a Bug 1259683 - Forgotten change to test_configure.py before landing bug 1257823. r=nalexander
This was suggested during review, and was applied to 2 of the 3 patches
where this applied, and the imply_option tests were left out. This fixes
it.
2016-03-26 10:34:29 +09:00
Mike Hommey 7ff92bc0ec Bug 1259683 - Miscellaneous small cleanups in the mozbuild.configure module. r=nalexander
This is not related to the bug, but are drive-by cleanups.
2016-03-26 10:34:29 +09:00
Mike Shal d4bd3eb4ca Bug 1252931 - Add support for generic OBJDIR_FILES and OBJDIR_PP_FILES; r=gps
MozReview-Commit-ID: 6H435DeMHie
2016-03-17 09:13:36 -04:00
aleth 6da499d398 Bug 1259174 - Fix absolute paths in TEST_HARNESS_FILES. r=mshal
--HG--
extra : amend_source : 73b8a4ad68d24ff5f04c17d95423565070aac04b
2016-03-23 22:44:12 +01:00
Gregory Szorc 4a5c6aaf2d Bug 1259551 - Add --no-download to virtualenv.py invocation; r=ted
Before, virtualenv.py may have attempted to use 3rd party
(untrusted) pip indices when installing wheels for pip,
setuptools, and wheel. These dependencies are vendored in
the tree for a reason. So don't let virtualenv contact the
outside world.

MozReview-Commit-ID: 6BCU0WegJO1

--HG--
extra : rebase_source : 6231235486e8cfa784e67e8b18004dd63d8aaf36
2016-03-24 12:34:47 -07:00
Mike Hommey 6a8ed3e4a8 Bug 1257823 - Move imply_option() to the global scope. r=nalexander
Like set_config and set_define, we move imply_option to the global
scope.
2016-03-24 09:04:28 +09:00
Mike Hommey 92c7aa3e65 Bug 1257823 - Keep track of the dependencies of @depends functions. r=nalexander
@depends functions are declared like the following:

  @depends('--option', other_function, '--other-option', ...)
  def ...

To simplify some of the processing related to those arguments it's
passed, keep a tuple of Option and DummyFunction objects corresponding
to those arguments.
2016-03-24 09:04:28 +09:00
Mike Hommey e5cde501da Bug 1257823 - Move set_define() to the global scope. r=nalexander
For the same reasons as set_config is being moved to the global scope,
we're moving set_define to the global scope here. An additional change
is that set_define is now part of the sandbox itself instead of being
defined within the sandbox, which makes it share the implementation
details with set_config.
2016-03-24 09:04:28 +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 8e6cfd60f3 Bug 1257823 - Split ConfigureSandbox._db. r=nalexander
Currently, ConfigureSandbox._db stores two different kind of
information. This split those in two different instance variables
instead, making things clearer.
2016-03-24 09:04:28 +09:00
Mike Hommey ed5e2c39f5 Bug 1257823 - Move set_define() to the sandbox. r=nalexander
In order to make the transition to global set_define easier, move its
current definition from inside the sandbox to the sandbox itself.
2016-03-24 09:04:28 +09:00
Mike Hommey a8db2a2c62 Bug 1258619 - Properly sandbox functions inside a template. r=chmanchester
The way functions are being sandboxed in moz.configure land is that
their global namespace is being replaced with a limited and identifiable
dict. And we avoid re-wrapping a function that already received this
treatment.

The problem is that template functions have their global namespace
replaced, and any function that is defined within the template inherits
that global namespace. So when it comes time to wrap those functions
defined in templates with e.g. depends, we detect that they're already
wrapped although they are not, because we look if their global namespace
is of the recognizable type we use when replacing it.

So instead of looking at the global namespace type, keep track of all
functions that are wrapped.
2016-03-23 13:24:54 +09:00
Mike Hommey 68c5ab1790 Bug 1258615 - Remove the "magic" that sets a result from set_config() in @depends functions. r=chmanchester
Currently, if a @depends function doesn't have a return statement or
return None, a result is automatically set from all the set_config()
called from the function.

As we're going to move set_config to the global namespace, and as this
feature is only used once, and it's only used for something that was
written before ReadOnlyNamespace was exposed to the sandbox, we can
"safely" get rid of it.
2016-03-23 06:51:10 +09:00
Gregory Szorc 79ad6e2449 Bug 1258574 - Allow JARReader to read data already in memory; r=glandium
This will be needed to teach artifact builds to extract files from
omni.ja files whose content is loaded into memory (from a tar
archive).

MozReview-Commit-ID: LH2HkKx5Zj3

--HG--
extra : rebase_source : 7f6b176f0ef9fc87889151d1d02da62de8a455d8
extra : source : 266928b5a7615fa054c70adf0f649cbb3f085e8d
2016-03-21 16:36:22 -07:00
Ted Mielczarek 5986418419 bug 1257607 - Add Version type to moz.configure. r=glandium
This change adds a `Version` type to moz.configure which is a small
wrapper around `distutils.version.Version`. It's suitable for wrapping
version numbers in configure checks and doing equality or greater-than
less-than comparisons in a sensible way.

MozReview-Commit-ID: BOL6yvemulG

--HG--
extra : rebase_source : 3b463eac0499086f8acffda0d01418b6ab17f3d6
extra : amend_source : aebd6e40c408d9f868623b2f53fcdf7455e2fff5
2016-03-17 11:52:18 -04: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
Carsten "Tomcat" Book f298917442 merge mozilla-inbound to mozilla-central a=merge 2016-03-17 11:00:17 +01:00
Richard Newman 89a12baeec Bug 1220184 - Eliminate Gingerbread compatibility. r=froydnj, r=nalexander
MozReview-Commit-ID: E5Ng6Y0IEU9

--HG--
extra : rebase_source : c65fae2ceaf486e536ea617e7912b3e8d97be755
extra : amend_source : cfd90e7b157a23fbe7a07e384d4702dadb603835
2016-02-24 09:25:14 -08: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 Shal 4c30a996ad Bug 1256033 - Allow GENERATED_FILES scripts to depend on other generated files; r=glandium
If we add an ObjDirPath as an input to a GENERATED_FILES script, we
should run it in the misc tier to ensure the dependent files are created
beforehand. We need to use Path objects instead of raw filenames in the
GeneratedFile object so the recursive make backend can distinguish
between source and objdir files.


MozReview-Commit-ID: 9thHTi75zdI
2016-03-11 19:25:24 -05:00
Mike Hommey 4ed6eca117 Bug 1257136 - Allow to pass configure options from mach configure. r=gps 2016-03-17 07:21:37 +09:00
Mike Hommey bc3a6199df Bug 1257104 - Allow options with choices and possibly no given values. r=ted
While rare, this is something we support for e.g. --enable-eme, where it
can be either given with no values, "adobe", some future other EME GMP
adapter names, or a combination of them.
2016-03-17 07:21:37 +09:00
Ted Mielczarek d74aee95c9 bug 1255479 - add PYTHON_UNIT_TESTS to all-tests.json. r=nalexander
MozReview-Commit-ID: HJ6ohvEOgdX

--HG--
extra : rebase_source : c41a3ee2a78df27cb7bd71c7a9a7b6991461aaa1
extra : amend_source : c3379ade5a92924f76a1f262e33c7d60bd76bbcb
extra : histedit_source : 87fdbd85f3e5ccdeee9c3c9b5c7afc21da5e7827%2C215cb1cdd4185d1fa3c47cc7858fe309db11058a
2016-03-10 15:42:27 -05:00
Gregory Szorc 062d2e4c6b Bug 1253436 - Write out a machine readable file with binaries metadata; r=glandium
This will make it easier for binaries only archive generation to consult
the list of binaries that are relevant to packaging.

This does overlap somewhat with compile databases. Perhaps someday the
logic could converge.

While I was here, I cleaned up writing of the all-tests.json file to
avoid an intermediate string variable.

This patch adds to_dict methods on some frontend data types. There is
room to improve the serialization of these types. For example, we could
use __slots__ to drive the default formatter. We could also leverage a
custom JSONEncoder class that knows how to call to_dict() on instances.
In the spirit of perfect is the enemy of done, I think this should be
deferred to a follow-up bug.

MozReview-Commit-ID: XVnKB1MNqu

--HG--
extra : source : 4167dfdf10457360c9c94ee6e55b03ef1b92c16d
extra : histedit_source : 2f3f10bbb8ef9da8c57b0d85cbf4ea80242eff1a%2C1a5654253181d75eecd5dfaca2c87e353f8126cd
2016-03-14 21:06:57 -07:00
Gregory Szorc 17a8e3c459 Bug 1253436 - Add __repr__ to BaseLibrary and BaseProgram; r=glandium
Now when we print instances in a debugger, we'll see something like:

<StaticLibrary: other-licenses/snappy/libother-licenses_snappy.a>
<StaticLibrary: toolkit/library/StaticXULComponentsEnd/libStaticXULComponentsEnd.a>
<SharedLibrary: toolkit/library/XUL>
<StaticLibrary: toolkit/library/libxul_s.a>
<HostProgram: config/nsinstall_real>
<Program: memory/replace/logalloc/replay/logalloc-replay>
<SimpleProgram: mfbt/tests/TestArrayUtils>

... instead of the the class name and memory address.

MozReview-Commit-ID: 8zdrM6KfP8U

--HG--
extra : source : 84849ad026c9ba1bbf71c93172b0a03440e51bec
2016-03-11 11:22:48 -08:00
Gregory Szorc 6bc67323f6 Bug 1253436 - Remove unused imports; r=glandium
MozReview-Commit-ID: 494hmTwyldH

--HG--
extra : source : c4a868c76959d3a2e13af6ca5adb0d629dcb2b34
2016-03-11 11:22:28 -08:00
Phil Ringnalda d5bd282a1b Back out 3 changesets (bug 1253436) for build bustage on a CLOSED TREE
Backed out changeset 4167dfdf1045 (bug 1253436)
Backed out changeset 84849ad026c9 (bug 1253436)
Backed out changeset c4a868c76959 (bug 1253436)
2016-03-14 20:22:29 -07:00
Gregory Szorc b7a0aef870 Bug 1253436 - Write out a machine readable file with binaries metadata; r=glandium
This will make it easier for binaries only archive generation to consult
the list of binaries that are relevant to packaging.

This does overlap somewhat with compile databases. Perhaps someday the
logic could converge.

While I was here, I cleaned up writing of the all-tests.json file to
avoid an intermediate string variable.

This patch adds to_dict methods on some frontend data types. There is
room to improve the serialization of these types. For example, we could
use __slots__ to drive the default formatter. We could also leverage a
custom JSONEncoder class that knows how to call to_dict() on instances.
In the spirit of perfect is the enemy of done, I think this should be
deferred to a follow-up bug.

MozReview-Commit-ID: XVnKB1MNqu

--HG--
extra : rebase_source : 376c93467dde3450c7c21cff918cb34913a3c5fe
2016-03-14 19:31:35 -07:00
Gregory Szorc cd4ba92951 Bug 1253436 - Add __repr__ to BaseLibrary and BaseProgram; r=glandium
Now when we print instances in a debugger, we'll see something like:

<StaticLibrary: other-licenses/snappy/libother-licenses_snappy.a>
<StaticLibrary: toolkit/library/StaticXULComponentsEnd/libStaticXULComponentsEnd.a>
<SharedLibrary: toolkit/library/XUL>
<StaticLibrary: toolkit/library/libxul_s.a>
<HostProgram: config/nsinstall_real>
<Program: memory/replace/logalloc/replay/logalloc-replay>
<SimpleProgram: mfbt/tests/TestArrayUtils>

... instead of the the class name and memory address.

MozReview-Commit-ID: 8zdrM6KfP8U

--HG--
extra : rebase_source : 7f964ad44a0061674f77d5716a6769a4aedb9e6c
2016-03-11 11:22:48 -08:00
Gregory Szorc 7b3913cab5 Bug 1253436 - Remove unused imports; r=glandium
MozReview-Commit-ID: 494hmTwyldH

--HG--
extra : rebase_source : 998f2b447df9ba023d0b12d4d70563e76e3bf0f7
2016-03-11 11:22:28 -08:00
Gregory Szorc c64c49d5ba Bug 1255963 - Detect warnings without space after line number; r=glandium
I'm not sure when this changed, but at least Visual Studio 2015
doesn't always emit a space between the line number and the ": warning"
text in cl.exe output.

Making the space optional in the regular expression enables one a
VS2015 build to capture 375 warnings instead of 17. We still fail to
capture some warnings (notably generic warnings about bad command
arguments and linker warnings). But that can be dealt with later.

MozReview-Commit-ID: q402CxTrQK

--HG--
extra : rebase_source : 6376a65b8d8145d68bad9b795b6abd6f4becefbd
2016-03-11 22:04:38 -08:00
Chris Manchester 87b3022311 Bug 1255585 - Prevent Python executable mis-match from constantly clobbering the virtualenv on OS X. r=gps
Virtualenv will sometimes find a different executable from its sys.executable on OS X,
causing a check in the build system comparing filesizes between sys.executable and virtualenv
python to fail, resulting in clobbering and re-building the virtualenv every time the virtualenv
is activated, causing the build backend and more to be re-built.

Instead of checking file sizes directly, this commit causes us to record the size and version of the
Python executable that created the virtualenv. If the Python executable checked is not the virtualenv
Python, or we have a different version than was used to create the virtualenv, then the virtualenv is
considered to be out of date.


MozReview-Commit-ID: KmrVfQCtbS3

--HG--
extra : rebase_source : d2b87325e10da6dfcd74f8b0d2ef7c0efb71595b
2016-03-11 12:24:10 -08:00
Ted Mielczarek a673bd63e2 bug 1248020 - add USE_YASM to moz.build. r=mshal
MozReview-Commit-ID: Liw4RGOXiVf

--HG--
extra : rebase_source : 1fa28bafd7cec69dd82f7f3ef0cea9f52593983a
extra : amend_source : 5d9185ff8a5562b2565cc5558127548fa7b9fb1f
extra : histedit_source : cafda3835897efec5519c2326c88e7f85ae4aad8%2Caf73cf11903c5d7baf38953503e3839873be3c68
2016-03-09 11:07:35 -05:00
Ryan VanderMeulen 3297186541 Backed out changeset 2ed1a0e47b18 (bug 1255585) for Windows build bustage.
CLOSED TREE
2016-03-11 21:40:08 -05:00
Chris Manchester ff0e9aac74 Bug 1255585 - Prevent Python executable mis-match from constantly clobbering the virtualenv on OS X. r=gps
Virtualenv will sometimes find a different executable from its sys.executable on OS X,
causing a check in the build system comparing filesizes between sys.executable and virtualenv
python to fail, resulting in clobbering and re-building the virtualenv every time the virtualenv
is activated, causing the build backend and more to be re-built.

Instead of checking file sizes directly, this commit causes us to record the size and path to the Python
executable that created the virtualenv. If the Python executable checked is not the virtualenv
Python, or the python that was used to create the interpreter, then the virtualenv is considered
to be out of date.


MozReview-Commit-ID: KmrVfQCtbS3
2016-03-11 12:24:10 -08:00
Mike Hommey 0c528f1ec6 Bug 1255433 - Read mozconfig as mbcs on Windows. r=gps
When writing e.g. Japanese text files on Windows, the text is encoded in
mbcs. So if a mozconfig is edited this way, and contains non ascii
characters, they won't be utf-8 as we're currently trying to decode
them, but mbcs.
2016-03-12 09:16:57 +09:00
Mike Hommey aca0420413 Bug 1254913 - Handle symbolic links in the path leading to moz.configure. r=nalexander 2016-03-11 09:38:28 +09:00
Maja Frydrychowicz 40304dfbf1 Bug 1255196 - Include mozinfo.json in common.tests.zip; r=gps
MozReview-Commit-ID: BJnXphkKJFy

--HG--
extra : rebase_source : c434e8555eceb8ea1073f00a4d387f270c0e3e4d
2016-03-10 15:44:59 -05:00
Mike Shal aeffe80634 Bug 1242632 - Remove TESTING_FILES from moz.build; r=glandium
MozReview-Commit-ID: ALy4s6Xpg7f
2016-01-25 13:41:22 -05:00
Chris Manchester b16bf0a8dd Bug 1240149 - Install Python packages necessary to artifact builds from mozilla pypi when running in automation. r=nalexander
MozReview-Commit-ID: 3hat64zgs2b
2016-03-09 10:58:49 -08:00
Mike Shal 053369e67e Bug 1253431 part 7 - Remove SDK_BINARY; r=gps
MozReview-Commit-ID: 4RmjsX966Qh

--HG--
extra : rebase_source : 0d9d94ed98ae8f1cfb9d5787edc1336ce1ee6785
2016-03-03 14:23:57 -05:00
Mike Shal 7ea5981744 Bug 1253431 part 1 - Add SDK_FILES to moz.build; r=gps
This adds support for an SDK_FILES variable in moz.build, which creates
a FinalTargetFiles object to install files into dist/sdk/

MozReview-Commit-ID: 97a5NdbZmmD

--HG--
extra : rebase_source : ad8d521ec56fe4610437c8d2d503c545894b40c2
2016-01-21 16:17:57 -05:00
Mike Shal 5fe7774087 Bug 1253430 - Move most FinalTargetFiles into misc tier; r=glandium
MozReview-Commit-ID: 6FECvFAfE4E

--HG--
extra : rebase_source : a53086a19a07c6bf64f06468a2c0930c3a2daacb
2016-03-02 17:38:35 -05:00
Chris Manchester 290404eacf Bug 1253651 - Undo changes to PATH made by activating virtualenv in mach artifact. r=glandium
The changes made to PATH by activating the in-tree virtualenv cause some git-cinnabar commands
in subprocesses to fail, because git cinnabar is expecting mercurial to be installed, while it
is not available from the in-tree virtualenv. To work around this, the changes to PATH made by
virtualenv are undone, allowing git-cinnabar to find system python, which is likely to have
mercurial installed.

MozReview-Commit-ID: 47ceHvMmuyf

--HG--
extra : rebase_source : 199d3b01fc49b2760ee14a08d4400a1addf83eac
2016-03-04 14:45:00 -08:00
Mike Hommey 849ac02d19 Bug 1253553 - Move --enable-artifact-builds, --disable-compile-environment and --enable-build-backend to moz.configure. r=nalexander,r=chmanchester
Note I'm using raw primitives until patterns emerge and we decide on
some helpers.
2016-03-08 15:41:32 +09:00
Mike Hommey 339d8a4013 Bug 1253502 - Allow to pass a specific python interpreter to initialize virtualenvs. 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 70fc00898e Bug 1253203 - Remove everything COMM_BUILD. r=nalexander,r=chmanchester
comm-central doesn't set it since bug 1040009.
2016-03-08 15:41:32 +09:00
Mike Hommey 646df2b991 Bug 1253203 - Use mozpath functions for sandboxed os.path in configure.py. r=nalexander,r=chmanchester
Generally speaking, the configuration needs forward-slashes in paths.
We might as well make it hard(er) to set configuration items with
backslash separators on Windows by exposing mozpath.* functions in place
of os.path functions. The downside is that functions explicitly
importing os will still get the real os.path functions.
2016-03-08 15:41:32 +09:00
Mike Hommey 3b7804715f Bug 1253203 - Normalize path separators in MozbuildObject. r=gps
The upcoming move of the configure.py initialization to sandboxed
moz.configure changes the path separators for topsrcdir and topobjdir
from native to always use forward-slashes, which confuses the hell out
of the test_base.py test. Settle the issue by declaring that
MozbuildObject will always use forward-slashed paths for topsrcdir
and topobjdir.
2016-03-08 15:41:32 +09:00
Mike Hommey b505dba93d Bug 1247836 - Building blocks for python configure. r=nalexander,r=chmanchester 2016-03-08 15:41:32 +09:00
Mike Hommey d43ee81232 Bug 1247836 - Add classes for python configure options handling. r=nalexander,r=chmanchester 2016-03-08 15:41:32 +09:00
Mike Hommey 44357443ac Bug 1247836 - Add a ReadOnlyNamespace class to mozbuild.util. r=nalexander,r=chmanchester 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
Myk Melez db9a40ca42 Bug 1238079 - remove the desktop web runtime; r=fabrice,mossop,gps,jryans,jmaher,marco 2016-03-07 13:33:12 -08:00