Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eng/liveBuilds.targets2
-rw-r--r--eng/pipelines/common/global-build-job.yml8
-rw-r--r--eng/pipelines/mono/templates/build-job.yml12
-rw-r--r--eng/pipelines/runtime-staging.yml2
-rw-r--r--src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props12
-rw-r--r--src/mono/mono.proj38
-rw-r--r--src/mono/mono/mini/CMakeLists.txt41
7 files changed, 112 insertions, 3 deletions
diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets
index 01a0c6aac67..fb05c25a395 100644
--- a/eng/liveBuilds.targets
+++ b/eng/liveBuilds.targets
@@ -109,6 +109,8 @@
<IsNative>true</IsNative>
</RuntimeFiles>
+ <FrameworkReleaseFiles Condition="'$(TargetsMacCatalyst)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'" Include="$(MonoArtifactsPath)\Mono.release.framework\*.*" />
+ <FrameworkDebugFiles Condition="'$(TargetsMacCatalyst)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'" Include="$(MonoArtifactsPath)\Mono.debug.framework\*.*" />
<MonoIncludeFiles Condition="'$(TargetsMobile)' == 'true'"
Include="$(MonoArtifactsPath)\include\**\*.*" />
</ItemGroup>
diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml
index 96c116eb872..84f1786bd21 100644
--- a/eng/pipelines/common/global-build-job.yml
+++ b/eng/pipelines/common/global-build-job.yml
@@ -83,6 +83,12 @@ jobs:
${{ if ne(parameters.isOfficialBuild, true) }}:
value: ''
+ - name: _buildDarwinFrameworksParameter
+ ${{ if in(parameters.osGroup, 'iOS', 'tvOS', 'MacCatalyst')}}:
+ value: /p:BuildDarwinFrameworks=true
+ ${{ if notin(parameters.osGroup, 'iOS', 'tvOS', 'MacCatalyst')}}:
+ value: ''
+
- name: _richCodeNavigationParam
${{ if eq(parameters.enableRichCodeNavigation, true) }}:
value: /p:EnableRichCodeNavigation=true
@@ -134,7 +140,7 @@ jobs:
displayName: Install native dependencies
# Build
- - script: $(_sclEnableCommand) $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_crossBuildPropertyArg) $(_cxx11Parameter) $(_richCodeNavigationParam)
+ - script: $(_sclEnableCommand) $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_crossBuildPropertyArg) $(_cxx11Parameter) $(_richCodeNavigationParam) $(_buildDarwinFrameworksParameter)
displayName: Build product
${{ if eq(parameters.useContinueOnErrorDuringBuild, true) }}:
continueOnError: ${{ parameters.shouldContinueOnError }}
diff --git a/eng/pipelines/mono/templates/build-job.yml b/eng/pipelines/mono/templates/build-job.yml
index ef9af237168..bdb15a09a66 100644
--- a/eng/pipelines/mono/templates/build-job.yml
+++ b/eng/pipelines/mono/templates/build-job.yml
@@ -63,6 +63,8 @@ jobs:
value: ''
- name: msCorDbi
value: '+mono.mscordbi'
+ - name: darwinFrameworks
+ value: ''
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- name: officialBuildIdArg
value: '/p:officialBuildId=$(Build.BuildNumber)'
@@ -76,15 +78,23 @@ jobs:
- ${{ if eq(parameters.osGroup, 'tvOS') }}:
- name: osOverride
value: -os tvOS
+ - name: darwinFrameworks
+ value: /p:BuildDarwinFrameworks=true
- ${{ if eq(parameters.osGroup, 'tvOSSimulator') }}:
- name: osOverride
value: -os tvOSSimulator
+ - name: darwinFrameworks
+ value: /p:BuildDarwinFrameworks=true
- ${{ if eq(parameters.osGroup, 'iOS') }}:
- name: osOverride
value: -os iOS
+ - name: darwinFrameworks
+ value: /p:BuildDarwinFrameworks=true
- ${{ if eq(parameters.osGroup, 'iOSSimulator') }}:
- name: osOverride
value: -os iOSSimulator
+ - name: darwinFrameworks
+ value: /p:BuildDarwinFrameworks=true
- ${{ if eq(parameters.osGroup, 'Android') }}:
- name: osOverride
value: -os Android
@@ -136,7 +146,7 @@ jobs:
# Build
- ${{ if ne(parameters.osGroup, 'windows') }}:
- - script: ./build$(scriptExt) -subset mono$(msCorDbi) -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter)
+ - script: ./build$(scriptExt) -subset mono$(msCorDbi) -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) $(darwinFrameworks)
displayName: Build product
- ${{ if eq(parameters.osGroup, 'windows') }}:
- script: build$(scriptExt) -subset mono$(msCorDbi) -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter)
diff --git a/eng/pipelines/runtime-staging.yml b/eng/pipelines/runtime-staging.yml
index 666641354bf..f58caca2899 100644
--- a/eng/pipelines/runtime-staging.yml
+++ b/eng/pipelines/runtime-staging.yml
@@ -119,7 +119,7 @@ jobs:
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono
- buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunAOTCompilation=true /p:MonoForceInterpreter=true
+ buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:RunAOTCompilation=true /p:MonoForceInterpreter=true /p:BuildDarwinFrameworks=true
timeoutInMinutes: 180
condition: >-
or(
diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props
index 4eea2cf850f..28ac4374be2 100644
--- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props
+++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props
@@ -70,6 +70,18 @@
<TargetPath>runtimes/$(RuntimeIdentifier)/native/include/%(RecursiveDir)</TargetPath>
</RuntimeFiles>
+ <RuntimeFiles Condition="'$(TargetsMacCatalyst)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'"
+ Include="@(FrameworkReleaseFiles)"
+ ExcludeFromDataFiles="true">
+ <TargetPath>runtimes/$(RuntimeIdentifier)/native/Mono.release.framework/%(RecursiveDir)</TargetPath>
+ </RuntimeFiles>
+
+ <RuntimeFiles Condition="'$(TargetsMacCatalyst)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'"
+ Include="@(FrameworkDebugFiles)"
+ ExcludeFromDataFiles="true">
+ <TargetPath>runtimes/$(RuntimeIdentifier)/native/Mono.debug.framework/%(RecursiveDir)</TargetPath>
+ </RuntimeFiles>
+
<RuntimeFiles Condition="'$(RuntimeFlavor)' == 'mono'"
Include="$(MonoArtifactsPath)\build\**\*.*"
ExcludeFromDataFiles="true">
diff --git a/src/mono/mono.proj b/src/mono/mono.proj
index c26eb9f4e2e..cc9fc41b546 100644
--- a/src/mono/mono.proj
+++ b/src/mono/mono.proj
@@ -198,6 +198,7 @@
<_MonoCMakeArgs Include="-DCMAKE_BUILD_TYPE=$(Configuration)"/>
<_MonoCMakeArgs Condition="'$(CMakeArgs)' != ''" Include="$(CMakeArgs)"/>
<_MonoCMakeArgs Condition="'$(MonoEnableLLVM)' == 'true'" Include="-DLLVM_PREFIX=$(MonoLLVMDir.TrimEnd('\/'))" />
+ <_MonoCMakeArgs Condition="'$(BuildDarwinFrameworks)' == 'true'" Include="-DBUILD_DARWIN_FRAMEWORKS=1" />
<_MonoCMakeArgs Include="-DGC_SUSPEND=$(MonoThreadSuspend)" />
<_MonoCMakeArgs Include="-DMONO_LIB_NAME=$(MonoLibName)" />
<_MonoCMakeArgs Include="-DMONO_SHARED_LIB_NAME=$(MonoSharedLibName)" />
@@ -508,6 +509,7 @@
<ItemGroup>
<FilesToStrip Include="$(_MonoRuntimeFilePath)" />
<FilesToStrip Include="$([System.IO.Directory]::GetParent($(_MonoRuntimeFilePath)))\libmono-component-*$(SharedLibExt)" />
+ <FilesToStrip Include="$([System.IO.Directory]::GetParent($(_MonoRuntimeFilePath)))\Mono*framework\**\Mono*" Exclude="$([System.IO.Directory]::GetParent($(_MonoRuntimeFilePath)))\Mono*framework\**\*.dwarf" />
</ItemGroup>
<Message Condition="'$(BuildMonoAOTCrossCompilerOnly)' != 'true' and ($([MSBuild]::IsOSPlatform('OSX')) or $([MSBuild]::IsOSPlatform('Linux')))" Text="Stripping debug symbols from %(FilesToStrip.Identity)" Importance="High"/>
<Exec Condition="!$([System.String]::Copy(%(FilesToStrip.Identity)).EndsWith('.a')) and '$(BuildMonoAOTCrossCompilerOnly)' != 'true' and ('$(TargetsOSX)' == 'true' or '$(TargetsMacCatalyst)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true')" Command="dsymutil --flat --minimize %(FilesToStrip.Identity)" IgnoreStandardErrorWarningFormat="true" WorkingDirectory="$(MonoObjDir)"/>
@@ -773,6 +775,42 @@
<Destination>$(RuntimeBinDir)cross\$(PackageRID)\opt$(ExeExt)</Destination>
</_MonoRuntimeArtifacts>
<_MonoIncludeArtifacts Include="$(MonoObjDir)out\include\**" />
+ <_MonoRuntimeArtifacts Condition="'$(MonoComponentsStatic)' != 'true' and Exists('$(MonoObjDir)out\lib\Mono.release.framework')" Include="@(_MonoRuntimeComponentsSharedFilePath)">
+ <Destination>$(RuntimeBinDir)\Mono.release.framework\%(_MonoRuntimeComponentsSharedFilePath.Filename)%(_MonoRuntimeComponentsSharedFilePath.Extension)</Destination>
+ </_MonoRuntimeArtifacts>
+ <_MonoRuntimeArtifacts Condition="Exists('$(MonoObjDir)out\lib\Mono.release.framework') and !Exists('$(MonoObjDir)out\lib\Mono.release.framework\Versions')" Include="$(MonoObjDir)out\lib\Mono.release.framework\Mono.release">
+ <Destination>$(RuntimeBinDir)\Mono.release.framework\Mono</Destination>
+ </_MonoRuntimeArtifacts>
+ <_MonoRuntimeArtifacts Condition="Exists('$(MonoObjDir)out\lib\Mono.release.framework') and Exists('$(MonoObjDir)out\lib\Mono.release.framework\Versions')" Include="$(MonoObjDir)out\lib\Mono.release.framework\Versions\Current\Mono.release">
+ <Destination>$(RuntimeBinDir)\Mono.release.framework\Mono</Destination>
+ </_MonoRuntimeArtifacts>
+ <_MonoRuntimeArtifacts Condition="Exists('$(MonoObjDir)out\lib\Mono.release.framework')" Include="$(MonoObjDir)out\lib\Mono.release.framework\Mono.release.dwarf">
+ <Destination>$(RuntimeBinDir)\Mono.release.framework\Mono.dwarf</Destination>
+ </_MonoRuntimeArtifacts>
+ <_MonoRuntimeArtifacts Condition="'$(MonoComponentsStatic)' != 'true' and Exists('$(MonoObjDir)out\lib\Mono.debug.framework')" Include="@(_MonoRuntimeComponentsSharedFilePath)">
+ <Destination>$(RuntimeBinDir)\Mono.debug.framework\%(_MonoRuntimeComponentsSharedFilePath.Filename)%(_MonoRuntimeComponentsSharedFilePath.Extension)</Destination>
+ </_MonoRuntimeArtifacts>
+ <_MonoRuntimeArtifacts Condition="Exists('$(MonoObjDir)out\lib\Mono.debug.framework') and !Exists('$(MonoObjDir)out\lib\Mono.debug.framework\Versions')" Include="$(MonoObjDir)out\lib\Mono.debug.framework\Mono.debug">
+ <Destination>$(RuntimeBinDir)\Mono.debug.framework\Mono</Destination>
+ </_MonoRuntimeArtifacts>
+ <_MonoRuntimeArtifacts Condition="Exists('$(MonoObjDir)out\lib\Mono.debug.framework') and Exists('$(MonoObjDir)out\lib\Mono.debug.framework\Versions')" Include="$(MonoObjDir)out\lib\Mono.debug.framework\Versions\Current\Mono.debug">
+ <Destination>$(RuntimeBinDir)\Mono.debug.framework\Mono</Destination>
+ </_MonoRuntimeArtifacts>
+ <_MonoRuntimeArtifacts Condition="Exists('$(MonoObjDir)out\lib\Mono.debug.framework')" Include="$(MonoObjDir)out\lib\Mono.debug.framework\Mono.debug.dwarf">
+ <Destination>$(RuntimeBinDir)\Mono.debug.framework\Mono.dwarf</Destination>
+ </_MonoRuntimeArtifacts>
+ <_MonoRuntimeArtifacts Condition="Exists('$(MonoObjDir)out\lib\Mono.release.framework') and !Exists('$(MonoObjDir)out\lib\Mono.release.framework\Versions')" Include="$(MonoObjDir)out\lib\Mono.release.framework\Info.plist">
+ <Destination>$(RuntimeBinDir)\Mono.release.framework\Info.plist</Destination>
+ </_MonoRuntimeArtifacts>
+ <_MonoRuntimeArtifacts Condition="Exists('$(MonoObjDir)out\lib\Mono.release.framework') and Exists('$(MonoObjDir)out\lib\Mono.release.framework\Versions')" Include="$(MonoObjDir)out\lib\Mono.release.framework\Versions\Current\Resources\Info.plist">
+ <Destination>$(RuntimeBinDir)\Mono.release.framework\Info.plist</Destination>
+ </_MonoRuntimeArtifacts>
+ <_MonoRuntimeArtifacts Condition="Exists('$(MonoObjDir)out\lib\Mono.debug.framework') and !Exists('$(MonoObjDir)out\lib\Mono.debug.framework\Versions')" Include="$(MonoObjDir)out\lib\Mono.debug.framework\Info.plist">
+ <Destination>$(RuntimeBinDir)\Mono.debug.framework\Info.plist</Destination>
+ </_MonoRuntimeArtifacts>
+ <_MonoRuntimeArtifacts Condition="Exists('$(MonoObjDir)out\lib\Mono.debug.framework') and Exists('$(MonoObjDir)out\lib\Mono.debug.framework\Versions')" Include="$(MonoObjDir)out\lib\Mono.debug.framework\Versions\Current\Resources\Info.plist">
+ <Destination>$(RuntimeBinDir)\Mono.debug.framework\Info.plist</Destination>
+ </_MonoRuntimeArtifacts>
<_MonoRuntimeBuildArtifacts Include="$(MonoObjDir)\build\**" />
<_MonoRuntimeArtifacts Condition="'$(_MonoIncludeInterpStaticFiles)' == 'true'" Include="$(MonoObjDir)out\lib\libmono-ee-interp.a">
<Destination>$(RuntimeBinDir)libmono-ee-interp.a</Destination>
diff --git a/src/mono/mono/mini/CMakeLists.txt b/src/mono/mono/mini/CMakeLists.txt
index c66362a55f3..841bff5f566 100644
--- a/src/mono/mono/mini/CMakeLists.txt
+++ b/src/mono/mono/mini/CMakeLists.txt
@@ -381,6 +381,47 @@ if(NOT DISABLE_SHARED_LIBS)
add_library(monosgen-shared-dac SHARED "mini-windows-dlldac.c")
set_target_properties(monosgen-shared-dac PROPERTIES OUTPUT_NAME ${MONO_SHARED_LIB_NAME}-dac)
endif()
+
+ if(BUILD_DARWIN_FRAMEWORKS)
+ if(TARGET_DARWIN)
+ # In cmake, you cannot have list entries which contain a space or semicolon - those are considered
+ # record separators (i.e. a list of list(APPEND foo "a" "b;c" "d e") is a five entry list of values
+ # a, b, c, d and e.
+ # So, in order to treat the components lists as single list entries, swap out the ; character
+ # for a temporary replacement character, allowing the full lists to be treated as single entries
+ string(REPLACE ";" "*" mono-components-objects-nowhitespace "${mono-components-objects}")
+ string(REPLACE ";" "*" mono-components-stub-objects-nowhitespace "${mono-components-stub-objects}")
+ list(APPEND FrameworkConfig Mono.debug Mono.release)
+ list(APPEND ComponentsObjects "${mono-components-objects-nowhitespace}" "${mono-components-stub-objects-nowhitespace}")
+ foreach(frameworkconfig componentsobjects IN ZIP_LISTS FrameworkConfig ComponentsObjects)
+ if("${componentsobjects}" STREQUAL "")
+ #components list is empty, use stubs instead
+ set(componentsobjects "${mono-components-stub-objects-nowhitespace}")
+ endif()
+ add_library(${frameworkconfig} SHARED $<TARGET_OBJECTS:monosgen-objects>)
+ target_compile_definitions(${frameworkconfig} PRIVATE -DMONO_DLL_EXPORT)
+ target_sources(${frameworkconfig} PRIVATE $<TARGET_OBJECTS:eglib_objects>)
+ target_link_libraries(${frameworkconfig} PRIVATE ${OS_LIBS} ${ICONV_LIB} ${LLVM_LIBS} ${ICU_LIBS})
+ if(ICU_LDFLAGS)
+ set_property(TARGET ${frameworkconfig} APPEND_STRING PROPERTY LINK_FLAGS " ${ICU_LDFLAGS}")
+ endif()
+ if(STATIC_ICU)
+ set_property(TARGET ${frameworkconfig} APPEND_STRING PROPERTY LINKER_LANGUAGE CXX)
+ endif ()
+ set_property(TARGET ${frameworkconfig} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-compatibility_version -Wl,2.0 -Wl,-current_version -Wl,2.0")
+ string(REPLACE "*" ";" componentsobjects-whitespace "${componentsobjects}")
+ target_sources(${frameworkconfig} PRIVATE "${componentsobjects-whitespace}")
+ set_target_properties(${frameworkconfig} PROPERTIES
+ FRAMEWORK TRUE
+ FRAMEWORK_VERSION C
+ MACOSX_FRAMEWORK_IDENTIFIER net.dot.mono-framework
+ )
+ install(TARGETS ${frameworkconfig}
+ FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ )
+ endforeach()
+ endif()
+ endif()
endif()
find_package(Python3 COMPONENTS Interpreter)