File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,8 @@ set(SWIFT_NATIVE_CLANG_TOOLS_PATH "" CACHE STRING
117117set (SWIFT_NATIVE_SWIFT_TOOLS_PATH "" CACHE STRING
118118 "Path to the directory that contains Swift tools that are executable on the build machine" )
119119
120+ set (SWIFT_ANDROID_NDK_PATH "/home/zhuowei/ndk" CACHE STRING
121+ "Path to the directory that contains the Android NDK tools that are executable on the build machine" )
120122# The following only works with the Ninja generator in CMake >= 3.0.
121123set (SWIFT_PARALLEL_COMPILE_JOBS "" CACHE STRING
122124 "Define the maximum number of concurrent compilation jobs." )
Original file line number Diff line number Diff line change @@ -102,8 +102,8 @@ function(_add_variant_c_compile_flags
102102
103103 if ("${sdk} " STREQUAL "ANDROID" )
104104 list (APPEND result
105- "-I/home/zhuowei/ndk /sources/cxx-stl/llvm-libc++/libcxx/include"
106- "-I/home/zhuowei/ndk /sources/android/support/include" )
105+ "-I${SWIFT_ANDROID_NDK_PATH} /sources/cxx-stl/llvm-libc++/libcxx/include"
106+ "-I${SWIFT_ANDROID_NDK_PATH} /sources/android/support/include" )
107107 endif ()
108108
109109 set ("${result_var_name} " "${result} " PARENT_SCOPE )
@@ -163,6 +163,11 @@ function(_add_variant_link_flags
163163
164164 if ("${sdk} " STREQUAL "LINUX" )
165165 list (APPEND result "-lpthread" "-ldl" )
166+ elseif ("${sdk} " STREQUAL "ANDROID" )
167+ list (APPEND result
168+ "-ldl"
169+ "-L${SWIFT_ANDROID_NDK_PATH} /toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.8/thumb"
170+ "${SWIFT_ANDROID_NDK_PATH} /sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/thumb/libc++_shared.so" )
166171 else ()
167172 list (APPEND result "-lobjc" )
168173 endif ()
Original file line number Diff line number Diff line change 10831083if [[ " $DISTCC " ]] ; then
10841084 BUILD_ARGS=" ${BUILD_ARGS} -j $( distcc -j) "
10851085fi
1086- BUILD_ARGS=" ${BUILD_ARGS} -j1 "
1086+ BUILD_ARGS=" ${BUILD_ARGS} -j2 "
10871087
10881088case " ${CMAKE_GENERATOR} " in
10891089 Ninja)
You can’t perform that action at this time.
0 commit comments