Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Query rustc for clang target triples instead of hardcoding them #1004

Merged
merged 9 commits into from
Mar 15, 2024

Conversation

NobodyXu
Copy link
Collaborator

@NobodyXu NobodyXu commented Mar 9, 2024

Fixed #994

Add new workspace crate gen-target-info for generating src/target_info.rs, and use it to simplify riscv target arch mapping logic in Build::add_default_flags

NobodyXu added 6 commits March 9, 2024 18:22
For generating `src/target_info.rs`, and use it to simplify
riscv target arch mapping logic in `Build::add_default_flags`

Signed-off-by: Jiahao XU <[email protected]>
Signed-off-by: Jiahao XU <[email protected]>
Signed-off-by: Jiahao XU <[email protected]>
@NobodyXu NobodyXu marked this pull request as ready for review March 9, 2024 12:45
Copy link
Member

@workingjubilee workingjubilee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not entirely sure if this is an improvement, but I am certainly not against it, since it transforms a bunch of logic into data, which is much better to see.

dev-tools/gen-target-info/src/main.rs Outdated Show resolved Hide resolved
dev-tools/gen-target-info/src/write.rs Show resolved Hide resolved
dev-tools/gen-target-info/src/write.rs Outdated Show resolved Hide resolved
src/target_info.rs Show resolved Hide resolved
dev-tools/gen-target-info/src/main.rs Show resolved Hide resolved
@NobodyXu NobodyXu merged commit abf67d7 into main Mar 15, 2024
42 checks passed
@NobodyXu NobodyXu deleted the feat/query-rustc branch March 15, 2024 01:45
@NobodyXu
Copy link
Collaborator Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Query rustc for clang target triples
2 participants