Skip to content

Commit 35686dc

Browse files
authored
[android-toolchain] Use Android NDK r14b. (#626)
A "funny" thing happened when [attempting to build][0] 84d4230: building the `armeabi` binaries resulted in a Segmentation fault *within the compiler*: ../../doltlibtool --tag=CC ... clang38: error: unable to execute command: Segmentation fault: 11 clang38: error: clang frontend command failed due to signal (use -v to see invocation) ... Building mono for armeabi is *crashing the compiler*. (This *might* have been introduced in 27a20f0; it's hard to say as I aborted the 27a20f0 build in order to get the 84d4230 build done sooner...) Fix the compiler crash by upgrading the Android NDK toolchain from r11c to r14b. [0]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/419/consoleText
1 parent fb16f4f commit 35686dc

File tree

6 files changed

+11
-74
lines changed

6 files changed

+11
-74
lines changed

build-tools/android-toolchain/android-toolchain.projitems

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<AntUri Condition=" '$(AntUri)' == '' ">http://archive.apache.org/dist/ant/binaries</AntUri>
66
</PropertyGroup>
77
<ItemGroup>
8-
<AndroidNdkItem Include="android-ndk-r11c-linux-x86_64.zip">
8+
<AndroidNdkItem Include="android-ndk-r14b-linux-x86_64.zip">
99
<HostOS>Linux</HostOS>
1010
</AndroidNdkItem>
1111
<!--
@@ -27,7 +27,7 @@
2727
<HostOS>Linux</HostOS>
2828
<DestDir>emulator</DestDir>
2929
</AndroidSdkItem>
30-
<AndroidNdkItem Include="android-ndk-r11c-darwin-x86_64.zip">
30+
<AndroidNdkItem Include="android-ndk-r14b-darwin-x86_64.zip">
3131
<HostOS>Darwin</HostOS>
3232
</AndroidNdkItem>
3333
<AndroidSdkItem Include="build-tools_r$(XABuildToolsVersion)-macosx.zip">
@@ -114,19 +114,19 @@
114114
</ItemGroup>
115115
<ItemGroup>
116116
<_NdkToolchain Include="arm-linux-androideabi-clang" Condition="$(AndroidSupportedTargetJitAbisForConditionalChecks.Contains(':armeabi:')) Or $(AndroidSupportedTargetJitAbisForConditionalChecks.Contains(':armeabi-v7a:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-armeabi:'))">
117-
<Platform>android-4</Platform>
117+
<Platform>9</Platform>
118118
<Arch>arm</Arch>
119119
</_NdkToolchain>
120120
<_NdkToolchain Include="aarch64-linux-android-clang" Condition="$(AndroidSupportedTargetJitAbisForConditionalChecks.Contains(':arm64-v8a:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-arm64:'))">
121-
<Platform>android-21</Platform>
121+
<Platform>21</Platform>
122122
<Arch>arm64</Arch>
123123
</_NdkToolchain>
124124
<_NdkToolchain Include="x86-clang" Condition="$(AndroidSupportedTargetJitAbisForConditionalChecks.Contains(':x86:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-x86:'))">
125-
<Platform>android-9</Platform>
125+
<Platform>9</Platform>
126126
<Arch>x86</Arch>
127127
</_NdkToolchain>
128128
<_NdkToolchain Include="x86_64-clang" Condition="$(AndroidSupportedTargetJitAbisForConditionalChecks.Contains(':x86_64:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-x86_64:'))">
129-
<Platform>android-21</Platform>
129+
<Platform>21</Platform>
130130
<Arch>x86_64</Arch>
131131
</_NdkToolchain>
132132
</ItemGroup>

build-tools/android-toolchain/android-toolchain.targets

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@
9595
Inputs="$(AndroidToolchainDirectory)\ndk\.stamp-ndk"
9696
Outputs="@(_NdkToolchain->'$(AndroidToolchainDirectory)\toolchains\%(Identity)\AndroidVersion.txt')">
9797
<PropertyGroup>
98-
<_Script>$(AndroidToolchainDirectory)\ndk\build\tools\make-standalone-toolchain.sh</_Script>
99-
<_Install>@(_NdkToolchain->'$(AndroidToolchainDirectory)\toolchains\%(Identity)')</_Install>
98+
<_Script>$(AndroidToolchainDirectory)\ndk\build\tools\make_standalone_toolchain.py</_Script>
10099
</PropertyGroup>
101-
<Exec Command="bash &quot;$(_Script)&quot; --platform=%(_NdkToolchain.Platform) &quot;--install-dir=$(_Install)&quot; --arch=%(_NdkToolchain.Arch) --toolchain=%(_NdkToolchain.Identity)" />
100+
<RemoveDir Directories="@(_NdkToolchain->'$(AndroidToolchainDirectory)\toolchains\%(Identity)')" />
101+
<Exec Command="python &quot;$(_Script)&quot; -v --api %(_NdkToolchain.Platform) --install-dir &quot;$(AndroidToolchainDirectory)\toolchains\%(_NdkToolchain.Identity)&quot; --arch %(_NdkToolchain.Arch)" />
102102
<Touch
103103
Files="@(_NdkToolchain->'$(AndroidToolchainDirectory)\toolchains\%(Identity)\AndroidVersion.txt')"
104104
AlwaysCreate="False"

src/monodroid/jni/Android.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ LOCAL_CFLAGS = $(COMMON_CFLAGS) \
1515
-D_REENTRANT -DPLATFORM_ANDROID -DANDROID -DLINUX -Dlinux -D__linux_ \
1616
-DHAVE_CONFIG_H -DJI_DLL_EXPORT -DMONO_DLL_EXPORT \
1717
-I$(topdir)/libmonodroid/zip -I$(BUILDDIR)/include -I$(BUILDDIR)/include/eglib \
18-
-mandroid \
1918
-fno-strict-aliasing \
2019
-ffunction-sections \
2120
-fomit-frame-pointer \

src/sqlite-xamarin/src-jni/Android.mk

Lines changed: 0 additions & 61 deletions
This file was deleted.

src/sqlite-xamarin/src-jni/Application.mk

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/sqlite-xamarin/src/main/jni/Android.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ LOCAL_SRC_FILES := $(common_src_files)
4545

4646
LOCAL_CFLAGS += $(device_sqlite_flags)
4747

48-
LOCAL_SHARED_LIBRARIES := libdl
48+
LOCAL_EXPORT_LDLIBS := -ldl
4949

5050
LOCAL_MODULE:= libsqlite3_xamarin
5151

5252
LOCAL_C_INCLUDES += $(call include-path-for, system-core)/cutils
5353

54-
LOCAL_SHARED_LIBRARIES += liblog
54+
LOCAL_EXPORT_LDLIBS += -llog
5555

5656
# include android specific methods
5757
#LOCAL_WHOLE_STATIC_LIBRARIES := libsqlite3_xamarin

0 commit comments

Comments
 (0)