-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
shards build --mcpu causes lookup of CPU arch as a target incorrectly #553
Comments
The bug is caused here: Lines 132 to 142 in 85b30b5
All arguments that don't start with a dash are considered a target. A simple workaround is to write flag and value as a single argument: Related: crystal-lang/crystal#11136 |
For a proper fix, I think it doesn't make sense to expect targets at arbitrary positions. Everything after the first flag argument (starting with dash) should simply be forwarded to |
Did you mean
I agree that this is how it should behave, because It also allows for Crystal to change without Shards having to. e.g., if Crystal added a |
Problem
shards build
incorrectly treats--mcpu
as if you specified--target
(also, separately,--target
onshards build
makes--target
oncrystal build
not available directly).Reproduce
As an example, if you were trying to optimize the build for Graviton2:
Workaround
There is a workaround (which also permits you to set
--target
):CRYSTAL_OPTS="--target aarch64-linux-gnu --mcpu neoverse-n1 --mattr +crc,+fp16,+rcpc,+dotprod,+crypto" shards build --production --no-debug --release --stats --verbose
The text was updated successfully, but these errors were encountered: