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
7 changes: 7 additions & 0 deletions src/libraries/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
<Import Project="$(Crossgen2SdkOverridePropsPath)"
Condition="'$(TestWasmReadyToRun)' == 'true' and '$(TargetOS)' == 'wasi' and '$(RuntimeFlavor)' == 'CoreCLR' and '$(Crossgen2SdkOverridePropsPath)' != '' and Exists('$(Crossgen2SdkOverridePropsPath)')" />

<!-- OpenHarmony has no platform TFM yet; build in the unix group so the existing
TargetPlatformIdentifier == 'unix' conditions apply, and keep the shims in the
same group so sfx-src keeps them in the layout. -->
<PropertyGroup>
<LibrariesOpenHarmonySfxTfm Condition="'$(TargetsOpenHarmony)' == 'true'">$(NetCoreAppCurrent)-unix</LibrariesOpenHarmonySfxTfm>
</PropertyGroup>

<PropertyGroup Condition="'$(UseBootstrap)' == 'true' and ('$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true' or '$(IsTrimmingTestProject)' == 'true')">
<UseBootstrapLayout>true</UseBootstrapLayout>
</PropertyGroup>
Expand Down
11 changes: 8 additions & 3 deletions src/libraries/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,14 @@
<BinPlaceForTargetVertical Condition="'$(BinPlaceForTargetVertical)' == ''">true</BinPlaceForTargetVertical>
</PropertyGroup>

<PropertyGroup>
<LibrariesBinPlaceTfm Condition="'$(LibrariesBinPlaceTfm)' == ''">$(NetCoreAppCurrent)-$(TargetOS)</LibrariesBinPlaceTfm>
<LibrariesBinPlaceTfm Condition="'$(TargetsOpenHarmony)' == 'true'">$(LibrariesOpenHarmonySfxTfm)</LibrariesBinPlaceTfm>
</PropertyGroup>

<ItemGroup>
<!-- Used by the runtime tests to prepare the CORE_ROOT layout. Don't use in libraries. -->
<BinPlaceTargetFrameworks Include="$(NetCoreAppCurrent)-$(TargetOS)"
<BinPlaceTargetFrameworks Include="$(LibrariesBinPlaceTfm)"
Condition="'$(BinPlaceForTargetVertical)' == 'true'">
<NativePath>$(LibrariesAllBinArtifactsPath)</NativePath>
<RefPath>$(LibrariesAllRefArtifactsPath)</RefPath>
Expand All @@ -112,13 +117,13 @@
'$(TargetFramework)' == 'netstandard2.0'" />

<!-- Setup the shared framework directory for testing -->
<BinPlaceTargetFrameworks Include="$(NetCoreAppCurrent)-$(TargetOS)">
<BinPlaceTargetFrameworks Include="$(LibrariesBinPlaceTfm)">
<NativePath>$(NetCoreAppCurrentTestHostSharedFrameworkPath)</NativePath>
<RuntimePath Condition="'$(IsNETCoreAppSrc)' == 'true'">$(NetCoreAppCurrentTestHostSharedFrameworkPath)</RuntimePath>
</BinPlaceTargetFrameworks>

<!-- Microsoft.NetCore.App.Ref and Microsoft.NetCore.App.Runtime targeting packs -->
<BinPlaceTargetFrameworks Include="$(NetCoreAppCurrent)-$(TargetOS)">
<BinPlaceTargetFrameworks Include="$(LibrariesBinPlaceTfm)">
<NativePath>$(MicrosoftNetCoreAppRuntimePackNativeDir)</NativePath>
<RefPath Condition="'$(IsNETCoreAppRef)' == 'true'">$(MicrosoftNetCoreAppRefPackRefDir)</RefPath>
<RuntimePath Condition="'$(IsNETCoreAppSrc)' == 'true'">$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)</RuntimePath>
Expand Down
2 changes: 2 additions & 0 deletions src/libraries/sfx-finish.proj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)-$(TargetOS)</TargetFramework>
<!-- No -openharmony TFM: compile in the linux group (LibrariesOpenHarmonySfxTfm). -->
<TargetFramework Condition="'$(TargetsOpenHarmony)' == 'true'">$(LibrariesOpenHarmonySfxTfm)</TargetFramework>
<NoDefaultSlnGenSolutionFolder>true</NoDefaultSlnGenSolutionFolder>
<FrameworkListOutputPath>$(MicrosoftNetCoreAppRefPackDataDir)FrameworkList.xml</FrameworkListOutputPath>
<!-- Import the illink file which contains some of the logic required to illink the shared framework assemblies. -->
Expand Down
2 changes: 2 additions & 0 deletions src/libraries/sfx-src.proj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)-$(TargetOS)</TargetFramework>
<!-- No -openharmony TFM: compile in the linux group (LibrariesOpenHarmonySfxTfm). -->
<TargetFramework Condition="'$(TargetsOpenHarmony)' == 'true'">$(LibrariesOpenHarmonySfxTfm)</TargetFramework>
<!-- Filter ProjectReferences to build the best matching target framework only. -->
<FilterTraversalProjectReferences>true</FilterTraversalProjectReferences>
<NoDefaultSlnGenSolutionFolder>true</NoDefaultSlnGenSolutionFolder>
Expand Down
2 changes: 2 additions & 0 deletions src/libraries/sfx.proj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)-$(TargetOS)</TargetFramework>
<!-- No -openharmony TFM: compile in the linux group (LibrariesOpenHarmonySfxTfm). -->
<TargetFramework Condition="'$(TargetsOpenHarmony)' == 'true'">$(LibrariesOpenHarmonySfxTfm)</TargetFramework>
<NoDefaultSlnGenSolutionFolder>true</NoDefaultSlnGenSolutionFolder>
</PropertyGroup>

Expand Down
3 changes: 3 additions & 0 deletions src/libraries/shims/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)-$(TargetOS)</TargetFramework>
<!-- No platform TFM: compile in the unix group, the same TFM as the shared-framework

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still does not look right. FreeBSD and other OSes do not have platform TFM either and work just fine. There should not be any special casing for open harmony like this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed — removed all the OpenHarmony TFM special casing. Without it the branch has no diff: the standard $(NetCoreAppCurrent)-$(TargetOS) path applies like FreeBSD. Closing this PR.

traversal (LibrariesOpenHarmonySfxTfm) so sfx-src keeps the shims in the layout. -->
<TargetFramework Condition="'$(TargetsOpenHarmony)' == 'true'">$(LibrariesOpenHarmonySfxTfm)</TargetFramework>
<EnableDefaultItems>true</EnableDefaultItems>
<!-- By default make shims compile against reference assemblies. -->
<CompileUsingReferenceAssemblies>true</CompileUsingReferenceAssemblies>
Expand Down
Loading