Commit Graph

2804 Commits

Author SHA1 Message Date
Jan Beich
6c24868ec4 Bug 1360781 - Add Stylo dependencies for ./mach bootstrap on FreeBSD. r=froydnj
MozReview-Commit-ID: 3cD8frPKXnW

--HG--
extra : rebase_source : a2172145af1aec80eb6a67a0a9bd06ab0ec22130
2017-04-29 02:04:02 +00:00
Wes Kocher
e141e24ffb Merge m-c to autoland, a=merge
MozReview-Commit-ID: 1peTFbNMVnU
2017-05-02 17:38:11 -07:00
Nathan Froyd
5635c7bffe Bug 1314355 - part 2 - download LLVM packages from mach bootstrap for Stylo development; r=rillian
For Stylo development, LLVM packages are required due to Stylo's
extensive use of bindgen--generating Rust bindings to Gecko's C++ code.
While people can install LLVM via their system package manager, we've
opted to download the LLVM packages used on Mozilla infrastructure for
building Gecko.  Using Mozilla's packages for LLVM ensures that they
work, and also makes it easier/trivial to integrate support for other
things (e.g. Mozilla's static checkers) into `mach bootstrap`.
2017-05-02 11:23:40 -04:00
Nathan Froyd
be73c54413 Bug 1314355 - part 1 - add ability to use a generic digest algorithm for http_download_and_save; r=rillian
This will be useful for downloading files from tooltool, which requires
a SHA512 checksum.
2017-05-02 11:23:40 -04:00
Gregory Szorc
f7e888274e Bug 1360764 - Print compiler warnings at end of the build; r=froydnj
The way it works today, compiler warnings are logged to build output
twice. The compiler's raw output is logged. Then, if mach's compiler
warning parser detects a warning, a structured log message with info
about that warning is printed as well. Because of the order in which
callbacks fire, mach's warning message is delivered to the logger
first. So build output looks something like:

 0:04.63 Warning: -Wsign-compare in /home/gps/src/firefox/security/nss/lib/dev/ckhelper.c: comparison of integers of different signs: 'CK_ULONG' (aka 'unsigned long') and 'int'
 0:04.63 /home/gps/src/firefox/security/nss/lib/dev/ckhelper.c:135:45: warning: comparison of integers of different signs: 'CK_ULONG' (aka 'unsigned long') and 'int' [-Wsign-compare]
 0:04.63                 (obj_template[i].ulValueLen == -1)) {
 0:04.63                  ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~

That first line is our structured message formatted to plain text.
Subsequent lines are Clang.

The output here is redundant. But having the structured compiler warning
in the JSON logs is nice so downstream systems don't have to reinvent
the parsing wheel.

Also today, at the end of a clobber build we print a count of the
total number of compiler warnings.

Compiler warnings represent potential bugs. So we want to encourage
people to look at them. However, with build system output often spanning
several hundred lines and compiler warnings scattered in no
deterministic order because build system execution is non-deterministic,
it is easy to lose sight of compiler warnings as they go by in build
output. And, it can be difficult to find a warning in files you care
about because you don't know where in the log to look for that file.

This commit attempts to improve the visibility of compiler warnings
by printing a sorted list of warnings at the end of the build. The list
of warnings it prints are only those seen during the current build
operation. We /could/ print a list of all warnings in the persisted
database. But I think this would be annoying, particularly for
incremental or partial builds.

The structured log message previously emitted at compiler invocation
time has been removed. So now the build backend output doesn't have a
redundant "Warning: " line summarizing the warning next to the compiler
output itself. This is less confusing.

That structured log message has been reborn at the end of the build
and reformatted slightly. If there are any consumers assuming that the
log entry near this structured message is compiler output itself,
they will break. I don't think any such consumers exist. It is also
possible the structured log may not contain warning messages if a
process exit occurs. I'm fine with this: if the `mach` process dies,
we have bigger problems to worry about.

The new output looks something like this:

18:07.97 warning: gfx/angle/src/compiler/translator/util.cpp:216:15 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
18:07.97 warning: gfx/angle/src/compiler/translator/util.cpp:225:15 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
18:07.97 warning: gfx/angle/src/compiler/translator/util.cpp:234:15 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
18:07.97 warning: gfx/cairo/libpixman/src/pixman-bits-image.c:268:32 [-Wshift-negative-value] shifting a negative signed value is undefined
18:07.97 warning: gfx/cairo/libpixman/src/pixman-linear-gradient.c:395:6 [-Wunreachable-code] code will never be executed
18:07.97 warning: gfx/cairo/libpixman/src/pixman-x86.c:80:5 [-Wexpansion-to-defined] macro expansion producing 'defined' has undefined behavior

Note the sorting of files, including by line number and column. If we
wanted to, we could even print that line. But that's for another day
(especially since compilers themselves tend to do this already).

This change has the potential to annoy people. That's because instead
of the parsed warning summary lines being spread out over the build
(where they tend not to be noticed), they will be lumped at the end of
the build log, which people do tend to notice. In my build, I have
~363 warnings/lines. Some could perceive this as excessive and
redundant. But the recourse for this is simple: eliminate compiler
warnings. My hope is that by having the compiler warnings exposed
clearly at the end of the build log that people will notice them
and will take action to eliminate them. Sunlight is a disinfectant.

MozReview-Commit-ID: 9VHXsPhAYmr

--HG--
extra : rebase_source : 6a2da05f794a54ea54a48167a36d130dfbf34e59
2017-04-28 15:50:04 -07:00
Gregory Szorc
f1c2887efb Bug 1360764 - Record warnings seen during the current operation; r=froydnj
Currently, the build monitor has a single compiler warnings database
that unions warnings from previous runs with warnings from the current
invocation. I want to introduce functionality that treats warnings
seen during the current invocation differently from "all warnings."
To facilitate this, this commit introduces a 2nd, non-persisted
warnings database to record warnings just for the current invocation.

MozReview-Commit-ID: FIY0GiarDmr

--HG--
extra : rebase_source : b2002e1c248ea65b2c0ee45a78b1e74d61a26f3c
2017-04-28 17:13:10 -07:00
Gregory Szorc
435febb8fc Bug 1360764 - Decouple warnings database from log parser; r=froydnj
Currently, the WarningsCollector (which parses warnings from line inputs)
accepts a WarningsDatabase (an object representing a collection of
warnings) and populates that instance as a new warning is parsed. In
an upcoming commit I want to introduce a 2nd WarningsDatabase.

Rather that add it to WarningsCollector, I figure it will be easier
to decouple WarningsDatabase from WarningsCollector.

This commit refactors WarningsCollector to call a callback when a
warning is parsed. This allows consumers to do anything they want
with a warning, including potentially write it to multiple databases.

MozReview-Commit-ID: 7Z9x4FMwyof

--HG--
extra : rebase_source : b4844b5c2b1926840d37e46ead38c8c358762ba8
2017-04-28 16:21:44 -07:00
Gregory Szorc
61a5501145 Bug 1304508 - Support passing --keep-going to make; r=chmanchester,ted
mozharness is currently making a manual `make -k` invocation. We don't
want automation calling `make` directly. So teach `mach build` to
accept a --keep-going argument that results in `make -k`.

MozReview-Commit-ID: H3lJ4r8S4vj

--HG--
extra : rebase_source : 9feb7bcaeb855254c53c5fa9d49177c5133f2773
2016-09-21 13:41:34 -07:00
Carsten "Tomcat" Book
1045b9730a merge mozilla-inbound to mozilla-central a=merge 2017-04-28 10:36:11 +02:00
Shing Lyu
c46f5d5baf Bug 1351548 - Remove reftest-stylo.lists. r=bholley
MozReview-Commit-ID: 8LoQ9xNnDnj
2017-04-28 11:15:58 +08:00
Shing Lyu
435db45b79 Bug 1351548 - Add stylo-vs-gecko expectations to reftest.lists. r=bholley
MozReview-Commit-ID: GOUGBsd05cn
2017-04-28 11:15:50 +08:00
Wes Kocher
9528ad9a03 Merge m-c to inbound, a=merge
MozReview-Commit-ID: DaH1djmEY5A
2017-04-27 13:29:07 -07:00
Ted Mielczarek
e0a932a9ba bug 1318143 - add support for detecting Visual Studio 2017 to configure. r=gps
This patch adds a copy of vswhere.exe to build/win32, downloaded from the
current latest release (1.0.62):
https://github.com/Microsoft/vswhere/releases/download/1.0.62/vswhere.exe

It changes toolchain.configure to invoke vswhere.exe instead of reading
the registry, since that no longer works for VS2017 (but vswhere can locate
VS2015). It also removes a layer of complexity in that code by dropping
support for non-64-bit host systems, since we don't really support building
on 32-bit Windows anymore anyway.

There's a little bit of fixup in windows.configure where some LIB paths
have changed in 2017.

MozReview-Commit-ID: 5XLWjidS6W4

--HG--
extra : rebase_source : 90f79b6f4a2d8d925dd20eb0bf6ab96262c227d5
2017-04-26 15:18:48 -04:00
Chris Manchester
9f8c2dd4af Bug 1360360 - Package screenshot programs during artifact builds. r=mshal
MozReview-Commit-ID: ExYrFbObOrG

--HG--
extra : rebase_source : be4f389d6b343a4c912d68b5dba40d09bf6ebb92
2017-04-27 14:03:19 -07:00
J. Ryan Stinnett
ecab5e3bc9 Bug 1359501 - Accept artifact builds from beta. r=chmanchester
MozReview-Commit-ID: 5a2NIi6U7n7

--HG--
extra : rebase_source : f4059bd35ae03609153eb79c1fe643dd8dc1d23d
2017-04-25 12:12:16 -05:00
Tom Ritter
f8c3899ea0 Bug 1353541 Fix rustc in MinGW build r=froydnj,ted
rustc generates .lib files for its libraries when compiling for Windows
(even using MinGW on Linux). But MinGW expects .a files. So we add in
rust-specific prefix and suffixes so MinGW builds can find the libs that
rustc generates. (And the RUST_LIB- variables default to the same vales
as the LIB_ variables otherwise.)

MozReview-Commit-ID: ClsA0YuJaxh

--HG--
extra : rebase_source : 7b46460c94ceb34b7a5a302ce91d3f1dca600041
2017-04-26 12:08:59 -05:00
Wes Kocher
5e8bdb175d Merge inbound to m-c a=merge
MozReview-Commit-ID: A85cs7Yriqj
2017-04-25 13:53:00 -07:00
Luis de Bethencourt
48d0873809 Bug 1140088 - Update git URL to github; r=froydnj
git.mozilla.org has been decommissioned.

DONTBUILD because comment-only fixes are safe.
2017-04-25 14:46:52 +01:00
Mark Banner
021f1ff90a Bug 1358540 - Change the *.lint files to be *.lint.py to better support editor integration & flake8 linting. r=smacleod
MozReview-Commit-ID: 4KK2GZK7xul

--HG--
rename : python/mozlint/test/linters/badreturncode.lint => python/mozlint/test/linters/badreturncode.lint.py
rename : python/mozlint/test/linters/explicit_path.lint => python/mozlint/test/linters/explicit_path.lint.py
rename : python/mozlint/test/linters/external.lint => python/mozlint/test/linters/external.lint.py
rename : python/mozlint/test/linters/invalid_exclude.lint => python/mozlint/test/linters/invalid_exclude.lint.py
rename : python/mozlint/test/linters/invalid_include.lint => python/mozlint/test/linters/invalid_include.lint.py
rename : python/mozlint/test/linters/invalid_type.lint => python/mozlint/test/linters/invalid_type.lint.py
rename : python/mozlint/test/linters/missing_attrs.lint => python/mozlint/test/linters/missing_attrs.lint.py
rename : python/mozlint/test/linters/missing_definition.lint => python/mozlint/test/linters/missing_definition.lint.py
rename : python/mozlint/test/linters/raises.lint => python/mozlint/test/linters/raises.lint.py
rename : python/mozlint/test/linters/regex.lint => python/mozlint/test/linters/regex.lint.py
rename : python/mozlint/test/linters/string.lint => python/mozlint/test/linters/string.lint.py
rename : python/mozlint/test/linters/structured.lint => python/mozlint/test/linters/structured.lint.py
rename : tools/lint/eslint.lint => tools/lint/eslint.lint.py
rename : tools/lint/flake8.lint => tools/lint/flake8.lint.py
rename : tools/lint/wpt.lint => tools/lint/wpt.lint.py
rename : tools/lint/wpt_manifest.lint => tools/lint/wpt_manifest.lint.py
extra : rebase_source : 97de88e0328e91347192672b848b286df1904ade
2017-04-21 17:31:15 +01:00
Carsten "Tomcat" Book
1dd975c180 Backed out changeset eec770d062b4 (bug 1358540) for bustage
--HG--
rename : tools/lint/eslint.lint.py => tools/lint/eslint.lint
rename : tools/lint/flake8.lint.py => tools/lint/flake8.lint
rename : tools/lint/wpt.lint.py => tools/lint/wpt.lint
rename : tools/lint/wpt_manifest.lint.py => tools/lint/wpt_manifest.lint
2017-04-25 10:15:07 +02:00
Mark Banner
8e42062ea3 Bug 1358540 - Change the *.lint files to be *.lint.py to better support editor integration & flake8 linting. r=smacleod
MozReview-Commit-ID: 4KK2GZK7xul

--HG--
rename : tools/lint/eslint.lint => tools/lint/eslint.lint.py
rename : tools/lint/flake8.lint => tools/lint/flake8.lint.py
rename : tools/lint/wpt.lint => tools/lint/wpt.lint.py
rename : tools/lint/wpt_manifest.lint => tools/lint/wpt_manifest.lint.py
extra : rebase_source : 66e4b4f95109c2645d0fb7be273de343408b9406
2017-04-21 17:31:15 +01:00
Sebastian Hengst
ceff3b0678 Backed out changeset 1f9d0f8e65b9 (bug 1351548) 2017-04-26 13:13:05 +02:00
Sebastian Hengst
f46ebb0d94 Backed out changeset aebb0ceeb20a (bug 1351548) 2017-04-26 13:12:53 +02:00
Shing Lyu
96b400c04a Bug 1351548 - Remove reftest-stylo.lists. r=bholley
MozReview-Commit-ID: Gn0fbS4PZ7i
2017-04-26 18:21:52 +08:00
Shing Lyu
dae014d9d5 Bug 1351548 - Add stylo-vs-gecko expectations to reftest.lists. r=bholley
MozReview-Commit-ID: GOUGBsd05cn
2017-04-26 18:21:43 +08:00
Cameron McCormack
14afe3c7a2 Bug 1257451 - Make |mach run| use --debugger-args instead of --debugparams, like the mochitest/reftest commands do. r=gps
MozReview-Commit-ID: ChB9KjNKbHO

--HG--
extra : rebase_source : 223097b1bef76fc5134d15af8cf68ed5e57fe961
2017-04-21 13:17:31 +10:00
Mike Hommey
34e619d1c1 Bug 1357323 - Remove support for gonk in the build system. r=gps
Everything depending on the widget being gonk can go away, as well as
everything depending on MOZ_AUDIO_CHANNEL_MANAGER, which was only
defined on gonk builds under b2g/ (which goes away in bug 1357326).

--HG--
extra : rebase_source : 9f0aeeb7eea8417fa4e06d662d566d67ecaf2a24
2017-04-18 16:56:09 +09:00
Mike Hommey
75fd170e4c Bug 1357326 - Remove things relying on the b2g* MOZ_BUILD_APP in the build system. r=gps
--HG--
extra : rebase_source : 2471f47ad07d8b90098f90db3ead2e26648cea9f
2017-04-18 18:39:53 +09:00
Mike Hommey
9620fd514e Bug 1356937 - Avoid mach artifact toolchain failing to get taskcluster artifacts when they are not directly under public/. r=gps
--HG--
extra : rebase_source : aeb7a54dea393a97c8597412e45520a2215f9cc5
2017-04-17 09:47:56 +09:00
Chris Manchester
c0c9bf46a0 Bug 1247567 - Include per-source flags in the CompileDB. r=glandium
MozReview-Commit-ID: Ivm4DeG8z94

--HG--
extra : rebase_source : 036629e4aefed04be78452d4c1cb88e8009da35e
2017-04-14 16:02:25 -07:00
Mike Hommey
81ecb91908 Bug 1356976 - Don't make mach artifact toolchain return an error code when there is nothing to download. r=gps
There can be cases where there is simply nothing to download, especially
with the --for-job argument. So we just stop erroring out when nothing
was downloaded.

However, if the user explicitly requested a particular file(s) via the
command line and there is nothing to download, we still emit an error
code.

--HG--
extra : rebase_source : 143c15c9711bbfbbfdc110da14f3738132d53ed4
2017-04-17 16:02:25 +09:00
Mike Hommey
59c62bd61c Bug 1356934 - Don't assume the path to the taskcluster config is relative to topsrcdir. r=gps
--HG--
extra : rebase_source : 4f9f30f563b60649f4fe26836c766e16d4b54491
2017-04-17 09:05:13 +09:00
Alex Gaynor
fcd28c5b2a Bug 1294641 - whitelist reads from the .app directory in the macOS sandbox r=froydnj,haik
This patch does a few things:
a) Adds the resources location from the .app directory to the read whitelist
b) When it's a non-packaged build, mach run (and various mach tests) set an environment variable for the repo location which we allow reads from.

r=haik,froydnj

MozReview-Commit-ID: KNvAoUs5Ati

--HG--
extra : rebase_source : 81ba8bfee0ca96979cf8e30d75cdd47f06bc10ea
2017-04-07 14:53:19 -04:00
Sebastian Hengst
e7317789ad Backed out changeset 225683fed1d1 (bug 1294641) for breaking crashtests, reftests and Windows builds. r=backout on a CLOSED TREE 2017-04-17 16:29:52 +02:00
Alex Gaynor
fd11319799 Bug 1294641 - whitelist reads from the .app directory in the macOS sandbox r=froydnj,haik
This patch does a few things:
a) Adds the resources location from the .app directory to the read whitelist
b) When it's a non-packaged build, mach run (and various mach tests) set an environment variable for the repo location which we allow reads from.

r=haik,froydnj

MozReview-Commit-ID: KNvAoUs5Ati

--HG--
extra : rebase_source : f637acff32fc8582732de932503dd696abc57877
2017-04-07 14:53:19 -04:00
Mike Hommey
d9e412fe4d Bug 1356524 - Add a mach artifact toolchain option to get artifacts from taskcluster builds. r=gps
Now that we have automated build jobs that produce toolchains, we want
to avoid the burden of uploading them to tooltool and then update the
tooltool manifests. But we don't have build jobs for all the possible
toolchains, so we allow `mach artifact toolchain` to get a mix of
tooltool and taskcluster artifacts.

For taskcluster artifacts, we can give a list of job names (conveniently
automatically normalized to begin with 'toolchain-' and end with '/opt')
for which the artifacts will be downloaded, in place of any tooltool
package with the same name (if a tooltool manifest is given).

The taskcluster artifacts that we download are the ones matching the
contents of the tree the command is run with, per the resources declared
for the corresponding toolchain build job (in
taskcluster/ci/toolchain*.yml)

So for example, a linux64 build could call the following command:
  mach artifact toolchain --tooltool-manifest \
    browser/config/tooltool-manifests/linux64/releng.manifest \
    --from-build linux64-gcc

and get the right gcc corresponding to the build-gcc script in tree,
along with the other non-gcc files from the tooltool manifest.

Things are however planned to be even more convenient, but some commands
can already benefit from this form (even without a tooltool manifest).
See e.g. bug 1328454.

--HG--
extra : rebase_source : b12ed77bef529eb8d67476aceac0166bdfe2eeed
2017-04-14 11:34:53 +09:00
Mike Hommey
29eb575e7e Bug 1356524 - Only add Authorization header when sending requests to the tooltool url. r=gps
We're going to potentially use the same download manager for tooltool
and taskcluster artifacts, and we don't want to send the tooltool
authentication header to the taskcluster requests.

