Commit Graph

3686 Commits

Author SHA1 Message Date
Mike Hommey
e9612fc379 Bug 1420355 - Don't initialize DMD if the DMD environment variable is not given. r=njn
This makes things slightly more inconvenient (having to set two
environment variables instead of one for the simplest case) until a few
patches down the line, when DMD is statically linked, at which point it
will get down to one environment variable every time.
2017-11-28 08:10:07 +09:00
Csoregi Natalia
e4966430b1 Backed out 7 changesets (bug 1420355) for mass failures on OS X and Android. r=backout on a CLOSED TREE
Backed out changeset a7ed89e13a4c (bug 1420355)
Backed out changeset fd6702e6e0a0 (bug 1420355)
Backed out changeset 0479dda078a2 (bug 1420355)
Backed out changeset e69357ccca9e (bug 1420355)
Backed out changeset 3742a4b69ba2 (bug 1420355)
Backed out changeset 451cd087922f (bug 1420355)
Backed out changeset d80b5c4e1dd0 (bug 1420355)
2017-11-29 03:08:46 +02:00
Mike Hommey
0a7b28a47e Bug 1420355 - Statically link DMD. r=njn 2017-11-28 08:10:48 +09:00
Mike Hommey
f88f56aa1d Bug 1420355 - Don't initialize DMD if the DMD environment variable is not given. r=njn
This makes things slightly more inconvenient (having to set two
environment variables instead of one for the simplest case) until a few
patches down the line, when DMD is statically linked, at which point it
will get down to one environment variable every time.
2017-11-28 08:10:07 +09:00
Henrik Skupin
4b1560cdf6 Bug 1417051 - Reorganize Firefox UI tests in test package for full path names in log files. r=maja_zf
The Firefox UI tests were packaged wrongly, and as such didn't use
the real path as in tree. This patch fixes that by separating the
packaging logic for the harness, and the tests.

Also it updates the mozharness script to run the Firefox UI tests
command by using the test folder as current working directory. This
will make sure that the relative path to the tests is reported.
It's identical to the location in the tree.

MozReview-Commit-ID: 3YVfCw4RWfV
2017-12-01 10:27:06 +01:00
Gurzau Raul
ebeea06a65 Backed out 5 changesets (bug 1255485) for mochitest failures on test/mochitest/test_hangui.xul
Backed out changeset 90b7449882b6 (bug 1255485)
Backed out changeset 5672cf8d324b (bug 1255485)
Backed out changeset ed6dd4aefadb (bug 1255485)
Backed out changeset 0ba36c0feddb (bug 1255485)
Backed out changeset 51af06b6123c (bug 1255485)
2018-01-23 02:01:43 +02:00
Gurzau Raul
df590e36a5 Backed out changeset 5bb16f349a38 (bug 1430825) for Windows build bustage on a CLOSED TREE 2018-01-22 21:54:08 +02:00
Andrew Halberstadt
4712493d77 Bug 1430825 - [mozlint] Split work up by paths instead of by linters, r=standard8
The initial motivation for this patch, was to prevent command lines that are
too long on Windows. To that end, there is a cap to the number of paths that
can be run per job. For now that cap is set to 50. This will allow for an
average path length of 160 characters, which should be sufficient with room to
spare.

But another big benefit of this patch is that we are running more things in
parallel. Previously, mozlint ran each linter in its own subprocess, but that's
it. If running eslint is 90% of the work, it'll still only get a single
process. This means we are wasting cores as soon as the other linters are
finished.

This patch chunks the number of specified paths such that there will be N*L
jobs where 'N' is the number of cores and 'L' is the number of linters.  This
means even when there's a dominant linter, we'll be making better use of our
resources. This isn't perfect of course, as some paths might contain a small
number of files, and some will contain a very large number of files.  But it's
a start

A limitation to this approach is that if there are fewer paths specified than
there are cores, we won't schedule enough jobs per linter to use those extra
cores. One idea might be to expand specified directories and individually list
all the paths under the directory. But this has some hairy edge cases that
would be tough to catch. Doing this in a non-hacky way would also require a
medium scale refactor.

So I propose further parallelization efforts be destined for follow-ups.

MozReview-Commit-ID: JRRu13AFaii
2018-01-16 16:01:20 -05:00
Ted Mielczarek
286a6a412b bug 1255485 - add some tests for building programs in dist/bin. r=nalexander
MozReview-Commit-ID: 94uOsInnWmT
2018-01-17 11:19:19 -05:00
Ted Mielczarek
47e236d7d3 bug 1255485 - build PROGRAMs directly in dist/bin instead of copying them. r=nalexander
Historically we built all our binaries in directories in the objdir, then
symlinked them into dist/bin. Some binaries needed to be copied instead
so that certain relative path lookups work properly, so we resorted to
sprinkling `NSDISTMODE=copy` around Makefiles.

