Bug 1381955 - Don't override RUSTFLAGS to set rust's debuginfo; r?ted
MozReview-Commit-ID: HevATvXusvE
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -903,29 +903,28 @@ rust_unlock_unstable += RUSTC_BOOTSTRAP=
endif
ifdef MOZ_USING_SCCACHE
sccache_wrap := RUSTC_WRAPPER='$(CCACHE)'
endif
# XXX hack to work around dsymutil failing on cross-OSX builds (bug 1380381)
ifeq ($(HOST_OS_ARCH)-$(OS_ARCH),Linux-Darwin)
-rust_debug_info=1
+default_rustflags += -C debuginfo=1
else
-rust_debug_info=2
+default_rustflags += -C debuginfo=2
endif
# We use the + prefix to pass down the jobserver fds to cargo, but we
# don't use the prefix when make -n is used, so that cargo doesn't run
# in that case)
define RUN_CARGO
$(if $(findstring n,$(filter-out --%, $(MAKEFLAGS))),,+)env $(environment_cleaner) $(rust_unlock_unstable) $(rustflags_override) $(sccache_wrap) \
CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) \
RUSTC=$(RUSTC) \
- RUSTFLAGS='-C debuginfo=$(rust_debug_info)' \
MOZ_SRC=$(topsrcdir) \
MOZ_DIST=$(ABS_DIST) \
LIBCLANG_PATH="$(MOZ_LIBCLANG_PATH)" \
CLANG_PATH="$(MOZ_CLANG_PATH)" \
PKG_CONFIG_ALLOW_CROSS=1 \
RUST_BACKTRACE=1 \
MOZ_TOPOBJDIR=$(topobjdir) \
$(2) \