Commit Graph
5079 Commits
Author SHA1 Message Date
Mike Shal f54b7476e4 Bug 1423809 - Fixup dist/bin/Tupfile generation; r=nalexander
Bug 1416891 introduced a line in moz.build that uses
LOCALIZED_FILES['..'], which ended up created a BackendTupfile object
for 'dist/bin/browser/../Tupfile' separate from the BackendTupfile
object for 'dist/bin/Tupfile'. Since both objects write to the same
file, the one with a '..' in the path ended up clobbering the original
one.

This patch makes two small changes, either of which would be sufficient
to fix the problem. First, we only get the backend file in
_process_final_target_files() when we actually use it (the
LOCALIZED_FILES in this case goes through the else case). Second, we now
call normpath in _get_backend_file() to ensure things like '..' are
resolved so that any future cases of 'Tupfile' and 'foo/../Tupfile'
end up pointing to the same object.

MozReview-Commit-ID: KDGBdtQ18lK
2017-12-08 14:37:30 -05:00
Mike Shal f5a0dd484c Bug 1423809 - Support localized generated files in the tup backend; r=nalexander
These files fail to build in the tup backend because the --locale
argument is missing and scripts like generate_update_locale.py require a
locale. Since the tup backend currently only supports en-US, we can just
hardcode this argument for now.

MozReview-Commit-ID: 7Js1yd9QB01
2017-12-08 13:53:44 -05:00
Andreea Pavel f83f963a34 Merge inbound to mozilla-central r=merge a=merge 2017-12-09 22:21:17 +02:00
Marco Castelluccio 52519f1ba6 Bug 1424227 - Close temporary file before reopening it to avoid a Permission Denied error on Windows. r=me 2017-12-09 14:54:02 +01:00
Marco Castelluccio 1adbbe59d2 Bug 1424227 - Make lcov rewriter tests use a temporary file. r=me 2017-12-09 11:55:58 +01:00
Marco Castelluccio d71e768f23 Bug 1424227 - Support merging multiple input info files into a single output info file. r=chmanchester 2017-12-09 01:38:34 +01:00
Marco Castelluccio 760d474d87 Bug 1424216 - Support passing directories as inputs to lcov_rewriter.py. r=chmanchester 2017-12-08 12:54:33 +01:00
Daniel Holbert 94b3eff6c0 backout changesets 50f8950fc2bc and cc0a899aa73a (bug 1424216) for bustage 2017-12-08 17:34:30 -08:00
Marco Castelluccio 31841c1b92 Bug 1424227 - Support merging multiple input info files into a single output info file. r=chmanchester 2017-12-09 01:38:34 +01:00
Marco Castelluccio ec9b805538 Bug 1424216 - Support passing directories as inputs to lcov_rewriter.py. r=chmanchester 2017-12-08 12:54:33 +01:00
Mike Hommey 3c0172c4e6 Bug 1423802 - Handle stdc++compat and STLPORT_LIBS at the emitter level. r=nalexander
Bug 1256642 introduced magic at the emitter level to determine whether a
binary contains C++ sources and should be linked with the C compiler or
the C++ compiler.

Unfortunately, the Binary() moz.build template always adds C++ OS
libraries on Android (through STLPORT_LIBS), and C++ libraries on Linux
(stdc++compat).

The latter only ends up forcing every Binary() to be linked with the C++
linker, which is unfortunate, but doesn't cause much problems. The
former, however, involving OS libraries, the magic from bug 1256642
doesn't kick in, so we end up trying to link C++ OS libraries with the C
linker. Which ends up failing, because the libraries in STLPORT_LIBS
require -lm, which, while it's added by the C++ compiler when linking,
is not when the linkage is driven by the C compiler.

Because the fallible library, linked to all GeckoBinary()s is a C++
library, we still ended up linking with the C++ compiler on Android, so
this wasn't actually causing any problem... until I tried to remove that
fallible library in bug 1423803.

Anyways, the core problem is that moz.build evaluation is happening too
early to know whether any C++ sources are being linked together, so
there is no way the Binary() template can do the right thing. So this
change moves the logic to the emitter.

This also changes the type of STLPORT_LIBS to a list.
2017-12-07 12:15:32 +09:00
Ralph Giles a80e62e258 Bug 1424439 - mozboot: Update to rust 1.22.0. r=nalexander
Since bug 1421097, rust 1.22.0 is required to build, but
mozboot was still considering 1.21.0 sufficiently new.
bumpt the version there as well so `./mach bootstap`
will update to the required version.

MozReview-Commit-ID: moYo0KSsU
2017-12-08 16:42:28 -08:00
Mike Shal 38214164ec Bug 1423438 - Fix invalid .pp content for process_define_files.py; r=glandium
The process_define_files action uses the PartialConfigEnvironment to
query buildconfig values, but it should only be doing it for 'define'
and 'undef' statements. It was incorrectly also querying the
PartialConfigEnvironment with other preprocessor statements like 'if'
and 'include', which caused bogus entries to appear in the generated
dependency file.

MozReview-Commit-ID: IJptyXGluC7
2017-12-07 10:54:28 -05:00
Mike Shal 7d97f5f590 Bug 1421038 - Rename 'relativedir' to 'relsrcdir'; r=nalexander
The name 'relativedir' is ambiguous - it is unclear whether it is a
relative srcdir or objdir. Rename it to 'relsrcdir' in the
ContextDerived() object to match the naming used in Context() so it is
obvious that it is a relative srcdir.

Most of these are a straight text replacement from relativedir to
relsrcdir, except for tup.py:_get_backend_file(), which was supposed to
be using an objdir in the first place.

MozReview-Commit-ID: 9eFHOCMofq5
2017-12-07 14:52:50 -05:00
Tom Ritter 8b7cfcf712 Bug 1393817 Fix L10N check for MinGW build r=ted
exe_7z_archive.py runs during the MinGW build L10N check step, and
hardcodes 7z as the 7zip executable. This works on Windows, but not
Linux. We need to pass it the correct executable for 7zip, which is
located during configure.

However, repacks (repackage-winXX-nightly) don't do configure, and
don't have the tools to do configure. So we leave the default
command in the python script if one is not supplied.

MozReview-Commit-ID: B7GEKRYEJTD
2017-12-07 11:09:43 -06:00
Gregory Szorc cde17550ea Bug 1429342 - Ignore mach file-info arguments that don't resolve to paths; r=froydnj
Without this, e.g. `mach file-info bugzilla-component build/does-not-exist`
reports the bug component is `Core :: Build Config`. Because paths
in CI have `build/` prefixes, people were typing `build/` paths into
`mach file-info` and reporting bugs against `Core :: Build Config`.

MozReview-Commit-ID: 8Zp6cnuw0Sh
2018-01-16 16:40:30 -08:00
Emilio Cobos Álvarez 7bad8d42e8 Bug 1423911: Update cargo-vendor requirement. r=kats
on a CLOSED TREE, so the sync bot can't clobber the revendor again.

MozReview-Commit-ID: 1SzllPXnCKd
2017-12-07 16:14:38 +01:00
Masatoshi Kimura e3d55b6652 Bug 1416465 - Expand pattern when track file is created rather than read. r=mshal
MozReview-Commit-ID: WISu4wThdw
2017-12-02 16:51:19 +09:00
Narcis Beleuzu 4de3d152e0 Merge mozilla-central to autoland. r=merge a=merge on a CLOSED TREE 2017-12-06 01:47:41 +02:00
Cosmin Sabou 061a2f57b4 Merge mozilla-inbound to mozilla-central r=merge a=merge 2017-12-06 00:09:01 +02:00
Ted Mielczarek d7f69ed0ea bug 1416891 - Open output files in binary mode for GENERATED_FILES. r=nalexander,gps
The script behind GENERATED_FILES currently opens output files in text mode,
which means that they wind up with CRLF line endings on Windows. With
switching updater.ini to use LOCALIZED_GENERATED_FILES, this means that it
will wind up with different line endings than it currently has.

