Closed
Bug 1414370
Opened 7 years ago
Closed 7 years ago
Ensure ldflags are emitted for directories containing only rust compilation
Categories
(Firefox Build System :: General, enhancement)
Firefox Build System
General
Tracking
(firefox58 fixed)
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: chmanchester, Assigned: chmanchester)
References
Details
Attachments
(1 file)
As a side effect of bug 1411712 I'm seeing MOZ_CARGO_WRAP_LDFLAGS empty in a lot of command lines.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 3•7 years ago
|
||
Is this bug here or bug 1411712 responsible for the Mac build bustage on Thunderbird? Apparently the linker crashes:
error: linking with `/builds/slave/tb-c-cen-m64-00000000000000000/build/mozilla/build/cargo-linker` failed: exit code: 1
|
= note: "/builds/slave/tb-c-cen-m64-00000000000000000/build/mozilla/build/cargo-linker" "-m64" "-L" "/builds/slave/tb-c-cen-m64-00000000000000000/build/rustc/lib/rustlib/x86_64-apple-darwin/lib" "/builds/slave/tb-c-cen-m64-00000000000000000/build/objdir-tb/toolkit/library/release/build/core-foundation-sys-de315f6b16b22143/build_script_build-de315f6b16b22143.0.o" "-o" "/builds/slave/tb-c-cen-m64-00000000000000000/build/objdir-tb/toolkit/library/release/build/core-foundation-sys-de315f6b16b22143/build_script_build-de315f6b16b22143" "/builds/slave/tb-c-cen-m64-00000000000000000/build/objdir-tb/toolkit/library/release/build/core-foundation-sys-de315f6b16b22143/build_script_build-de315f6b16b22143.crate.allocator.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/builds/slave/tb-c-cen-m64-00000000000000000/build/objdir-tb/toolkit/library/release/deps" "-L" "/builds/slave/tb-c-cen-m64-00000000000000000/build/rustc/lib/rustlib/x86_64-apple-darwin/lib" "/builds/slave/tb-c-cen-m64-00000000000000000/build/rustc/lib/rustlib/x86_64-apple-darwin/lib/libstd-a4cb6a5cdd439628.rlib" "/builds/slave/tb-c-cen-m64-00000000000000000/build/rustc/lib/rustlib/x86_64-apple-darwin/lib/librand-d0d8801a35685ad6.rlib" "/builds/slave/tb-c-cen-m64-00000000000000000/build/rustc/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-bf40ace258e8c400.rlib" "/builds/slave/tb-c-cen-m64-00000000000000000/build/rustc/lib/rustlib/x86_64-apple-darwin/lib/liballoc_system-232b33d68f8d8793.rlib" "/builds/slave/tb-c-cen-m64-00000000000000000/build/rustc/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-518d4b2a103f523e.rlib" "/builds/slave/tb-c-cen-m64-00000000000000000/build/rustc/lib/rustlib/x86_64-apple-darwin/lib/libunwind-ae44887349ff2666.rlib" "/builds/slave/tb-c-cen-m64-00000000000000000/build/rustc/lib/rustlib/x86_64-apple-darwin/lib/liblibc-547714683d755c8a.rlib" "/builds/slave/tb-c-cen-m64-00000000000000000/build/rustc/lib/rustlib/x86_64-apple-darwin/lib/liballoc-ee8c941dfe26cb03.rlib" "/builds/slave/tb-c-cen-m64-00000000000000000/build/rustc/lib/rustlib/x86_64-apple-darwin/lib/libstd_unicode-ed28cc142b5072c0.rlib" "/builds/slave/tb-c-cen-m64-00000000000000000/build/rustc/lib/rustlib/x86_64-apple-darwin/lib/libcore-2e89074855638f2b.rlib" "/builds/slave/tb-c-cen-m64-00000000000000000/build/rustc/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-3cf04f5feabf9eee.rlib" "-l" "System" "-l" "resolv" "-l" "pthread" "-l" "c" "-l" "m"
= note: Assertion failed: (_mode == modeFinalAddress), function finalAddress, file /SourceCache/ld64/ld64-123.2.1/src/ld/ld.hpp, line 573.
0 0x103a9971c __assert_rtn + 76
1 0x103b1201c ld::tool::OutputFile::addressOf(ld::Internal const&, ld::Fixup const*, ld::Atom const**) + 172
2 0x103b14a25 ld::tool::OutputFile::applyFixUps(ld::Internal&, unsigned long long, ld::Atom const*, unsigned char*) + 3909
3 0x103b10f70 ld::tool::OutputFile::writeOutputFile(ld::Internal&) + 816
4 0x103b09ab9 ld::tool::OutputFile::write(ld::Internal&) + 153
5 0x103a99caa main + 1178
clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)
![]() |
||
Updated•7 years ago
|
Attachment #8925122 -
Flags: review?(mshal)
Attachment #8925122 -
Flags: review?(core-build-config-reviews)
Attachment #8925122 -
Flags: review+
Updated•7 years ago
|
Attachment #8925122 -
Flags: review?(nfroyd)
Attachment #8925122 -
Flags: review+
![]() |
||
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8925122 [details]
Bug 1414370 - Emit ldflags in directories containing only rust programs for the benefit of cargo.
https://reviewboard.mozilla.org/r/196370/#review201960
Attachment #8925122 -
Flags: review?(nfroyd) → review+
Pushed by cmanchester@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/82e2afb4d904
Emit ldflags in directories containing only rust compilation for the benefit of cargo. r=froydnj
Comment 7•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Comment 8•7 years ago
|
||
It appears this still doesn't handle directories that only have `RustProgram`s in them.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8925122 -
Flags: review+ → review?(nfroyd)
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8925122 -
Flags: review?(nfroyd)
![]() |
||
Comment 11•7 years ago
|
||
mozreview-review |
Comment on attachment 8925122 [details]
Bug 1414370 - Emit ldflags in directories containing only rust programs for the benefit of cargo.
https://reviewboard.mozilla.org/r/196370/#review202292
Sorry for missing this last time...I thought the programs would show up in the linkables list, but I guess not!
::: python/mozbuild/mozbuild/frontend/emitter.py:554
(Diff revision 4)
> + if kind == 'RUST_PROGRAMS':
> + self._rust_compile_dirs.add(context.objdir)
Why are we avoiding this for host rust programs? I guess the workarounds we have in `rules.mk` only apply to target programs, so we don't need to care so much for host programs? Might be reasonable to say something about that in a comment.
Attachment #8925122 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 12•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8925122 [details]
Bug 1414370 - Emit ldflags in directories containing only rust programs for the benefit of cargo.
https://reviewboard.mozilla.org/r/196370/#review202292
> Why are we avoiding this for host rust programs? I guess the workarounds we have in `rules.mk` only apply to target programs, so we don't need to care so much for host programs? Might be reasonable to say something about that in a comment.
Right, we're only passing these flags to target programs/libraries, so I don't want emit them and let us pick up an implicit dependency along the way.
Comment 13•7 years ago
|
||
Pushed by cmanchester@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ee8c2f65351c
Emit ldflags in directories containing only rust programs for the benefit of cargo. r=froydnj
Comment 14•7 years ago
|
||
bugherder |
Status: REOPENED → RESOLVED
Closed: 7 years ago → 7 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•