-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
A-build-scriptsArea: build.rs scriptsArea: build.rs scriptsA-cargo-targetsArea: selection and definition of targets (lib, bins, examples, tests, benches)Area: selection and definition of targets (lib, bins, examples, tests, benches)A-manifestArea: Cargo.toml issuesArea: Cargo.toml issuesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Description
Currently a library named foo will generate an artifact libfoo.dylib on OSX. That's probably the right default, but it's doubly problematic when building CPython libraries (native modules):
- CPython's
importstatement will lookup the shared library's name exactly (ignoring extension) requiring animport libfoo. Thelibprefix is very rarely used in Python (the lib suffix somewhat more so,libfoomight also be the postfix to a Python binding tolibfooe.g.python-libfoo). This is compounded by "accelerator" native modules (as replacements or improvements of pure-python ones) normally being prefixed by_: Cargo would generatelib_foorather than the expecting_foo - CPython doesn't look for
.dylibfiles, it apparently only looks for.sofiles, even in OSX
Being able to provide an exact name for generated library artifacts (maybe platform-wise?) would fix both issues.
I didn't find any way to achieve that via a build script, or the native parameters of cargo build.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-build-scriptsArea: build.rs scriptsArea: build.rs scriptsA-cargo-targetsArea: selection and definition of targets (lib, bins, examples, tests, benches)Area: selection and definition of targets (lib, bins, examples, tests, benches)A-manifestArea: Cargo.toml issuesArea: Cargo.toml issuesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.