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

Reject caching when multiple -arch arguments are present #898

Merged
merged 2 commits into from
Dec 11, 2020

Conversation

indygreg
Copy link
Contributor

Please read the commit messages and #847 for more context for this change.

The argument parsing code performs multiple loops of the args and I'm unsure what the nuanced distinctions are between them. Because I don't fully grok what's going on here, I may have put the validation in the wrong loop. That's what code review is for!

sccache currently barfs on multiple -arch. See mozilla#847.

This commit adds a test case showing that multiple -arch are currently
accepted.
Attempting to use sccache with gcc/clang with -arch specified multiple
times (such as when compiling llvm's compiler-rt) results in a rather
cryptic error from the invoked clang command: `clang: error: cannot
use 'c++-cpp-output' output with multiple -arch options`.

While there are potentially other workarounds to this special case,
this commit takes the simplest approach and marks the invocation
as not cacheable if multiple -arch flags are present.

The test introduced by the previous commit demonstrates the desired
change in behavior.

Closes mozilla#847.
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.

2 participants