This Open source project won't be updated until Kremlin will stop war in Ukraine and repair damages made in towns: Irpin, Bucha, Gostomel. If this won't happen during next 6 months (until 1 September 2022), then this project will be removed from public space.
See also:
- Russian invaders bomb high-rise building in Irpin west of Kyiv
- In the morning, the invaders launched two air strikes on Irpin, a residential building was destroyed
- macOS 12
- Xcode 13
- Android Studio 2020.3.1
- Android NDK (See version number in file
NDK_VERSION
in the root of this repository) - Node 14.17.3 (node -v). Newer versions may also work, but not tested.
- CMake 3.21.2 (cmake --version)
- Ninja 1.10.2 (ninja --version)
- autoconf 2.71 (autoconf --version)
- aclocal 1.16.4 (aclocal --version)
- glibtool 2.4.6 (glibtool --version)
- pkg-config 0.29.2 (pkg-config --version)
- Toolchain build may fail if macOS headers installed under
/usr/include
. This usually happens if you previously installed package/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
. See details in Xcode Command Line Tools notes. See following SuperUser question about how to uninstall package. - Toolchain build may fail if the command line tools are present in
/Library/Developer/CommandLineTools
. Remove them if you are not using them. See: macos - How do I uninstall the command line tools for Xcode? - Ask Different
Keep tools like CMake
and ninja
up to date.
Build of complete toolchain takes ~1.5h. Instead of building it you can just download and use already pre-built package from Releases page.
-
Install CMake, Ninja, Autotools and git-lfs. Check that all requirements are installed.
brew install cmake ninja autoconf automake libtool pkg-config git-lfs which cmake which ninja which autoconf which aclocal which glibtool which pkg-config which git-lfs
-
Make sure that
Xcode Build Tools
properly configured.xcode-select --print-path
-
Clone this repository.
git clone https://github.com/vgorloff/swift-everywhere-toolchain.git cd swift-everywhere-toolchain
-
Create a symbolic link to NDK installation directory.
sudo mkdir -p /usr/local/ndk sudo ln -vsi ~/Library/Android/sdk/ndk/$VERSION /usr/local/ndk/$VERSION
The placeholder
$VERSION
needs to be replaced with a version mentioned in fileNDK_VERSION
at the root of cloned repository. -
Start a build.
node main.js
-
Once the build completed, toolchain will be saved to folder
ToolChain/swift-android-toolchain
and compressed into archiveToolChain/swift-android-toolchain.tar.gz
.
Please refer file Assets/Readme.md to see how to compile Swift files or build Swift packages using Toolchain.
Sample projects can be found in a separate swift-everywhere-samples repository. Please look into Readme.md
in that repository to get information about how to configure and build sample projects.