Changing this to use binary format means that we'll have LF line endings
everywhere, which shouldn't harm anything on Windows as most of our generated
files are source files anyway.

MozReview-Commit-ID: 7rTUDtVGL82
2017-11-30 11:32:29 -05:00
Mike Shal 661d391708 Bug 1319222 - Enable compilation on all directories in the tup backend; r=chmanchester
MozReview-Commit-ID: D5NlgEHVydZ
2017-11-22 13:26:33 -05:00
Mike Shal ca39e0a119 Bug 1319222 - Support compiling *.s with yasm; r=chmanchester
The moz.build files that specify USE_YASM = True will get the value of
AS_DASH_C_FLAG and AS overwritten in PassthruVariables. We can save
those in the BackendTupfile and use them in place of the configure or
default settings as appropriate. This enables compilation of those .s
files that are built with yasm.

MozReview-Commit-ID: J66q8nKQ0an
2017-11-22 17:12:50 -05:00
Mike Shal ccd99dc850 Bug 1319222 - Enable host compilation in the tup backend; r=chmanchester
MozReview-Commit-ID: 4hp6oH7YOd7
2017-11-22 16:24:33 -05:00
Mike Shal 17ad772453 Bug 1319222 - Add include flags to HOST_*; r=chmanchester
This accounts for LOCAL_INCLUDES in the moz.build files, as well as the
default INCLUDES specified in config.mk that are used for host
compilation. Since some of the HOST_CFLAGS were also used for linking,
those flags are split off into HOST_C{XX}_LDFLAGS so that
the linker-only flags can be placed in those variables.

MozReview-Commit-ID: J1LxIZVeFJ
2017-11-22 16:23:44 -05:00
Mike Shal 628ac535a5 Bug 1319222 - Compile the generated IPDL and WebIDL sources in the tup backend; r=chmanchester
The filenames that these objects generate are passed into the _handle_*
methods instead of with a Sources object, so they need to be added to
the BackendTupfile's list of sources separately.

MozReview-Commit-ID: GoqhiJ3Ismm
2017-11-22 16:06:34 -05:00
Mike Shal 76ccf7019c Bug 1319222 - Add an SFLAGS ComputedFlags variable for compiling *.S; r=chmanchester
Both SFLAGS and ASFLAGS are used to compile assembly, but SFLAGS include
DEFINES and LOCAL_INCLUDES whereas ASFLAGS do not. It seems easiest to
just separate them into two different ComputedFlags values so that the
backend can distinguish between the two types.

MozReview-Commit-ID: Bkm3621ImJG
2017-11-22 15:27:52 -05:00
Mike Shal c266dfae85 Bug 1319222 - Use relobjdir instead of relativedir to determine outputs; r=chmanchester
In most cases, relobjdir is the same as relativedir. However they are
different for some objects, notably with nss gyp handling.  We need to
output files in relobjdir, so use that when getting the BackendTupfile.
This puts generated files like certdata.c in the directory that
moz.build is expecting.

MozReview-Commit-ID: DG29OulOKAz
2017-11-22 11:24:12 -05:00
Mike Shal 010ed261ea Bug 1319222 - Remove srcdir from BackendTupfile; r=chmanchester
The srcdir does not necessarily directly correspond to the objdir, so it
doesn't make sense to tie them together in BackendTupfile. Since the
srcdir was only used for the IPDL sources, we can just replace that
usage with a local variable.

MozReview-Commit-ID: By0N30VTKhh
2017-11-22 11:18:28 -05:00
Ted Mielczarek 56c8e4603b bug 1416891 - support LOCALIZED_GENERATED_FILES in the recursive make backend. r=nalexander
This change makes the recursive make backend emit slightly different rules
when handling LOCALIZED_GENERATED_FILES vs. GENERATED_FILES.

First, localized file generation is always done in the libs tier.

