* 64 bit desktop compiler

* Add tests
This commit is contained in:
Kevin Ransom (msft) 2021-08-25 10:58:58 -07:00 коммит произвёл GitHub
Родитель 6271eb0917
Коммит 55c49ef420
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
36 изменённых файлов: 412 добавлений и 52 удалений

Просмотреть файл

@ -76,6 +76,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharp_Analysis", "tests\se
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "TestTP", "tests\service\data\TestTP\TestTP.fsproj", "{7BFA159A-BF9D-4489-BF46-1B83ACCEEE0F}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fscAnyCpu", "src\fsharp\fscAnyCpu\fscAnyCpu.fsproj", "{8ACA60C2-7266-425A-B641-A2946396B7D1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -386,6 +388,18 @@ Global
{7BFA159A-BF9D-4489-BF46-1B83ACCEEE0F}.Release|Any CPU.Build.0 = Release|Any CPU
{7BFA159A-BF9D-4489-BF46-1B83ACCEEE0F}.Release|x86.ActiveCfg = Release|Any CPU
{7BFA159A-BF9D-4489-BF46-1B83ACCEEE0F}.Release|x86.Build.0 = Release|Any CPU
{8ACA60C2-7266-425A-B641-A2946396B7D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8ACA60C2-7266-425A-B641-A2946396B7D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8ACA60C2-7266-425A-B641-A2946396B7D1}.Debug|x86.ActiveCfg = Debug|Any CPU
{8ACA60C2-7266-425A-B641-A2946396B7D1}.Debug|x86.Build.0 = Debug|Any CPU
{8ACA60C2-7266-425A-B641-A2946396B7D1}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
{8ACA60C2-7266-425A-B641-A2946396B7D1}.Proto|Any CPU.Build.0 = Debug|Any CPU
{8ACA60C2-7266-425A-B641-A2946396B7D1}.Proto|x86.ActiveCfg = Debug|Any CPU
{8ACA60C2-7266-425A-B641-A2946396B7D1}.Proto|x86.Build.0 = Debug|Any CPU
{8ACA60C2-7266-425A-B641-A2946396B7D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8ACA60C2-7266-425A-B641-A2946396B7D1}.Release|Any CPU.Build.0 = Release|Any CPU
{8ACA60C2-7266-425A-B641-A2946396B7D1}.Release|x86.ActiveCfg = Release|Any CPU
{8ACA60C2-7266-425A-B641-A2946396B7D1}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -394,7 +408,7 @@ Global
{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06} = {B8DDA694-7939-42E3-95E5-265C2217C142}
{DED3BBD7-53F4-428A-8C9F-27968E768605} = {3058BC79-8E79-4645-B05D-48CC182FA8A6}
{702A7979-BCF9-4C41-853E-3ADFC9897890} = {B8DDA694-7939-42E3-95E5-265C2217C142}
{C94C257C-3C0A-4858-B5D8-D746498D1F08} = {3881429D-A97A-49EB-B7AE-A82BA5FE9C77}
{C94C257C-3C0A-4858-B5D8-D746498D1F08} = {B8DDA694-7939-42E3-95E5-265C2217C142}
{649FA588-F02E-457C-9FCF-87E46407481E} = {B8DDA694-7939-42E3-95E5-265C2217C142}
{D0E98C0D-490B-4C61-9329-0862F6E87645} = {B8DDA694-7939-42E3-95E5-265C2217C142}
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B} = {B8DDA694-7939-42E3-95E5-265C2217C142}
@ -420,6 +434,7 @@ Global
{452EED3C-AA87-471F-B9AC-0F4479C5820C} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}
{F8743670-C8D4-41B3-86BE-BBB1226C352F} = {452EED3C-AA87-471F-B9AC-0F4479C5820C}
{7BFA159A-BF9D-4489-BF46-1B83ACCEEE0F} = {452EED3C-AA87-471F-B9AC-0F4479C5820C}
{8ACA60C2-7266-425A-B641-A2946396B7D1} = {B8DDA694-7939-42E3-95E5-265C2217C142}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BD5177C7-1380-40E7-94D2-7768E1A8B1B8}

Просмотреть файл

