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

[Android] Enable building static stdlib on macOS #4972

Merged
merged 1 commit into from Oct 17, 2016

Conversation

Projects
None yet
9 participants
@modocache
Collaborator

modocache commented Sep 23, 2016

The Swift runtime can be built for Android on Linux host machines using the instructions in docs/Android.md. This commit allows it to be built on macOS host machines as well.

This work is inspired by @compnerd's work in enabling Windows builds from macOS hosts. It assumes host tools are already built for macOS. It also does not support building the stdlib and SDK overlays yet. I intend to support these in a future commit.

For now, the Android runtime may be built by using the following bash script, which simply calls CMake:

set -e
set -x

HOME_DIR="/Users/bgesiak"

APPLE_DIR="${HOME_DIR}/GitHub/apple"
BUILD_DIR="${APPLE_DIR}/build/Ninja-Release"
CMARK_SRC_DIR="${APPLE_DIR}/cmark"
CMARK_BUILD_DIR="${BUILD_DIR}/cmark-macosx-x86_64"
LLVM_SRC_DIR="${APPLE_DIR}/llvm"
LLVM_BUILD_DIR="${BUILD_DIR}/llvm-macosx-x86_64"
SWIFT_BUILD_DIR="${BUILD_DIR}/swift-macosx-x86_64"

ANDROID_NDK_DIR="${HOME_DIR}/android-ndk-r12b"
LIBICU_SRC_DIR="${APPLE_DIR}/libiconv-libicu-android"
LIBICU_BUILD_DIR="${LIBICU_SRC_DIR}/armeabi-v7a"

SWIFT_ANDROID_BUILD_DIR="${APPLE_DIR}/build/SwiftAndroid"

mkdir -p "${SWIFT_ANDROID_BUILD_DIR}"

cmake \
  -G "Ninja" \
  \
  -DCMAKE_C_COMPILER:PATH="${LLVM_BUILD_DIR}/bin/clang" \
  -DCMAKE_CXX_COMPILER:PATH="${LLVM_BUILD_DIR}/bin/clang++" \
  \
  -DSWIFT_PATH_TO_CMARK_SOURCE:PATH="${CMARK_SRC_DIR}" \
  -DSWIFT_PATH_TO_CMARK_BUILD:PATH="${CMARK_BUILD_DIR}" \
  -DSWIFT_CMARK_LIBRARY_DIR:PATH="${CMARK_BUILD_DIR}/src" \
  -DSWIFT_PATH_TO_LLVM_SOURCE:PATH="${LLVM_SRC_DIR}" \
  -DSWIFT_PATH_TO_LLVM_BUILD:PATH="${LLVM_BUILD_DIR}" \
  -DSWIFT_PATH_TO_CLANG_SOURCE:PATH="${LLVM_SRC_DIR}/tools/clang" \
  -DSWIFT_PATH_TO_CLANG_BUILD:PATH="${LLVM_BUILD_DIR}" \
  -DSWIFT_NATIVE_LLVM_TOOLS_PATH:STRING="${LLVM_BUILD_DIR}/bin" \
  -DSWIFT_NATIVE_SWIFT_TOOLS_PATH:STRING="${SWIFT_BUILD_DIR}/bin" \
  \
  -DSWIFT_ANALYZE_CODE_COVERAGE:STRING=FALSE \
  -DSWIFT_SERIALIZE_STDLIB_UNITTEST:BOOL=FALSE \
  -DSWIFT_STDLIB_SIL_DEBUGGING:BOOL=FALSE \
  -DSWIFT_CHECK_INCREMENTAL_COMPILATION:BOOL=FALSE \
  -DSWIFT_STDLIB_ENABLE_RESILIENCE:BOOL=FALSE \
  -DSWIFT_STDLIB_SIL_SERIALIZE_ALL:BOOL=TRUE \
  -DSWIFT_BUILD_PERF_TESTSUITE:BOOL=FALSE \
  -DSWIFT_BUILD_EXAMPLES:BOOL=FALSE \
  -DSWIFT_INCLUDE_TESTS:BOOL=FALSE \
  -DSWIFT_EMBED_BITCODE_SECTION:BOOL=FALSE \
  -DSWIFT_TOOLS_ENABLE_LTO:STRING= \
  -DSWIFT_AST_VERIFIER:BOOL=TRUE \
  -DSWIFT_SIL_VERIFY_ALL:BOOL=FALSE \
  -DSWIFT_RUNTIME_ENABLE_LEAK_CHECKER:BOOL=FALSE \
  \
  -DCMAKE_BUILD_TYPE:STRING=Release \
  -DLLVM_ENABLE_ASSERTIONS:BOOL=TRUE \
  -DSWIFT_STDLIB_BUILD_TYPE:STRING=Release \
  -DSWIFT_STDLIB_ASSERTIONS:BOOL=TRUE \
  -DSWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER:BOOL=TRUE \
  -DSWIFT_HOST_VARIANT=macosx \
  -DSWIFT_HOST_VARIANT_SDK=OSX \
  -DSWIFT_HOST_VARIANT_ARCH=x86_64 \
  -DSWIFT_BUILD_TOOLS:BOOL=FALSE \
  -DSWIFT_INCLUDE_TOOLS:BOOL=FALSE \
  -DSWIFT_BUILD_REMOTE_MIRROR:BOOL=FALSE \
  -DSWIFT_BUILD_DYNAMIC_STDLIB:BOOL=FALSE \
  -DSWIFT_BUILD_STATIC_STDLIB:BOOL=TRUE \
  -DSWIFT_BUILD_DYNAMIC_SDK_OVERLAY:BOOL=FALSE \
  -DSWIFT_BUILD_STATIC_SDK_OVERLAY:BOOL=FALSE \
  -DSWIFT_EXEC:STRING="${SWIFT_BUILD_DIR}/bin/swiftc" \
  \
  -DSWIFT_ENABLE_GOLD_LINKER:BOOL=TRUE \
  -DSWIFT_SDKS:STRING=ANDROID \
  -DSWIFT_ANDROID_NDK_PATH:STRING="${ANDROID_NDK_DIR}" \
  -DSWIFT_ANDROID_NDK_GCC_VERSION:STRING=4.9 \
  -DSWIFT_ANDROID_SDK_PATH:STRING="${ANDROID_NDK_DIR}/platforms/android-21/arch-arm" \
  -DSWIFT_ANDROID_ICU_UC:STRING="${LIBICU_BUILD_DIR}" \
  -DSWIFT_ANDROID_ICU_UC_INCLUDE:STRING="${LIBICU_BUILD_DIR}/icu/source/common" \
  -DSWIFT_ANDROID_ICU_I18N:STRING="${LIBICU_BUILD_DIR}" \
  -DSWIFT_ANDROID_ICU_I18N_INCLUDE:STRING="${LIBICU_BUILD_DIR}/icu/source/i18n" \
  \
  "${APPLE_DIR}/swift"

cmake --build "${APPLE_DIR}/swift" -- -j8 swift-stdlib-android-armv7

Addresses part of SR-1362, with stdlib and SDK overlay support coming in a future pull request.

@compnerd

This comment has been minimized.

Show comment
Hide comment
@compnerd

compnerd Sep 23, 2016

Collaborator

I think that we should consider splitting this up a fair amount. Enabling the policy for IN_LIST is simple and standalone. Lets pull that out, get that merged. Getting the CMAKE_SYSTEM_NAME usage replaced with the SDK target is a separable piece as well. Sprinkling the TARGET_SDKS is also something we can do asynchronously.

Doing that will simplify this change and make it easier to digest.

Collaborator

compnerd commented Sep 23, 2016

I think that we should consider splitting this up a fair amount. Enabling the policy for IN_LIST is simple and standalone. Lets pull that out, get that merged. Getting the CMAKE_SYSTEM_NAME usage replaced with the SDK target is a separable piece as well. Sprinkling the TARGET_SDKS is also something we can do asynchronously.

Doing that will simplify this change and make it easier to digest.

@modocache

This comment has been minimized.

Show comment
Hide comment
@modocache

modocache Sep 23, 2016

Collaborator

Absolutely, will do. Thanks, @compnerd!

Collaborator

modocache commented Sep 23, 2016

Absolutely, will do. Thanks, @compnerd!

@gottesmm

Meta comment. Can you split this up?

Show outdated Hide outdated cmake/modules/AddSwift.cmake
Show outdated Hide outdated cmake/modules/AddSwift.cmake
Show outdated Hide outdated cmake/modules/AddSwift.cmake
Show outdated Hide outdated stdlib/public/core/CMakeLists.txt
Show outdated Hide outdated stdlib/public/runtime/CMakeLists.txt
@modocache

This comment has been minimized.

Show comment
Hide comment
@modocache

modocache Oct 3, 2016

Collaborator

I rebased these changes on top of:

  1. #5068
  2. #5095
  3. #5096
  4. #5100
  5. #5101

This can probably be split up further, but I'll wait until those pull requests are reviewed/merged.

Collaborator

modocache commented Oct 3, 2016

I rebased these changes on top of:

  1. #5068
  2. #5095
  3. #5096
  4. #5100
  5. #5101

This can probably be split up further, but I'll wait until those pull requests are reviewed/merged.

@modocache modocache changed the title from [Android] Enable building on a macOS host machine to [Android] Enable building static stdlib on macOS Oct 7, 2016

@modocache

This comment has been minimized.

Show comment
Hide comment
@modocache

modocache Oct 7, 2016

Collaborator

I rebased these changes on top of the following pull requests:

  • #5095 -- I'd really appreciate advice on how to remove the dependency on Foundation and CoreFoundation when building for Android.
  • #5175 -- Currently in review.

I've also reduced the scope of this pull request, to only enable building static libraries. I'll work on shared libraries in an upcoming pull request.

Collaborator

modocache commented Oct 7, 2016

I rebased these changes on top of the following pull requests:

  • #5095 -- I'd really appreciate advice on how to remove the dependency on Foundation and CoreFoundation when building for Android.
  • #5175 -- Currently in review.

I've also reduced the scope of this pull request, to only enable building static libraries. I'll work on shared libraries in an upcoming pull request.

@modocache

This comment has been minimized.

Show comment
Hide comment
@modocache

modocache Oct 10, 2016

Collaborator

@swift-ci please clean test

Collaborator

modocache commented Oct 10, 2016

@swift-ci please clean test

@modocache

This comment has been minimized.

Show comment
Hide comment
@modocache

modocache Oct 10, 2016

Collaborator

OK, this pull request now works on its own, even without #5095. The functionality here is now just for building static versions of the Swift runtime for Android, no dynamic libraries, using the CMake invocation at the top of this pull request.

@gottesmm Reviews welcome! Assuming CI passes I'd like to merge this and get Android building on macOS! 🎉

Collaborator

modocache commented Oct 10, 2016

OK, this pull request now works on its own, even without #5095. The functionality here is now just for building static versions of the Swift runtime for Android, no dynamic libraries, using the CMake invocation at the top of this pull request.

@gottesmm Reviews welcome! Assuming CI passes I'd like to merge this and get Android building on macOS! 🎉

@modocache

This comment has been minimized.

Show comment
Hide comment
@modocache

modocache Oct 10, 2016

Collaborator

Alternatively, @erg, is this the sort of CMake work you'd be interested in reviewing? 🤔

Collaborator

modocache commented Oct 10, 2016

Alternatively, @erg, is this the sort of CMake work you'd be interested in reviewing? 🤔

@gottesmm

This comment has been minimized.

Show comment
Hide comment
@gottesmm

gottesmm Oct 10, 2016

Member

I am going to re-review real quick.

Member

gottesmm commented Oct 10, 2016

I am going to re-review real quick.

@gottesmm

This comment has been minimized.

Show comment
Hide comment
@gottesmm

gottesmm Oct 10, 2016

Member

(btw the approval is so I can re-review)

Member

gottesmm commented Oct 10, 2016

(btw the approval is so I can re-review)

@gottesmm

This comment has been minimized.

Show comment
Hide comment
@gottesmm

gottesmm Oct 10, 2016

Member

@modocache Your commit message just states that this commit allows you to compile for Android. It does not state why your commit makes it possible to compile the static stdlib for android on macOS. Can you update that?

Member

gottesmm commented Oct 10, 2016

@modocache Your commit message just states that this commit allows you to compile for Android. It does not state why your commit makes it possible to compile the static stdlib for android on macOS. Can you update that?

@gottesmm

Overall looks good. I just have a question/2x requests (the commit msg and the assert)

Show outdated Hide outdated CMakeLists.txt
# If we're not building for the host, the cross-compiled target should be the 'primary variant'.
if("${swift_build_linux}" STREQUAL "FALSE")
set(SWIFT_PRIMARY_VARIANT_SDK_default "ANDROID")
set(SWIFT_PRIMARY_VARIANT_ARCH_default "armv7")

This comment has been minimized.

@gottesmm

gottesmm Oct 11, 2016

Member

You are deleting the primary variant SDK/Arch code here. Wouldn't this make you also build the OS X stdlib as well when compiling on OS X? Is that intended?

@gottesmm

gottesmm Oct 11, 2016

Member

You are deleting the primary variant SDK/Arch code here. Wouldn't this make you also build the OS X stdlib as well when compiling on OS X? Is that intended?

This comment has been minimized.

@modocache

modocache Oct 11, 2016

Collaborator

I mirrored what was going on with configure_sdk_windows below. I think the idea is that, right now, we limit what's built by specifying TARGET_SDKS and the like via CMake. So, in practice: no, we don't also build for macOS.

I do have a patch that addresses your concern, though, although I think you might find it "cheesy"! 😝

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff085f6..af3cc70 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -713,8 +713,18 @@ if(swift_build_android AND NOT "${SWIFT_ANDROID_NDK_PATH}" STREQUAL "")

   if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
     set(_swift_android_prebuilt_suffix "darwin-x86_64")
+
+    if(swift_build_osx)
+      set(SWIFT_PRIMARY_VARIANT_SDK_default "ANDROID")
+      set(SWIFT_PRIMARY_VARIANT_ARCH_default "armv7")
+    endif()
   elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
     set(_swift_android_prebuilt_suffix "linux-x86_64")
+
+    if(swift_build_linux)
+      set(SWIFT_PRIMARY_VARIANT_SDK_default "ANDROID")
+      set(SWIFT_PRIMARY_VARIANT_ARCH_default "armv7")
+    endif()
   else()
     message(FATAL_ERROR "A Darwin or Linux host is required to build the Swift runtime for Android")
   endif()

The icky part is that swift_build_osx and swift_build_linux are defined several lines above, so it's not immediately clear where they come from. Thoughts? 🙌

@modocache

modocache Oct 11, 2016

Collaborator

I mirrored what was going on with configure_sdk_windows below. I think the idea is that, right now, we limit what's built by specifying TARGET_SDKS and the like via CMake. So, in practice: no, we don't also build for macOS.

I do have a patch that addresses your concern, though, although I think you might find it "cheesy"! 😝

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff085f6..af3cc70 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -713,8 +713,18 @@ if(swift_build_android AND NOT "${SWIFT_ANDROID_NDK_PATH}" STREQUAL "")

   if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
     set(_swift_android_prebuilt_suffix "darwin-x86_64")
+
+    if(swift_build_osx)
+      set(SWIFT_PRIMARY_VARIANT_SDK_default "ANDROID")
+      set(SWIFT_PRIMARY_VARIANT_ARCH_default "armv7")
+    endif()
   elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
     set(_swift_android_prebuilt_suffix "linux-x86_64")
+
+    if(swift_build_linux)
+      set(SWIFT_PRIMARY_VARIANT_SDK_default "ANDROID")
+      set(SWIFT_PRIMARY_VARIANT_ARCH_default "armv7")
+    endif()
   else()
     message(FATAL_ERROR "A Darwin or Linux host is required to build the Swift runtime for Android")
   endif()

