-
Notifications
You must be signed in to change notification settings - Fork 471
build: improve cross-compilation for android #312
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
Conversation
CC: @ephemer |
The sysroot headers for android require some definitions to be altered. Ensure that we do not define `_GNU_SOURCE` for Android.
@swift-ci please test |
build: improve cross-compilation for android A few updates to enable building on Raspberry PI/Ubuntu 16.04 As requested by MadCoder, changed the unsigned long long to uint64_t
Hi @compnerd, I’m looking at getting the build of an android toolkit to be possible on macOS alone and am looking to move to the new cmake way of doing things. Would it be possible for you to document the command you ran for a cmake Android build on Linux here so I can adapt it for macOS. Cheers! |
Is it something like: cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/Users/user/swifty-robot-environment/util/prepare_environment/swift-source/build/Ninja-ReleaseAssert/llvm-macosx-x86_64/bin/clang -DCMAKE_CXX_COMPILER=/Users/user/swifty-robot-environment/util/prepare_environment/swift-source/build/Ninja-ReleaseAssert/llvm-macosx-x86_64/bin/clang++ -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=21 -DCMAKE_ANDROID_NDK=/usr/local/android/ndk -DENABLE_SWIFT=YES -DCMAKE_SWIFT_COMPILER=/Users/user/swifty-robot-environment/util/prepare_environment/swift-install/usr/bin/swiftc -DENABLE_TESTING=OFF -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a ../swift-corelibs-libdispatch |
@johnno1962 we spoke about this on Slack but here for anyone else wondering. This command works on both Mac and Linux:
I'm about to put another pull request through with the required changes to make that command work |
build: improve cross-compilation for android Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
The sysroot headers for android require some definitions to be altered.
Ensure that we do not define
_GNU_SOURCE
for Android.