Skip to content

Add CMake toolchain for cross-compiling Swift #989

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2020

Conversation

MaxDesiatov
Copy link

@MaxDesiatov MaxDesiatov commented May 13, 2020

This toolchain file is what I use to cross-compile Foundation with CMake. Even though Foundation still isn't fully working, I'm thinking this toolchain file is worth keeping in the repository in case anyone would like to collaborate on it.

I use it with this invocation in the Foundation build directory (usually build/Ninja-ReleaseAssert/foundation-wasi-wasm32):

cmake -G Ninja \
  -DCMAKE_TOOLCHAIN_FILE=../../../swift/utils/webassembly/toolchain-wasi.cmake \
  -DICU_ROOT=../../../icu_out -DICU_DEBUG=ON -DBUILD_SHARED_LIBS=OFF \
  ../../../swift-corelibs-foundation

@kateinoigakukun
Copy link
Member

Thanks for sharing 👍

@MaxDesiatov MaxDesiatov merged commit d2f81e1 into swiftwasm May 13, 2020
@MaxDesiatov MaxDesiatov deleted the maxd/cmake-toolchain branch May 13, 2020 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants