Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

Allow using the crate with custom target JSON specs#304

Merged
bors[bot] merged 1 commit intorust-embedded:masterfrom
jonas-schievink:target-json
Jan 8, 2021
Merged

Allow using the crate with custom target JSON specs#304
bors[bot] merged 1 commit intorust-embedded:masterfrom
jonas-schievink:target-json

Conversation

@jonas-schievink
Copy link
Contributor

This should fix #145 (cc @thejpster)

@rust-highfive
Copy link

r? @adamgreig

(rust-highfive has picked a reviewer for you, use r? to override)

@adamgreig
Copy link
Member

Idea seems good but this breaks when target is thumbv8m.base-none-eabi and similar.

@jonas-schievink
Copy link
Contributor Author

Path::new("thumbv8m.base-none-eabi.json").file_stem().unwrap().to_str().unwrap() results in thumbv8m.base-none-eabi, so this should work fine. file_stem only strips preceding directories and the last suffix.

@adamgreig
Copy link
Member

Won't it also run for just "--target thumbv8m.base-none-eabi", without a JSON spec, though?

@jonas-schievink
Copy link
Contributor Author

Oh, right, that's a problem.

adamgreig
adamgreig previously approved these changes Jan 8, 2021
Copy link
Member

@adamgreig adamgreig left a comment

Choose a reason for hiding this comment

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

Thanks!

bors merge

bors bot added a commit that referenced this pull request Jan 8, 2021
304: Allow using the crate with custom target JSON specs r=adamgreig a=jonas-schievink

This should fix #145 (cc @thejpster)

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
@bors
Copy link
Contributor

bors bot commented Jan 8, 2021

Build failed:

Copy link
Member

@adamgreig adamgreig left a comment

Choose a reason for hiding this comment

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

bors merge

@bors
Copy link
Contributor

bors bot commented Jan 8, 2021

@bors bors bot merged commit 3a2ae35 into rust-embedded:master Jan 8, 2021
@jonas-schievink jonas-schievink deleted the target-json branch January 8, 2021 16:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doesn't support JSON targets

3 participants