From a648ecd2d55d39e266f40028afa9b4fb0e1e2f42 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Mon, 14 Nov 2016 05:39:34 +0800 Subject: [PATCH] [New] Use Clang as C/C++ compiler if we detected it, close #902 --- nvm.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nvm.sh b/nvm.sh index 090043e7d90..abcb020d24c 100755 --- a/nvm.sh +++ b/nvm.sh @@ -1854,6 +1854,10 @@ nvm_install_source() { elif [ "${NVM_OS}" = 'aix' ]; then make='gmake' fi + if nvm_has "clang++" && nvm_has "clang" ; then + nvm_echo "Clang detected! Use Clang as c/c++ compiler!" + MAKE_CXX='CC=clang CXX=clang++' + fi local tar_compression_flag tar_compression_flag='z'