--HG--
extra : rebase_source : 79a0afdbf06cb05d7792f413ab1f6715b2a9fe2e
2017-04-14 10:28:42 +09:00
Gregory Szorc
81cd3ec73b Bug 1334525 - Handle tuple types and WPT manifests correctly; r=chmanchester
beb43155b7a6 changed WPT items to be 3-tuples instead of 2-tuples.
This broke test_defaults_for_path().

MozReview-Commit-ID: 7M0RcQ7bOIU

--HG--
extra : rebase_source : 28e44e5206abb7939d540ba809ec71325ead341c
2017-04-12 15:15:36 -07:00
Mike Hommey
a8cb87ea48 Bug 1356142 - Use mozbuild.util.mkdir instead of os.makedirs for the artifact cache directory. r=gps
At the same time, make the artifact cache directory not indexed, and
move the directory creation to the base classes that actually use it.

--HG--
extra : rebase_source : 62994499afceb5166c0041148dcc702f87166fdc
2017-04-13 16:35:20 +09:00
Mike Hommey
7b4adcc548 Bug 1355731 - Add a mach command wrapping tooltool. r=gps
The ultimate goal is to have a generic command that pulls relevant
toolchains from either tooltool or taskcluster artifacts.

This introduces the command and makes it work to allow to wrap tooltool
in most places where it's used currently, with the ability to replace
tooltool_wrapper.sh as well.

--HG--
extra : rebase_source : f63178282f00f8698a148db484f0276c99d61f7b
2017-04-12 17:42:17 +09:00
Mike Hommey
f3a3f6081e Bug 1355731 - For artifacts cache, use the file name from the url if it looks like a hash digest. r=gps
--HG--
extra : rebase_source : ef48b50df8f1063c8ed9c27ecf04b17388b69512
2017-04-12 16:26:20 +09:00
Mike Hommey
4d1881e4dd Bug 1355731 - Move tooltool to mozbuild.action. r=gps
--HG--
rename : taskcluster/docker/recipes/tooltool.py => python/mozbuild/mozbuild/action/tooltool.py
extra : rebase_source : 6278d8692956a67f37fd788df894657d6eeb53e8
2017-02-22 17:20:41 +09:00
Wes Kocher
20dd5f52c2 Merge m-c to autoland, a=merge 2017-04-13 17:35:34 -07:00
Wes Kocher
514e230373 Merge inbound to central, a=merge 2017-04-13 17:24:01 -07:00
Mike Hommey
aedebf3f44 Bug 1356064 - Remove the mach artifact print-cache subcommand. r=nalexander
--HG--
extra : rebase_source : b044acc420285ec050196efdf737e59d60269991
2017-04-13 09:50:57 +09:00
Mike Hommey
a3c516ed4e Bug 1356064 - Remove the mach artifact last subcommand. r=nalexander
It has been broken for a while (bug 1341205).

--HG--
extra : rebase_source : 85feaf001545642342c54af856fd4dfe6828b35d
2017-04-13 09:47:27 +09:00
Gregory Szorc
f2e9cb2310 Bug 1355630 - Inline specialized version of relpath(); r=chmanchester
Profiling revealed that mozpath.relpath() accounted for a lot of CPU
time when operating on an input of ~42,000 paths.

Due to the nature of the paths we're operating on, we don't need the
full power of mozpath.relpath() here. Instead, we can implement a
specialized version that works given already normalized paths and the
knowledge that context paths must be ancestors of the current path
being examined.

This change drops execution time of a mach command feeding ~42,000
paths to this function from ~90s to ~24s. On an input with 9131 paths,
execution time dropped from ~8.8s to ~3.7s.

MozReview-Commit-ID: EGLiJa10Zj2

--HG--
extra : rebase_source : 8e9d7a957ea3d865a6f18a3b99cca2b22f7a0385
2017-04-11 16:46:55 -07:00
Gregory Szorc
009ab65975 Bug 1355630 - Memoize tests_defaults_for_path call; r=chmanchester
Calling self.test_defaults_for_path() from files_info() with tens
of thousands of paths resulted in a CPU explosion in various path
normalization functions. I don't think it was so much the complexity
of the operations as much as the volume.

For an input with 9131 elements, this reduces execution time of a
mach command from ~25.7s to ~8.8s. With ~42,000 inputs, execution time
drops from <it took too long and I gave up> to ~90s.

MozReview-Commit-ID: pjQQByi2Bc

--HG--
extra : rebase_source : b8307a92e494f128ba3cf29348bc7996cfea4221
2017-04-11 16:24:42 -07:00
Gregory Szorc
4a47739a31 Bug 1355630 - Use a set for membership testing; r=chmanchester
With ~42,000 entries in relpaths, this change drops execution time
of this loop from ~23s to ~0.01s.

MozReview-Commit-ID: Afm245tjWUQ

--HG--
extra : rebase_source : 86ee525b0539c80e47e4326a3f111a3fc84d0a6e
2017-04-11 15:25:13 -07:00
Nathan Froyd
2989feb7d7 Bug 1353810 - add a --enable-rust-debug option; r=chmanchester
For people working on Rust code, compiling in debug mode (Cargo's "dev"
profile) is convenient: debug assertions are turned on, optimization is
turned off, and parallel compilation inside of rustc itself can be
used.  These things make the build faster and the debugging experience
more pleasant.

To obtain that currently, one needs to --enable-debug at the Gecko
toplevel, which turns on debug assertions for the entire browser, which
makes things run unreasonably slowly.  So it would be desirable to be
able to turn *off* debug mode for the entirety of the browser, but turn
on debug mode for the Rust code only.

Hence this added switch, --enable-rust-debug, which does what it
suggests and defaults to the value of --enable-debug.  For our own
sanity and because we judge it a non-existent use case, we do not
support --enable-debug --disable-rust-debug.
2017-04-12 21:49:25 -04:00