-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
cctools: try to use clang in as #3486
Conversation
The clang integrated assembler is way more up-to-date than the ancient pre-GPLv3 version of gas that is the alternative. The latter doesn't know about newer instructions such as AVX. The as(1) shipped with recent Xcode versions will just run clang behind the scenes under most circumstances for this reason. Our cctools can't actually depend on clang because that would create a circular dependency. So we'll try to run the clang corresponding to the LLVM being used by cctools, and if that isn't present, try the system clang in /usr/bin if we're on an OS version that has a clang with a working integrated assembler. (The ancient gas is still used as a final fallback.) Fixes: https://trac.macports.org/ticket/37846
Notifying maintainers: |
Travis Build #5004 Passed. Lint results
Port cctools success on xcode9.4. Log |
LGTM... I like the way you try and find the correct MPs clang version, without directly depending on it, and fall back to trying With this patch I was successfully able to build OpenBLAS with AVX2 enabled, which currently has to be turned off due to the fact the symbols generated by gcc's fortran compiler could not be linked, due to the limitations of cctools. https://trac.macports.org/ticket/57912 I think we should not sit on this for too long, and merge quickly. @kencu What do you think ? |
I'll merge if @jeremyhu doesn't raise any objections by the end of the day. |
a workable approach. The only other approach I could think of would be to have "as" respond to an env var with a clang path in it, and that seems more cumbersome. So +1 . |
Its unlikely we will hear from @jeremyhu, if previous experience holds. I am happy with the changes here, so if no one else beats me to it, or objects, I am happy to be the one to hit go later on today... |
The clang integrated assembler is way more up-to-date than the ancient
pre-GPLv3 version of gas that is the alternative. The latter doesn't
know about newer instructions such as AVX. The as(1) shipped with
recent Xcode versions will just run clang behind the scenes under most
circumstances for this reason.
Our cctools can't actually depend on clang because that would create a
circular dependency. So we'll try to run the clang corresponding to the
LLVM being used by cctools, and if that isn't present, try the system
clang in /usr/bin if we're on an OS version that has a clang with a
working integrated assembler. (The ancient gas is still used as a final
fallback.)
Fixes: https://trac.macports.org/ticket/37846
Type(s)
Tested on
macOS 10.14
Xcode 10.1