Last active
April 21, 2020 04:54
-
-
Save sstadelman/7decd65236cc2b1ff5ef905802193243 to your computer and use it in GitHub Desktop.
Updated single script of post: https://www.polidea.com/blog/how-to-build-swift-compiler-based-tool-the-step-by-step-guide/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install cmake ninja | |
brew install sccache | |
mkdir swift-source | |
cd swift-source | |
git clone --branch swift-5.1.5-RELEASE [email protected]:apple/swift.git | |
./swift/utils/update-checkout --clone-with-ssh | |
# ./swift/utils/update-checkout --tag swift-5.1.5-RELEASE | |
# sccache --start-server | |
./swift/utils/build-script --clean --xcode --release-debuginfo | |
./swift/utils/build-script --ios --release-debuginfo | |
mkdir -p build/PristineCopy/macosx/swift | |
cp -r build/Xcode-RelWithDebInfoAssert/swift-macosx-x86_64/RelWithDebInfo/lib/swift/ build/PristineCopy/macosx/swift/ | |
rm -r -f build/Xcode-RelWithDebInfoAssert/swift-macosx-x86_64/RelWithDebInfo/lib/swift | |
cp -r build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/lib/swift build/Xcode-RelWithDebInfoAssert/swift-macosx-x86_64/RelWithDebInfo/lib/swift | |
# rm -r -f build/Ninja-RelWithDebInfoAssert | |
open build/Xcode-RelWithDebInfoAssert/swift-macosx-x86_64/Swift.xcodeproj | |
cd swift | |
git checkout -b scrubjay-5.1.5 | |
hub submodule add sstadelman/obfuscation-lib lib/Obfuscation | |
hub submodule add -f sstadelman/obfuscation-include include/swift/Obfuscation | |
hub submodule add sstadelman/obfuscator-name-mapper tools/obfuscator-name-mapper | |
hub submodule add sstadelman/obfuscator-renamer tools/obfuscator-renamer | |
hub submodule add sstadelman/obfuscator-symbol-extractor tools/obfuscator-symbol-extractor | |
# update tools/CMakeLists.txt and lib/CMakeLists.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment