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
2 changes: 1 addition & 1 deletion fcs/dependencies/MSBuild.v12.0/MSBuild.v12.0.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">

<PropertyGroup>
<TargetFramework>net45</TargetFramework>
<TargetFramework>net472</TargetFramework>
<NuspecFile>MSBuild.v12.0.nuspec</NuspecFile>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp\%(_XlfLanguages
file source="$(ArtifactsBinDir)FSharp.Build\$(Configuration)\$(TargetFramework)\%(_XlfLanguages.Identity)\FSharp.Build.resources.dll"
file source="$(ArtifactsBinDir)FSharp.Compiler.Interactive.Settings\$(Configuration)\$(TargetFramework)\%(_XlfLanguages.Identity)\FSharp.Compiler.Interactive.Settings.resources.dll"
file source="$(ArtifactsBinDir)FSharp.Compiler.Private\$(Configuration)\$(TargetFramework)\%(_XlfLanguages.Identity)\FSharp.Compiler.Private.resources.dll"
file source="$(ArtifactsBinDir)FSharp.Core\$(Configuration)\net45\%(_XlfLanguages.Identity)\FSharp.Core.resources.dll"
file source="$(ArtifactsBinDir)FSharp.Core\$(Configuration)\netstandard2.0\%(_XlfLanguages.Identity)\FSharp.Core.resources.dll"
]]>
</_Line>
</PropertyGroup>
Expand Down Expand Up @@ -95,9 +95,7 @@ folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp"
file source="$(BinariesFolder)\FSharp.Compiler.Interactive.Settings\$(Configuration)\$(TargetFramework)\FSharp.Compiler.Interactive.Settings.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2
file source="$(BinariesFolder)\FSharp.Compiler.Private\$(Configuration)\$(TargetFramework)\FSharp.Compiler.Private.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2
file source="$(BinariesFolder)\FSharp.Compiler.Server.Shared\$(Configuration)\$(TargetFramework)\FSharp.Compiler.Server.Shared.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2
file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\FSharp.Core.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2
file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\FSharp.Core.optdata"
file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\FSharp.Core.sigdata"
file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\netstandard2.0\FSharp.Core.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2
file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\FSharp.Build.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2
file source="$(NuGetPackageRoot)\Microsoft.VisualFSharp.Type.Providers.Redist\$(MicrosoftVisualFSharpTypeProvidersRedistVersion)\content\$(FSharpDataTypeProvidersVersion)\FSharp.Data.TypeProviders.dll"
file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.Build.dll"
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<PreRelease>true</PreRelease>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<PackageId>FSharp.Core</PackageId>
<NuspecFile>FSharp.Core.nuspec</NuspecFile>
<IsPackable>true</IsPackable>
Expand Down
9 changes: 0 additions & 9 deletions src/fsharp/FSharp.Core.nuget/FSharp.Core.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,15 @@
<language>en-US</language>
<dependencies>
<group targetFramework=".NETStandard2.0" />
<group targetFramework="net45" />
</dependencies>
</metadata>
<files>
<file src="FSharp.Core.nuget\$Configuration$\netstandard2.0\icon.png" target="icon.png" />

<file src="FSharp.Core\$Configuration$\netstandard2.0\FSharp.Core.dll" target="lib\netstandard2.0" />
<file src="FSharp.Core\$Configuration$\netstandard2.0\FSharp.Core.sigdata" target="lib\netstandard2.0" />
<file src="FSharp.Core\$Configuration$\netstandard2.0\FSharp.Core.optdata" target="lib\netstandard2.0" />
<file src="FSharp.Core\$Configuration$\netstandard2.0\FSharp.Core.xml" target="lib\netstandard2.0" />

<file src="FSharp.Core\$Configuration$\net45\FSharp.Core.dll" target="lib\net45" />
<file src="FSharp.Core\$Configuration$\net45\FSharp.Core.sigdata" target="lib\net45" />
<file src="FSharp.Core\$Configuration$\net45\FSharp.Core.optdata" target="lib\net45" />
<file src="FSharp.Core\$Configuration$\net45\FSharp.Core.xml" target="lib\net45" />