The icky part is that swift_build_osx and swift_build_linux are defined several lines above, so it's not immediately clear where they come from. Thoughts? 🙌

This comment has been minimized.

@gottesmm

gottesmm Oct 11, 2016

Member

Hmmm... In that case, what is the point of having SWIFT_PRIMARY_VARIANT_SDK?

@gottesmm

gottesmm Oct 11, 2016

Member

Hmmm... In that case, what is the point of having SWIFT_PRIMARY_VARIANT_SDK?

This comment has been minimized.

@gottesmm

gottesmm Oct 11, 2016

Member

You know what, this code has changed a bit recently, let me do a quick read through and refresh my memory.

@gottesmm

gottesmm Oct 11, 2016

Member

You know what, this code has changed a bit recently, let me do a quick read through and refresh my memory.

This comment has been minimized.

@modocache

modocache Oct 11, 2016

Collaborator

I assume your initial comment was right, and I need to set the primary variant. Or was your memory refreshed otherwise? :)

@modocache

modocache Oct 11, 2016

Collaborator

I assume your initial comment was right, and I need to set the primary variant. Or was your memory refreshed otherwise? :)

This comment has been minimized.

@gottesmm

gottesmm Oct 11, 2016

Member

Can you try building Android and tell me if it builds OS X as well? That would answer the question. I have a few other things I have to take care of today, so I need to look into this later = (.

@gottesmm

gottesmm Oct 11, 2016

Member

Can you try building Android and tell me if it builds OS X as well? That would answer the question. I have a few other things I have to take care of today, so I need to look into this later = (.

This comment has been minimized.

@modocache

modocache Oct 12, 2016

Collaborator

Ah yes, you're right. I updated the commit with the cheesy code I mention above.

@modocache

modocache Oct 12, 2016

Collaborator

Ah yes, you're right. I updated the commit with the cheesy code I mention above.

@modocache

This comment has been minimized.

Show comment
Hide comment
@modocache

modocache Oct 12, 2016

Collaborator

@swift-ci Please test

Collaborator

modocache commented Oct 12, 2016

@swift-ci Please test

@swift-ci

This comment has been minimized.

Show comment
Hide comment
@swift-ci

swift-ci Oct 12, 2016

Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 2a77408
Test requested by - @modocache

Contributor

swift-ci commented Oct 12, 2016

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 2a77408
Test requested by - @modocache

@modocache

This comment has been minimized.

Show comment
Hide comment
@modocache

modocache Oct 12, 2016

Collaborator

Wrong sha 2a774087c334b3d8faf6f39ffadb41c3166d4714. @shahmishal, is this the CI behavior you mentioned yesterday, in which force pushes to my own branches aren't parsed correctly or something?

Collaborator

modocache commented Oct 12, 2016

Wrong sha 2a774087c334b3d8faf6f39ffadb41c3166d4714. @shahmishal, is this the CI behavior you mentioned yesterday, in which force pushes to my own branches aren't parsed correctly or something?

@shahmishal

This comment has been minimized.

Show comment
Hide comment
@shahmishal

shahmishal Oct 12, 2016

Member

@modocache Yes, Please re-trigger testing

Member

shahmishal commented Oct 12, 2016

@modocache Yes, Please re-trigger testing

@swift-ci

This comment has been minimized.

Show comment
Hide comment
@swift-ci

swift-ci Oct 12, 2016

Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 2a77408
Test requested by - @modocache

Contributor

swift-ci commented Oct 12, 2016

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 2a77408
Test requested by - @modocache

@shahmishal

This comment has been minimized.

Show comment
Hide comment
@shahmishal

shahmishal Oct 12, 2016

Member

@swift-ci Please test

Member

shahmishal commented Oct 12, 2016

@swift-ci Please test

@modocache

This comment has been minimized.

Show comment
Hide comment
@modocache

modocache Oct 12, 2016

Collaborator

@erg @gottesmm The builds passed! :) What do you both think?

Collaborator

modocache commented Oct 12, 2016

@erg @gottesmm The builds passed! :) What do you both think?

@modocache

This comment has been minimized.

Show comment
Hide comment
@modocache

modocache Oct 14, 2016

Collaborator

@erg @gottesmm @jrose-apple Friendly ping! It'd be great if I could build off of these changes over the weekend. :)

Collaborator

modocache commented Oct 14, 2016

@erg @gottesmm @jrose-apple Friendly ping! It'd be great if I could build off of these changes over the weekend. :)

Show outdated Hide outdated CMakeLists.txt
[Android] Enable building static stdlib on macOS
The Swift runtime can be built for Android on Linux host machines using
the instructions in `docs/Android.md`. This commit allows a static build
of the runtime to be compiled on macOS host machines as well.

This work is inspired by @compnerd's work in enabling Windows builds
from macOS hosts. It assumes host tools are already built for macOS. It
also does not support building SDK overlays yet. I intend to support these in a
future commit.

For now, the Android runtime may be built by using the following bash
script, which simply calls CMake:

```sh

set -e
set -x

HOME_DIR="/Users/bgesiak"

APPLE_DIR="${HOME_DIR}/GitHub/apple"
BUILD_DIR="${APPLE_DIR}/build/Ninja-Release"
CMARK_SRC_DIR="${APPLE_DIR}/cmark"
CMARK_BUILD_DIR="${BUILD_DIR}/cmark-macosx-x86_64"
LLVM_SRC_DIR="${APPLE_DIR}/llvm"
LLVM_BUILD_DIR="${BUILD_DIR}/llvm-macosx-x86_64"
SWIFT_BUILD_DIR="${BUILD_DIR}/swift-macosx-x86_64"

ANDROID_NDK_DIR="${HOME_DIR}/android-ndk-r12b"
LIBICU_SRC_DIR="${APPLE_DIR}/libiconv-libicu-android"
LIBICU_BUILD_DIR="${LIBICU_SRC_DIR}/armeabi-v7a"

SWIFT_ANDROID_BUILD_DIR="${APPLE_DIR}/build/SwiftAndroid"

mkdir -p "${SWIFT_ANDROID_BUILD_DIR}"

cmake \
  -G "Ninja" \
  \
  -DCMAKE_C_COMPILER:PATH="${LLVM_BUILD_DIR}/bin/clang" \
  -DCMAKE_CXX_COMPILER:PATH="${LLVM_BUILD_DIR}/bin/clang++" \
  \
  -DSWIFT_PATH_TO_CMARK_SOURCE:PATH="${CMARK_SRC_DIR}" \
  -DSWIFT_PATH_TO_CMARK_BUILD:PATH="${CMARK_BUILD_DIR}" \
  -DSWIFT_CMARK_LIBRARY_DIR:PATH="${CMARK_BUILD_DIR}/src" \
  -DSWIFT_PATH_TO_LLVM_SOURCE:PATH="${LLVM_SRC_DIR}" \
  -DSWIFT_PATH_TO_LLVM_BUILD:PATH="${LLVM_BUILD_DIR}" \
  -DSWIFT_PATH_TO_CLANG_SOURCE:PATH="${LLVM_SRC_DIR}/tools/clang" \
  -DSWIFT_PATH_TO_CLANG_BUILD:PATH="${LLVM_BUILD_DIR}" \
  -DSWIFT_NATIVE_LLVM_TOOLS_PATH:STRING="${LLVM_BUILD_DIR}/bin" \
  -DSWIFT_NATIVE_SWIFT_TOOLS_PATH:STRING="${SWIFT_BUILD_DIR}/bin" \
  \
  -DSWIFT_ANALYZE_CODE_COVERAGE:STRING=FALSE \
  -DSWIFT_SERIALIZE_STDLIB_UNITTEST:BOOL=FALSE \
  -DSWIFT_STDLIB_SIL_DEBUGGING:BOOL=FALSE \
  -DSWIFT_CHECK_INCREMENTAL_COMPILATION:BOOL=FALSE \
  -DSWIFT_STDLIB_ENABLE_RESILIENCE:BOOL=FALSE \
  -DSWIFT_STDLIB_SIL_SERIALIZE_ALL:BOOL=TRUE \
  -DSWIFT_BUILD_PERF_TESTSUITE:BOOL=FALSE \
  -DSWIFT_BUILD_EXAMPLES:BOOL=FALSE \
  -DSWIFT_INCLUDE_TESTS:BOOL=FALSE \
  -DSWIFT_EMBED_BITCODE_SECTION:BOOL=FALSE \
  -DSWIFT_TOOLS_ENABLE_LTO:STRING= \
  -DSWIFT_AST_VERIFIER:BOOL=TRUE \
  -DSWIFT_SIL_VERIFY_ALL:BOOL=FALSE \
  -DSWIFT_RUNTIME_ENABLE_LEAK_CHECKER:BOOL=FALSE \
  \
  -DCMAKE_BUILD_TYPE:STRING=Release \
  -DLLVM_ENABLE_ASSERTIONS:BOOL=TRUE \
  -DSWIFT_STDLIB_BUILD_TYPE:STRING=Release \
  -DSWIFT_STDLIB_ASSERTIONS:BOOL=TRUE \
  -DSWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER:BOOL=TRUE \
  -DSWIFT_HOST_VARIANT=macosx \
  -DSWIFT_HOST_VARIANT_SDK=OSX \
  -DSWIFT_HOST_VARIANT_ARCH=x86_64 \
  -DSWIFT_BUILD_TOOLS:BOOL=FALSE \
  -DSWIFT_INCLUDE_TOOLS:BOOL=FALSE \
  -DSWIFT_BUILD_REMOTE_MIRROR:BOOL=FALSE \
  -DSWIFT_BUILD_DYNAMIC_STDLIB:BOOL=FALSE \
  -DSWIFT_BUILD_STATIC_STDLIB:BOOL=TRUE \
  -DSWIFT_BUILD_DYNAMIC_SDK_OVERLAY:BOOL=FALSE \
  -DSWIFT_BUILD_STATIC_SDK_OVERLAY:BOOL=FALSE \
  -DSWIFT_EXEC:STRING="${SWIFT_BUILD_DIR}/bin/swiftc" \
  \
  -DSWIFT_ENABLE_GOLD_LINKER:BOOL=TRUE \
  -DSWIFT_SDKS:STRING=ANDROID \
  -DSWIFT_ANDROID_NDK_PATH:STRING="${ANDROID_NDK_DIR}" \
  -DSWIFT_ANDROID_NDK_GCC_VERSION:STRING=4.9 \
  -DSWIFT_ANDROID_SDK_PATH:STRING="${ANDROID_NDK_DIR}/platforms/android-21/arch-arm" \
  -DSWIFT_ANDROID_ICU_UC:STRING="${LIBICU_BUILD_DIR}" \
  -DSWIFT_ANDROID_ICU_UC_INCLUDE:STRING="${LIBICU_BUILD_DIR}/icu/source/common" \
  -DSWIFT_ANDROID_ICU_I18N:STRING="${LIBICU_BUILD_DIR}" \
  -DSWIFT_ANDROID_ICU_I18N_INCLUDE:STRING="${LIBICU_BUILD_DIR}/icu/source/i18n" \
  \
  "${APPLE_DIR}/swift"

cmake --build "${APPLE_DIR}/swift" -- -j8 swift-stdlib-android-armv7
```
@jrose-apple