This change makes it so we build PROGRAMs (not any other sort of targets)
directly in dist/bin instead. We could do the same for our other targets
with a little more work.

There were several places in the tree that were copying built binaries to
some other place and needed fixup to match the new location of binaries.

On Windows pdb files are left in the objdir where the program was
originally linked. symbolstore.py needs to locate the pdb file both to
determine whether it should dump symbols for a binary and also to copy
the pdb file into the symbol package. We fix this by simply looking for
the pdb file in the current working directory if it isn't present next
to the binary, which matches how we invoke symbolstore.py.

MozReview-Commit-ID: 8TOD1uTXD5e
2018-01-10 14:26:12 -05:00
Valerie R Young
36c853e049 Bug 1423335 - jstest reorganization: move all test files into non262/ with a parallel structure to test262, removing tests that duplicate test262 coverage. r=sfink
Descriptions of the original patches, which I had to squash because they needed to land together:

 - move all test files
 - move and add shell.js files
 - move vars in ecma/shell.js and ecma_3/Date/shell.js
 - move funcs in ecma_5/RegExp/shell.js into non262/RegExp/shell.js
 - move funcs in js1_5/Expressions/shell.js into non262/expressions/shell.js
 - move funcs in js1_8_5/extensions/shell.js into non262/extensions/shell.js
 - move funcs in ecma_5/shell.js into non262/shell.js and non262/strict/shell.js
 - move funcs from ecma_6/shell.js and ecma_7/shell.js
 - move and make browser.js files
 - remove unnecessary files
 - update script locations from move
 - remove redeclarations of vars in shell.js
 - save a few more old tests
 - delete old test files covered by test262
 - fix references to scripts from jit-test
 - Move Intl directory
2017-12-08 10:11:00 -08:00
Mike Hommey
dc1cf661c8 Bug 1419196 - Use the "threadsafe" variant of gtest death tests. r=ted
Because the default "fast" variant uses fork() on !windows, death tests
are dangerous, as they themselves say. There are race conditions
involving locks that lead to dead locks in the death test process while
disabling the crash reporter (currently, but this could happen for
different code, even the tested code itself).

See https://bugzilla.mozilla.org/show_bug.cgi?id=1419196#c7 for details.

Using the "threadsafe" variant creates new processes for each death
test. This is notably slower, but can't dead-lock because of some random
lock being held by some random other thread at the moment fork occurred.
2017-11-24 14:22:20 +09:00
Mike Hommey
eaca02ca47 Bug 1420100 - Add memory to the list of projects we run the configure lint on. r=nalexander 2017-11-23 17:13:53 +09:00
Masatoshi Kimura
8eed4a9d59 Bug 1416465 - Regression tests for process_install_manifest.py. r=mshal
MozReview-Commit-ID: LTqTddybtrr
2017-11-18 11:31:04 +09:00
Coroiu Cristina
9a0a6dd7de Merge mozilla-central to autoland. r=merge a=merge on a CLOSED TREE 2017-11-22 01:46:49 +02:00
Mike Shal
eea21e9b33 Bug 1419556 - Expand list of supported compilation dirs in the tup backend; r=chmanchester
This combines and expands the list of directories where compilation
currently works in tup, going backwards through the alphabet. Not all of
these directories actually contain compileable code, but this makes it
obvious which top-level directories are not yet enabled. It is likely
that other directories will compile successfully as well - this is
simply a staging point.

MozReview-Commit-ID: Arsk9Oq5XTV
2017-11-21 09:30:15 -05:00
Mike Shal
ea8ba412a3 Bug 1419556 - shell_quote() the ComputedFlags in the tup backend; r=chmanchester
Flags like -DMOZ_APP_NAME="firefox" need to be sent through the shell as
'-DMOZ_APP_NAME="firefox"', otherwise the double-quotes get eaten and
the string is invalid.

MozReview-Commit-ID: 7QN3VTMAY77
2017-11-21 09:29:55 -05:00
Ted Mielczarek
9b0a151afa bug 1419055 - Fix FasterMake backend handling of FINAL_TARGET_FILES with wildcards in filename. r=nalexander
This patch fixes a bug in the FasterMake backend and adds a new
test_fastermake.py file to add a test for the behavior.

The FasterMake backend didn't handle wildcards in file names present in
FINAL_TARGET_FILES properly. For an entry like:

FINAL_TARGET_FILES.foo += ['*.xyz']

It would wind up trying to install the files to `dist/bin/foo/*.xyz/`, a
path with a literal asterisk in it. The code seems to have been written
assuming that wildcards would only be present in directory components of
the path. This change fixes this specific case, although it's possible that
it still doesn't handle all permutations of wildcards properly.