<!-- resources -->
<file src="FSharp.Core\$Configuration$\netstandard2.0\**\FSharp.Core.resources.dll" target="lib\netstandard2.0" />
<file src="FSharp.Core\$Configuration$\net45\**\FSharp.Core.resources.dll" target="lib\net45" />
</files>
</package>
16 changes: 1 addition & 15 deletions src/fsharp/FSharp.Core/FSharp.Core.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Unix'">netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<NoWarn>$(NoWarn);45;55;62;75;1204</NoWarn>
<AllowCrossTargeting>true</AllowCrossTargeting>
<DefineConstants>$(DefineConstants);FSHARP_CORE</DefineConstants>
Expand Down Expand Up @@ -214,17 +213,4 @@
<PackageReference Include="System.Threading.Tasks.Parallel" Version="$(SystemThreadingTasksParallelVersion)" />
</ItemGroup>

<!-- Hook compilation phase to do custom work -->
<!-- NOTE: The optdata and sigdata files are no longer needed by the F# compiler (the information is -->
<!-- integrated as resources into more recent FSharp.Core.dll's. However they are still produced to -->
<!-- allow older versions of the F# compiler to reference more recent FSharp.Core packages -->
<Target Name="CopyToBuiltBin" BeforeTargets="AfterCompile" AfterTargets="CoreCompile" >
<ItemGroup>
<BuiltProjectOutputGroupKeyOutput Include="$(IntermediateOutputPath)\FSharp.Core.sigdata" />
<BuiltProjectOutputGroupKeyOutput Include="$(IntermediateOutputPath)\FSharp.Core.optdata" />
</ItemGroup>
<Copy SourceFiles="$(IntermediateOutputPath)\FSharp.Core.sigdata" DestinationFolder="$(OutputPath)" SkipUnchangedFiles="true" />
<Copy SourceFiles="$(IntermediateOutputPath)\FSharp.Core.optdata" DestinationFolder="$(OutputPath)" SkipUnchangedFiles="true" />
</Target>

