Skip to content

Commit

Permalink
DSO stub
Browse files Browse the repository at this point in the history
  • Loading branch information
grendello committed Jul 29, 2024
1 parent c157aed commit e3b5ff1
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 1 deletion.
1 change: 1 addition & 0 deletions build-tools/create-packs/SignList.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<ThirdParty Include="SgmlReaderDll.dll" />
<ThirdParty Include="aapt2.exe" />
<ThirdParty Include="llvm-mc.exe" />
<ThirdParty Include="llvm-objcopy.exe" />
<ThirdParty Include="llvm-strip.exe" />
<ThirdParty Include="aarch64-linux-android-ld.exe" />
<ThirdParty Include="arm-linux-androideabi-ld.exe" />
Expand Down
1 change: 1 addition & 0 deletions build-tools/installers/create-installers.targets
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
<_MSBuildFilesWin Include="$(MicrosoftAndroidSdkOutDir)binutils\bin\ld.exe" />
<_MSBuildFilesWin Include="$(MicrosoftAndroidSdkOutDir)binutils\bin\llc.exe" />
<_MSBuildFilesWin Include="$(MicrosoftAndroidSdkOutDir)binutils\bin\llvm-mc.exe" />
<_MSBuildFilesWin Include="$(MicrosoftAndroidSdkOutDir)binutils\bin\llvm-objcopy.exe" />
<_MSBuildFilesWin Include="$(MicrosoftAndroidSdkOutDir)binutils\bin\llvm-strip.exe" />
<_MSBuildFilesWin Include="$(MicrosoftAndroidSdkOutDir)binutils\bin\aarch64-linux-android-as.cmd" />
<_MSBuildFilesWin Include="$(MicrosoftAndroidSdkOutDir)binutils\bin\aarch64-linux-android-ld.cmd" />
Expand Down
1 change: 1 addition & 0 deletions build-tools/installers/unix-binutils.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<_BinUtilsFilesUnixSignAndHarden Include="$(MicrosoftAndroidSdkOutDir)$(HostOS)\binutils\bin\ld" />
<_BinUtilsFilesUnixSignAndHarden Include="$(MicrosoftAndroidSdkOutDir)$(HostOS)\binutils\bin\llc" />
<_BinUtilsFilesUnixSignAndHarden Include="$(MicrosoftAndroidSdkOutDir)$(HostOS)\binutils\bin\llvm-mc" />
<_BinUtilsFilesUnixSignAndHarden Include="$(MicrosoftAndroidSdkOutDir)$(HostOS)\binutils\bin\llvm-objcopy" />
<_BinUtilsFilesUnixSignAndHarden Include="$(MicrosoftAndroidSdkOutDir)$(HostOS)\binutils\bin\llvm-strip" />
<_BinUtilsFilesUnixSignAndHarden Include="$(MicrosoftAndroidSdkOutDir)$(HostOS)\binutils\bin\x86_64-linux-android-as" />
<_BinUtilsFilesUnixSignAndHarden Include="$(MicrosoftAndroidSdkOutDir)$(HostOS)\binutils\bin\x86_64-linux-android-ld" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Xamarin.Android.Prepare
//
partial class Configurables
{
const string BinutilsVersion = "L_18.1.6-8.0.0";
const string BinutilsVersion = "L_18.1.7-8.0.0";

const string MicrosoftOpenJDK17Version = "17.0.11";
const string MicrosoftOpenJDK17Release = "17.0.11.9";
Expand Down Expand Up @@ -174,6 +174,7 @@ public static partial class Defaults
new NDKTool (name: "ld"),
new NDKTool (name: "llc"),
new NDKTool (name: "llvm-mc"),
new NDKTool (name: "llvm-objcopy"),
new NDKTool (name: "llvm-strip"),
};
}
Expand Down
3 changes: 3 additions & 0 deletions src/native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,9 @@ add_subdirectory(pinvoke-override)

if(DEBUG_BUILD)
add_subdirectory(xamarin-debug-app-helper)
else()
# We need to build this only once per target architecture
add_subdirectory(archive-dso-stub)
endif()

add_subdirectory(monodroid)
Expand Down
23 changes: 23 additions & 0 deletions src/native/archive-dso-stub/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
set(LIB_NAME archive-dso-stub)

set(LIB_SOURCES
stub.cc
)

add_library(
${LIB_NAME}
SHARED
${LIB_SOURCES}
)

target_compile_options(
${LIB_NAME}
PRIVATE
${XA_COMMON_CXX_ARGS} -nostdlib -fno-exceptions -fno-rtti
)

target_link_options(
${LIB_NAME}
PRIVATE
${XA_COMMON_CXX_LINKER_ARGS} -nostdlib -fno-exceptions -fno-rtti -s
)
2 changes: 2 additions & 0 deletions src/native/archive-dso-stub/stub.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[[gnu::visibility("default")]]
bool i_am_a_dummy_stub = true;

0 comments on commit e3b5ff1

Please sign in to comment.