зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1335203 - Synchronize rust debug-assertions with C++ DEBUG, r=froydnj
MozReview-Commit-ID: JPD9eNFg89S
This commit is contained in:
Родитель
b62bca9af3
Коммит
0dadca05f7
|
@ -940,7 +940,13 @@ endif
|
|||
# optimization level here, if necessary. (The Cargo.toml files already
|
||||
# specify debug-assertions appropriately for --{disable,enable}-debug.)
|
||||
ifndef MOZ_OPTIMIZE
|
||||
rustflags_override = RUSTFLAGS='-C opt-level=0'
|
||||
rustflags = -C opt-level=0
|
||||
# Unfortunately, -C opt-level=0 implies -C debug-assertions, so we need
|
||||
# to explicitly disable them when MOZ_DEBUG is not set.
|
||||
ifndef MOZ_DEBUG
|
||||
rustflags += -C debug-assertions=no
|
||||
endif
|
||||
rustflags_override = RUSTFLAGS='$(rustflags)'
|
||||
endif
|
||||
|
||||
CARGO_BUILD = env $(rustflags_override) \
|
||||
|
|
|
@ -355,12 +355,14 @@ static_assert(sizeof(nsStringContainer_base) == sizeof(nsSubstring),
|
|||
// Provide rust bindings to the nsA[C]String types
|
||||
extern "C" {
|
||||
|
||||
// This is a no-op on release, when bug 1335203 is fixed we should ifdef this
|
||||
// to ensure using it in release results in a linker error.
|
||||
// This is a no-op on release, so we ifdef it out such that using it in release
|
||||
// results in a linker error.
|
||||
#ifdef DEBUG
|
||||
void Gecko_IncrementStringAdoptCount(void* aData)
|
||||
{
|
||||
MOZ_LOG_CTOR(aData, "StringAdopt", 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
void Gecko_FinalizeCString(nsACString* aThis)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче