afonso360 opened PR #4447 from clif-util-parse-values to main:
When parsing ISA specific values we were accidentally discarding the value of the flag, and treating it always as a boolean flag.
This would cause a
clif-utilinvocation such as
cargo run -- compile -D --set has_sse41=false --target x86_64 test.clifto be interpreted as
--set has_sse41and enable that feature instead
of disabling it.
abrown submitted PR review.
abrown submitted PR review.
abrown created PR review comment:
I guess I don't see how changing the error type returned fixes the issue you mention in the PR description. Shouldn't
BadNamestill map toUnknownFlagbut theUnknownValuebe used for some new case where the value isn't understood?
afonso360 submitted PR review.
afonso360 created PR review comment:
In
cranelift/src/utils.rswe parse some flags before knowing the target triple. Once we know the triple we parse those flags again but now with the correct triple. However returningUnknownFlaghere discarded thevalueof this Value and made it a flag, which is incorrect when we are trying to disable a value since theFlagsonly ever enable values.Shouldn't BadName still map to UnknownFlag but the UnknownValue be used for some new case where the value isn't understood?
It does in the branch above for
TestOption::Flag
afonso360 edited PR review comment.
abrown submitted PR review.
abrown submitted PR review.
abrown created PR review comment:
Ah, ok, I think I see now; thanks for the explanation.
abrown merged PR #4447.
Last updated: Dec 13 2025 at 19:03 UTC