Skip to content

Commit 94cb32e

Browse files
authored
[monodroid] Fix ld build error on Nightly Builds. (#7925)
We are seeing the following build error on Nightly builds: ld : error : undefined symbol: vtable for __cxxabiv1::__function_type_info [/Users/builder/azdo/_work/3/s/xamarin-android/src/monodroid/monodroid.csproj] clang++ : error : linker command failed with exit code 1 (use -v to see invocation) [/Users/builder/azdo/_work/3/s/xamarin-android/src/monodroid/monodroid.csproj] ld : error : undefined symbol: vtable for __cxxabiv1::__function_type_info [/Users/builder/azdo/_work/3/s/xamarin-android/src/monodroid/monodroid.csproj] clang++ : error : linker command failed with exit code 1 (use -v to see invocation) [/Users/builder/azdo/_work/3/s/xamarin-android/src/monodroid/monodroid.csproj] We are not sure why `ANALYZERS_ENABLED` needs to be set in this manner to prevent the linker error, but setting `ANALYZERS_ENABLED` in this manner prevents the linker error. :-)
1 parent 9766e87 commit 94cb32e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/monodroid/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ option(ENABLE_CLANG_UBSAN "Enable the clang UndefinedBehaviorSanitizer support"
4040

4141
if(ENABLE_CLANG_ASAN OR ENABLE_CLANG_UBSAN)
4242
set(STRIP_DEBUG_DEFAULT OFF)
43+
set(ANALYZERS_ENABLED ON)
4344
else()
4445
set(STRIP_DEBUG_DEFAULT ON)
46+
set(ANALYZERS_ENABLED OFF)
4547
endif()
4648

4749
option(ENABLE_NET "Enable compilation for .NET 6+" OFF)
@@ -722,7 +724,7 @@ target_link_libraries(
722724
${LINK_LIBS} xamarin-app
723725
)
724726

725-
if(ANDROID AND ENABLE_NET)
727+
if(ANDROID AND ENABLE_NET AND (NOT ANALYZERS_ENABLED))
726728
add_library(
727729
c
728730
SHARED ${XAMARIN_STUB_LIB_SOURCES}

0 commit comments

Comments
 (0)