This comment has been minimized.

Show comment
Hide comment
@jrose-apple

jrose-apple Oct 14, 2016

Member

Seems reasonable enough to me, but since I haven't been following this one I'd still prefer to wait for @gottesmm or @erg. @compnerd's approval is reassuring though. 👍

Member

jrose-apple commented Oct 14, 2016

Seems reasonable enough to me, but since I haven't been following this one I'd still prefer to wait for @gottesmm or @erg. @compnerd's approval is reassuring though. 👍

@erg

This comment has been minimized.

Show comment
Hide comment
@erg

erg Oct 15, 2016

Contributor

@swift-ci Please test

Contributor

erg commented Oct 15, 2016

@swift-ci Please test

@swift-ci

This comment has been minimized.

Show comment
Hide comment
@swift-ci

swift-ci Oct 15, 2016

Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 37c946e
Test requested by - @erg

Contributor

swift-ci commented Oct 15, 2016

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 37c946e
Test requested by - @erg

@modocache

This comment has been minimized.

Show comment
Hide comment
@modocache

modocache Oct 15, 2016

Collaborator

The DebugInfo test failure appears unrelated.

Collaborator

modocache commented Oct 15, 2016

The DebugInfo test failure appears unrelated.

@modocache

This comment has been minimized.

Show comment
Hide comment
@modocache

modocache Oct 15, 2016

Collaborator

@swift-ci please test

Collaborator

modocache commented Oct 15, 2016

@swift-ci please test

@swift-ci

This comment has been minimized.

Show comment
Hide comment
@swift-ci

swift-ci Oct 15, 2016

Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - be5a34e
Test requested by - @modocache

Contributor

swift-ci commented Oct 15, 2016

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - be5a34e
Test requested by - @modocache

@modocache

This comment has been minimized.

Show comment
Hide comment
@modocache

modocache Oct 15, 2016

Collaborator

@swift-ci please test os x platform

Collaborator

modocache commented Oct 15, 2016

@swift-ci please test os x platform

@swift-ci

This comment has been minimized.

Show comment
Hide comment
@swift-ci

swift-ci Oct 15, 2016

Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - be5a34e
Test requested by - @modocache

Contributor

swift-ci commented Oct 15, 2016

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - be5a34e
Test requested by - @modocache

@modocache

This comment has been minimized.

Show comment
Hide comment
@modocache

modocache Oct 17, 2016

Collaborator

@swift-ci please test os x platform

Collaborator

modocache commented Oct 17, 2016

@swift-ci please test os x platform

@swift-ci

This comment has been minimized.

Show comment
Hide comment
@swift-ci

swift-ci Oct 17, 2016

Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - be5a34e
Test requested by - @modocache

Contributor

swift-ci commented Oct 17, 2016

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - be5a34e
Test requested by - @modocache

@modocache

This comment has been minimized.

Show comment
Hide comment
@modocache

modocache Oct 17, 2016

Collaborator

@swift-ci please test os x platform

Collaborator

modocache commented Oct 17, 2016

@swift-ci please test os x platform

@modocache

This comment has been minimized.

Show comment
Hide comment
@modocache

modocache Oct 17, 2016

Collaborator

@erg @gottesmm All the tests pass! I'm really hoping I can merge this this week. Any thoughts?

Collaborator

modocache commented Oct 17, 2016

@erg @gottesmm All the tests pass! I'm really hoping I can merge this this week. Any thoughts?

@gottesmm

This comment has been minimized.

Show comment
Hide comment
@gottesmm

gottesmm Oct 17, 2016

Member

@erg Can you take this one. I need to focus on semantic ARC. Let me dismiss the review.

Member

gottesmm commented Oct 17, 2016

@erg Can you take this one. I need to focus on semantic ARC. Let me dismiss the review.

The code has changed and I don't have time right now to review = (

@erg erg merged commit 23c1514 into apple:master Oct 17, 2016

4 checks passed

Swift Test Linux Platform 8722 tests run, 0 skipped, 0 failed.
Details
Swift Test Linux Platform (smoke test)
Details
Swift Test OS X Platform 43960 tests run, 0 skipped, 0 failed.
Details
Swift Test OS X Platform (smoke test)
Details

@modocache modocache deleted the modocache:macos-host-android-stdlib branch Oct 17, 2016

@modocache

This comment has been minimized.

Show comment
Hide comment
@modocache

modocache Oct 17, 2016

Collaborator

Awesome, thanks @erg!!

Collaborator

modocache commented Oct 17, 2016

Awesome, thanks @erg!!

@medampudi

This comment has been minimized.

Show comment
Hide comment
@medampudi

medampudi Mar 31, 2017

great persistent efforts @modocache thanks a lot.. moving in that direction.

medampudi commented Mar 31, 2017

great persistent efforts @modocache thanks a lot.. moving in that direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment