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

clang version detection #10

Open
devernay opened this issue Oct 8, 2013 · 0 comments
Open

clang version detection #10

devernay opened this issue Oct 8, 2013 · 0 comments

Comments

@devernay
Copy link
Contributor

devernay commented Oct 8, 2013

sconsPorject always detects clang as being version 4.2.1, because the -dumpversion command-line option is actually a GCC compatibility option, and it always returns "4.2.1".
The actual clang version may be optained using the "-v" option, port example on Snow Leopard with macports clang 3.3 installed:
$ clang -v
clang version 3.3 (tags/RELEASE_33/final)
Target: i386-apple-darwin10.8.0
Thread model: posix

$ /usr/bin/clang -v
Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn)
Target: i386-apple-darwin10
Thread model: posix

And on Leopard:
$ clang-mp-3.1 -v
clang version 3.1 (branches/release_31)
Target: powerpc-apple-darwin9.8.0
Thread model: posix
$ clang-mp-3.2 -v
clang version 3.2 (tags/RELEASE_32/final)
Target: powerpc-apple-darwin9.8.0
Thread model: posix
$ clang-mp-3.3 -v
clang version 3.3 (tags/RELEASE_33/final)
Target: powerpc-apple-darwin9.8.0
Thread model: posix

I guess compiler/clang.py could easily be modified to detect the actual clang version, which could be "the word before clang if it exists plus the number after version": 3.1, 3.2, 3.3, Apple-1.7 ...

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

No branches or pull requests

1 participant