On Mon, 3 Dec 2018 at 14:16, Daniel P. Berrangé <berra...@redhat.com> wrote: > NB although this will succeed, it is not technically checking the > right thing on macOS platforms as their clang used a completely > different numbering scheme. It just happens to have larger numbers > than upstream clang, so we'll always succeed. > > Compare clang on Ubuntu: > > https://travis-ci.org/qemu/qemu/jobs/460892603 > > $ clang --version > clang version 5.0.0 (tags/RELEASE_500/final) > > with clang on macOS: > > https://travis-ci.org/qemu/qemu/jobs/460892611 > > $ clang --version > Apple LLVM version 9.1.0 (clang-902.0.39.2) > > Fortunately there's a mapping recorded here: > > https://en.wikipedia.org/wiki/Xcode#Latest_versions > > See "LLVM" and "CLang version string" columns.
...but overall it is better to check for feature presence/absence where possible rather than using a version number check. clang does at least make this easier than it has historically been for gcc. thanks -- PMM