Skip to content

Commit e9fa669

Browse files
committed
merge main; fix up some conflicts
2 parents f5c2d93 + 7d75878 commit e9fa669

File tree

106 files changed

+2845
-706
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+2845
-706
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@
6868
# this only affects the repo's language statistics
6969
*.h linguist-language=C
7070

71+
# don't treat files in 'build' directories as generated
72+
**/build/** linguist-generated=false
73+
7174
# CLR specific
7275
src/coreclr/pal/tests/palsuite/paltestlist.txt text eol=lf
7376
src/coreclr/pal/tests/palsuite/paltestlist_to_be_reviewed.txt text eol=lf

eng/Subsets.props

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
<DefaultSubsets Condition="'$(TargetsAppleMobile)' == 'true'">clr.nativeaotruntime+clr.nativeaotlibs+mono+libs+packs</DefaultSubsets>
6060
<DefaultSubsets Condition="'$(TargetsLinuxBionic)' == 'true' and '$(MonoSupported)' == 'true'">clr.nativeaotruntime+clr.nativeaotlibs+mono+libs+host+packs</DefaultSubsets>
6161
<DefaultSubsets Condition="'$(TargetsLinuxBionic)' == 'true' and '$(MonoSupported)' != 'true'">clr.nativeaotruntime+clr.nativeaotlibs+libs+packs</DefaultSubsets>
62-
<!-- In source build, mono is only supported as primary runtime flavor. On Windows mono is supported for x86/x64 only. -->
63-
<DefaultSubsets Condition="('$(DotNetBuildSourceOnly)' == 'true' and '$(PrimaryRuntimeFlavor)' != 'Mono') or ('$(TargetOS)' == 'windows' and '$(TargetArchitecture)' != 'x86' and '$(TargetArchitecture)' != 'x64')">clr+libs+tools+host+packs</DefaultSubsets>
62+
<!-- In source build, mono is only supported as primary runtime flavor. -->
63+
<DefaultSubsets Condition="'$(DotNetBuildSourceOnly)' == 'true' and '$(PrimaryRuntimeFlavor)' != 'Mono'">clr+libs+tools+host+packs</DefaultSubsets>
6464
<DefaultSubsets Condition="'$(DotNetBuildRuntimeNativeAOTRuntimePack)' == 'true'">clr.nativeaotlibs+clr.nativeaotruntime+libs+packs</DefaultSubsets>
6565
<DefaultSubsets Condition="'$(DotNetBuildMonoCrossAOT)' == 'true'">mono+packs</DefaultSubsets>
6666
</PropertyGroup>
@@ -96,19 +96,21 @@
9696

9797
<DefaultNativeAotSubsets>clr.alljits+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime</DefaultNativeAotSubsets>
9898

99+
<_MonoAotCrossSubsets Condition="'$(MonoCrossAOTTargetOS)' != ''">mono.aotcross</_MonoAotCrossSubsets>
100+
99101
<DefaultMonoSubsets Condition="'$(MonoEnableLLVM)' == 'true' and '$(MonoLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
100102
<DefaultMonoSubsets Condition="'$(MonoAOTEnableLLVM)' == 'true' and '$(MonoLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
101103
<DefaultMonoSubsets Condition="'$(TargetOS)' == 'browser'">$(DefaultMonoSubsets)mono.wasmruntime+</DefaultMonoSubsets>
102104
<DefaultMonoSubsets Condition="'$(TargetOS)' == 'wasi'">$(DefaultMonoSubsets)mono.wasiruntime+</DefaultMonoSubsets>
103-
<DefaultMonoSubsets Condition="'$(MonoCrossAOTTargetOS)' != ''">$(DefaultMonoSubsets)mono.aotcross+</DefaultMonoSubsets>
105+
<DefaultMonoSubsets Condition="'$(_MonoAotCrossSubsets)' != ''">$(DefaultMonoSubsets)$(_MonoAotCrossSubsets)+</DefaultMonoSubsets>
104106
<DefaultMonoSubsets>$(DefaultMonoSubsets)mono.runtime+mono.corelib+mono.packages+</DefaultMonoSubsets>
105107
<DefaultMonoSubsets Condition="'$(TargetsMobile)' == 'true' or '$(ForceBuildMobileManifests)' == 'true'">$(DefaultMonoSubsets)mono.manifests+</DefaultMonoSubsets>
106108
<DefaultMonoSubsets Condition="$(_subset.Contains('+mono.wasmworkload+'))">$(DefaultMonoSubsets)mono.manifests+</DefaultMonoSubsets>
107109
<DefaultMonoSubsets Condition="'$(PrimaryRuntimeFlavor)' != 'Mono'">$(DefaultMonoSubsets)mono.tools+</DefaultMonoSubsets>
108110
<DefaultMonoSubsets Condition="'$(TargetsMobile)' != 'true'">$(DefaultMonoSubsets)host.native+</DefaultMonoSubsets>
109111

110112
<!-- If the Mono runtime isn't supported but the AOT compiler is, just build the AOT cross compiler -->
111-
<DefaultMonoSubsets Condition="'$(BuildMonoAOTCrossCompilerOnly)' == 'true' or ('$(MonoSupported)' != 'true' and '$(MonoAOTCrossCompilerSupported)' == 'true')">mono.aotcross</DefaultMonoSubsets>
113+
<DefaultMonoSubsets Condition="'$(BuildMonoAOTCrossCompilerOnly)' == 'true' or ('$(MonoSupported)' != 'true' and '$(MonoAOTCrossCompilerSupported)' == 'true')">$(_MonoAotCrossSubsets)</DefaultMonoSubsets>
112114

113115
<DefaultLibrariesSubsets Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or
114116
'$(BuildTargetFramework)' == '' or

eng/Version.Details.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -352,21 +352,21 @@
352352
<Uri>https://github.com/dotnet/arcade</Uri>
353353
<Sha>e7cb34898a1b610eb2a22591a2178da6f1fb7e3c</Sha>
354354
</Dependency>
355-
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.25053.1">
355+
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.25067.2">
356356
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
357-
<Sha>0eb38b09e89e233cf7cd056fad672627ea2fa05a</Sha>
357+
<Sha>93bf80f30db2e15a7d62c22ff80fecf3518519b1</Sha>
358358
</Dependency>
359-
<Dependency Name="optimization.windows_nt-x86.MIBC.Runtime" Version="1.0.0-prerelease.25053.1">
359+
<Dependency Name="optimization.windows_nt-x86.MIBC.Runtime" Version="1.0.0-prerelease.25067.2">
360360
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
361-
<Sha>0eb38b09e89e233cf7cd056fad672627ea2fa05a</Sha>
361+
<Sha>93bf80f30db2e15a7d62c22ff80fecf3518519b1</Sha>
362362
</Dependency>
363-
<Dependency Name="optimization.linux-x64.MIBC.Runtime" Version="1.0.0-prerelease.25053.1">
363+
<Dependency Name="optimization.linux-x64.MIBC.Runtime" Version="1.0.0-prerelease.25067.2">
364364
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
365-
<Sha>0eb38b09e89e233cf7cd056fad672627ea2fa05a</Sha>
365+
<Sha>93bf80f30db2e15a7d62c22ff80fecf3518519b1</Sha>
366366
</Dependency>
367-
<Dependency Name="optimization.PGO.CoreCLR" Version="1.0.0-prerelease.25053.1">
367+
<Dependency Name="optimization.PGO.CoreCLR" Version="1.0.0-prerelease.25067.2">
368368
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
369-
<Sha>0eb38b09e89e233cf7cd056fad672627ea2fa05a</Sha>
369+
<Sha>93bf80f30db2e15a7d62c22ff80fecf3518519b1</Sha>
370370
</Dependency>
371371
<Dependency Name="Microsoft.DotNet.HotReload.Utils.Generator.BuildTool" Version="10.0.0-alpha.0.24627.1">
372372
<Uri>https://github.com/dotnet/hotreload-utils</Uri>
@@ -412,13 +412,13 @@
412412
<Sha>13330d5ded0b2b2bcd6459d6a410aa6220b11040</Sha>
413413
<SourceBuild RepoName="sdk" ManagedOnly="true" />
414414
</Dependency>
415-
<Dependency Name="optimization.windows_nt-arm64.MIBC.Runtime" Version="1.0.0-prerelease.25053.1">
415+
<Dependency Name="optimization.windows_nt-arm64.MIBC.Runtime" Version="1.0.0-prerelease.25067.2">
416416
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
417-
<Sha>0eb38b09e89e233cf7cd056fad672627ea2fa05a</Sha>
417+
<Sha>93bf80f30db2e15a7d62c22ff80fecf3518519b1</Sha>
418418
</Dependency>
419-
<Dependency Name="optimization.linux-arm64.MIBC.Runtime" Version="1.0.0-prerelease.25053.1">
419+
<Dependency Name="optimization.linux-arm64.MIBC.Runtime" Version="1.0.0-prerelease.25067.2">
420420
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
421-
<Sha>0eb38b09e89e233cf7cd056fad672627ea2fa05a</Sha>
421+
<Sha>93bf80f30db2e15a7d62c22ff80fecf3518519b1</Sha>
422422
</Dependency>
423423
<!-- Necessary for source-build. This allows the package to be retrieved from previously-source-built artifacts
424424
and flow in as dependencies of the packages produced by runtime. -->

eng/Versions.props

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,12 @@
164164
<!-- hotreload-utils dependencies -->
165165
<MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>10.0.0-alpha.0.24627.1</MicrosoftDotNetHotReloadUtilsGeneratorBuildToolVersion>
166166
<!-- dotnet-optimization dependencies -->
167-
<optimizationwindows_ntx64MIBCRuntimeVersion>1.0.0-prerelease.25053.1</optimizationwindows_ntx64MIBCRuntimeVersion>
168-
<optimizationwindows_ntx86MIBCRuntimeVersion>1.0.0-prerelease.25053.1</optimizationwindows_ntx86MIBCRuntimeVersion>
169-
<optimizationwindows_ntarm64MIBCRuntimeVersion>1.0.0-prerelease.25053.1</optimizationwindows_ntarm64MIBCRuntimeVersion>
170-
<optimizationlinuxx64MIBCRuntimeVersion>1.0.0-prerelease.25053.1</optimizationlinuxx64MIBCRuntimeVersion>
171-
<optimizationlinuxarm64MIBCRuntimeVersion>1.0.0-prerelease.25053.1</optimizationlinuxarm64MIBCRuntimeVersion>
172-
<optimizationPGOCoreCLRVersion>1.0.0-prerelease.25053.1</optimizationPGOCoreCLRVersion>
167+
<optimizationwindows_ntx64MIBCRuntimeVersion>1.0.0-prerelease.25067.2</optimizationwindows_ntx64MIBCRuntimeVersion>
168+
<optimizationwindows_ntx86MIBCRuntimeVersion>1.0.0-prerelease.25067.2</optimizationwindows_ntx86MIBCRuntimeVersion>
169+
<optimizationwindows_ntarm64MIBCRuntimeVersion>1.0.0-prerelease.25067.2</optimizationwindows_ntarm64MIBCRuntimeVersion>
170+
<optimizationlinuxx64MIBCRuntimeVersion>1.0.0-prerelease.25067.2</optimizationlinuxx64MIBCRuntimeVersion>
171+
<optimizationlinuxarm64MIBCRuntimeVersion>1.0.0-prerelease.25067.2</optimizationlinuxarm64MIBCRuntimeVersion>
172+
<optimizationPGOCoreCLRVersion>1.0.0-prerelease.25067.2</optimizationPGOCoreCLRVersion>
173173
<!-- Not auto-updated. -->
174174
<MicrosoftDiaSymReaderVersion>2.0.0</MicrosoftDiaSymReaderVersion>
175175
<MicrosoftDiaSymReaderNativeVersion>17.10.0-beta1.24272.1</MicrosoftDiaSymReaderNativeVersion>
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# This pipeline deploys the test servers we are using to run (outerloop) Functional tests for various functionality in System.Net namespace.
2+
# The pipeline deploys to staging slots, which are available at
3+
# - corefx-net-http11-staging.azurewebsites.net
4+
# - corefx-net-http2-staging.azurewebsites.net
5+
#
6+
# Usage instructions:
7+
# 1) Start pipeline at https://dev.azure.com/dnceng/internal/_build?definitionId=1419
8+
# (deploy-networking-echo-test-servers), pick the correct branch and start the build.
9+
# 2) After pipeline succeeds, check your changes against the staging slots, two possible ways to do this are:
10+
# - create a no-merge PR where you overwrite the default urls (e.g. https://github.com/dotnet/runtime/pull/111396)
11+
# - test locally, either by same changes as in above PR, or by using the override environment variables
12+
#
13+
# DOTNET_TEST_HTTPHOST=http://corefx-net-http11-staging.azurewebsites.net
14+
# DOTNET_TEST_SECUREHTTPHOST=https://corefx-net-http11-staging.azurewebsites.net
15+
# DOTNET_TEST_WEBSOKETHOST=http://corefx-net-http11-staging.azurewebsites.net
16+
# DOTNET_TEST_SECUREWEBSOKETHOST=http://corefx-net-http11-staging.azurewebsites.net
17+
#
18+
# DOTNET_TEST_HTTP2HOST=http://corefx-net-http2-staging.azurewebsites.net
19+
# 3) If there are no issues, you can swap the staging slots with production slots via the Azure portal.
20+
# Only the members of the .NET Networking team have access to the Azure Subscription which hosts the
21+
# servers. Look for the "Deployment slots" section at corefx-net-http11 and corefx-net-http2 Web Apps
22+
23+
trigger: none
24+
25+
resources:
26+
repositories:
27+
- repository: 1ESPipelineTemplates
28+
type: git
29+
name: 1ESPipelineTemplates/1ESPipelineTemplates
30+
ref: refs/tags/release
31+
32+
variables:
33+
- template: /eng/common/templates-official/variables/pool-providers.yml
34+
- name: FrameworkVersion
35+
value: 8.x
36+
- name: TargetFramework
37+
value: net8.0
38+
39+
extends:
40+
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
41+
parameters:
42+
customBuildTags:
43+
- 1ES.PT.ViaStartRight
44+
pool:
45+
name: $(DncEngInternalBuildPool)
46+
image: 1es-windows-2022
47+
os: windows
48+
49+
stages:
50+
- stage: stage
51+
displayName: Building in a VM
52+
jobs:
53+
- job: job
54+
displayName: Build
55+
steps:
56+
- checkout: self
57+
58+
- task: UseDotNet@2
59+
inputs:
60+
packageType: "sdk"
61+
version: $(FrameworkVersion)
62+
63+
- script: echo {} > ./global.json
64+
displayName: Bypass repository global.json
65+
workingDirectory: ./src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer
66+
67+
- script: dotnet publish -c Release /p:GenevaTelemetry=true /p:_TargetFrameworkForXHarness=$(TargetFramework)
68+
workingDirectory: ./src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer
69+
displayName: Run dotnet publish
70+
71+
- task: zip@0
72+
displayName: Zip artifacts
73+
inputs:
74+
pathToZipFolder: 'artifacts\bin\NetCoreServer\Release\$(TargetFramework)\publish\'
75+
pathToZipFile: 'artifacts\bin\NetCoreServer\Release\$(TargetFramework)\publish.zip'
76+
77+
- task: AzureRmWebAppDeployment@4
78+
displayName: Deploy to corefx-net-http11-staging
79+
inputs:
80+
ConnectionType: "AzureRM"
81+
azureSubscription: .NET Libraries Network Testing
82+
appType: "webApp"
83+
WebAppName: "corefx-net-http11"
84+
deployToSlotOrASE: true
85+
ResourceGroupName: "Production-WestUS"
86+
SlotName: "staging"
87+
package: 'artifacts\bin\NetCoreServer\Release\$(TargetFramework)\publish.zip'
88+
89+
- task: AzureRmWebAppDeployment@4
90+
displayName: Deploy to corefx-net-http2-staging
91+
inputs:
92+
ConnectionType: "AzureRM"
93+
azureSubscription: .NET Libraries Network Testing
94+
appType: "webApp"
95+
WebAppName: "corefx-net-http2"
96+
deployToSlotOrASE: true
97+
ResourceGroupName: "Production-WestUS"
98+
SlotName: "staging"
99+
package: 'artifacts\bin\NetCoreServer\Release\$(TargetFramework)\publish.zip'

eng/pipelines/libraries/helix-queues-setup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
# Linux arm64
3636
- ${{ if eq(parameters.platform, 'linux_arm64') }}:
37-
- (Ubuntu.2204.Arm64.Open)Ubuntu.2204.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-arm64v8
37+
- (Ubuntu.2410.Arm64.Open)Ubuntu.2204.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-24.10-helix-arm64v8
3838
- ${{ if or(ne(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
3939
- (Debian.12.Arm64.Open)Ubuntu.2204.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm64v8
4040

eng/pipelines/runtime-ioslike.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@
44

55
trigger: none
66

7+
# To reduce the load on the pipeline, enable it only for PRs that affect Mono LLVM related code.
8+
pr:
9+
branches:
10+
include:
11+
- main
12+
- release/*.*
13+
14+
paths:
15+
include:
16+
- src/mono/mono/mini/aot-*.*
17+
- src/mono/mono/mini/llvm-*.*
18+
- src/mono/mono/mini/mini-llvm-*.*
19+
- src/mono/mono/mini/intrinsics.c
20+
- src/mono/mono/mini/simd-*.*
21+
- src/mono/mono/mini/decompose.c
22+
- src/mono/mono/mini/method-to-ir.c
23+
- src/mono/mono/mini/mini.c
24+
725
variables:
826
- template: /eng/pipelines/common/variables.yml
927

eng/pipelines/runtime-llvm.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,24 @@ schedules:
2828
- main
2929
always: false # run only if there were changes since the last successful scheduled run.
3030

31+
# To reduce the load on the pipeline, enable it only for PRs that affect Mono LLVM related code.
32+
pr:
33+
branches:
34+
include:
35+
- main
36+
- release/*.*
37+
38+
paths:
39+
include:
40+
- src/mono/mono/mini/aot-*.*
41+
- src/mono/mono/mini/llvm-*.*
42+
- src/mono/mono/mini/mini-llvm-*.*
43+
- src/mono/mono/mini/intrinsics.c
44+
- src/mono/mono/mini/simd-*.*
45+
- src/mono/mono/mini/decompose.c
46+
- src/mono/mono/mini/method-to-ir.c
47+
- src/mono/mono/mini/mini.c
48+
3149
variables:
3250
- template: /eng/pipelines/common/variables.yml
3351

src/coreclr/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,7 @@ endif(CLR_CMAKE_HOST_WIN32)
170170
#----------------------------------
171171
include(clrdefinitions.cmake)
172172

173-
if(FEATURE_STANDALONE_GC)
174-
add_definitions(-DFEATURE_STANDALONE_GC)
175-
add_subdirectory(gc)
176-
endif(FEATURE_STANDALONE_GC)
173+
add_subdirectory(gc)
177174

178175
if (CLR_CMAKE_HOST_UNIX)
179176
include_directories("pal/inc")

src/coreclr/gc/CMakeLists.txt

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
set(CMAKE_INCLUDE_CURRENT_DIR ON)
22

3-
# Local GC meta-issue: https://github.com/dotnet/runtime/issues/8061
4-
5-
# https://github.com/dotnet/runtime/issues/8059
6-
remove_definitions(-DSTRESS_HEAP)
7-
8-
# https://github.com/dotnet/runtime/issues/8062
9-
remove_definitions(-DWRITE_BARRIER_CHECK)
3+
if(FEATURE_STANDALONE_GC)
4+
add_definitions(-DFEATURE_STANDALONE_GC)
5+
remove_definitions(-DSTRESS_HEAP)
6+
remove_definitions(-DWRITE_BARRIER_CHECK)
7+
endif(FEATURE_STANDALONE_GC)
108

119
set(GC_SOURCES
1210
gceventstatus.cpp
@@ -100,37 +98,39 @@ list(APPEND GC_SOURCES ${GC_HEADERS})
10098

10199
convert_to_absolute_path(GC_SOURCES ${GC_SOURCES})
102100

103-
# clrgcexp is build with standalone+regions
104-
if (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
105-
add_library_clr(clrgcexp SHARED ${GC_SOURCES})
106-
add_dependencies(clrgcexp eventing_headers)
107-
target_link_libraries(clrgcexp PRIVATE ${GC_LINK_LIBRARIES})
108-
target_compile_definitions(clrgcexp PRIVATE -DUSE_REGIONS)
109-
install_clr(TARGETS clrgcexp DESTINATIONS . COMPONENT runtime)
110-
endif (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
111-
112-
# clrgc is build with standalone+segments
113-
add_library_clr(clrgc SHARED ${GC_SOURCES})
114-
add_dependencies(clrgc eventing_headers)
115-
target_link_libraries(clrgc PRIVATE ${GC_LINK_LIBRARIES})
116-
install_clr(TARGETS clrgc DESTINATIONS . COMPONENT runtime)
117-
118-
add_definitions(-DBUILD_AS_STANDALONE)
119-
add_definitions(-DFEATURE_CONSERVATIVE_GC)
120-
121-
add_definitions(-DFX_VER_INTERNALNAME_STR=clrgc.dll)
122-
add_definitions(-DVERIFY_HEAP)
123-
if(CLR_CMAKE_HOST_APPLE)
124-
# The implementation of GCToOSInterface on Apple platforms makes use of non-POSIX
125-
# pthreads APIs, which by default are not included in the pthreads header
126-
# unless we define this macro.
127-
add_definitions(-D_DARWIN_C_SOURCE)
128-
endif(CLR_CMAKE_HOST_APPLE)
129-
130-
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
131-
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/env)
132-
133-
install_clr(TARGETS clrgc DESTINATIONS . sharedFramework COMPONENT runtime)
134-
if (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
135-
install_clr(TARGETS clrgcexp DESTINATIONS . sharedFramework COMPONENT runtime)
136-
endif (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
101+
if(FEATURE_STANDALONE_GC)
102+
# clrgcexp is build with standalone+regions
103+
if (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
104+
add_library_clr(clrgcexp SHARED ${GC_SOURCES})
105+
add_dependencies(clrgcexp eventing_headers)
106+
target_link_libraries(clrgcexp PRIVATE ${GC_LINK_LIBRARIES})
107+
target_compile_definitions(clrgcexp PRIVATE -DUSE_REGIONS)
108+
install_clr(TARGETS clrgcexp DESTINATIONS . COMPONENT runtime)
109+
endif (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
110+
111+
# clrgc is build with standalone+segments
112+
add_library_clr(clrgc SHARED ${GC_SOURCES})
113+
add_dependencies(clrgc eventing_headers)
114+
target_link_libraries(clrgc PRIVATE ${GC_LINK_LIBRARIES})
115+
install_clr(TARGETS clrgc DESTINATIONS . COMPONENT runtime)
116+
117+
add_definitions(-DBUILD_AS_STANDALONE)
118+
add_definitions(-DFEATURE_CONSERVATIVE_GC)
119+
120+
add_definitions(-DFX_VER_INTERNALNAME_STR=clrgc.dll)
121+
add_definitions(-DVERIFY_HEAP)
122+
if(CLR_CMAKE_HOST_APPLE)
123+
# The implementation of GCToOSInterface on Apple platforms makes use of non-POSIX
124+
# pthreads APIs, which by default are not included in the pthreads header
125+
# unless we define this macro.
126+
add_definitions(-D_DARWIN_C_SOURCE)
127+
endif(CLR_CMAKE_HOST_APPLE)
128+
129+
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
130+
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/env)
131+
132+
install_clr(TARGETS clrgc DESTINATIONS . sharedFramework COMPONENT runtime)
133+
if (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
134+
install_clr(TARGETS clrgcexp DESTINATIONS . sharedFramework COMPONENT runtime)
135+
endif (CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
136+
endif(FEATURE_STANDALONE_GC)

0 commit comments

Comments
 (0)