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.
This commit is contained in:
Nathan Froyd
2017-04-12 21:49:25 -04:00
parent 65308c79f2
commit d58a810176
5 changed files with 23 additions and 5 deletions

View File

@@ -378,6 +378,10 @@ void Gecko_IncrementStringAdoptCount(void* aData)
{
MOZ_LOG_CTOR(aData, "StringAdopt", 1);
}
#elif defined(MOZ_DEBUG_RUST)
void Gecko_IncrementStringAdoptCount(void *aData)
{
}
#endif
void Gecko_FinalizeCString(nsACString* aThis)