@ -178,6 +178,8 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "MicroPerf", "tests\benchmar
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MicroPerf", "MicroPerf", "{47112E07-9FF1-43E7-8021-F2A21D6A19A0}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fscAnyCpu", "src\fsharp\fscAnyCpu\fscAnyCpu.fsproj", "{52DCA91F-3843-43E3-8FE1-FB2B66658CBD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -1016,6 +1018,18 @@ Global
{EE08E954-AE91-4EFA-8595-10931D29E628}.Release|Any CPU.Build.0 = Release|Any CPU
{EE08E954-AE91-4EFA-8595-10931D29E628}.Release|x86.ActiveCfg = Release|Any CPU
{EE08E954-AE91-4EFA-8595-10931D29E628}.Release|x86.Build.0 = Release|Any CPU
{52DCA91F-3843-43E3-8FE1-FB2B66658CBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{52DCA91F-3843-43E3-8FE1-FB2B66658CBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{52DCA91F-3843-43E3-8FE1-FB2B66658CBD}.Debug|x86.ActiveCfg = Debug|Any CPU
{52DCA91F-3843-43E3-8FE1-FB2B66658CBD}.Debug|x86.Build.0 = Debug|Any CPU
{52DCA91F-3843-43E3-8FE1-FB2B66658CBD}.Proto|Any CPU.ActiveCfg = Debug|Any CPU
{52DCA91F-3843-43E3-8FE1-FB2B66658CBD}.Proto|Any CPU.Build.0 = Debug|Any CPU
{52DCA91F-3843-43E3-8FE1-FB2B66658CBD}.Proto|x86.ActiveCfg = Debug|Any CPU
{52DCA91F-3843-43E3-8FE1-FB2B66658CBD}.Proto|x86.Build.0 = Debug|Any CPU
{52DCA91F-3843-43E3-8FE1-FB2B66658CBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{52DCA91F-3843-43E3-8FE1-FB2B66658CBD}.Release|Any CPU.Build.0 = Release|Any CPU
{52DCA91F-3843-43E3-8FE1-FB2B66658CBD}.Release|x86.ActiveCfg = Release|Any CPU
{52DCA91F-3843-43E3-8FE1-FB2B66658CBD}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -1051,7 +1065,7 @@ Global
{AC85EE6D-033C-45F9-B8BA-884BC22EC6D9} = {3F044931-FB83-4433-B934-AE66AB27B278}
{956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C} = {3F044931-FB83-4433-B934-AE66AB27B278}
{702A7979-BCF9-4C41-853E-3ADFC9897890} = {B8DDA694-7939-42E3-95E5-265C2217C142}
{C94C257C-3C0A-4858-B5D8-D746498D1F08} = {3881429D-A97A-49EB-B7AE-A82BA5FE9C77}
{C94C257C-3C0A-4858-B5D8-D746498D1F08} = {B8DDA694-7939-42E3-95E5-265C2217C142}
{649FA588-F02E-457C-9FCF-87E46407481E} = {B8DDA694-7939-42E3-95E5-265C2217C142}
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B} = {B8DDA694-7939-42E3-95E5-265C2217C142}
{D0E98C0D-490B-4C61-9329-0862F6E87645} = {B8DDA694-7939-42E3-95E5-265C2217C142}
@ -1097,6 +1111,7 @@ Global
{208E36EE-665C-42D2-B767-C6DB03C4FEB2} = {47112E07-9FF1-43E7-8021-F2A21D6A19A0}
{EE08E954-AE91-4EFA-8595-10931D29E628} = {47112E07-9FF1-43E7-8021-F2A21D6A19A0}
{47112E07-9FF1-43E7-8021-F2A21D6A19A0} = {DFB6ADD7-3149-43D9-AFA0-FC4A818B472B}
{52DCA91F-3843-43E3-8FE1-FB2B66658CBD} = {B8DDA694-7939-42E3-95E5-265C2217C142}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {48EDBBBE-C8EE-4E3C-8B19-97184A487B37}

Просмотреть файл

@ -24,10 +24,11 @@ try {
$ArtifactsBinDir = Join-Path $RepoRoot "artifacts" | Join-Path -ChildPath "bin" -Resolve
$FSharpAssemblyDirs = Get-ChildItem -Path $ArtifactsBinDir -Filter "FSharp.*"
$FscAssemblyDir = Get-ChildItem -Path $ArtifactsBinDir -Filter "fsc"
$FscAnyCpuAssemblyDir = Get-ChildItem -Path $ArtifactsBinDir -Filter "fscAnyCpu"
$FsiAssemblyDir = Get-ChildItem -Path $ArtifactsBinDir -Filter "fsi"
$FsiAnyCpuAssemblyDir = Get-ChildItem -Path $ArtifactsBinDir -Filter "fsiAnyCpu"
$ProjectSystemAssemblyDirs = Get-ChildItem -Path $ArtifactsBinDir -Filter "ProjectSystem*"
$FSharpDirs = @($FSharpAssemblyDirs) + @($FscAssemblyDir) + @($FsiAssemblyDir) + @($FsiAnyCpuAssemblyDir) + @($ProjectSystemAssemblyDirs)
$FSharpDirs = @($FSharpAssemblyDirs) + @($FscAssemblyDir) + @($FscAnyCpuAssemblyDir) + @($FsiAssemblyDir) + @($FsiAnyCpuAssemblyDir) + @($ProjectSystemAssemblyDirs)
$FSharpDllPaths = $FSharpDirs | ForEach-Object { Get-ChildItem -Path (Join-Path $ArtifactsBinDir $_) -Recurse -Filter "*.dll" } | ForEach-Object { $_.FullName }
$FSharpExePaths = $FSharpDirs | ForEach-Object { Get-ChildItem -Path (Join-Path $ArtifactsBinDir $_) -Recurse -Filter "*.exe" } | ForEach-Object { $_.FullName }
$FSharpAssemblyPaths = @($FSharpDllPaths) + @($FSharpExePaths)

Просмотреть файл

@ -6,6 +6,7 @@
<ItemGroup>
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\fsc\fsc.fsproj" />
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\fscAnyCpu\fscAnyCpu.fsproj" />
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\fsi\fsi.fsproj" />
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\fsiAnyCpu\fsiAnyCpu.fsproj" />
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Build\FSharp.Build.fsproj" />
@ -80,6 +81,8 @@ vs.dependencies
folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools"
file source="$(BinariesFolder)fsc\$(Configuration)\$(TargetFramework)\fsc.exe" vs.file.ngen=yes vs.file.ngenArchitecture=x86 vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools\fsc.exe"
file source="$(BinariesFolder)fsc\$(Configuration)\$(TargetFramework)\fsc.exe.config"
file source="$(BinariesFolder)fscAnyCpu\$(Configuration)\$(TargetFramework)\fscAnyCpu.exe" vs.file.ngen=yes vs.file.ngenArchitecture=X64 vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools\fscAnyCpu.exe"
file source="$(BinariesFolder)fscAnyCpu\$(Configuration)\$(TargetFramework)\fscAnyCpu.exe.config"
file source="$(BinariesFolder)fsi\$(Configuration)\$(TargetFramework)\fsi.exe" vs.file.ngen=yes vs.file.ngenArchitecture=X86 vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools\fsi.exe"
file source="$(BinariesFolder)fsi\$(Configuration)\$(TargetFramework)\fsi.exe.config"
file source="$(BinariesFolder)fsiAnyCpu\$(Configuration)\$(TargetFramework)\fsiAnyCpu.exe" vs.file.ngen=yes vs.file.ngenArchitecture=X64 vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools\fsiAnyCpu.exe"

Просмотреть файл

@ -5,22 +5,26 @@
</PropertyGroup>
<!--
If the Directory.Build.props file in the project directory specifies 'FSharpUseNETSdkCompiler' then Visual Studio / msbuild.exe will use the NETSDK compiler.
Otherwise stick with desktop compiler.
If FSharpCompilerPath is set, we have nothing else to do, someone has already expressed a preference.
-->
<PropertyGroup Condition="'$(FSharpUseNETSdkCompiler)' == 'true'">
<PropertyGroup Condition="'$(FSharpCompilerPath)' == '' and '$(DisableAutoSetFscCompilerPath)' != 'true'">
<!--
Precompute paths to compiler for both netsdk and netframework compilers. Settings in the project file will allow
Microsoft.FSharp.Targets to select which compiler to use.
-->
<FSharp_Shim_Present>true</FSharp_Shim_Present>
<!-- We are in the msbuild/VS build path only, we want to forward to the installed net sdk always -->
<FSharpCompilerPath Condition="'$(FSharpCompilerPath)' == ''">$(NetCoreRoot)sdk/$(NETCoreSdkVersion)/FSharp/</FSharpCompilerPath>
<Fsc_NetFramework_X86_ToolExe>fsc.exe</Fsc_NetFramework_X86_ToolExe>
<Fsc_NetFramework_AnyCpu_ToolExe>fscAnyCpu.exe</Fsc_NetFramework_AnyCpu_ToolExe>
<FscToolPath>$(NetCoreRoot)</FscToolPath>
<FscToolExe>$(NetCoreRoot)dotnet.exe</FscToolExe>
<DotnetFscCompilerPath>"$(FSharpCompilerPath)fsc.dll"</DotnetFscCompilerPath>
<Fsc_DotNet_CompilerPath>$(NetCoreRoot)sdk/$(NETCoreSdkVersion)/FSharp/</Fsc_DotNet_CompilerPath>
<Fsc_NetFramework_ToolPath>$(VsInstallRoot)/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools/</Fsc_NetFramework_ToolPath>
<FsiToolPath>$(NetCoreRoot)</FsiToolPath>
<FsiToolExe>$(NetCoreRoot)dotnet.exe</FsiToolExe>
<DotnetFsiCompilerPath>"$(FSharpCompilerPath)fsi.dll"</DotnetFsiCompilerPath>
<Fsc_DotNET_ToolPath>$(NetCoreRoot)</Fsc_DotNET_ToolPath>
<Fsc_DotNET_ToolExe>dotnet.exe</Fsc_DotNET_ToolExe>
<Fsc_DotNET_DotnetFscCompilerPath>$(Fsc_DotNet_CompilerPath)fsc.dll</Fsc_DotNET_DotnetFscCompilerPath>
<FSharpCompilerPath>$(Fsc_NetFramework_ToolPath)</FSharpCompilerPath>
</PropertyGroup>
</Project>

Просмотреть файл

@ -50,6 +50,30 @@ this file.
<Actual32Bit Condition="!('$(TargetFrameworkVersion)'=='v2.0' or '$(TargetFrameworkVersion)'=='v3.0' or '$(TargetFrameworkVersion)'=='v3.5' or '$(TargetFrameworkVersion)'=='v4.0')">$(Prefer32Bit)</Actual32Bit>
</PropertyGroup>
<!--
Project file properties that control compiler selection:
========================================================
Suggest that the compiler used be the desktop framework version. On computers without Visual Studio these properties is ignored.
<FSharpPreferNetFrameworkTools> boolean: true or false === default value true
Suggest that the compiler used be the 64 Bit compiler. On computers without Visual Studio this property is ignored.
<FSharpPrefer64BitFSCTools> boolean: true or false === default value true
If Shim helpers are present then the values are valid and set by the Microsoft.FSharp.Helpers.props
-->
<PropertyGroup Condition="'$(FSharp_Shim_Present)' == 'true' and '$(FSharpPreferNetFrameworkTools)' == 'true'">
<FscToolPath>$(Fsc_NetFramework_ToolPath)</FscToolPath>
<FscToolExe Condition="'$(FSharpPrefer64BitTools)' != 'false'">$(Fsc_NetFramework_AnyCpu_ToolExe)</FscToolExe>
<FscToolExe Condition="'$(FSharpPrefer64BitTools)' == 'false'">$(Fsc_NetFramework_X86_ToolExe)</FscToolExe>
<DotnetFscCompilerPath></DotnetFscCompilerPath>
</PropertyGroup>
<PropertyGroup Condition="'$(FSharp_Shim_Present)' == 'true' and '$(FSharpPreferNetFrameworkTools)' != 'true'">
<FscToolPath>$(Fsc_Dotnet_ToolPath)</FscToolPath>
<FscToolExe>$(Fsc_Dotnet_ToolExe)</FscToolExe>
<DotnetFscCompilerPath>"$(Fsc_Dotnet_DotnetFscCompilerPath)"</DotnetFscCompilerPath>
</PropertyGroup>
<!--
The CreateManifestResourceNames target create the manifest resource names from the .RESX
files.

Просмотреть файл

@ -64,6 +64,7 @@
<ItemGroup>
<InternalsVisibleTo Include="fsc" />
<InternalsVisibleTo Include="fscAnyCpu" />
<InternalsVisibleTo Include="fsi" />
<InternalsVisibleTo Include="fsiAnyCpu" />
<InternalsVisibleTo Include="FSharp.Compiler.Server.Shared" />

Просмотреть файл

@ -1,8 +0,0 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
namespace Microsoft.FSharp
open System.Reflection
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("VisualFSharp.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
do()

Просмотреть файл

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<gcAllowVeryLargeObjects enabled="true" />
<legacyUnhandledExceptionPolicy enabled="true" />
<gcServer enabled="true"/>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="2.0.0.0-{{FSCoreVersion}}" newVersion="{{FSCoreVersion}}"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

Просмотреть файл

@ -0,0 +1,9 @@
<Project>
<PropertyGroup>
<UseFSharpProductVersion>true</UseFSharpProductVersion>
</PropertyGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
</Project>

Просмотреть файл

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net472</TargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>
<TargetExt>.exe</TargetExt>
<NoWarn>$(NoWarn);44;45;55;62;75;1204</NoWarn>
<AllowCrossTargeting>true</AllowCrossTargeting>
<OtherFlags>$(OtherFlags) --maxerrors:20 --extraoptimizationloops:1</OtherFlags>
<NGenBinary>true</NGenBinary>
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\fscmain.fs">
<Link>fscmain.fs</Link>
</Compile>
<None Include="..\fsc\default.win32manifest">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<NoneSubstituteText Include="App.config">
<Pattern1>{{FSCoreVersion}}</Pattern1>
<Replacement1>$(FSCoreVersion)</Replacement1>
</NoneSubstituteText>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Core\FSharp.Core.fsproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Build\FSharp.Build.fsproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.Nuget.fsproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Console" Version="$(SystemConsoleVersion)" />
<PackageReference Include="System.Linq.Expressions" Version="$(SystemLinqExpressionsVersion)" />
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
<PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataVersion)" />
<PackageReference Include="System.Runtime.Loader" Version="$(SystemRuntimeLoaderVersion)" />
<PackageReference Include="System.Security.Principal" Version="$(SystemSecurityPrincipalVersion)" />
</ItemGroup>
</Project>

Просмотреть файл

@ -18,27 +18,34 @@ open FSharp.Compiler.Text
[<Dependency("FSharp.Compiler.Service",LoadHint.Always)>]
do ()
[<EntryPoint>]
let main(argv) =
let compilerName =
// the 64 bit desktop version of the compiler is name fscAnyCpu.exe, all others are fsc.exe
if Environment.Is64BitProcess && typeof<obj>.Assembly.GetName().Name <> "System.Private.CoreLib" then
"fscAnyCpu.exe"
else
"fsc.exe"
// Set the garbage collector to batch mode, which improves overall performance.
System.Runtime.GCSettings.LatencyMode <- System.Runtime.GCLatencyMode.Batch
// Set the initial phase to garbage collector to batch mode, which improves overall performance.
use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parameter
// An SDL recommendation
UnmanagedProcessExecutionOptions.EnableHeapTerminationOnCorruption()
try
try
// We are on a compilation thread
let ctok = AssumeCompilationThreadWithoutEvidence ()
// The F# compiler expects 'argv' to include the executable name, though it makes no use of it.
let argv = Array.append [| "fsc.exe" |] argv
let argv = Array.append [| compilerName |] argv
// Check for --pause as the very first step so that a compiler can be attached here.
let pauseFlag = argv |> Array.exists (fun x -> x = "/pause" || x = "--pause")
if pauseFlag then
@ -48,9 +55,9 @@ let main(argv) =
// Set up things for the --times testing flag
#if !FX_NO_APP_DOMAINS
let timesFlag = argv |> Array.exists (fun x -> x = "/times" || x = "--times")
if timesFlag then
if timesFlag then
let stats = ILBinaryReader.GetStatistics()
AppDomain.CurrentDomain.ProcessExit.Add(fun _ ->
AppDomain.CurrentDomain.ProcessExit.Add(fun _ ->
printfn "STATS: #ByteArrayFile = %d, #MemoryMappedFileOpen = %d, #MemoryMappedFileClosed = %d, #RawMemoryFile = %d, #WeakByteArrayFile = %d"
stats.byteFileCount
stats.memoryMapFileOpenedCount

Просмотреть файл

@ -90,12 +90,16 @@
<Compile Include="Compiler\Libraries\Core\Reflection\PreComputedTupleConstructorTests.fs" />
<Compile Include="Compiler\Libraries\Core\Unchecked\DefaultOfTests.fs" />
<Compile Include="Compiler\Infrastructure\AstCompiler.fs" />
<None Include="..\..\setup\shims\Microsoft.FSharp.ShimHelpers.props">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="update.base.line.with.actuals.fsx" />
<!-- don't include test resources in subdirectories -->
<EmbeddedResource Remove="**" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Build\FSharp.Build.fsproj" />
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj" />
<ProjectReference Include="$(FSharpTestsRoot)\FSharp.Test.Utilities\FSharp.Test.Utilities.fsproj" />

Просмотреть файл

@ -6,7 +6,7 @@
<_NETCoreSdkIsPreview>false</_NETCoreSdkIsPreview>
</PropertyGroup>
<Import Project="Test.props" />
<Import Project="PackageTest.props" />
<PropertyGroup>
<ExpectsValueTuple>false</ExpectsValueTuple>
@ -15,6 +15,6 @@
<ExpectedFSharpCorePackageVersion>$(FSCorePackageVersion)</ExpectedFSharpCorePackageVersion>
</PropertyGroup>
<Import Project="Test.targets" />
<Import Project="PackageTest.targets" />
</Project>

Просмотреть файл

@ -6,7 +6,7 @@
<_NETCoreSdkIsPreview>false</_NETCoreSdkIsPreview>
</PropertyGroup>
<Import Project="Test.props" />
<Import Project="PackageTest.props" />
<PropertyGroup>
<ExpectsValueTuple>false</ExpectsValueTuple>
@ -16,6 +16,6 @@
<ExpectedFSharpCorePackageVersion>$(FSCorePackageVersion)</ExpectedFSharpCorePackageVersion>
</PropertyGroup>
<Import Project="Test.targets" />
<Import Project="PackageTest.targets" />
</Project>

Просмотреть файл

@ -6,7 +6,7 @@
<_NETCoreSdkIsPreview>false</_NETCoreSdkIsPreview>
</PropertyGroup>
<Import Project="Test.props" />
<Import Project="PackageTest.props" />
<PropertyGroup>
<ExpectsValueTuple>false</ExpectsValueTuple>
@ -16,6 +16,6 @@
<ExpectedFSharpCorePackageVersion>$(FSCorePackageVersion)</ExpectedFSharpCorePackageVersion>
</PropertyGroup>
<Import Project="Test.targets" />
<Import Project="PackageTest.targets" />
</Project>

Просмотреть файл

@ -6,7 +6,7 @@
<_NETCoreSdkIsPreview>true</_NETCoreSdkIsPreview>
</PropertyGroup>
<Import Project="Test.props" />
<Import Project="PackageTest.props" />
<PropertyGroup>
<ExpectsValueTuple>false</ExpectsValueTuple>
@ -15,6 +15,6 @@
<ExpectedFSharpCorePackageVersion>$(FSharpCorePreviewPackageVersion)</ExpectedFSharpCorePackageVersion>
</PropertyGroup>
<Import Project="Test.targets" />
<Import Project="PackageTest.targets" />
</Project>

Просмотреть файл

@ -6,7 +6,7 @@
<_NETCoreSdkIsPreview>true</_NETCoreSdkIsPreview>
</PropertyGroup>
<Import Project="Test.props" />
<Import Project="PackageTest.props" />
<PropertyGroup>
<ExpectsValueTuple>false</ExpectsValueTuple>
@ -16,6 +16,6 @@
<ExpectedFSharpCorePackageVersion>$(FSharpCoreShippedPackageVersionProperty)</ExpectedFSharpCorePackageVersion>
</PropertyGroup>
<Import Project="Test.targets" />
<Import Project="PackageTest.targets" />
</Project>

Просмотреть файл

@ -6,7 +6,7 @@
<_NETCoreSdkIsPreview>true</_NETCoreSdkIsPreview>
</PropertyGroup>
<Import Project="Test.props" />
<Import Project="PackageTest.props" />
<PropertyGroup>
<ExpectsValueTuple>false</ExpectsValueTuple>
@ -16,6 +16,6 @@
<ExpectedFSharpCorePackageVersion>$(FSharpCorePreviewPackageVersion)</ExpectedFSharpCorePackageVersion>
</PropertyGroup>
<Import Project="Test.targets" />
<Import Project="PackageTest.targets" />
</Project>

Просмотреть файл

@ -1,6 +1,6 @@
<Project ToolsVersion="4.0" DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Test.props" />
<Import Project="PackageTest.props" />
<PropertyGroup>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
@ -15,6 +15,6 @@
<ExpectsValueTuple>false</ExpectsValueTuple>
</PropertyGroup>
<Import Project="Test.targets" />
<Import Project="PackageTest.targets" />
</Project>

Просмотреть файл

@ -1,6 +1,6 @@
<Project ToolsVersion="4.0" DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Test.props" />
<Import Project="PackageTest.props" />
<PropertyGroup>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
@ -23,6 +23,6 @@
<ExpectedValueTuplePackageVersion>44.44.44</ExpectedValueTuplePackageVersion>
</PropertyGroup>
<Import Project="Test.targets" />
<Import Project="PackageTest.targets" />
</Project>

Просмотреть файл

@ -8,7 +8,7 @@
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETFramework</TargetFrameworkIdentifier>
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
<TargetsDirectory>$(MSBuildThisFileDirectory)..\..\..\..\artifacts\bin\FSharp.Build\$(Configuration)\netstandard2.0</TargetsDirectory>
<TargetsDirectory>..\..\..\..\artifacts\bin\FSharpSuite.Tests\$(Configuration)\$(TARGETFRAMEWORK)</TargetsDirectory>
<!-- these properties don't really matter, but they're necessary to make MSBuild happy -->
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>

Просмотреть файл

@ -1,6 +1,6 @@
<Project ToolsVersion="4.0" DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Test.props" />
<Import Project="PackageTest.props" />
<PropertyGroup>
<FSharpCoreImplicitPackageVersion>99.99.99</FSharpCoreImplicitPackageVersion>
@ -18,6 +18,6 @@
<ExpectedValueTuplePackageVersion>44.44.44</ExpectedValueTuplePackageVersion>
</PropertyGroup>
<Import Project="Test.targets" />
<Import Project="PackageTest.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,28 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)..\..\..\..\eng\Versions.props" />
<PropertyGroup>
<TargetFramework Condition="'$(TargetFramework)' == ''">net472</TargetFramework>
<_TargetFrameworkVersionWithoutV Condition="'$(_TargetFrameworkVersionWithoutV)' == ''">4.7.2</_TargetFrameworkVersionWithoutV>
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETFramework</TargetFrameworkIdentifier>
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
<TargetsDirectory>$(MSBuildThisFileDirectory)..\..\..\..\artifacts\bin\FSharpSuite.Tests\$(Configuration)\$(TARGETFRAMEWORK)</TargetsDirectory>
<!-- these properties don't really matter, but they're necessary to make MSBuild happy -->
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
<OutputPath>$(MSBuildThisFileDirectory)</OutputPath>
</PropertyGroup>
<!-- Initialize Paths -->
<PropertyGroup>
<NetCoreRoot>/_NetCoreRoot_/</NetCoreRoot>
<NETCoreSdkVersion>_NETCoreSdkVersion_</NETCoreSdkVersion>
<VsInstallRoot>_VsInstallRoot_</VsInstallRoot>
<DotnetFscCompilerPath></DotnetFscCompilerPath>
</PropertyGroup>
<Import Project="$(TargetsDirectory)\Microsoft.FSharp.NetSdk.props" />
</Project>

Просмотреть файл

@ -0,0 +1,26 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(TargetsDirectory)\Microsoft.FSharp.ShimHelpers.props" />
<Import Project="$(TargetsDirectory)\Microsoft.FSharp.targets" />
<Target Name="Test">
<Message Importance="High" Text="===========================================================================================================" />
<Message Importance="High" Text="Testing : $(MSBuildProjectName)" />
<!-- check for expected settings -->
<Error Condition="'$(ExpectedFSharpShimPresent)' != '$(FSharp_Shim_Present)'" Text="FSharp_Shim_Present expected:'$(ExpectedFSharpShimPresent)' actual: '$(FSharp_Shim_Present)'" />
<Error Condition="$([System.String]::new('$(FSharpCompilerPath)').EndsWith('$(ExpectedFSharpCompilerPath)')) != true" Text="FSharpCompilerPath expected to end with: '$(ExpectedFSharpCompilerPath)' actual:'$(FSharpCompilerPath)'" />
<Error Condition="'$(ExpectedFscToolExe)' != '$(FscToolExe)'" Text="FscToolExe: expected:'$(ExpectedFscToolExe)' actual:'$(FscToolExe)'" />
<Error Condition="'$(ExpectedFscToolPath)' != '$(FscToolPath)'" Text="FscToolPath: expected:'$(ExpectedFscToolPath)' actual:'$(FscToolPath)'" />
<Error Condition="'$(ExpectedDotnetFscCompilerPath)' == '' and '$(DotnetFscCompilerPath)' != ''" Text="DotnetFscCompilerPath expected to be empty actual:'$(DotnetFscCompilerPath)'" />
<Error Condition="'$(ExpectedDotnetFscCompilerPath)' != '' and $([System.String]::new('$(DotnetFscCompilerPath)').EndsWith('$(ExpectedDotnetFscCompilerPath)')) == true" Text="DotnetFscCompilerPath expected to end with: '$(ExpectedDotnetFscCompilerPath)' actual:'$(DotnetFscCompilerPath)'" />
</Target>
</Project>

Просмотреть файл

@ -1,6 +1,6 @@
<Project ToolsVersion="4.0" DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Test.props" />
<Import Project="PackageTest.props" />
<ItemGroup>
<PackageReference Update="FSharp.Core" Version="99.99.99" />
@ -16,6 +16,6 @@
<ExpectedValueTuplePackageVersion>44.44.44</ExpectedValueTuplePackageVersion>
</PropertyGroup>
<Import Project="Test.targets" />
<Import Project="PackageTest.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,24 @@
<Project ToolsVersion="4.0" DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Initialize Variables -->
<PropertyGroup>
<FSharpCompilerPath></FSharpCompilerPath>
</PropertyGroup>
<!-- Expected Values -->
<PropertyGroup>
<ExpectedFSharpShimPresent>true</ExpectedFSharpShimPresent>
<ExpectedFSharpCompilerPath>/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools/</ExpectedFSharpCompilerPath>
<ExpectedFscToolExe>dotnet.exe</ExpectedFscToolExe>
<ExpectedFscToolPath>/_NetCoreRoot_/</ExpectedFscToolPath>
<ExpectedDotnetFscCompilerPath>/FSharp/fsc.dll</ExpectedDotnetFscCompilerPath>
</PropertyGroup>
<Import Project="ToolsTest.props" />
<PropertyGroup>
</PropertyGroup>
<Import Project="ToolsTest.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,26 @@
<Project ToolsVersion="4.0" DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Initialize Variables -->
<PropertyGroup>
<FSharpCompilerPath></FSharpCompilerPath>
</PropertyGroup>
<!-- Expected Values -->
<PropertyGroup>
<ExpectedFSharpShimPresent>true</ExpectedFSharpShimPresent>
<ExpectedFSharpCompilerPath>/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools/</ExpectedFSharpCompilerPath>
<ExpectedFscToolExe>fsc.exe</ExpectedFscToolExe>
<ExpectedFscToolPath>_VsInstallRoot_/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools/</ExpectedFscToolPath>
<ExpectedDotnetFscCompilerPath></ExpectedDotnetFscCompilerPath>
</PropertyGroup>
<Import Project="ToolsTest.props" />
<PropertyGroup>
<FSharpPreferNetFrameworkTools>true</FSharpPreferNetFrameworkTools>
<FSharpPrefer64BitTools>false</FSharpPrefer64BitTools>
</PropertyGroup>
<Import Project="ToolsTest.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,25 @@
<Project ToolsVersion="4.0" DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Initialize Variables -->
<PropertyGroup>
<FSharpCompilerPath></FSharpCompilerPath>
</PropertyGroup>
<!-- Expected Values -->
<PropertyGroup>
<ExpectedFSharpShimPresent>true</ExpectedFSharpShimPresent>
<ExpectedFSharpCompilerPath>/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools/</ExpectedFSharpCompilerPath>
<ExpectedFscToolExe>fscAnyCpu.exe</ExpectedFscToolExe>
<ExpectedFscToolPath>_VsInstallRoot_/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools/</ExpectedFscToolPath>
<ExpectedDotnetFscCompilerPath></ExpectedDotnetFscCompilerPath>
</PropertyGroup>
<Import Project="ToolsTest.props" />
<PropertyGroup>
<FSharpPreferNetFrameworkTools>true</FSharpPreferNetFrameworkTools>
</PropertyGroup>
<Import Project="ToolsTest.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,26 @@
<Project ToolsVersion="4.0" DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Initialize Variables -->
<PropertyGroup>
<FSharpCompilerPath></FSharpCompilerPath>
</PropertyGroup>
<!-- Expected Values -->
<PropertyGroup>
<ExpectedFSharpShimPresent>true</ExpectedFSharpShimPresent>
<ExpectedFSharpCompilerPath>/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools/</ExpectedFSharpCompilerPath>
<ExpectedFscToolExe>dotnet.exe</ExpectedFscToolExe>
<ExpectedFscToolPath>/_NetCoreRoot_/</ExpectedFscToolPath>
<ExpectedDotnetFscCompilerPath>/FSharp/fsc.dll</ExpectedDotnetFscCompilerPath>
</PropertyGroup>
<Import Project="ToolsTest.props" />
<PropertyGroup>
<FSharpPreferNetFrameworkTools>false</FSharpPreferNetFrameworkTools>
<FSharpPrefer64BitTools>true</FSharpPrefer64BitTools>
</PropertyGroup>
<Import Project="ToolsTest.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,25 @@
<Project ToolsVersion="4.0" DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Initialize Variables -->
<PropertyGroup>
<FSharpCompilerPath></FSharpCompilerPath>
</PropertyGroup>
<!-- Expected Values -->
<PropertyGroup>
<ExpectedFSharpShimPresent>true</ExpectedFSharpShimPresent>
<ExpectedFSharpCompilerPath>/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools/</ExpectedFSharpCompilerPath>
<ExpectedFscToolExe>dotnet.exe</ExpectedFscToolExe>
<ExpectedFscToolPath>/_NetCoreRoot_/</ExpectedFscToolPath>
<ExpectedDotnetFscCompilerPath>/FSharp/fsc.dll</ExpectedDotnetFscCompilerPath>
</PropertyGroup>
<Import Project="ToolsTest.props" />
<PropertyGroup>
<FSharpPreferNetFrameworkTools>false</FSharpPreferNetFrameworkTools>
</PropertyGroup>
<Import Project="ToolsTest.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,30 @@
<Project ToolsVersion="4.0" DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Initialize Variables -->
<PropertyGroup>
<FSharpCompilerPath>/ExplicitCompilerPath/</FSharpCompilerPath>
<FscToolExe>_FscToolExe_</FscToolExe>
<FscToolPath>_FscToolPath_</FscToolPath>
<DotnetFscCompilerPath>_DotnetFscCompilerPath_</DotnetFscCompilerPath>
</PropertyGroup>
<!-- Expected Values -->
<PropertyGroup>
<ExpectedFSharpShimPresent></ExpectedFSharpShimPresent>
<ExpectedFSharpCompilerPath>/ExplicitCompilerPath/</ExpectedFSharpCompilerPath>
<ExpectedFscToolExe>_FscToolExe_</ExpectedFscToolExe>
<ExpectedFscToolPath>_FscToolPath_</ExpectedFscToolPath>
<ExpectedDotnetFscCompilerPath>_DotnetFscCompilerPath_</ExpectedDotnetFscCompilerPath>
</PropertyGroup>
<Import Project="ToolsTest.props" />
<PropertyGroup>
<FSharpCompilerPath>/ExplicitCompilerPath/</FSharpCompilerPath>
<FSharpPreferNetFrameworkTools>true</FSharpPreferNetFrameworkTools>
<FSharpPrefer64BitTools>true</FSharpPrefer64BitTools>
</PropertyGroup>
<Import Project="ToolsTest.targets" />
</Project>

Просмотреть файл

@ -15,6 +15,7 @@
<Actions>
<Action Type="Ngen" Path="fsiAnyCpu.exe" />
<Action Type="Ngen" Path="fsi.exe" />
<Action Type="Ngen" Path="fscAnyCpu.exe" />
<Action Type="Ngen" Path="fsc.exe" />
<Action Type="Ngen" Path="FSharp.Compiler.Service.dll" />
<Action Type="Ngen" Path="FSharp.Compiler.Interactive.Settings.dll" />

Просмотреть файл

@ -94,6 +94,11 @@
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\src\fsharp\fscAnyCpu\fscAnyCpu.fsproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\src\fsharp\fsc\fsc.fsproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<Private>False</Private>

Просмотреть файл

@ -36,11 +36,21 @@
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="$(ArtifactsBinDir)/fscAnyCpu/$(Configuration)/net472/**/%(_XlfLanguages.Identity)/*">
<VSixSubPath>Tools/%(_XlfLanguages.Identity)</VSixSubPath>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="$(ArtifactsBinDir)/fsc/$(Configuration)/net472/*">
<VSixSubPath>Tools</VSixSubPath>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="$(ArtifactsBinDir)/fscAnyCPU/$(Configuration)/net472/*">
<VSixSubPath>Tools</VSixSubPath>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="$(ArtifactsBinDir)/fsi/$(Configuration)/net472/*">
<VSixSubPath>Tools</VSixSubPath>
<IncludeInVSIX>true</IncludeInVSIX>
@ -52,5 +62,4 @@
</Content>
</ItemGroup>
</Target>
</Project>