Skip to content

Commit c3555ad

Browse files
authored
Build only Debug configuration of libxamarin-debug-app-helper.so (#3890)
`libxamarin-debug-app-helper.so` is a shared library used only for Debug Xamarin.Android applications to set up the debugging environment, amongst others to copy the fast-deployed shared libraries from the override directories to an internal location where we're allowed to use `dlopen` to load the DSOs. The library used to be built twice (like our runtime), but unlike the runtime it was copied to the same location and, with Release being built second, the release version replaced the debug one resulting in a library that does not include the necessary code to set up the scenario described above. Fix the issue by building the library only in Debug configuration.
1 parent fbb3342 commit c3555ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/monodroid/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ endif()
270270
set(XAMARIN_APP_STUB_SOURCES ${SOURCES_DIR}/application_dso_stub.cc)
271271
add_library(xamarin-app SHARED ${XAMARIN_APP_STUB_SOURCES})
272272

273-
if(NOT WIN32 AND NOT MINGW)
273+
if(NOT WIN32 AND NOT MINGW AND CMAKE_BUILD_TYPE STREQUAL Debug)
274274
set(XAMARIN_DEBUG_APP_HELPER_SOURCES
275275
${SOURCES_DIR}/basic-android-system.cc
276276
${SOURCES_DIR}/basic-utilities.cc
@@ -325,6 +325,6 @@ endif()
325325

326326
target_link_libraries(${MONO_ANDROID_LIB} ${LINK_LIBS} xamarin-app)
327327

328-
if(NOT WIN32 AND NOT MINGW)
328+
if(NOT WIN32 AND NOT MINGW AND CMAKE_BUILD_TYPE STREQUAL Debug)
329329
target_link_libraries(xamarin-debug-app-helper ${DEBUG_HELPER_LINK_LIBS})
330330
endif()

0 commit comments

Comments
 (0)