MozReview-Commit-ID: rk2tSyDyIu
2017-11-20 11:35:39 -05:00
Brindusan Cristian
69083c77d3 Merge mozilla-central to autoland. r=merge a=merge on a CLOSED TREE 2017-11-21 00:24:13 +02:00
Ted Mielczarek
ed4eccb5ee bug 1409721 - add LOCALIZED_FILES and LOCALIZED_PP_FILES to moz.build sandbox. r=nalexander
This commit adds new moz.build sandbox symbols that are intended to be used
for localized files: LOCALIZED_FILES and LOCALIZED_PP_FILES. They are currently
just do-nothing subclasses of FinalTarget[Preprocessor]Files, but the next
change in this series will add support for them to the recursive make backend.

Because they subclass FinalTarget[Preprocessor]Files, build backends that are
not concerned about localized builds should be able to handle them as if
they were FINAL_TARGET[_PP]_FILES without any additional code.

MozReview-Commit-ID: K0baBZ0F7av
2017-11-09 14:01:48 -08:00
Ted Mielczarek
e971da8bbd bug 1409721 - wire up support for LOCALIZED[_PP]_FILES in the recursive make backend. r=nalexander
This commit adds support for handling LOCALIZED_FILES and LOCALIZED_PP_FILES
in the recursive make backend. They get special handling because they have
a few special needs:
* They run during the libs tier, so that repacks work.
* The filenames cannot be determined at build-backend generation time,
  since repacks run configure once and then repack multiple locales using
  the generated backend files, so they are written with to be expanded with
  MERGE_FILE by make so that the file gets picked up from the proper locale dir.

Other build backends that aren't trying to handle localized builds will
silently handle these like FINAL_TARGET_FILES, which is fine until we revamp
our l10n repack story.

MozReview-Commit-ID: 2LZhPZNhQ4S
2017-11-09 15:22:42 -08:00
Sylvestre Ledru
5634432250 Bug 1406346 - In case of error, tell to the dev that it might be caused by temporary files r=gps
MozReview-Commit-ID: k4RkIWeDQc
2017-11-06 12:03:59 +01:00
Axel Hecht
7fadc0bc70 bug 1417414, force shell=True when running config.guess, r=gps
MozReview-Commit-ID: GpRlbS4SoA2
2017-11-15 13:59:27 +01:00
Gregory Szorc
efd963ff41 Bug 1417264 - Write .mozconfig.json from Python; r=nalexander
In order to determine if we need to re-run configure, we write
a JSON file representing the evaluated mozconfig. If this JSON
file changes, configure (and config.status for that matter) is
out of data and it is re-executed.

This commit moves the generation of that JSON file to Python.

MozReview-Commit-ID: 636rpSY7gOm
2017-11-13 17:45:03 -08:00
Gregory Szorc
ba00f4381e Bug 1417264 - Write objdir .mozconfig from Python; r=nalexander
This is a pretty straightforward port of the logic. But we
even go a step further: we delete the file in the objdir if there is
no source mozconfig!

MozReview-Commit-ID: AHFFzy6mXRY
2017-11-13 17:31:14 -08:00
Gregory Szorc
a2cad97524 Bug 1417264 - Write .mozconfig.mk file from Python; r=nalexander
The file is a filtered version of the make file that we previously
started generating for client.mk. Why there is special casing for
UPLOAD_EXTRA_FILES, I'm not sure. This smells fishy and is something
I'd like to take a look at once all code is ported out of client.mk.

The removal of the logic from client.mk meant that we could remove
a bunch of code from client.mk related to loading mozconfig files.
We can now simply include the auto-generated make file directly and
be done with it.

MozReview-Commit-ID: 4M5NElQA7iR
2017-11-13 16:22:42 -08:00
Gregory Szorc
545a730eb1 Bug 1417264 - Move printing of mozconfig lines to Python; r=nalexander
We write the file that client.mk is printing from Python. We can
also log it from there pretty easily. So do that.

MozReview-Commit-ID: 7eeugdOJR5b
2017-11-13 15:35:16 -08:00
Gregory Szorc
4ab8156d41 Bug 1417264 - Refactor code for writing mozconfig make file; r=nalexander
Upcoming commits need to move more logic from client.mk. It will
be easier if we have a list of lines in the mozconfig as a local
variable.

MozReview-Commit-ID: 1wFZTfWLGP9
2017-11-13 16:14:47 -08:00
Sebastian Hengst
4b11b2e19b merge mozilla-central to autoland. r=merge a=merge on a CLOSED TREE 2017-11-16 18:42:38 +02:00
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