</Project>
6 changes: 1 addition & 5 deletions tests/fsharp/single-test.fs
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,7 @@ let generateProjectArtifacts (pc:ProjectConfiguration) outputType (targetFramewo
"fsi"
else
"FSharp.Core"
let targetCore =
if targetFramework.StartsWith("netstandard", StringComparison.InvariantCultureIgnoreCase) || targetFramework.StartsWith("netcoreapp", StringComparison.InvariantCultureIgnoreCase) then
"netstandard2.0"
else
"net45"
let targetCore = "netstandard2.0"
(Path.GetFullPath(__SOURCE_DIRECTORY__) + "/../../artifacts/bin/" + compiler + "/" + configuration + "/" + targetCore + "/FSharp.Core.dll")

let computeSourceItems addDirectory addCondition (compileItem:CompileItem) sources =
Expand Down
6 changes: 3 additions & 3 deletions tests/fsharp/test-framework.fs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ let config configurationName envVars =
#if NET472
let fscArchitecture = "net472"
let fsiArchitecture = "net472"
let fsharpCoreArchitecture = "net45"
let fsharpCoreArchitecture = "netstandard2.0"
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 line can be pulled out of the #if NET472 block since it's the same for both scenarios.

let fsharpBuildArchitecture = "net472"
let fsharpCompilerInteractiveSettingsArchitecture = "net472"
#else
Expand All @@ -179,8 +179,8 @@ let config configurationName envVars =
let artifactsBinPath = artifactsPath ++ "bin"
let coreClrRuntimePackageVersion = "3.0.0-preview-27318-01"
let csc_flags = "/nologo"
let fsc_flags = "-r:System.Core.dll --nowarn:20 --define:COMPILED"
let fsi_flags = "-r:System.Core.dll --nowarn:20 --define:INTERACTIVE --maxerrors:1 --abortonerror"
let fsc_flags = "-r:System --nowarn:20 --define:COMPILED"
let fsi_flags = "-r:System --nowarn:20 --define:INTERACTIVE --maxerrors:1 --abortonerror"
let Is64BitOperatingSystem = WindowsPlatform.Is64BitOperatingSystem envVars
let architectureMoniker = if Is64BitOperatingSystem then "x64" else "x86"
let CSC = requireFile (packagesDir ++ "Microsoft.Net.Compilers" ++ "2.7.0" ++ "tools" ++ "csc.exe")
Expand Down
12 changes: 6 additions & 6 deletions tests/fsharp/tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ module CoreTests =

peverify cfg "test.dll"

csc cfg """/r:"%s" /reference:test.dll /debug+""" cfg.FSCOREDLLPATH ["testcs.cs"]
csc cfg """/r:"%s" "/r:netstandard.dll" /reference:test.dll /debug+""" cfg.FSCOREDLLPATH ["testcs.cs"]

peverify cfg "testcs.exe"

Expand Down Expand Up @@ -618,13 +618,13 @@ module CoreTests =

peverify cfg "lib.dll"

csc cfg """/nologo /r:"%s" /r:System.Core.dll /r:lib.dll /out:test.exe""" cfg.FSCOREDLLPATH ["test.cs"]
csc cfg """/nologo /r:"%s" "/r:netstandard.dll" /r:lib.dll /out:test.exe""" cfg.FSCOREDLLPATH ["test.cs"]

fsc cfg """%s -a --doc:lib--optimize.xml -o:lib--optimize.dll -g""" cfg.fsc_flags ["lib.fs"]

peverify cfg "lib--optimize.dll"

csc cfg """/nologo /r:"%s" /r:System.Core.dll /r:lib--optimize.dll /out:test--optimize.exe""" cfg.FSCOREDLLPATH ["test.cs"]
csc cfg """/nologo /r:"%s" "/r:netstandard.dll" /r:lib--optimize.dll /out:test--optimize.exe""" cfg.FSCOREDLLPATH ["test.cs"]

exec cfg ("." ++ "test.exe") ""

Expand All @@ -638,9 +638,9 @@ module CoreTests =

peverify cfg "lib.dll"

csc cfg """/nologo /target:library /r:"%s" /r:lib.dll /out:lib2.dll /langversion:7.2""" cfg.FSCOREDLLPATH ["lib2.cs"]
csc cfg """/nologo "/r:netstandard.dll" /target:library /r:"%s" /r:lib.dll /out:lib2.dll /langversion:7.2""" cfg.FSCOREDLLPATH ["lib2.cs"]

csc cfg """/nologo /target:library /r:"%s" /out:lib3.dll /langversion:7.2""" cfg.FSCOREDLLPATH ["lib3.cs"]
csc cfg """/nologo "/r:netstandard.dll" /target:library /r:"%s" /out:lib3.dll /langversion:7.2""" cfg.FSCOREDLLPATH ["lib3.cs"]

fsc cfg "%s -r:lib.dll -r:lib2.dll -r:lib3.dll -o:test.exe -g" cfg.fsc_flags ["test.fsx"]

Expand All @@ -656,7 +656,7 @@ module CoreTests =
exec cfg ("." ++ "test.exe") ""

// Same without the reference to lib.dll - testing an incomplete reference set, but only compiling a subset of the code
fsc cfg "%s -r:System.Runtime.dll --noframework --define:NO_LIB_REFERENCE -r:lib3.dll -r:lib2.dll -o:test.exe -g" cfg.fsc_flags ["test.fsx"]
fsc cfg "%s -r:System.Runtime.dll --define:NO_LIB_REFERENCE -r:lib3.dll -r:lib2.dll -o:test.exe -g" cfg.fsc_flags ["test.fsx"]

peverify cfg "test.exe"

Expand Down
29 changes: 17 additions & 12 deletions tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Decimal01.il.bsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Microsoft (R) .NET Framework IL Disassembler. Version 4.7.3081.0
// Copyright (c) Microsoft Corporation. All rights reserved.


Expand All @@ -13,7 +13,12 @@
.assembly extern FSharp.Core
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 4:4:1:0
.ver 4:8:0:0
}
.assembly extern netstandard
{
.publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q
.ver 2:0:0:0
}
.assembly Decimal01
{
Expand All @@ -29,20 +34,20 @@
}
.mresource public FSharpSignatureData.Decimal01
{
// Offset: 0x00000000 Length: 0x0000013F
// Offset: 0x00000000 Length: 0x00000139
}
.mresource public FSharpOptimizationData.Decimal01
{
// Offset: 0x00000148 Length: 0x00000050
// Offset: 0x00000140 Length: 0x00000050
}
.module Decimal01.exe
// MVID: {59B19213-F150-FA46-A745-03831392B159}
// MVID: {5D4DD374-F150-FA46-A745-038374D34D5D}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x002E0000
// Image base: 0x05950000


