bug 1301751 - work around llvm-dsymutil crash by building rust with debuginfo=1 instead of -g. r?froydnj
MozReview-Commit-ID: 5pK8okLw0Cl
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -931,17 +931,17 @@ cargo_build_flags += --verbose
# Assume any system libraries rustc links against are already in the target's LIBS.
#
# We need to run cargo unconditionally, because cargo is the only thing that
# has full visibility into how changes in Rust sources might affect the final
# build.
force-cargo-build:
$(REPORT_BUILD)
- env CARGO_TARGET_DIR=. RUSTC=$(RUSTC) $(CARGO) build $(cargo_build_flags) --
+ env CARGO_TARGET_DIR=. RUSTC=$(RUSTC) RUSTFLAGS='-C debuginfo=1' $(CARGO) build $(cargo_build_flags) --
$(RUST_LIBRARY_FILE): force-cargo-build
endif # CARGO_FILE
ifdef RUST_PRELINK
# Make target for building a prelinked rust library. This merges rust .rlibs
# together into a single .a file which is used within the FINAL_LIBRARY.
#
--- a/toolkit/library/gtest/rust/Cargo.toml
+++ b/toolkit/library/gtest/rust/Cargo.toml
@@ -17,26 +17,26 @@ doctest = false
bench = false
doc = false
plugin = false
harness = false
# Explicitly specify what our profiles use.
[profile.dev]
opt-level = 1
-debug = true
+debug = false
rpath = false
lto = false
debug-assertions = true
codegen-units = 1
panic = "abort"
[profile.release]
opt-level = 2
-debug = true
+debug = false
rpath = false
# This would normally be 'true' for release configurations, but using LTO on
# rul-gtest causes link failures due to symbols also being found in libxul's
# librul.a. But LTO'ing things here is not crucial and not LTO'ing things
# enables us to link libxul-gtest, so we leave it turned off.
lto = false
debug-assertions = false
codegen-units = 1
--- a/toolkit/library/rust/Cargo.toml
+++ b/toolkit/library/rust/Cargo.toml
@@ -17,22 +17,22 @@ doctest = false
bench = false
doc = false
plugin = false
harness = false
# Explicitly specify what our profiles use.
[profile.dev]
opt-level = 1
-debug = true
+debug = false
rpath = false
lto = false
debug-assertions = true
codegen-units = 1
panic = "abort"
[profile.release]
opt-level = 2
-debug = true
rpath = false
+debug = false
lto = true
debug-assertions = false
panic = "abort"