bug 1301751 - work around llvm-dsymutil crash by building rust with debuginfo=1 instead of -g. r?froydnj draft
authorTed Mielczarek <ted@mielczarek.org>
Tue, 27 Sep 2016 06:24:24 -0400
changeset 417939 4f0d6daff675f0097afc2a67dd3c3f9ee0960fae
parent 417914 66a77b9bfe5dcacd50eccf85de7c0e7e15ce0ffd
child 532206 6596f755d2186e1dd46802a7e2c17f923b14fee9
push id30530
push usertmielczarek@mozilla.com
push dateTue, 27 Sep 2016 10:27:49 +0000
reviewersfroydnj
bugs1301751
milestone52.0a1
bug 1301751 - work around llvm-dsymutil crash by building rust with debuginfo=1 instead of -g. r?froydnj MozReview-Commit-ID: 5pK8okLw0Cl
config/rules.mk
toolkit/library/gtest/rust/Cargo.toml
toolkit/library/rust/Cargo.toml
--- 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"