Revert Apple Clang Version For NVCC Revert Apple Clang Version For NVCC xcode xcode

Revert Apple Clang Version For NVCC


  1. Go to https://developer.apple.com/downloads/, log in and then download http://adcdownload.apple.com/Developer_Tools/Command_Line_Tools_OS_X_10.11_for_Xcode_7.2/Command_Line_Tools_OS_X_10.11_for_Xcode_7.2.dmg, and install, as was suggested by fabregaszy.
  2. Run the following command to switch to the old version:sudo xcode-select --switch /Library/Developer/CommandLineTools
  3. Run the following command to quickly check clang version:clang --version


I just had the same issue after upgrading to XCode 7.3 on 10.11. Reinstalling the previous (7.2) command line tools didn't downgrade the default clang compiler. To fix this I used a previous XCode.app package to rename and copy the XcodeDefault.xctoolchain directory into the Toolchains director in the current /Applications/Xcode.app. You have to right click on Xcode.app to "Show package contents" then browse to the Toolchains dir.

enter image description here

Then (re)start Xcode, hit command-, for preferences, then go to locations. You will see the dropdown for Command Line Tools. Change this to the version of the toolchain you copied over.

enter image description here

You can check the default version of clang in Terminal:

clang -v OR llvm-gcc -v

Now nvcc should work


The accepted answer says to download the next-to-latest command line tools and install them, then select them by typing in the console

sudo xcode-select --switch /Library/Developer/CommandLineTools

Its been asked how to revert to the original version of the tools. This is achieved by

sudo xcode-select --switch /Applications/Xcode.app