// =============== CLASS MEMBERS DECLARATION ===================
Expand All @@ -66,17 +71,17 @@
// Code size 13 (0xd)
.maxstack 8
.language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
.line 6,6 : 9,13 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\Misc\\Decimal01.fs'
.line 6,6 : 9,13 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\Decimal01.fs'
IL_0000: ldc.i4.s 12
IL_0002: ldc.i4.0
IL_0003: ldc.i4.0
IL_0004: ldc.i4.0
IL_0005: ldc.i4.1
IL_0006: newobj instance void [mscorlib]System.Decimal::.ctor(int32,
int32,
int32,
bool,
uint8)
IL_0006: newobj instance void [netstandard]System.Decimal::.ctor(int32,
int32,
int32,
bool,
uint8)
IL_000b: pop
IL_000c: ret
} // end of method $Decimal01::main@
Expand Down
23 changes: 14 additions & 9 deletions tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Lock01.il.bsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Microsoft (R) .NET Framework IL Disassembler. Version 4.7.3081.0
// Copyright (c) Microsoft Corporation. All rights reserved.


Expand All @@ -13,7 +13,12 @@
.assembly extern FSharp.Core
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 4:4:1:0
.ver 4:8:0:0
}
.assembly extern netstandard
{
.publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q
.ver 2:0:0:0
}
.assembly Lock01
{
Expand All @@ -29,20 +34,20 @@
}
.mresource public FSharpSignatureData.Lock01
{
// Offset: 0x00000000 Length: 0x00000184
// Offset: 0x00000000 Length: 0x0000017E
}
.mresource public FSharpOptimizationData.Lock01
{
// Offset: 0x00000188 Length: 0x00000064
}
.module Lock01.exe
// MVID: {59B19213-2BCA-B308-A745-03831392B159}
// MVID: {5D4DD374-2BCA-B308-A745-038374D34D5D}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x02FB0000
// Image base: 0x06670000


// =============== CLASS MEMBERS DECLARATION ===================
Expand Down Expand Up @@ -72,7 +77,7 @@
// Code size 2 (0x2)
.maxstack 8
.language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
.line 20,20 : 19,21 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\Misc\\Lock01.fs'
.line 20,20 : 19,21 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\Lock01.fs'
IL_0000: ldnull
IL_0001: ret
} // end of method clo@20::Invoke
Expand Down Expand Up @@ -130,8 +135,8 @@
{
IL_001a: ldloc.1
IL_001b: ldloca.s V_3
IL_001d: call void [mscorlib]System.Threading.Monitor::Enter(object,
bool&)
IL_001d: call void [netstandard]System.Threading.Monitor::Enter(object,
bool&)
IL_0022: ldloc.2
IL_0023: ldnull
IL_0024: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0)
Expand All @@ -150,7 +155,7 @@

.line 100001,100001 : 0,0 ''
IL_0034: ldloc.1
IL_0035: call void [mscorlib]System.Threading.Monitor::Exit(object)
IL_0035: call void [netstandard]System.Threading.Monitor::Exit(object)
IL_003a: ldnull
IL_003b: pop
IL_003c: endfinally
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Microsoft (R) .NET Framework IL Disassembler. Version 4.7.3081.0
// Copyright (c) Microsoft Corporation. All rights reserved.


Expand All @@ -13,7 +13,12 @@
.assembly extern FSharp.Core
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 4:4:1:0
.ver 4:8:0:0
}
.assembly extern netstandard
{
.publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q
.ver 2:0:0:0
}
.assembly MethodImplNoInline
{
Expand All @@ -25,20 +30,20 @@
}
.mresource public FSharpSignatureData.MethodImplNoInline
{
// Offset: 0x00000000 Length: 0x000002FF
// Offset: 0x00000000 Length: 0x000002F9
}
.mresource public FSharpOptimizationData.MethodImplNoInline
{
// Offset: 0x00000308 Length: 0x000000F5
// Offset: 0x00000300 Length: 0x000000F5
}
.module MethodImplNoInline.exe
// MVID: {59B19213-4480-09E2-A745-03831392B159}
// MVID: {5D4DD374-4480-09E2-A745-038374D34D5D}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x00D80000
// Image base: 0x06DF0000


// =============== CLASS MEMBERS DECLARATION ===================
Expand All @@ -55,7 +60,7 @@
IL_0000: ldstr "Hey!"
IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::.ctor(string)
IL_000a: stloc.0
IL_000b: call class [mscorlib]System.IO.TextWriter [mscorlib]System.Console::get_Out()
IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out()
IL_0010: ldloc.0
IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter<class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [mscorlib]System.IO.TextWriter,
class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4<!!0,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>)
Expand Down
Loading