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
117
117
set (SWIFT_NATIVE_SWIFT_TOOLS_PATH "" CACHE STRING
118
118
"Path to the directory that contains Swift tools that are executable on the build machine" )
119
119
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" )
120
122
# The following only works with the Ninja generator in CMake >= 3.0.
121
123
set (SWIFT_PARALLEL_COMPILE_JOBS "" CACHE STRING
122
124
"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
102
102
103
103
if ("${sdk} " STREQUAL "ANDROID" )
104
104
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" )
107
107
endif ()
108
108
109
109
set ("${result_var_name} " "${result} " PARENT_SCOPE )
@@ -163,6 +163,11 @@ function(_add_variant_link_flags
163
163
164
164
if ("${sdk} " STREQUAL "LINUX" )
165
165
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" )
166
171
else ()
167
172
list (APPEND result "-lobjc" )
168
173
endif ()
Original file line number Diff line number Diff line change 1083
1083
if [[ " $DISTCC " ]] ; then
1084
1084
BUILD_ARGS=" ${BUILD_ARGS} -j $( distcc -j) "
1085
1085
fi
1086
- BUILD_ARGS=" ${BUILD_ARGS} -j1 "
1086
+ BUILD_ARGS=" ${BUILD_ARGS} -j2 "
1087
1087
1088
1088
case " ${CMAKE_GENERATOR} " in
1089
1089
Ninja)
You can’t perform that action at this time.
0 commit comments