By default, windows.h exposes a large number of problematic define statements
which are UpperCamelCase, such as a define from `CreateWindow` to
`CreateWindow{A,W}`.
As many of these names are generic (e.g. CreateFile, CreateWindow), they can
mess up Gecko code that may legitimately have its own methods with the same
names.
The header also defines some traditional SCREAMING_SNAKE_CASE defines which
can mess up our code by conflicting with local values.
This patch adds a simple code generator which generates wrappers for these
defines, and uses them to wrap the windows.h wrapper using the `stl_wrappers`
mechanism, allowing us to use windows.h in more places.
Differential Revision: https://phabricator.services.mozilla.com/D10932
This also uses idiomatic packaging of the native libraries, which
will allow easier downstream consumption of GeckoView.
Differential Revision: https://phabricator.services.mozilla.com/D10775
In order to reduce the cost of running marionette tests on a virtual machine
with a GPU, add a marionette-gpu job, and run the WebRender rollout test added
in the previous patch in this new job.
Depends on D10528
Differential Revision: https://phabricator.services.mozilla.com/D12241
consume_object() is only called with Defines objects for directories containing
a moz.build file that sets a DEFINES value, and those Defines objects only
contain the defines set in that moz.build (not defines that affect the
directory's files that are set elsewhere). That's why we fail to set some
defines.
This commit changes consume_object to obtain defines from the ComputedFlags
objects that it is passed instead. We get one of these objects for every
directory with a moz.build, and we can obtain all defines passed to the
compiler for the files in a given directory from these objects.
Differential Revision: https://phabricator.services.mozilla.com/D12009
We've been setting per-directory defines in the "CDT Managed Build Setting
Entries" which are ignored(!) during indexing since we don't use the Eclipse
managed build system (we use mach). We need to set the defines as "CDT User
Setting Entries".
Differential Revision: https://phabricator.services.mozilla.com/D12008
This also uses idiomatic packaging of the native libraries, which
will allow easier downstream consumption of GeckoView.
Differential Revision: https://phabricator.services.mozilla.com/D10775
A subsequent commit will require similar logic to the
checks found in this command. Moving to mozbuild will
allow us to re-use the function instead of re-writing
similar logic.
Differential Revision: https://phabricator.services.mozilla.com/D11277
The build telemetry code attempts to filter paths to avoid PII from usernames
and other things. It does this by converting every commandline argument to
an absolute path and then making them relative to topsrcdir or topobjdir and
omitting any that fail. This meant that running a mach command with a cwd
outside of the topsrcdir or objdir would omit all arguments since they were
converted to absolute paths from the cwd.
This change fixes this by adding the cwd to the list of paths used to create
relative paths. Additionally we add the user's home directory to that list
to try to avoid usernames sneaking through. Finally, instead of simply
removing these path prefixes, we replace them with sigils: $topsrcdir,
$objdir, $HOME.
Differential Revision: https://phabricator.services.mozilla.com/D11174
After bug 1497638 the method by which build telemetry data gets written
to disk is slightly convoluted. Since we're now invoking `gather_telemetry`
from `post_dispatch_handler`, we just make that function return the data
it gathers and inline the contents of `telemetry_handler` after the call
to it.
Differential Revision: https://phabricator.services.mozilla.com/D11173
When using artifact builds, one can use the MOZ_ARTIFACT_REVISION
environment variable to force download artifacts from the given
revision.
When the VCS is git, it expects the revision to be a git ref or commit
sha1, which is resolved to a mercurial changeset via git-cinnabar.
It can however be convenient to just point to a given mercurial revision
directly, from, say, try, without pulling it first. This can actually be
useful even when the VCS is mercurial.
So if the given revision doesn't resolve to an existing git or hg commit,
and it's a complete 40-character sha1, we assume it's a valid mercurial
changeset.
Differential Revision: https://phabricator.services.mozilla.com/D11266