Skip to content

building corefx on linux platform with unknown rid #22143

@tmds

Description

@tmds

When trying to build corefx on a Linux host with an unsupported RID, the external/{ilasm,runtime}.depproj fail to compile because they are using the host rid.

These projects are compiled as:

  • /p:TargetGroup=netstandard /p:ConfigurationGroup=Debug /p:ArchGroup=x64 /p:OSGroup=AnyOS /p:TargetFramework=netstandard2.0
  • /p:TargetGroup=netcoreapp /p:ConfigurationGroup=Debug /p:ArchGroup=x64 /p:OSGroup=Unix /p:TargetFramework=netcoreapp2.0

The following change to external/dir.props makes them compile fine:

diff --git a/external/dir.props b/external/dir.props
index eb7e7b6..4ec6ee5 100644
--- a/external/dir.props
+++ b/external/dir.props
@@ -5,6 +5,8 @@
     <RuntimeOS Condition="'$(PortableBuild)' == 'true' and '$(OSGroup)' == 'Windows_NT'">win</RuntimeOS>
     <RuntimeOS Condition="'$(PortableBuild)' == 'true' and '$(OSGroup)' == 'OSX'">osx</RuntimeOS>
     <RuntimeOS Condition="'$(PortableBuild)' == 'true' and '$(OSGroup)' == 'Linux'">linux</RuntimeOS>
+    <RuntimeOS Condition="'$(PortableBuild)' == 'true' and '$(OSGroup)' == 'AnyOS'">linux</RuntimeOS>
+    <RuntimeOS Condition="'$(PortableBuild)' == 'true' and '$(OSGroup)' == 'Unix'">linux</RuntimeOS>
     <NugetRuntimeIdentifier>$(RuntimeOS)-$(ArchGroup)</NugetRuntimeIdentifier>
     <ContainsPackageReferences>true</ContainsPackageReferences>
     <!-- We need configuration-specific assets files. -->

I'm not sure what the proper change is to make the corefx repo compile on unsupported linux flavors (using portable linux).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions