[New] `nvm install -s`: Use clang as C/C++ compiler if detected.

Fixes #902.
Peter Dave Hello 2016-11-14 05:39:34 +08:00 committed by Jordan Harband
parent 61ae478c38
commit 38934bf16c
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
1 changed files with 4 additions and 0 deletions

4
nvm.sh
View File

@ -1854,6 +1854,10 @@ nvm_install_source() {
elif [ "${NVM_OS}" = 'aix' ]; then elif [ "${NVM_OS}" = 'aix' ]; then
make='gmake' make='gmake'
fi 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 local tar_compression_flag
tar_compression_flag='z' tar_compression_flag='z'