Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
<DefaultMonoSubsets Condition="'$(MonoEnableLLVM)' == 'true' and '$(MonoLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(MonoAOTEnableLLVM)' == 'true' and '$(MonoAOTLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(TargetOS)' == 'Browser'">$(DefaultMonoSubsets)mono.wasmruntime+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(TargetOS)' == 'Android'">$(DefaultMonoSubsets)mono.aotprofiler+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(MonoCrossAOTTargetOS)' != ''">$(DefaultMonoSubsets)mono.aotcross+</DefaultMonoSubsets>
<DefaultMonoSubsets>$(DefaultMonoSubsets)mono.runtime+mono.corelib+mono.packages</DefaultMonoSubsets>

Expand Down Expand Up @@ -128,6 +129,7 @@
<SubsetName Include="Mono" Description="The Mono runtime and CoreLib. Equivalent to: $(DefaultMonoSubsets)" />
<SubsetName Include="Mono.Runtime" Description="The Mono .NET runtime." />
<SubsetName Include="Mono.AotCross" Description="The cross-compiler runtime for Mono AOT." />
<SubsetName Include="Mono.AotProfiler" Description="The profiler for Mono AOT." />
<SubsetName Include="Mono.CoreLib" Description="The managed System.Private.CoreLib library for Mono." />
<SubsetName Include="Mono.Packages" Description="The projects that produce NuGet packages for the Mono runtime." />
<SubsetName Include="Mono.WasmRuntime" Description="The WebAssembly runtime." />
Expand Down Expand Up @@ -334,6 +336,10 @@
<ProjectToBuild Include="$(MonoProjectRoot)wasm\wasm.proj" Category="mono" />
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+mono.aotprofiler+'))">
<ProjectToBuild Include="$(MonoProjectRoot)nuget\Microsoft.NET.Runtime.MonoAOTCompiler.Profiler.Mono\Microsoft.NET.Runtime.MonoAOTCompiler.Profiler.Mono.pkgproj" Category="mono" />
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+libs.pretest+'))">
<ProjectToBuild Include="$(LibrariesProjectRoot)pretest.proj" Category="libs" />
</ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/mono/mono.proj
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,9 @@
<_MonoRuntimeArtifacts Condition="'$(TargetsBrowser)' == 'true' and '$(BuildMonoAOTCrossCompilerOnly)' != 'true'" Include="$(MonoObjDir)out\lib\libmono-profiler-aot.a">
<Destination>$(RuntimeBinDir)libmono-profiler-aot.a</Destination>
</_MonoRuntimeArtifacts>
<_MonoRuntimeArtifacts Condition="'$(TargetsAndroid)' == 'true' and '$(BuildMonoAOTCrossCompilerOnly)' != 'true'" Include="$(MonoObjDir)out\lib\libmono-profiler-aot.so">
<Destination>$(RuntimeBinDir)\..\..\monoprofiler\$(PlatformConfigPathPart)\libmono-profiler-aot.so</Destination>
</_MonoRuntimeArtifacts>
<_MonoICorDebugArtifacts Condition="'$(MonoMsCorDbi)' == 'true'" Include="$(MonoObjDir)out\lib\$(LibPrefix)dbgshim$(LibSuffix)">
<Destination>$(RuntimeBinDir)$(LibPrefix)dbgshim$(LibSuffix)</Destination>
</_MonoICorDebugArtifacts>
Expand Down
7 changes: 7 additions & 0 deletions src/mono/mono/profiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ if(NOT DISABLE_LIBS)
endif()
endif()

if(HOST_ANDROID)
add_library(mono-profiler-aot SHARED aot.c helper.c)
target_compile_definitions(mono-profiler-aot PRIVATE -DMONO_DLL_EXPORT)
target_link_libraries(mono-profiler-aot monosgen-shared eglib_objects log monoapi)
install(TARGETS mono-profiler-aot LIBRARY)
endif()

if(NOT HOST_WASI)
add_library(mono-profiler-aot-static STATIC aot.c helper.c)
target_link_libraries(mono-profiler-aot-static monoapi)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project DefaultTargets="Pack">
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />

<PropertyGroup>
<GeneratePackage>true</GeneratePackage>
<IncludeSymbolsInPackage>true</IncludeSymbolsInPackage>
<PackageDescription>Provides AOT profiler for Mono runtime</PackageDescription>
<ApplyMetaPackages>false</ApplyMetaPackages>
<IsShipping>false</IsShipping>
<IdPrefix>transport.$(PackageRID).</IdPrefix>
<Id>Microsoft.NET.Runtime.MonoAOTCompiler.Profiler.Mono</Id>
</PropertyGroup>

<ItemGroup>
<PackageFile Include="$(RepoRoot)\artifacts\bin\monoprofiler\Android.$(TargetArchitecture).$(Configuration)\libmono-profiler-aot.so" TargetPath="runtimes\$(PackageRID)\native\lib\%(Filename)%(Extension)" SkipPackageFileCheck="true" />
</ItemGroup>

<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
</Project>