-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Description
This is a tracking issue for the RFC "Flexible target specification" (rust-lang/rfcs#131).
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Overview
This is the tracking issue for the ability to specify custom targets using a file that defines the target (currently JSON).
See also #38338 for the related --print=target-spec-json.
Documentation: https://doc.rust-lang.org/nightly/rustc/targets/custom.html
Issues:
A-target-specs
Unresolved Questions
- Should the file format be JSON or something else like TOML?
- See target-spec-toml draft davidtwco/rfcs#5 for a draft RFC proposal that also includes stability information.
- The format is somewhat tied to LLVM. There are some concerns that may make using other backends more difficult. Here is a suggestion for making the backend explicit.
- How will stability be handled?
- Validate that the standard library can be reliably built (no TARGET detection, see Target specification? wg-cargo-std-aware#6 (comment)).
Implementation history
- Original tracking issue: Implement flexible target specs #16093
- Initial implementation: Implement flexible target specification #16156
- Added
--print target-spec-json: print option to dump target spec as JSON #38061 - Support for absolute paths: Introduce a TargetTriple enum to support absolute target paths #49019
- Added sysroot path search: Add default search path to
Target::search()#83800 - Target search cleanup: Adjust target search algorithm for rustlib path #85152
- Added
--print target-spec-json-schema: Add --print target-spec-json-schema #144498 - Destabilization: Destabilise
target-spec-json#150151 target: fix destabilising target-spec-json #151534