Commit Graph

1436 Commits

Author SHA1 Message Date
Mike Hommey
e6c4cd8840 Bug 1162852 - Don't set IS_GYP_DIR from the gyp_reader. r=gps
With TemplateContexts keeping the name of the associated template, and the
Gyp context being declared as a TemplateContext, it is now possible to know
the equivalent of IS_GYP_DIR just by looking at the template name.
2015-05-12 07:54:10 +09:00
Mike Hommey
1a99e69477 Bug 1162851 - Keep the template name in TemplateContext instances. r=gps 2015-05-12 07:54:09 +09:00
Mike Hommey
bf048111fa Bug 1162845 - Move ASFLAGS to moz.build. r=mshal 2015-05-12 07:54:06 +09:00
Mike Hommey
53490947cc Bug 1162826 - Display a proper error when a moz.build tries to set a "reserved keyword". r=mshal 2015-05-12 07:27:31 +09:00
Mike Hommey
c203463421 Bug 1162826 - Properly display full moz.build processing errors when empty KeyError or ValueError are thrown. r=mshal 2015-05-12 07:26:49 +09:00
Mike Hommey
c4edef7b2b Bug 1162779 - Move NO_EXPAND_LIBS to moz.build. r=mshal 2015-05-12 07:26:42 +09:00
Ralph Giles
be59a13194 Bug 1161339 - Add rust support to moz.build. r=ted
Add .rs as a recognized file extension in SOURCES.

Propagate that through to the Makefile backend and add a dependency
generated and an explicit rule to call $(RUSTC) to compile them.

rustc builds static libraries, not obj files. At least, if one
asks it to output an obj file, I'm not clear how to get all the
compiler-specific runtime libraries the code will expect to link
to. Therefore we generate a static library for each rust source
file (which must be a complete crate for the time being) and link
that. Because of the extension it ends up on the LIBS line in the
the corresponding .desc file.

Note that the static library does still depend on some system
libraries, e.g. -ldl -lpthread -lm on linux. Gecko already
links to all of those, so we don't keep track of it here.

Should we need to add explicit linkage for other targets,
rustc does print a list to stderr which can be parsed.
2015-05-08 15:18:00 -07:00
Mike Hommey
f27bf48865 Bug 1128037 - Minimalist support for wildcards in jar manifests. r=gps 2015-05-05 09:25:24 +09:00
Brian O'Keefe
40e53378a4 Bug 978591 - Remove per-directory uses of MOZ_CHROME_FILE_FORMAT. r=glandium 2015-04-23 18:43:06 -04:00
Brian O'Keefe
0baecf0b74 Bug 786520 - Install things to $(DIST)/branding from moz.build instead of manual rules in Makefile.ins. r=mshal 2015-02-26 16:53:31 -05:00
Randell Jesup
273314247a Bug 1159300: Add a clone of gmp-fake that doesn't do decryption r=glandium,cpearce 2015-04-30 00:52:26 -04:00
Chris Manchester
6a255fffe2 Bug 1158019 - Tests exercising the proposed behavior. r=gps 2015-04-24 17:14:03 -07:00
Chris Manchester
43d6133754 Bug 1158019 - Only resolve to tests under a subdirectory if an input to mozbuild's test resolver is the prefix of a directory containing tests. r=gps
Formerly, running |./mach test image/| would result in running a number of devtools tests
in addition to running tests under the image/ subdirectory. With this change, only tests
under the image/ directory would be run. Note that ./mach test animations or similar will
still run a variety of tests across the tree, because this input does not match a directory.
2015-04-24 17:14:03 -07:00
Gregory Szorc
0ada61ccf3 Bug 1158898 - Cache config.guess output; r=mshal
mach dispatch makes separate, independent calls to construct build
system state. Part of this resolution is determining the object
directory. For environments without an object directory defined, we must
execute config.guess to determine the object directory. This redundant
execution of config.guess can result in significant execution overhead.

Before this patch, `mach help` with no mozconfig took ~1.5s on my OS X
machine. After this patch, it goes down to ~0.750s. On Windows, the
difference is even more pronounced, with execution time dropping from
8.5s to 0.930s.
2015-04-27 17:07:49 -07:00
David Major
c92c020b89 Bug 1157835: Remove the MSVC_ENABLE_PGO flag from the build system. r=glandium 2015-04-27 19:59:27 -04:00
Philipp Kewisch
9d5f48a936 Bug 1153790 - mac unification doesn't work with packaged addons. r=glandium 2015-04-27 00:46:20 +02:00
Gregory Szorc
26bce22eb4 Bug 1128586 - Properly look for Mercurial version; r=RyanVM
`mercurial version` doesn't always print the version number. `mercurial
--version` does. Use the latter.
2015-04-27 10:43:25 -07:00
Ehsan Akhgari
7b1c0384ea Bug 892973 - Add support for the YouCompleteMe vim plugin; r=gps 2015-04-27 13:08:43 -04:00
Nathan Froyd
c065eab40d Bug 1155816 - followup - delete trailing whitespace, DONTBUILD for whitespace-only change; r=tidybot 2015-04-24 15:46:45 -04:00
Nathan Froyd
206784f8f3 Bug 1155816 - part 2 - move EXTRA_*COMPONENTS manifest check to build-backend time; r=mshal
Now that moz.build can see EXTRA_*COMPONENTS and NO_JS_MANIFEST, we can
move some logic from rules.mk (executed every build) to moz.build's
emitter.py (executed only at build-backend time).
2015-04-17 15:02:19 -04:00
Nathan Froyd
cbc082742a Bug 1155816 - part 1 - move NO_JS_MANIFEST to moz.build; r=mshal 2015-04-17 14:50:12 -04:00
Nathan Froyd
c0444f0a3d Bug 1155776 - move USE_EXTENSION_MANIFEST to moz.build; r=mshal 2015-04-17 13:51:42 -04:00
Morgan Phillips
76525226aa Bug 1151834 - Allow users to skip all interactive prompts; r=gps
Interactive prompts make automation more difficult for developers looking to stand up machines using bootstrap en masse.
Two new options have been added to allow users with such needs to bypass all prompts: one for selecing an application
(desktop/mobile) and another for assuming yes to all questions posed by package managers (apt-get/yum).
2015-04-22 16:37:19 +00:00
Brian O'Keefe
e491df5f61 Bug 1154687 - Restore EXTERNALLY_MANAGED_MAKE_FILE handling to the moz.build blacklist check. r=gps 2015-04-15 08:15:03 -04:00
ISHIKAWA, Chiaki
c424d5f80c Bug 1153566 - Incorrect re in _check_blacklisted_variables did not ignore comment. r=gps 2015-04-11 09:41:00 +02:00
Andrew Halberstadt
a081db3205 Bug 1154006 - [mach] Ability to lazy load parsers passed in via the @Command decorator, r=gps 2015-04-13 15:36:56 -04:00
Nathan Froyd
1d766b1f34 Bug 870891 - move DIST_FILES to moz.build; r=mshal 2015-04-15 16:04:49 -04:00
travis
aa8ce9d64e Bug 1151005 - Show notifications when the 'install' and 'package' mach commands complete r=gps 2015-04-14 10:35:10 -05:00
travis
c05d5aa7c4 Bug 1151005 - Refactor terminal notification stuff from 'mach build' into MozbuildObject r=gps 2015-04-14 10:35:09 -05:00
Andrew Halberstadt
463aca49bd Bug 1151370 - Only guess platform/buildtype in mozinfo.py if processor is known, r=ted 2015-04-07 09:07:32 -04:00
Brian O'Keefe
70bc6b6163 Bug 852814 - Move mozbuild variable blacklist logic into the backend. r=gps 2015-03-27 15:39:34 -04:00
Andrew Halberstadt
1408286ebb Bug 1046992 - Consolidate desktop/b2g/b2g desktop mochitest mach commands, r=gbrown 2015-04-08 11:12:52 -04:00
Ryan VanderMeulen
b208a763b2 Backed out changeset 6bbe2e6958a9 (bug 1127801) for intermittent (?!?!) Mulet mochitest bustage.
CLOSED TREE
2015-04-07 13:47:54 -04:00
naru-san
5c8f37a380 Bug 1127801 - Capture path to milestone.txt from the OS automatically using MozbuildObject from mozbuild.base. r=ted
CLOSED TREE
2015-04-07 12:43:40 -04:00
Ryan VanderMeulen
a55fdccf04 Backed out changeset a67a0be7325e (bug 1127801) for test bustage. 2015-04-07 11:50:10 -04:00
naru-san
3ff8433b08 Bug 1127801 - Capture path to milestone.txt from the OS automatically using MozbuildObject from mozbuild.base. r=ted 2015-04-06 16:54:00 -04:00
Markus Stange
68a36f51b6 Bug 1151349 - Make lldb ns(Int)Region summary handle the numRects==0 case. r=jrmuizel 2015-04-05 14:06:43 -04:00
Mike Hommey
d34c663b09 Bug 1147207 - Use SimplePackager code to find manifest entries and base directories during l10n repack. r=gps
This avoids duplicating the logic from SimplePackager to find base
directories, and fixes some cases where the l10n repack code wouldn't
find them properly.
2015-04-01 13:52:07 +09:00
Mike Hommey
dd5d962c46 Backout changeset 685aa4dfe753 (bug 1147207) for build bustage 2015-03-31 13:18:39 +09:00
Mike Hommey
bd7aa25304 Bug 1147207 - Allow to give extra l10n directories to l10n-repack.py. r=gps
This allows to use separate l10n staging directories for e.g. addons.
2015-03-31 12:32:53 +09:00
Mike Hommey
cb47c355c4 Bug 1147207 - Improve SimplePackager manifest consistency check. r=gps
Bug 910660 added a consistency check that rejects cases where a manifest
inside a directory detected as being the base of an addon is included from
outside the addon. Unfortunately, this triggered false positives when
a manifest is included from within the addon, but just happens to be at
the top-level of that addon.
2015-03-31 12:32:52 +09:00
Mike Hommey
aa7f4670b6 Bug 1147207 - Use SimplePackager code to find manifest entries and base directories during l10n repack. r=gps
This avoids duplicating the logic from SimplePackager to find base
directories, and fixes some cases where the l10n repack code wouldn't
find them properly.
2015-03-31 12:32:52 +09:00
Mike Hommey
f3b9961394 Bug 1147207 - Add a ComposedFinder class that acts like a FileFinder proxy over multiple FileFinders. r=gps 2015-03-31 12:32:51 +09:00
Mike Hommey
de81ea5b58 Bug 1147760 - In mozpack.files.FileCopier.copy, remove files after copying. r=gps
Some file types, such as XPTFile, read their associated data during the
copy. In the case of XPTFiles, several original files are linked together
in one destination file. When a FileCopier is used in-place, those
original files are removed before XPTFile.copy is invoked, so XPTFile.copy
fails.

Generally speaking, there are many other reasons why FileCopier can fail
in-place, but the only active use of this mode is l10n repack code, which
actually doesn't do much of the dangerous uses. However, it can end up
linking XPTFiles for some reason, which fails for the reasons given above.
2015-03-31 12:32:51 +09:00
Mike Hommey
8d7e9d7efb Bug 1147723 - Avoid non TEST_PASS/TEST_UNEXPECTED_FAIL output from test_files.py. r=gps
Instead, capture the output and check it's being printed.
2015-03-31 12:32:50 +09:00
Andrew Halberstadt
dadb3dc04c Bug 1142050 - Add buildprops platform and buildtype guess to mozinfo.py, r=ted 2015-03-13 11:09:47 -04:00
Wes Kocher
dd8a8fcae7 Merge m-c to inbound a=merge CLOSED TREE 2015-03-26 17:46:35 -07:00
Mike Hommey
6ee628d425 Bug 1147283 - Replace mozpack.path with mozpath. r=mshal
Back when mozpack.path was added, it was used as:

  import mozpack.path
  mozpack.path.func()

Nowadays, the common idiom is:

  import mozpack.path as mozpath
  mozpath.func()

because it's shorter.

$ git grep mozpath\\. | wc -l
423
$ git grep mozpack.path\\. | wc -l
123

This change was done with:
$ git grep -l mozpack.path\\. | xargs sed -i 's/mozpack\.path\./mozpath./g'
$ git grep -l 'import mozpack.path$' | xargs sed -i 's/import mozpack.path$/\0 as mozpath/'
$ (pat='import mozpack.path as mozpath'; git grep -l "$pat" | xargs sed -i "1,/$pat/b;/$pat/d")
2015-03-27 08:13:16 +09:00
Mike Hommey
fb66d5439b Bug 1147217 - Improve l10n repack error message when locale doesn't contain necessary files. r=mshal 2015-03-27 08:13:04 +09:00
Mike Hommey
f0e35f76e4 Bug 1147183 - Avoid test_generate_browsersearch.py printing out unicode. r=mshal 2015-03-27 08:12:15 +09:00
Dirkjan Ochtman
61bf144dbf Bug 1143660 - Fix spacing around operators. r=gps 2015-03-18 19:13:27 +01:00
Dirkjan Ochtman
ed98cb0cf6 Bug 1143660 - Remove empty lines before EOF. r=gps 2015-03-18 19:11:50 +01:00
Dirkjan Ochtman
550509bdd4 Bug 1143660 - Make sure inline comments are preceded by two spaces. r=gps 2015-03-18 19:10:41 +01:00
Dirkjan Ochtman
17555e2993 Bug 1143660 - Fix continuation line indentations for visual indent. r=gps 2015-03-18 19:08:55 +01:00
Dirkjan Ochtman
32090a4f08 Bug 1143660 - Ascertain 2 blank lines between top-level elements. r=gps 2015-03-18 18:58:35 +01:00
Dirkjan Ochtman
68ae493f82 Bug 1143660 - Remove unused imports from mozboot. r=gps 2015-03-18 18:53:24 +01:00
Axel Hecht
a3e314eada Bug 940103 - Add a mach command to call compare-locales. r=gps
We're using as many defaults from the configure step as we can. We're also opinionated upon the defaults, but obviously allow most compare-locales options to be specified.

There are two exceptions:
Reference language is specified to be en-US, without optional argument. This is our in-tree command, and the reference language is known.
We always clobber the merge dir, and don't give an option not to. We default to a merge dir in the objdir, so we don't need to be that paranoid as in the standalone version.

Also, compare-locales clobbers merge-dir/browser etc, so you're not going to get / removed.
2015-03-18 18:47:36 +01:00
Axel Hecht
e7629ae40b Bug 940103 - Import compare-locales in the tree. r=gps
This is http://hg.mozilla.org/l10n/compare-locales/file/48445f53a274 in the upstream repo.

To review future updates, using the github mirror will be easier, you can check
https://github.com/Pike/compare-locales/compare/873e557...master
for future commits.
2015-03-18 18:34:15 +01:00
Mike Hommey
649c7a056c Bug 910660 - Make the SimplePackager emit a separate base for addons. r=gps
Addons are detected by the presence of an install.rdf file in their base.
2015-03-24 09:10:33 +09:00
Mike Hommey
3a042bfd62 Bug 910660 - Make package formatters handle addons. r=gps
Addons are always formatted with jars for omnijar and jar packaging, and
flat for flat packaging.
2015-03-24 09:10:33 +09:00
Mike Hommey
49b96b0dd2 Bug 910660 - Add a test for the unpacker code. r=gps 2015-03-24 09:10:32 +09:00
Mike Hommey
f17a072557 Bug 910660 - Refactor test_packager_formats.py so that it's easier to follow. r=gps 2015-03-24 09:10:31 +09:00
Ms2ger
c3884d2833 Bug 1143932 - Factor out test harness files processing code from emit_from_context; r=gps 2015-03-17 10:39:08 +01:00
Ms2ger
1bd52f867a Bug 1143932 - Factor out XPIDL processing code from emit_from_context; r=gps 2015-03-17 10:37:57 +01:00
Ms2ger
032f0347bd Bug 1143932 - Factor out programs processing code from emit_from_context; r=gps 2015-03-17 10:36:55 +01:00
Ms2ger
b8b3cd4235 Bug 1143932 - Factor out generated filed processing code from emit_from_context; r=gps 2015-03-17 10:33:45 +01:00
Ms2ger
a23e6b0227 Bug 1143932 - Factor out jar manifest processing code from emit_from_context; r=gps 2015-03-17 10:32:10 +01:00
Ms2ger
84b8bf93b1 Bug 1143932 - Factor out sources processing code from emit_from_context; r=gps 2015-03-17 10:32:10 +01:00
Ms2ger
4b34eacab2 Bug 1143932 - Factor out test manifest processing code from emit_from_context; r=gps 2015-03-17 10:32:10 +01:00
Ms2ger
d8800543ce Bug 1143932 - Factor out library handling code from emit_from_context; r=gps 2015-03-17 10:32:09 +01:00
Sylvestre Ledru
49488f970b Bug 1143412 - Make sure that we run "apt-get update". Otherwise, the install of packages will fail r=nalexander 2015-03-16 14:29:53 +01:00
Nick Alexander
9451893d64 Bug 1142897 - Include archlinux module in bin/bootstrap.py download list. r=gps 2015-03-13 13:24:47 -07:00
Brian O'Keefe
ee4b8ea815 Bug 1140161 - Sensibly handle patterns with absolute paths in TEST_HARNESS_FILES. r=gps 2015-03-05 09:22:43 -05:00
Ryan VanderMeulen
fd511a4b5b Merge inbound to m-c. a=merge 2015-03-12 18:05:45 -04:00
Anders Holbøll
8b9cc246ce Bug 1138250 - add actual source files from UNIFIED_SOURCES to VS projects always; r=ted.mielczarek; a=RyanVM
DONTBUILD because NPOTB
2015-03-12 14:31:05 -04:00
Jonathan Griffin
84011a87cc Bug 1116187 - Disable failing mochitest-chrome tests for B2G, r=gbrown 2015-02-06 16:30:37 -08:00
Geoffroy Planquart
953fa29dfb Bug 942475 - Add ArchlinuxBootstrapper; r=gps 2015-03-12 10:27:44 +01:00
Philipp Kewisch
6ec375d048 Bug 1142127 - Fix typo in exception for "IDL already registered"; r=gps 2015-03-11 17:47:02 +01:00
Mike Hommey
cb8d1b2884 Bug 1063880 - Do not emit Linkable-derived objects when COMPILE_ENVIRONMENT is not set. r=mshal 2015-03-11 16:03:55 +09:00
Ahmed Khalil
d2aca5c19d Bug 927388 - Produce and upload GeckoView AAR during packaging. r=nalexander 2015-03-06 10:17:00 -08:00
Andrew Halberstadt
abcd159a11 Bug 1140441 - Add substring matching option to |mach mach-debug-commands|, r=gps 2015-03-06 11:25:55 -05:00
Wes Kocher
8cd7de362d Merge inbound to m-c a=merge CLOSED TREE 2015-03-05 15:17:41 -08:00
Wes Kocher
4ef44dbc63 Merge fx-team to m-c a=merge CLOSED TREE 2015-03-05 14:51:48 -08:00
Mitchell Field
76054867fa Bug 987902 - Add a "doctor" mach command; r=gps 2015-03-05 10:14:08 -08:00
vidit23
a9a1bc2523 Bug 1121317 - Install Maven repositories during |mach bootstrap| for mobile/android. r=nalexander
DONTBUILD NPOTB
2015-03-04 11:22:00 -08:00
Gregory Szorc
b908c47723 Bug 1139086 - Write entire docstring for SubContexts in Sphinx; r=glandium 2015-03-04 00:03:05 -08:00
Gregory Szorc
bc56b18cd4 Bug 1138581 - Support wildcard expansion in mach file-info; r=glandium
This change includes a few fixes to other issues in mach file-info, such
as error handling for invalid paths not working properly.
2015-03-02 12:58:17 -08:00
Gregory Szorc
98b3807628 Bug 1138283 - Fix bad documentation around wildcard patterns; r=glandium 2015-03-03 09:21:23 -08:00
Andrew Halberstadt
cd88c29bf3 Bug 1134395 - mozbuild should pass in rootdir to manifestparser to properly calculate test relpaths, r=gps 2015-02-18 17:07:55 -05:00
Ahmed Khalil
70739474b9 Bug 1119365 - Implement |mach ide| for mobile/android and IntelliJ/Android Studio. r=nalexander 2015-02-27 05:46:00 -08:00
Gregory Szorc
f0f4d459df Bug 1132771 - Implement file-info mach command; r=glandium
Now that we have a mechanism for defining file-based metadata, let's add
a mach command to interface with it.

Currently, we limit ourselves to simple Bugzilla data dumping. Features
will be added over time.
2015-02-27 13:58:01 -08:00
Gregory Szorc
85dc822c42 Bug 1132771 - Define some bug components; r=glandium
This patch defines bug components for code that I have historically
touched.
2015-02-26 11:43:45 -08:00
Gregory Szorc
0f1b6ef394 Bug 1132771 - Add Files to moz.build with ability to define Bugzilla component; r=glandium
The Files sub-context allows us to attach metadata to files based on
pattern matching rules.

Patterns are matched against files in a last-write-wins fashion.

The sub-context defines the BUG_COMPONENT variable, which is a 2-tuple
(actually a named tuple) defining the Bugzilla product and component for
files. There are no consumers yet. But an eventual use case will be to
suggest a bug component for a patch/commit. Another will be to
automatically suggest a bug component for a failing test.
2015-03-01 22:15:07 -08:00
Gregory Szorc
84c01c942b Bug 1132771 - Support and test for reading without a config object; r=glandium
We want the ability to read data from any moz.build file without needing
a full build configuration (running configure). This will enable tools
to consume metadata by merely having a copy of the source code and
nothing more.

This commit creates the EmptyConfig object. It is a config object that -
as its name implies - is empty. It will be used for reading moz.build
files in "no config" mode.

Many moz.build files make assumptions that variables in CONFIG are
defined and that they are strings. We create the EmptyValue type that
behaves like an empty unicode string. Since moz.build files also do some
type checking, we carve an exemption for EmptyValue, just like we do for
None.

We add a test to verify that reading moz.build files in "no config" mode
works. This required some minor changes to existing moz.build files to
make them work in the new execution mode.
2015-02-26 10:21:52 -08:00
Gregory Szorc
f61be1e387 Bug 1132771 - Support reading relevant moz.build files; r=glandium
Building on top of the API to retrieve relevant moz.build files for a
given path, we introduce a moz.build reading API that reads all
moz.build files relevant to a given set of paths. We plan to use this
new API to read metadata from moz.build files relevant to a set of
files.

This patch changes the generator behavior of read_mozbuild to emit the
main context before any processing occurs. This allows downstream
consumers to manipulate state of the context before things like
directory processing occurs. We utilize this capability in the new
reading API to forcefully declare the directory traversal order for
processed moz.build files, overriding DIRS and similar variables.

Since variable exporting doesn't work reliably in this new traversal
mode, variable exporting no-ops when this mode is activated.
2015-02-26 09:44:55 -08:00
Gregory Szorc
224571d296 Bug 1132771 - Pass special types down to sandboxes via metadata; r=glandium
Currently, MozSandbox assumes that the FUNCTIONS, SPECIAL_VARIABLES, and
SUBCONTEXTS data structures are the instances that should be associated
with the sandbox. As we introduce new moz.build processing modes that
wish to change processing behavior, it is necessary for them to have
control over these special symbols.

This patch moves the declaration of these types to the special metadata
dictionary which is inherited during recursion. The "read_topsrcdir" API
now explicitly passes the initial metadata into "read_mozbuild".
2015-02-26 09:43:55 -08:00
Gregory Szorc
46df41aba6 Bug 1132771 - Implement strongly typed named tuples; r=glandium
An upcoming patch introduces a use case for a strongly typed named
tuple. So, we introduce a generic factory function that can produce these
types.
2015-02-26 09:38:43 -08:00
Gregory Szorc
59e13c8599 Bug 1132771 - API to return moz.build files relevant for a set of paths; r=glandium
We have an eventual goal to store file-level metadata in moz.build files
and to have this metadata "cascade" down directory hierarchies. e.g.
metadata in the root directory will apply to all children directories.

A prerequisite for this feature is a way to query which moz.build files
are relevant to a given file. In this patch, we implement an API that
returns this information.
2015-02-25 14:10:10 -08:00
Ted Mielczarek
ef5b90cdda bug 1135700 - Import the Python requests module. r=gps 2015-02-23 11:27:50 -05:00
Nathan Froyd
02e43668cb Bug 1136383 - enable specifying method names for GENERATED_FILES scripts; r=gps
The inputs to scripts for GENERATED_FILES are restricted to filenames
only.  We have several examples in the tree, however, where a script
takes non-filename arguments.  For converting those cases to use
GENERATED_FILES, we first need to provide some way of "injecting"
non-filename arguments into the script.

This commit adds a method for doing that, by extending the .script flag
on GENERATED_FILES to include an optional method name:

  f = GENERATED_FILES['foo']
  f.script = 'script.py:make_foo'

will invoke the make_foo function found in script.py instead of the
function named main.
2015-02-24 16:36:39 -05:00
Carsten "Tomcat" Book
360c069b06 Backed out changeset fab243c8d0c5 (bug 1136383) for bustage on a CLOSED TREE 2015-02-25 14:23:10 +01:00
Nathan Froyd
cde173b50b Bug 1136383 - enable specifying method names for GENERATED_FILES scripts; r=gps
The inputs to scripts for GENERATED_FILES are restricted to filenames
only.  We have several examples in the tree, however, where a script
takes non-filename arguments.  For converting those cases to use
GENERATED_FILES, we first need to provide some way of "injecting"
non-filename arguments into the script.

This commit adds a method for doing that, by extending the .script flag
on GENERATED_FILES to include an optional method name:

  f = GENERATED_FILES['foo']
  f.script = 'script.py:make_foo'

will invoke the make_foo function found in script.py instead of the
function named main.
2015-02-24 16:36:39 -05:00
Gregory Szorc
5ddf815a31 Bug 1134072 - Support for sub-contexts; r=glandium
As content in moz.build files has grown, it has become clear that
storing everything in one global namespace (the "context") per moz.build
file will not scale. This approach (which is carried over from
Makefile.in patterns) limits our ability to do things like declare
multiple instances of things (like libraries) per file.

A few months ago, templates were introduced to moz.build files. These
started the process of introducing separate contexts / containers in
each moz.build file. But it stopped short of actually emitting multiple
contexts per container. Instead, results were merged with the main
context.

This patch takes sub-contexts to the next level.

Introduced is the "SubContext" class. It is a Context derived from
another context. SubContexts are special in that they are context
managers. With the context manager is entered, the SubContext becomes
the main context associated with the executing sandbox, temporarily
masking the existence of the main context. This means that UPPERCASE
variable accesses and writes will be handled by the active SubContext.
This allows SubContext instances to define different sets of variables.

When a SubContext is spawned, it is attached to the sandbox executing
it. The moz.build reader will now emit not only the main context, but
also every SubContext that was derived from it.

To aid with the creation and declaration of sub-contexts, we introduce
the SUBCONTEXTS variable. This variable holds a list of classes that
define sub-contexts.

Sub-contexts behave a lot like templates. Their class names becomes the
symbol name in the sandbox.
2015-02-24 13:05:59 -08:00
Mike Hommey
afd2bc83d0 Bug 1136456 - Remove leftovers from TIERS support in mozbuild.frontend.reader. r=gps 2015-02-25 13:12:14 +09:00
Gregory Szorc
193771a104 Bug 1134800 - Properly cache file matching patterns; r=glandium
The regular expression cache for mozpack.path.match was keyed off the
original pattern. However, that variable was mutated as part of the
function and the mutated result was subsequently stored as the cache
key. This effectively resulted in a 0% cache hit rate.

On some tests being written for bug 1132111 which involve a full
filesystem traversal for moz.build files and subsequent execution of
those files, the following timings are indicative of the impact of this
patch.

Before:
real 16.082s
user 14.760s
sys   1.318s

After:
real 6.345s
user 5.085s
sys  1.257s
2015-02-24 10:19:41 -08:00
Mike Hommey
1a43b33799 Bug 1135984 - Avoid setting an empty GYP_DIRS in contexts when reading it. r=gps 2015-02-24 11:28:50 +09:00
Mike Hommey
dece0bacb7 Bug 1135984 - Fix typo which made Context.__init__ set the unused executed_time attribute. r=gps 2015-02-24 11:28:36 +09:00
Gregory Szorc
503a0737fb Bug 1134072 - Remove support for post-eval sandbox callback; r=glandium
Support for a callback to be executed post sandbox evaluation was added
in 24b43ecb4cad (bug 949906) to unbust Sphinx as a result of some GYP
processing changes. e93c40d4344f and bug 1071012 subsequently changed
how Sphinx variables are extracted from moz.build, removing the only
consumer of this feature.

Since there are no consumers of this feature left, remove it and make
the code simpler.
2015-02-23 17:30:45 -08:00
Ting-Yu Lin
6187ca71d6 Bug 1054892 - Fix ccache status not shown after shrinking cache size. r=gps
The value of cache files or cache size might decrease under these
circumstances.

* The user manually changes the max cache size to a value smaller than
  the current cache size.
* The cache size is reaching the cache max size.

We should not assume both values will be increased after the build is
finished.
2015-02-20 03:42:00 +01:00
Joe Steele
20a21bdf78 Bug 1131798 - Fix handling of CPU sub-type and rebasing WITHOUT requiring Python 3.3. r=ted 2015-02-21 16:43:36 +13:00
Nick Alexander
6403bf80f6 Bug 1093242 - Follow-up: define geckolibs-revision and log files written.
--HG--
extra : rebase_source : 8a95ad976f6b57d3ab756692887a623a11256e42
2015-02-20 11:42:28 -08:00
Nick Alexander
443bc60a63 Bug 1093242 - Produce and upload geckolibs artifacts for Android API v11+ opt builds. r=gps
The Android ARchive contains the compiled Gecko libraries that Firefox
for Android interfaces to.  It does not contain the Gecko resources
(the omnijar, omni.ja) nor the compiled Java code (classes.dex).

This also uploads metadata and sha1 hashes for future consumption by
Maven and/or Ivy dependency managers.  In some brave future world,
we'll work out exactly what that looks like; for now, this solves a
storage problem (each .aar file is ~20MB) and it's possible to point
Gradle directly at the uploaded Ivy metadata and artifacts.

--HG--
extra : rebase_source : 0c12b44f587d4a027ca5258bae8fcbb6f6028c24
2015-02-17 17:23:23 -08:00
Alessio Placitelli
ff6e3829dd Bug 1075055 - Inform mozinfo about the MOZ_TELEMETRY_REPORTING build configuration. r=ted
--HG--
extra : rebase_source : 69f39a94d1284aaa087993cd65aa030f40e9ff92
2015-02-19 22:20:00 -08:00
Ryan VanderMeulen
f677331314 Backed out changeset e4962045c59c (bug 1131798) for Win8 build bustage.
--HG--
extra : rebase_source : 0f196b6774783dd804bb39a19a850297a650c121
2015-02-18 14:46:42 -05:00
Joe Steele
2d6158780c Bug 1131798 - Fix handling of CPU sub-type and rebasing WITHOUT requiring Python 3.3. r=ted 2015-02-19 07:10:26 +13:00
Gregory Szorc
4f6edc655f Bug 1139100 - Apply proper checking for command existence; r=ahal
Previously, we raised errors attempting to register a mach sub-command
if the parent command was not defined on the Registrar. This broke B2G
because its mach command Registrar imposes restrictions on which
commands it exposes. Commands there were not getting registered on the
Registrar, leading mach to give a false positive that the parent command
was never defined.

We change the verification logic to take present but unregistered
commands into consideration and to skip registering sub-commands if the
parent isn't present in the Registrar.
2015-03-04 11:03:07 -08:00
Nathan Froyd
7e9c1febf1 Bug 883954 - part 2 - add support for defining generating scripts for GENERATED_FILES; r=gps
Now that we have proper moz.build objects for GENERATED_FILES, we can
add 'script' flags and 'args' flags in moz.build for select
GENERATED_FILES.  We restrict 'args' to being filenames for ease of
implementing checks for file existence, and many (all?) of the examples
of file generation throughout the tree don't need arbitrary strings or
Python data.
2014-12-16 15:13:27 -05:00
Nathan Froyd
4e3ebc6311 Bug 883954 - part 1 - make GENERATED_FILES emit proper moz.build objects; r=gps
This patch is mostly useful for being able to see these changes
independently of the major changes to GENERATED_FILES.  We are going to
need proper moz.build objects for GENERATED_FILES when we add the
ability to define scripts and arguments for them, so we might as well do
that first.
2014-12-16 12:55:02 -05:00
Nathan Froyd
b8a4e263e3 Bug 1122812 - part 4 - update the Visual Studio backend for UnifiedSources changes; r=mshal
With the previous changes, we can now tell Visual Studio about the
actual unified files, rather than the files that are #include'd in them.
I believe this is much closer to what Visual Studio wants to see, and
enables things like Intellisense to work properly.
2015-02-05 14:55:54 -05:00
Nathan Froyd
33e576b186 Bug 1122812 - part 3 - move unified files writing for UnifiedSources to CommonBackend; r=mshal
CommonBackend is where the writing of the unified files belong, since
that's an operation common to all backends.  A special hook into
subclasses is used to enable subclass-specific processing of
UnifiedSources.
2015-02-05 14:54:28 -05:00
Nathan Froyd
267d7d67ca Bug 1122812 - part 2 - factor out the grabbing of an object's backend.mk; r=mshal
UnifiedSources will be processed outside of consume_object, so we need
some way of accessing the backend file for an object outside of
consume_object as well.
2015-02-05 14:25:14 -05:00
Nathan Froyd
1750896125 Bug 1122812 - part 1 - move unified file grouping to UnifiedSources's constructor; r=mshal
UnifiedSources, not the recursivemake backend, should be responsible for
figuring out what unified files to generate, and what those unified
files should contain.
2015-02-05 14:05:36 -05:00
Mike Hommey
95dad56d90 Bug 1114669 - Use a generated list of idl deps for xpt generation. r=gps
Generating the list of idl deps to generate an xpt from its dependency list
makes us give all _previous_ dependencies, inherited from the .deps makefiles.
This leads to removed files being listed on xpidl-process.py command line, and
the command subsequently failing.

Instead, use generated lists of idl dependencies. At the same time, lighten the
generated Makefile further by not emitting xpt dependencies on their containing
directory, and instead generating it from the $xpt_files list.

This brings down the Makefile size from 100k to 38k.
2015-02-13 10:29:19 +09:00
Mike Hommey
49b62d273f Bug 1063874 - Move the parts of XPIDL_SOURCES handling in misc to export. r=gps 2015-02-11 17:36:45 +09:00
Joshua Cranmer
97fb09553f Bug 1127882: Sort the unified files list before splitting into multiple files, r=nfroyd
--HG--
extra : rebase_source : da8309728d29ed3a51d11536f962cf9255fb6f4f
2015-02-09 08:45:15 -06:00
Gregory Szorc
6ce7780306 Bug 1129798 - Use pdb.runcall to debug mach commands; r=ahal
The previous debugger was setting a breakpoint in the mach dispatcher.
This required users to step into the main function to be called into.
Using pdb.runcall(), the debugger starts at the first line in the
executed command, which is far more useful.

--HG--
extra : rebase_source : 10734805ad40ec85eedbb089b11d618dc32398e7
extra : amend_source : da89da1af1f137db2f5902bcb5a69312f4636a4b
2015-02-04 22:49:06 -08:00
Nathan Froyd
4ea01de4ca Bug 1129394 - produce a useful error message for |mach build-backend| without having run configure; r=ted.mielczarek
Checking for config.status ourselves avoids the unpleasant situation of
the subprocess module checking for us and producing a cryptic error
message.
2015-02-04 08:40:56 -05:00
Phil Ringnalda
1c0ae8ffca Merge f-t to m-c, a=merge 2015-01-31 09:06:14 -08:00
Nick Alexander
af5fe4dbf5 Bug 1123824 - Include platforms/android-VERSION in suggested mozconfig. r=me,f=psd
DONTBUILD NPOTB

--HG--
extra : rebase_source : a273c9939b937ddbb0be387041eb645ec726bd26
2015-01-26 11:13:49 -08:00
Brian O'Keefe
96f36e3bf3 Bug 870366 - Part 1: Move PREF_JS_EXPORTS to moz.build (mozbuild logic). r=gps 2015-01-20 13:07:02 -05:00
Joshua Cranmer
3070527a2d Bug 934170: Make mach xpcshell-test work for comm-central, r=ted
--HG--
extra : rebase_source : d5ce19f18108c598aaa0a519e73a268f1dba91b5
2015-01-30 09:54:00 -06:00
Nathan Froyd
b78b9ca0ca Bug 1108750 - part 8 - move WebIDL unification logic to CommonBackend; r=mshal
Similar to the changes made for IPDL files, this commit moves all of the
non-makefile related logic for WebIDL files out of the recursive make
backend and into the common build backend.  Derivative backends that
would like to do interesting things with WebIDL files now need to
implement _handle_webidl_build, which takes more parameters, but should
ideally require less duplication of logic.
2015-01-19 15:38:26 -05:00
Nathan Froyd
e2beab2d53 Bug 1108750 - part 7 - move IPDL unification logic to CommonBackend; r=mshal
After a bunch of tiny changes, we're finally ready to make real
progress.  We can now move the grouping of the generated IDPL C++ files
and the actual writing of the unified files for them into the common
build backend.  Derivative backends now only have to concern themselves
with adding the particular logic that compiling those files requires.
2015-01-19 15:34:00 -05:00
Nathan Froyd
3750b17070 Bug 1108750 - part 6 - move unified source writing to the callers of _add_unified_build_rules; r=mshal
_add_unified_build_rules shouldn't be in the business of writing out
unified files.  Some outside, higher-up logic should be doing that.
2015-01-19 15:28:46 -05:00
Nathan Froyd
3d5f6897ff Bug 1108750 - part 5 - move logic for writing all unified files into CommonBackend; r=mshal
We'll need to write out unified files for multiple backends, not just
the recursive make one.  Put that logic someplace where all build
backends can access it.
2015-01-19 15:11:39 -05:00
Nathan Froyd
d66a78417a Bug 1108750 - part 4 - remove handling of extra_dependencies from _add_unified_build_rules; r=mshal
No callers use it, and the makefile rules it generates don't really do
anything that the compiler won't already infer.  Let's get rid of it.
2015-01-19 15:07:43 -05:00
Nathan Froyd
67053dffc9 Bug 1108750 - part 3 - move unified source mapping to the callers of _add_unified_build_rules; r=mshal
_add_unified_build_rules shouldn't be in the business of determining how
to group files into their unified files.  That logic belongs in the
caller of _add_unified_build_rules.  Once that's done, the logic for
determining how to group files can migrate out of the recursive make
bakend.
2015-01-19 14:58:21 -05:00
Nathan Froyd
115cb0a707 Bug 1108750 - part 2 - move _write_unified_file to CommonBackend; r=mshal
Nothing about writing unified files is specific to the recursive make
backend, and if we want to write the unified files for IPDL and WebIDL
files, we'll need this functionality available in the common build
backend.
2015-01-19 14:45:32 -05:00
Nathan Froyd
6847c92b87 Bug 1108750 - part 1 - move group_unified_files to mozbuild.util; r=mshal
RecursiveMakeBackend._group_unified_files doesn't contain any
functionality specific to the recursive make backend.  We would also
like to move the unification of generated IPDL and WebIDL source files
into the common build backend.  Moving _group_unified_files into the
common build backend would be the logical place for it, but the frontend
should also be able to handle unifying files so that backends don't have
to duplicate logic for UNIFIED_FILES.  Therefore, we choose to move it
to mozbuild.util as its final resting place.
2015-01-19 14:32:44 -05:00
Ryan VanderMeulen
0de38c2525 Merge inbound to m-c. a=merge 2015-01-26 16:28:17 -05:00
Ted Mielczarek
dff12d663c bug 1124192 - Fix PATH winding up as unicode when using activate_virtualenv. r=gps
--HG--
extra : rebase_source : 11bca3bcacfd27234100ceaf64166c0bfcb96b45
2015-01-26 13:43:01 -05:00
James Lal
7ea7902827 Bug 1068653 - Part 1 Add python dependencies for taskcluster mach commands r=gps
--HG--
extra : rebase_source : 7a91182ca85dde748a14b03fa93ae85769691042
extra : source : b91e85b02d796db5de9a0e726a7c3360ea67b400
2014-11-26 10:11:28 -08:00
Nick Alexander
524a7bb865 Bug 1123980 - Part 2: Write region-specific search settings into res/raw/browsersearch.json. r=mfinkle
Pushing on a CLOSED TREE since Android build only.

--HG--
extra : rebase_source : cc99efa734d1f4738d3f026c930a4d1955723783
extra : amend_source : 52c07807a77f263d2eb2593826dc0285928d9be4
2015-01-20 16:27:27 -08:00
Nick Alexander
2b2f357b64 Bug 1123980 - Part 1: Handle common prefixes in .properties lists and dicts. r=mshal
This handles:

list.0=A
list.1=B
list.sublist.0=C

so that

list=>[A, B]
list.sublist=>[C]

and

dict=default
dict.key1=A
dict.key2=B

so that

dict=>{key1:A, key2:B}
dict=>default

--HG--
extra : rebase_source : 2c8f5941d2fca9c56b3858d3e98078a43fa69090
2015-01-21 14:31:22 -08:00
Markus Stange
a902728dbe Bug 1118228 - Add an lldb helper that allows calling functions without debug info. r=jrmuizel, r=ehsan 2015-01-14 19:04:24 -05:00
Brian Smith
1a3d2e92d2 Bug 1119776, Part 7: Avoid defining snprintf when MSVC provides it (other), r=bsmedberg
--HG--
extra : rebase_source : 3fc7e4e83f57252e15cf32846f23e497f8532ea5
2015-01-08 22:35:33 -08:00
Ehsan Akhgari
12fe0d8022 Bug 1121000 - Remove support for non-unified builds; r=gps 2015-01-14 17:26:39 -05:00
Sai Prathik
fed7ab85ef Bug 1119167 - Advertise IntelliJ support in build-backend message. r=nalexander 2015-01-11 19:17:00 -05:00
Nick Alexander
2ffd31115f No bug - Fix typo in mozconfig output message. r=me
DONTBUILD NPOTB on a CLOSED TREE

This was tested by ally and mfinkle in #mobile.

--HG--
extra : amend_source : 5dd061d6ef98f49cb232baa7221ec514a32eeeee
2015-01-12 14:51:31 -08:00
Mike Shal
172b1dfcb9 Bug 1118774 - Import python redo library; r=gps 2015-01-07 14:18:20 -05:00