Skip to content

Android CrossCompile on Mac: Fixes Cmake error "Unrecognized architecture on host system: armv7-a" #2314

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
Jun 2, 2019

Conversation

vgorloff
Copy link
Contributor

@vgorloff vgorloff commented Jun 1, 2019

Hello!

This PR fixes error shown below:

cd $REPO/swift-everywhere-toolchain/ToolChain/Build/armv7a/swift-corelibs-foundation && \
cmake -G Ninja \
-DFOUNDATION_PATH_TO_LIBDISPATCH_SOURCE=$REPO/swift-everywhere-toolchain/ToolChain/Sources/swift-corelibs-libdispatch \
-DFOUNDATION_PATH_TO_LIBDISPATCH_BUILD=$REPO/swift-everywhere-toolchain/ToolChain/Build/armv7a/swift-corelibs-libdispatch \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=$ndk-bundle/build/cmake/android.toolchain.cmake \
-DANDROID_STL=c++_static \
-DANDROID_TOOLCHAIN=clang \
-DANDROID_PLATFORM=android-24 \
-DANDROID_ABI=armeabi-v7a \
-DCMAKE_SYSTEM_NAME=Android \
-DCMAKE_C_FLAGS="-D__ANDROID__" \
-DCMAKE_CXX_FLAGS="-D__ANDROID__" \
-DICU_INCLUDE_DIR=$REPO/swift-everywhere-toolchain/ToolChain/Install/armv7a/icu/include \
-DICU_LIBRARY=$REPO/swift-everywhere-toolchain/ToolChain/Install/armv7a/icu/lib \
-DICU_I18N_LIBRARY_RELEASE=$REPO/swift-everywhere-toolchain/ToolChain/Install/armv7a/icu/lib/libicui18nswift.so \
-DICU_UC_LIBRARY_RELEASE=$REPO/swift-everywhere-toolchain/ToolChain/Install/armv7a/icu/lib/libicuucswift.so \
-DLIBXML2_INCLUDE_DIR=$REPO/swift-everywhere-toolchain/ToolChain/Install/armv7a/xml/include/libxml2 \
-DLIBXML2_LIBRARY=$REPO/swift-everywhere-toolchain/ToolChain/Install/armv7a/xml/lib/libxml2.so \
-DCURL_INCLUDE_DIR=$REPO/swift-everywhere-toolchain/ToolChain/Install/armv7a/curl/include \
-DCURL_LIBRARY=$REPO/swift-everywhere-toolchain/ToolChain/Install/armv7a/curl/lib/libcurl.so \
-DCMAKE_INSTALL_PREFIX=/ \
-DCMAKE_SWIFT_COMPILER="$REPO/swift-everywhere-toolchain/ToolChain/Build/darwin/swift/bin/swiftc" \
$REPO/swift-everywhere-toolchain/ToolChain/Sources/swift-corelibs-foundation

-- Found ICU: $REPO/swift-everywhere-toolchain/ToolChain/Install/armv7a/icu/include (found version "64.2")
CMake Error at cmake/modules/SwiftSupport.cmake:272 (message):
  Unrecognized architecture on host system: armv7-a
Call Stack (most recent call first):
  CMakeLists.txt:46 (get_swift_host_arch)


-- Configuring incomplete, errors occurred!

@vgorloff
Copy link
Contributor Author

vgorloff commented Jun 1, 2019

@swift-ci please test

@vgorloff vgorloff changed the title Fixes Cmake error "Unrecognized architecture on host system: armv7-a" Android CrossCompile on Mac: Fixes Cmake error "Unrecognized architecture on host system: armv7-a" Jun 1, 2019
@compnerd
Copy link
Member

compnerd commented Jun 2, 2019

@swift-ci please test and merge

@swift-ci swift-ci merged commit f9b18eb into swiftlang:master Jun 2, 2019
@vgorloff vgorloff deleted the macos-to-android-crosscompile branch June 2, 2019 20:45
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.

3 participants