-
Notifications
You must be signed in to change notification settings - Fork 331
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
fix(cli): get-target #270
fix(cli): get-target #270
Conversation
Lines 79 to 91 in 8ac9e54
Can this function fit the need? For example, in the sp1/cli/src/commands/install_toolchain.rs Lines 57 to 61 in 81f01f9
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix! LGTM
Issue
To build from source on platforms without pre-built toolchain (e.g. x86_64 macOS), the Book instruct to run the
cargo prove build-toolchain
command.In the
build_toolchain
command, the functionget_target()
will be called.sp1/cli/src/commands/build_toolchain.rs
Line 121 in 8ac9e54
But it only returns the target triplet for the platforms with pre-built binaries and panic otherwise.
sp1/cli/src/lib.rs
Lines 65 to 77 in 8ac9e54
Meaning that building from source on other platforms will encounter the following error.
Solution
This PR uses the target_lexicon crate to get the target triplet of the host machine.