diff --git a/eng/Subsets.props b/eng/Subsets.props index f92103b14b977..7b9099c38bd4a 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -103,7 +103,7 @@ - true + true true diff --git a/eng/Versions.props b/eng/Versions.props index 3a97f80fd7497..f14a6fa1db31a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -111,6 +111,7 @@ 1.0.0-alpha.1.23059.1 1.0.0-alpha.1.23059.1 1.0.0-alpha.1.23059.1 + 1.0.0-alpha.1.23059.1 6.0.0 1.1.1 @@ -248,5 +249,6 @@ 1.0.0-alpha.1.23059.1 1.0.0-alpha.1.23059.1 1.0.0-alpha.1.23059.1 + 1.0.0-alpha.1.23059.1 diff --git a/src/coreclr/CMakeLists.txt b/src/coreclr/CMakeLists.txt index c28c30514832d..9f632a5194eba 100644 --- a/src/coreclr/CMakeLists.txt +++ b/src/coreclr/CMakeLists.txt @@ -139,7 +139,7 @@ add_subdirectory(tools/aot/jitinterface) if(NOT CLR_CROSS_COMPONENTS_BUILD) # NativeAOT only buildable for a subset of CoreCLR-supported configurations - if((CLR_CMAKE_HOST_LINUX OR CLR_CMAKE_HOST_OSX OR CLR_CMAKE_HOST_WIN32) AND (CLR_CMAKE_HOST_ARCH_ARM64 OR CLR_CMAKE_HOST_ARCH_AMD64)) + if(CLR_CMAKE_HOST_ARCH_ARM64 OR CLR_CMAKE_HOST_ARCH_AMD64) add_subdirectory(nativeaot) endif() endif(NOT CLR_CROSS_COMPONENTS_BUILD) diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets index 07ab9cd9d43a1..1fae5ebf4d444 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets @@ -4,6 +4,7 @@ win osx + freebsd linux-musl linux diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets index 29d19fea6c887..783ca0f96b079 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets @@ -39,6 +39,7 @@ The .NET Foundation licenses this file to you under the MIT license. $(CrossCompileArch)-linux-gnu $(CrossCompileArch)-alpine-linux-musl + $(CrossCompileArch)-unknown-freebsd12 $ORIGIN @executable_path @@ -141,8 +142,12 @@ The .NET Foundation licenses this file to you under the MIT license. - - + + + + + + diff --git a/src/coreclr/tools/aot/ILCompiler/ILCompiler.props b/src/coreclr/tools/aot/ILCompiler/ILCompiler.props index 98f5a12a4362f..347ead37e8ba2 100644 --- a/src/coreclr/tools/aot/ILCompiler/ILCompiler.props +++ b/src/coreclr/tools/aot/ILCompiler/ILCompiler.props @@ -28,8 +28,8 @@ $(RuntimeIdentifier.Substring(0, $(_objWriterRidPlatformIndex))) $(RuntimeIdentifier.Substring($(_objWriterRidPlatformIndex)).TrimStart('-')) - - linux + + linux osx.10.12 @@ -45,6 +45,7 @@ $(runtimewinx64MicrosoftNETCoreRuntimeObjWriterVersion) $(runtimeosx110arm64MicrosoftNETCoreRuntimeObjWriterVersion) $(runtimeosx1012x64MicrosoftNETCoreRuntimeObjWriterVersion) + $(runtimefreebsdx64MicrosoftNETCoreRuntimeObjWriterVersion) true diff --git a/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs b/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs index 6795f7f47d941..bfbb1fed9c509 100644 --- a/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs +++ b/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs @@ -306,7 +306,7 @@ public static IEnumerable> GetExtendedHelp(HelpContext _) "considered to be input files. If no input files begin with '--' then this option is not necessary.\n"); string[] ValidArchitectures = new string[] { "arm", "arm64", "x86", "x64" }; - string[] ValidOS = new string[] { "windows", "linux", "osx" }; + string[] ValidOS = new string[] { "windows", "linux", "osx", "freebsd" }; Console.WriteLine("Valid switches for {0} are: '{1}'. The default value is '{2}'\n", "--targetos", string.Join("', '", ValidOS), Helpers.GetTargetOS(null).ToString().ToLowerInvariant()); diff --git a/src/coreclr/tools/aot/ILCompiler/repro/repro.csproj b/src/coreclr/tools/aot/ILCompiler/repro/repro.csproj index b3a490ed6c078..f2d7f5c109a05 100644 --- a/src/coreclr/tools/aot/ILCompiler/repro/repro.csproj +++ b/src/coreclr/tools/aot/ILCompiler/repro/repro.csproj @@ -6,7 +6,7 @@ AnyCPU false false - linux-x64;win-x64;osx-x64 + linux-x64;win-x64;osx-x64;freebsd-x64 Debug;Release;Checked true false diff --git a/src/installer/managed/Microsoft.NET.HostModel/Bundle/TargetInfo.cs b/src/installer/managed/Microsoft.NET.HostModel/Bundle/TargetInfo.cs index 5a1c0c4fd66a5..1876c7e379050 100644 --- a/src/installer/managed/Microsoft.NET.HostModel/Bundle/TargetInfo.cs +++ b/src/installer/managed/Microsoft.NET.HostModel/Bundle/TargetInfo.cs @@ -35,8 +35,6 @@ public TargetInfo(OSPlatform? os, Architecture? arch, Version targetFrameworkVer Arch = arch ?? RuntimeInformation.OSArchitecture; FrameworkVersion = targetFrameworkVersion ?? Environment.Version; - Debug.Assert(IsLinux || IsOSX || IsWindows); - if (FrameworkVersion.Major >= 6) { BundleMajorVersion = 6u; @@ -79,7 +77,7 @@ public TargetInfo(OSPlatform? os, Architecture? arch, Version targetFrameworkVer public bool IsNativeBinary(string filePath) { - return IsLinux ? ElfUtils.IsElfImage(filePath) : IsOSX ? MachOUtils.IsMachOImage(filePath) : PEUtils.IsPEImage(filePath); + return IsWindows ? PEUtils.IsPEImage(filePath) : IsOSX ? MachOUtils.IsMachOImage(filePath) : ElfUtils.IsElfImage(filePath); } public string GetAssemblyName(string hostName) @@ -91,15 +89,16 @@ public string GetAssemblyName(string hostName) public override string ToString() { - string os = IsWindows ? "win" : IsLinux ? "linux" : "osx"; + string os = IsWindows ? "win" : OS.ToString().ToLowerInvariant(); string arch = Arch.ToString().ToLowerInvariant(); return $"OS: {os} Arch: {arch} FrameworkVersion: {FrameworkVersion}"; } + private static readonly OSPlatform s_freebsdOSPlatform = OSPlatform.Create("FREEBSD"); + private static OSPlatform HostOS => RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? OSPlatform.Linux : - RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? OSPlatform.OSX : OSPlatform.Windows; + RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? OSPlatform.OSX : RuntimeInformation.IsOSPlatform(s_freebsdOSPlatform) ? s_freebsdOSPlatform : OSPlatform.Windows; - public bool IsLinux => OS.Equals(OSPlatform.Linux); public bool IsOSX => OS.Equals(OSPlatform.OSX); public bool IsWindows => OS.Equals(OSPlatform.Windows); @@ -116,7 +115,7 @@ public override string ToString() public bool ShouldExclude(string relativePath) => (FrameworkVersion.Major != 3) && (relativePath.Equals(HostFxr) || relativePath.Equals(HostPolicy)); - private string HostFxr => IsWindows ? "hostfxr.dll" : IsLinux ? "libhostfxr.so" : "libhostfxr.dylib"; - private string HostPolicy => IsWindows ? "hostpolicy.dll" : IsLinux ? "libhostpolicy.so" : "libhostpolicy.dylib"; + private string HostFxr => IsWindows ? "hostfxr.dll" : IsOSX ? "libhostfxr.dylib" : "libhostfxr.so"; + private string HostPolicy => IsWindows ? "hostpolicy.dll" : IsOSX ? "libhostpolicy.dylib" : "libhostpolicy.so"; } } diff --git a/src/installer/pkg/projects/Microsoft.DotNet.ILCompiler/ILCompilerRIDs.props b/src/installer/pkg/projects/Microsoft.DotNet.ILCompiler/ILCompilerRIDs.props index 70e13f311b74a..8cd82c085c1a6 100644 --- a/src/installer/pkg/projects/Microsoft.DotNet.ILCompiler/ILCompilerRIDs.props +++ b/src/installer/pkg/projects/Microsoft.DotNet.ILCompiler/ILCompilerRIDs.props @@ -9,5 +9,6 @@ + diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj index 7ea5e438f02ed..81aa510c27b91 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj @@ -18,6 +18,10 @@ true false + + false + + false @@ -41,6 +46,7 @@ Targets="Publish;PublishItemsOutputGroup" Properties="_IsPublishing=true ;RuntimeIdentifier=$(PackageRID) + ;NativeAotSupported=$(NativeAotSupported) ;CoreCLRArtifactsPath=$(CoreCLRArtifactsPath) ;R2ROverridePath=$(MSBuildThisFileDirectory)ReadyToRun.targets"> OSPlatform.Windows, "osx" => OSPlatform.OSX, "linux" => OSPlatform.Linux, + "freebsd" => OSPlatform.FreeBSD, _ => throw new ArgumentException(nameof(runtimeIdentifier)) }; }