workshopper / goingnative

A NodeSchool style workshopper for learning how to write native Node.js addons
MIT License
414 stars 54 forks source link

update Apple gcc version check #96

Closed nineninesevenfour closed 3 years ago

nineninesevenfour commented 3 years ago

MacOS: allow term 'clang' additionally to 'LLVM' in gcc version string Signed-off-by: Harald Fassler harald.fassler+9974@gmail.com

Apple seems to have changed the version string from "LLVM" to "clang":

% gcc -v            
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1205.0.22.11)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Therefor in the current version the first exercise fails with:

 ✗ 

 Unknown gcc found in $PATH

This pull request is to allow also "clang" in the version check.

nineninesevenfour commented 3 years ago

BTW I found a good source for the version strings. The change from "LLVM" to "clang" was made together with XCode 11: https://trac.macports.org/wiki/XcodeVersionInfo#Xcode11.0 (September 2019).

martinheidegger commented 3 years ago

Published with 2.1.0