Skip to content

Instantly share code, notes, and snippets.

@jimmyliao
Created May 5, 2016 06:46
Show Gist options
  • Save jimmyliao/686929249c5d40f1fcf6a604422258cb to your computer and use it in GitHub Desktop.
Save jimmyliao/686929249c5d40f1fcf6a604422258cb to your computer and use it in GitHub Desktop.
How to change swift runtime with xcrun
export TOOLCHAINS=swift
xcrun --find swift
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-03-24-a.xctoolchain/usr/bin/swift
export PATH=/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-03-24-a.xctoolchain/usr/bin:"${PATH}"
--
export PATH=/Library/Developer/Toolchains/${swift-latest.xctoolchain}/usr/bin:"${PATH}"
export TOOLCHAINS=
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift
=====
>>>> jimmyliao@jimmyliaombpr $ xcrun --toolchain org.swift.22120160328a swift --version
Apple Swift version 2.2-dev (LLVM ead37413ea, Clang 77f76b255c, Swift 9e755c224a)
Target: x86_64-apple-macosx10.9
[ /Users/jimmyliao/WebDrive/Github/Kitura-Sample-JimmyLiao/Kitura-Sample-JimmyLiao ]
>>>> jimmyliao@jimmyliaombpr $ xcrun --toolchain org.swift.3020160324a swift --version
Apple Swift version 3.0-dev (LLVM b010debd0e, Clang 3e4d01d89b, Swift 7182c58cb2)
Target: x86_64-apple-macosx10.9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment