Closed Bug 1492268 Opened 7 years ago Closed 7 years ago

Rust libraries are not linked into programs

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox64 fixed)

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: agashlin, Assigned: agashlin)

Details

Attachments

(1 file)

Recursive make silently ignores any Rust libraries included in USE_LIBS for a program. I have a small patch in progress that seems to fix this, will attach shortly.
I had wanted to add this check: if isinstance(obj, (SharedLibrary, Program)): self._process_rust_libraries(obj, backend_file, pretty_relpath) elif any(isinstance(l, RustLibrary) for l in obj.linked_libraries): raise Exception("Linking to Rust libraries not supported for " "the object type of " + obj.name) to avoid mysterious silent failures on other object types (not sure what the right term is), but due to the way gtest is set up [1] it would have required more hacking than I'm ready to do. [1] For gtest, lib gkrust-gtest contains all the Rust that would normally be linked into xul, since xul is linked into gtest statically, but a static lib doesn't get linked to a Rust static lib (gkrust) for some reason?
Comment on attachment 9010070 [details] Bug 1492268: Allow a Rust library to link to a program Nathan Froyd [:froydnj] has approved the revision.
Attachment #9010070 - Flags: review+
Pushed by agashlin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/61ffb6c642cd Allow a Rust library to link to a program r=froydnj
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Assignee: nobody → agashlin
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: