How do I get clang 7.0?

Hi,

I just upgraded my Mac (Retina Late 2014) to El Capitan B4 from Yosemite.


I had already installed Xcode 7.0B4


I then installed Command Line Developer Tools for OS 10.11.


But I still see that I'm running Clang 6.1.0.




$ clang -v

Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)

Target: x86_64-apple-darwin15.0.0


Two questions:




1: How do I get Clang 7.0 installed?

2. How do I restore my IOS 9 B4 simulators, which seem to have disappeared?

Answered by Max108 in 33524022

Hoping to help with question #2:


Delete old (all) runtimes from /Library/Developer/CoreSimulator/Profiles/Runtimes.


That alone should do the trick. If not, continue with:

  1. In Simulator's Hardware > Devices > Manage Devices menu add a new iOS9 device.
  2. Quit out of Xcode and Simulator.app.
  3. Restart Simulator.app (via Xcode > ODT > Simulator) and expected iOS9 simulators should be displayed.
  4. Close and re-open Xcode, change the target OS for your project, and the Sims should be displayed as run targets.

Ok - answering my own question #1. The developer tools version can be set by
xcode->preferences->locations->command line tools.


Now:



$ clang -v

Apple LLVM version 7.0.0 (clang-700.0.59.1)

Target: x86_64-apple-darwin15.0.0

Thread model: posix

Accepted Answer

Hoping to help with question #2:


Delete old (all) runtimes from /Library/Developer/CoreSimulator/Profiles/Runtimes.


That alone should do the trick. If not, continue with:

  1. In Simulator's Hardware > Devices > Manage Devices menu add a new iOS9 device.
  2. Quit out of Xcode and Simulator.app.
  3. Restart Simulator.app (via Xcode > ODT > Simulator) and expected iOS9 simulators should be displayed.
  4. Close and re-open Xcode, change the target OS for your project, and the Sims should be displayed as run targets.

Thanks - I found those instructions on another thread and they worked.


What was frustrating was that I thought I was required to upgrade to El Capitan to get Clang 7.0. Turns out I already had a copy of the 7.0 tools under Yosemite, but I hadn't configured them in XCode, but loading them onto 7.04b doesn't activate them; You have to manually change the setting via preferences, as I comment above. A lot of time wasted and now I have a big commitment to the El Capitan beta cycle. Oh well.


Still can't quite figure out how to create an archive that has a rebuilt BITCODE_ENABLED static library, which is the reason I needed Clang 7 in the first place. If you know, please pass along. This has been quite a rat-hole.

Sorry, I don't have experience with that. Best I can offer is the following stackoverflow link, which you've likely already seen:

stackoverflow.com/questions/31486232/how-do-i-xcodebuild-a-static-library-with-bitcode-enabled

I did eventually conquer this. I found a Github shell-script for building OpenSSL 1.0.2d with bit-code-enabled libraries. With a tweak or two to the shell script, I got it to generate a single multi-platform static library (via LIPO) that contains native objects for I386 (simulators), armV7 and arm64 (for devices), AND bit-code objects (for archives). Hallelujah!


Now here are the next 2 problems, one of which I posted elsewhere:


1) I successfully built an Archive, albeit with one linker warning that is related to bit-codes and weak references. (I'd love to get rid of that warning -- I hate warnings.)

2) When I issue a "validate archive" command from the Organizer, XCode 7.0b4 crashes miserably every time. I submitted a bug report.

Update:


Weak references disappeared. Not sure how, though.


The archive validation crashes were due to a looping subdirectory tree as noted here:
https://forums.developer.apple.com/message/46541?et=watches.email.thread#46541

How do I get clang 7.0?
 
 
Q