Commit Graph

3657 Commits

Author SHA1 Message Date
Sebastian Hengst
bebc17c784 Backed out changeset 6f0e650b0e53 (bug 1416465) on request from nalexander for many busted build environments. r=backout a=backout 2017-11-16 18:41:24 +02:00
Nathan Froyd
f2e9f9f3d3 Backout b0eedb4c140b (bug 1412983 part 6) for breaking local Windows builds; r=bustage; a=bustage 2017-11-16 09:53:34 -05:00
Csoregi Natalia
998e1ef995 Merge mozilla-central to mozilla-autoland. r=merge a=merge CLOSED TREE 2017-11-16 17:57:40 +02:00
Mike Shal
19e1422eec Bug 1416062 - Start compiling things in the tup backend, limited to xpcom/*; r=chmanchester
Compiling C/C++/asm just requires the list of sources from _process_unified_sources() and the
Sources/GeneratedSources objects, along with the ComputedFlags and
PerSourceFlags.

The assembler invocation will need to be tweaked to support yasm as
well, but this works so far for the xpcom directory.

MozReview-Commit-ID: 91BSKV9XPLU
2017-11-07 18:50:21 -05:00
Andrew Halberstadt
ea4da089aa Bug 1405588 - [mozversioncontrol] Use base_ref instead of upstream as default outgoing comparison on git, r=gps
Detecting the upstream repository isn't always possible. Using 'git merge-base'
seems to be a more reliable way of detecting outgoing files.


MozReview-Commit-ID: 3zOdTRIcggw
2017-11-01 12:57:03 -04:00
Andrew Halberstadt
bb9ace07c8 Bug 1405588 - [mozversioncontrol] Add ability to get base revision, r=gps
In addition to help fix this bug, having the base revision will allow us
to download the most likely relevant artifacts from CI. For example, in
|mach try| we can search for a 'full-taskgraph.json' artifact from the
most relevant decision task, even if not updated to the latest central.

The ability to find the base revision will also be needed when merging
tools/tryselect/vcs.py into mozversioncontrol.

MozReview-Commit-ID: 2WRRs4AoXcK
2017-10-26 17:04:22 -04:00
Brindusan Cristian
e4db08616d Merge inbound to mozilla-central r=merge a=merge 2017-11-16 00:24:15 +02:00
Nathan Froyd
2561ffce34 Bug 1325632 - part 6 - compile with C++14 support; r=glandium 2017-11-15 13:53:16 -05:00
Nathan Froyd
06a07063ea Bug 1412983 - part 6 - compile headers for cross-compilers during configure; r=ted.mielczarek
Our toolchain detection logic checks whether we can reuse the target
C (resp. C++) compiler for the host compiler.  This is generally only
applicable in the not-cross-compiling case, but we had special logic to
check for clang in the cross-compiling case and accept it, as clang is
able to generate code for multiple architectures from a single compiler
binary.

Our recent switch to clang on Android has exposed a problem in this
logic: we would never check whether the target clang, compiling for the
host, could actually find the host's headers.  This was especially
problematic on OS X hosts, where the host clang contains special logic
to grovel inside the XCode installation to find C++ headers.  The clang
from the NDK, however, was ignorant of the XCode installation.
Therefore, the NDK clang would happily compile code for the host, even
including C headers for the host, but would be hopelessly lost when it
came to compiling C++ headers during the actual build.

In hopes of mitigating this, we now include a check for a representative
header for C and C++ when checking compilers for each of those
languages.  This check will detect such problems as the above, and will
also alert people to potentially misconfigured compilers in other
situations.

We need to modify our test framework to cope with headers being
included, since our mock environment isn't actually equipped with a full
set of compilers and headers.
2017-11-15 10:12:22 -05:00
Gregory Szorc
3b1bd3953b Bug 1417387 - Don't mix unicode and bytes in clobber code; r=nalexander
b6adf66f34c6 (bug 1416052) changed the value for "fh" when this code
is called. It can now be an io.BytesIO. This type enforces that
arguments are bytes and doesn't perform automatic type coercion like
most other parts of Python 2.

self.topobjdir is a unicode. And unicode_literals isn't in effect
in this file. So convert self.topobjdir to bytes to make BytesIO
happy.

MozReview-Commit-ID: LrWTKFp3ZKT
2017-11-15 10:17:26 -08:00
Gregory Szorc
fb4384b5d7 Bug 1416052 - Fixup for test_clobber.py; r=me
Forgot to push the updated patch to review.

Test-only change. So self-reviewing.

CLOSED TREE
2017-11-14 16:08:35 -08:00
Gregory Szorc
79e19ec817 Bug 1416052 - Check clobber state from Python; r=nalexander
The clobber logic is already written in Python. Now that we
always use mach in front of client.mk, we can check the clobber
state before we execute client.mk.

Since we always check the clobber state, we can remove the
CLOBBER files from various dependencies in client.mk. The
clobberer code should ensure everything is in a good state.

The refactor of the clobber Python code required some changes to
its testing. We drop some support for verifying output strings.
But testing this correctly would require a bit of effort. I don't
think it is worth it.

MozReview-Commit-ID: 69CoImCgtNm
2017-11-09 23:13:59 -08:00
Gregory Szorc
3626b092a5 Bug 1416052 - Remove mkdir of objdir from client.mk; r=nalexander
Now that mach is being used to invoke client.mk, we can perform
objdir directory creation there.

Removing the use of mkdir_deps meant that we could remove some
included make files which AFAICT were only used to provide
$(mkdir_deps).

MozReview-Commit-ID: 4ZRToz8xqZy
2017-11-09 22:41:17 -08:00
Gregory Szorc
a7bede65fc Bug 1416052 - Move export of FOUND_MOZCONFIG to Python; r=nalexander
This should have the same net result.

TBH, I'm not 100% convinced we need this export. It is only needed
to send variables to sub-makes. And the only make file reading
FOUND_MOZCONFIG is client.mk. Since the code that evals the
auto-generated make file is always executed in client.mk, we
shouldn't need this export.

All this code is going away soon anyway. So I'm inclined to cargo
cult this just in case.

MozReview-Commit-ID: DqF1BU702A
2017-11-09 22:23:14 -08:00
Gregory Szorc
04d1681269 Bug 1416052 - Generate a make file to include in client.mk; r=nalexander
Currently, client.mk calls `mach environment` to obtain a make file
to be evaluated in the context of client.mk. The reason it is
implemented this way is because client.mk could be an entrypoint to
the build system.

With recent changes that require the use of mach to use client.mk,
we are now guaranteed to have Python code running before client.mk
is invoked. This means we don't need to invoke `mach` from client.mk.

This commit ports the code for generating a client.mk suitable make
file from `mach environment` to the build dispatcher. We now write out
a new .mozconfig-client-mk file in the objdir. client.mk is changed
to cat this file and to include it as a native make file.

The OBJDIR environment variable is also set so client.mk knows where
to read the auto-generated file from.

This commit should be backwards compatible.

Hopefully it is obvious, but this new make file is only temporary.
As soon as the remaining mozconfig logic is moved out of client.mk,
we should be able to simplify down to a single "include" in client.mk.

MozReview-Commit-ID: BEfWo76Z1qA
2017-11-09 22:27:16 -08:00
Gregory Szorc
60cceae5ac Bug 1416052 - Remove references to MOZ_CURRENT_PROJECT; r=nalexander
Actual uses of this variable were removed by 5fb427c50ca3
(bug 1412431). This is dead code.

MozReview-Commit-ID: GsDqpXZol2L
2017-11-09 21:47:43 -08:00
Gregory Szorc
eed5e08684 Bug 1416052 - Move config.guess logic to Python; r=nalexander
Instead of evaluating config.guess in client.mk, we evaluate it
in Python. The Python code also looks for CONFIG_GUESS in the
mozconfig. This still happens in client.mk courtesy of evaling
the mozconfig's relevant parts.

MozReview-Commit-ID: 87NmQiB2ccX
2017-11-09 16:17:35 -08:00
Gregory Szorc
73357ee3e7 Bug 1416052 - Pass TOPSRCDIR into client.mk; r=nalexander
MozReview-Commit-ID: B5TfneZRan7
2017-11-09 15:50:32 -08:00
Gregory Szorc
bce4e9ef20 Bug 1416052 - Add a wrapper to invoke client.mk; r=nalexander
We're about to start moving logic from client.mk into Python.

The transition will require doing things like setting
environment variables when we invoke client.mk. Prepare for
this by factoring the "call client.mk" logic into a reusable
function.

The function will obviously be temporary until client.mk is
no more. I'm not sure what the end state will be yet. But surely
having equivalent code in Python is better than having it in
make.

MozReview-Commit-ID: F15DxXSV8V3
2017-11-09 15:50:37 -08:00
Masatoshi Kimura
709fe653c5 Bug 1416465 - Fix PATTERN_LINK and PATTERN_COPY entries of install manifests. r=mshal
MozReview-Commit-ID: DNVk40ISour
2017-11-12 00:06:22 +09:00
Chris Manchester
9cac88a0b1 Bug 1416059 - Move ASFLAGS logic from config.mk to mozbuild. r=mshal
MozReview-Commit-ID: L7RSijG9uA
2017-11-10 16:58:16 -08:00
Andreea Pavel
338060b4fd Backed out 2 changesets (bug 1416059) for failing /python/mozbuild/mozbuild/test/frontend/test_emitter.py::TestEmitterBasic::test_use_yasm r=backout on a CLOSED TREE
Backed out changeset 597624409f4c (bug 1416059)
Backed out changeset d0df69766fa5 (bug 1416059)
2017-11-14 20:44:54 +02:00
Chris Manchester
c9df78a677 Bug 1416059 - Move ASFLAGS logic from config.mk to mozbuild. r=mshal
MozReview-Commit-ID: L7RSijG9uA
2017-11-10 16:58:16 -08:00
Tom Prince
98b879981b Bug 1416349: Specify mozmill as a type of testsuite in mozbuild scheduler definitions; r=dustin
MozReview-Commit-ID: I9XJJo92Ka4
2017-11-01 14:14:06 -06:00
Dustin J. Mitchell
256f5ffad0 Bug 1410911 - back out bug 1403322; r=gbrown
Backed out changesets 37db725b2308 ccc4f12edef0 e3a310b6b896 547109f6eb1d 5c50f100460d

MozReview-Commit-ID: 5M6Mevz6LZV
2017-11-10 18:19:47 +00:00
Mike Shal
f3498f61ac Bug 1407432 - Move stl wrapper generation into moz.build; r=froydnj
This is fairly straightforward to represent as a GENERATED_FILES, though
we have to take some care to construct the outputs tuple correctly. This
script needs to run during export, and unfortunately none of the STL
headers have proper file extensions, so the 'new' header is
special-cased in the recursive make backend to serve as a marker for
running it in the correct tier.

We can't remove the stl-headers file yet because it is still used for
the system header generation.

MozReview-Commit-ID: 3tQTOY0LAsQ
2017-11-08 17:42:27 -05:00
Mike Shal
0a3d829764 Bug 1407432 - Remove unused builtins arg from Sandbox; r=froydnj
MozReview-Commit-ID: JVukxIg04AT
2017-11-08 19:58:28 -05:00
Gregory Szorc
b0c5a42e2e Bug 1411462 - Abort when I/O error seen; r=glandium
Before, I/O errors writing to stdout/stderr (e.g. due to broken pipe)
would result in handleError() being called and execution would
keep running. This would potentially result in an error message for
every log/line failure being printed to stderr.

We change the behavior so I/O failures are fatal and abort
execution.

We test the new behavior by changing a test to pipe to `head`
directly. Since `head` exits once it has seen sufficient output,
this results in an EPIPE which now results in immediate program
termination.

MozReview-Commit-ID: 1UecZJ56h4r
2017-11-09 20:44:10 -08:00
Gregory Szorc
226ca80b40 Bug 1411462 - Normalize when argument earlier in imply_option(); r=glandium
This makes `configure --help` work again (it stopped working due to
370a4a2a7898 (bug 1405982).

MozReview-Commit-ID: 2gCmAAsE0qW
2017-10-24 12:56:10 -07:00
Phil Ringnalda
32df571256 Backed out 6 changesets (bug 1407432) on (wild) suspicion of causing failures in browser_sanitize-timespans.js, somehow
CLOSED TREE

Backed out changeset 86302df0b38a (bug 1407432)
Backed out changeset 5a967cc85e28 (bug 1407432)
Backed out changeset 828d43ec1b16 (bug 1407432)
Backed out changeset bacf04be0a48 (bug 1407432)
Backed out changeset 8d770908a5b9 (bug 1407432)
Backed out changeset ffe9aed0944f (bug 1407432)

MozReview-Commit-ID: 7D50rKeXLrn
2017-11-09 22:07:46 -08:00
Gregory Szorc
f04d339935 Bug 1415971 - Dedent warning printing code; r=nalexander
This doesn't need to run when the context manager is active.

MozReview-Commit-ID: DV3SZyUwxlM
2017-11-09 13:13:09 -08:00
Gregory Szorc
70999bf2c6 Bug 1415971 - Stop build output monitor earlier; r=nalexander
We currently print compiler warnings summary then stop the build
output manager, which basically stops resource monitoring.

A future commit will refactor this code a bit and it will be easier
to have the monitor.stop() call directly after the build finishes.

MozReview-Commit-ID: 3uWFWG6ELnH
2017-11-09 12:12:31 -08:00
Gregory Szorc
0faef56530 Bug 1415614 - Move configure invocation out of mach_commands.py; r=nalexander
While we're here, also move the low-level code to invoke configure
to a proper Python module.

MozReview-Commit-ID: 4rlCxOwcVu1
2017-11-09 12:19:16 -08:00
Gregory Szorc
bc891eaae0 Bug 1415614 - Move code for invoking build system out of mach_commands.py; r=nalexander
The goal is to move this lower-level code somewhere where it can be
reused.

The only meaningful code change as part of the move was handling
of the mach context. Before, we could access self._mach_context.
After, we need to pass it as an argument. This also uncovered a bug
where "telemetry_handler" could be None but we called it
unconditionally. We now guard this call with an "if."

MozReview-Commit-ID: FWw4l6H1ayS
2017-11-08 15:52:17 -08:00
Gregory Szorc
15ccd5fd80 Bug 1415614 - Move build output processing code out of mach_commands.py; r=nalexander
In general, we shouldn't have so much business logic in mach_commands.py
files.

I'd like to move more of the low-level "perform a build" logic out of
mach_commands.py to facilitate some future work. That code makes use of
this output processing code. So as the first step in moving the build
code, we move its dependencies.

As part of this, I also cleaned up some random unused imports around
lines that were touched.

No meaningful code changes were performed as part of the code move.

MozReview-Commit-ID: 96mGWUJ7oLb
2017-11-08 14:45:07 -08:00
Gregory Szorc
48b46d8306 Bug 1415614 - Add an API to log all structured messages; r=mshal
Currently, marking a logger as a structured logger will require a
subsequent function call in order for the logger to be hooked up
to active handlers. This behavior is not intuitive and makes it
easy to not have handlers for newly-registered loggers. This means
messages may not be logged anywhere.

In addition, we have to manually specify which named loggers to
enable structured logging for. This can be annoying.

We change the behavior of register_structured_logger() to
automatically add existing terminal and json handlers to the
logger being marked as structured.

We also introduce an API to enable structured logging for all
loggers. Existing consumers of registered_structured_logger()
in mozbuild have been updated to use this API. A new consumer
has been added for the `mach configure` command because it should
have been there before.

We stop short of making enable_all_structured_loggers() the default.
This is because various commands interact with the log manager in
ways that will result in duplicate logging of messages and
dropping of structured messages. There is a bit of a rabbit hole
here and addressing it can be done as a follow-up.

MozReview-Commit-ID: 1aU6eJvTSMP
2017-11-09 15:09:52 -08:00
Gregory Szorc
25278dd898 Bug 1415614 - Don't assign mach logger to instance variable; r=nalexander
We don't use this attribute outside of this function. Besides, you can
easily obtain a handle on the logger by calling
``logging.getLogger('mach')``.

MozReview-Commit-ID: 41vdn6McowW
2017-11-08 14:28:19 -08:00
Mike Shal
7cc1c32eaf Bug 1407432 - Move stl wrapper generation into moz.build; r=froydnj
This is fairly straightforward to represent as a GENERATED_FILES, though
we have to take some care to construct the outputs tuple correctly. This
script needs to run during export, and unfortunately none of the STL
headers have proper file extensions, so the 'new' header is
special-cased in the recursive make backend to serve as a marker for
running it in the correct tier.

We can't remove the stl-headers file yet because it is still used for
the system header generation.

MozReview-Commit-ID: 3tQTOY0LAsQ
2017-11-08 17:42:27 -05:00
Mike Shal
59118f2b47 Bug 1407432 - Remove unused builtins arg from Sandbox; r=froydnj
MozReview-Commit-ID: JVukxIg04AT
2017-11-08 19:58:28 -05:00
dluca
935c41c8bf Backed out 1 changesets (bug 1393817) for failing to repackage the nightly build on Windows a=backout.
Backed out changeset 25f21f22a34b (bug 1393817)
2017-11-09 15:34:00 +02:00
Sebastian Hengst
52ea9f8769 merge mozilla-inbound to mozilla-central. r=merge a=merge 2017-11-09 00:00:16 +02:00
Zibi Braniecki
505ab04c54 Bug 1415432 - .ftl files repackaged multiple times. r=glandium 2017-11-07 22:16:16 -08:00
Andrew Halberstadt
2730a80a6b Bug 1414399 - [mozbuild/moztest] Move mozbuild.testing.TestResolver to moztest.resolve r=gps
The TestMetadata and TestResolver classes aren't technically part of the build
system. The only connection is that they consume some build system output.

The next patch in this series is going to be merging in a bunch of other test
resolving logic from other parts of the tree. Moving this out first allows us
to keep that extra logic out of mozbuild.

MozReview-Commit-ID: 1eq4SjFVCyW
2017-11-06 08:41:42 -05:00
Tom Ritter
1625276bf4 Bug 1393817 Use buildconfig to get the path for 7z rather than hardcoding it in exe_7z_archive.py r=ted
With that fixed, Re-enable MOZ_AUTOMATION_L10N_CHECK for MinGW

MozReview-Commit-ID: BDTtY1J7sBj
2017-10-27 20:13:21 -05:00
Jonathan Watt
096bcbef0b Bug 1413227 - Turn off Eclipse CDT's "Limit console output" option for debug output. r=botond
The default debug console line limit is far too short, especially when
debugging a debug build or a build with some logging turned on.  I've never
had any issues with turning off the limit, so hopefully this is fine for
everyone else too.

MozReview-Commit-ID: Krlo7XPEjE0
2017-10-16 11:53:26 +01:00
Jonathan Watt
679962db59 Bug 1413227 - Increase the line limit for Eclipse CDT's build console to 10,000. r=botond
By default the build console is limited to 500 lines.  This can be far too
short, especially when building using `mach build --verbose`.  I've run with
this value set to 1,000,000 before without issue, so 10,000 should be fine.

MozReview-Commit-ID: GxBUjW7nOYJ
2017-10-16 09:36:09 +01:00
Gregory Szorc
cdf807962b Bug 1412932 - Switch to PGO build in Makefile.in; r=ted
Previously, client.mk made the decision of whether to perform a PGO
build. This required passing around MOZ_PGO and invoking a separate
make target if this variable was set.

In this commit, we move this logic to Makefile.in. We employ a special
mechanism in rules.mk to override the default make target so
`make` evaluates "profiledbuild" if MOZ_PGO is set. This also
required using an explicit target for $(MAKE) invocations inside
the "profiledbuild" rule to avoid infinite recursion.

MozReview-Commit-ID: 8sHiVspMisM
2017-11-07 16:38:39 -08:00
Marco Castelluccio
56a9cc11e1 Bug 1317041 - Calculate crc32 incrementally; r=gps 2017-11-07 15:34:20 -08:00
Chris Manchester
226e4b9e9a Bug 1414064 - Remove LD_VERSION_SCRIPT from the build system. r=mshal
MozReview-Commit-ID: 6KOLZh6aQmc
2017-11-07 14:35:05 -08:00
Tom Prince
5c1e459dac Bug 1415199: Move some logic for loading taskgraph kinds from mozbuild.mach_bootstrap to taskgraph. r=dustin
This fixes the fallout from the mach command not being updated for 69c60c8fc528d8d038e22a2ae62f5ff7b1131231.

MozReview-Commit-ID: 7WZ8wW4gnCY
2017-11-07 10:08:49 -07:00