Second, inputs are allowed to be locale-dependent, which is determined by
the path starting with `en-US/`. These inputs will be run through MERGE_FILE
to determine the actual file path to pass to the script.

Third, the file_generate action now accepts a `--locale` option, and it
gets passed the value of `$(AB_CD)` when generating localized files. If this
option is passed it is also passed as a keyword argument `locale` to the
generation function.

Fourth, the make rules for localized files include an additional dependency
on FORCE when running l10n repacks, so that the targets will always be
rebuilt in that situation.

MozReview-Commit-ID: BfgR8MxxJXZ
2017-11-16 17:07:23 -05:00
Ted Mielczarek e0f44f0764 bug 1416891 - allow LOCALIZED_FILES to contain objdir paths as long as they're also from LOCALIZED_GENERATED_FILES. r=nalexander
LOCALIZED_FILES and LOCALIZED_GENERATED_FILES are analogs of FINAL_TARGET_FILES
and GENERATED_FILES, but they receive special handling in the recursive
make backend so that l10n repacks work properly. To this end, we support
using the output of LOCALIZED_GENERATED_FILES in LOCALIZED_FILES, but not
mixing localized with non-localized targets.

MozReview-Commit-ID: GCJAUfUG8OZ
2017-11-17 12:16:20 -05:00
Ted Mielczarek 8ccd7bc66e bug 1416891 - add LOCALIZED_GENERATED_FILES to the moz.build sandbox. r=nalexander
This change adds LOCALIZED_GENERATED_FILES, which emits GeneratedFile objects
just like GENERATED_FILES. It also adds a `localized` field to GeneratedFile
which will be `True` for objects emitted from LOCALIZED_GENERATED_FILES.

MozReview-Commit-ID: 3iWGLMkbF2C
2017-11-16 13:44:14 -05:00
Seinlin b5a5b49f9d Bug 1274518 - Allow to use preprocessor in IPDL files. r=mshal
MozReview-Commit-ID: KfALhgTzrJT
2017-11-15 23:44:32 +08:00
Andrew Halberstadt aed860d40d Bug 1422302 - Move mozbuild.controller.building.Footer to mozterm r=gps
This makes it a bit easier to share with other parts of the tree,
like test and linting.

MozReview-Commit-ID: 8Gzk8uOF5zK
2017-12-01 09:59:54 -05:00
Andrew Halberstadt d33b8880b0 Bug 1422302 - Create python/mozterm for sharing terminal blessings across modules r=gps
This is a new module that will provide a place to store some common
abstractions around the 'blessings' module. The main entrypoint is:

    from mozterm import Terminal
    term = Terminal()

If blessings is available, this will return a blessings.Terminal()
object. If it isn't available, or something went wrong on import,
this will return a NullTerminal() object, which is a drop-in
replacement that does no formatting.

MozReview-Commit-ID: 6c63svm4tM5
2017-12-04 09:38:24 -05:00
Jan Beich 9bf2484f3f Bug 1420330 - FreeBSD bootstrap: add aarch64 and testing dependencies. r=nalexander
- aarch64 has GNU-free toolchain thus /usr/bin/as is N/A by default
  but GNU as is required to build bundled ICU.
- Downstream Python splits sqlite3 C module into a separate package
  to reduce optional dependencies but _sqlite3 is used by mozprofile.

MozReview-Commit-ID: Lh2ktcqh16f
2017-11-24 03:24:57 +00:00
Mike Shal 0664efc032 Bug 1417658 - Move export_suffixes into GeneratedFile; r=nalexander
I believe all backends will need to know which GeneratedFiles are needed
before compilation can start, so we should make that an attribute of the
object. Each backend can then make its own decision about what to do
with the different types of GeneratedFiles.

MozReview-Commit-ID: ByburRx540b
2017-11-22 14:14:30 -05:00
Mike Hommey 6841c321d6 Bug 1420355 - Statically link DMD. r=njn 2017-11-28 08:10:48 +09:00
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