Skip to content
Merged
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 build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ rem Build Proto
if '%BUILD_PROTO%' == '1' (
if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '1' (

pushd .\lkg & %_dotnetexe% restore --packages %~dp0\packages &popd
pushd .\lkg & %_dotnetexe% restore &popd
@if ERRORLEVEL 1 echo Error: dotnet restore failed && goto :failure

pushd .\lkg & %_dotnetexe% publish project.json -o %~dp0\Tools\lkg -r win7-x64 &popd
Expand Down
2 changes: 1 addition & 1 deletion lkg/project.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

{
"dependencies": {
"Microsoft.FSharp.Compiler.Host.netcore": "1.0.0-alpha-160807",
"Microsoft.FSharp.Compiler.Host.netcore": "1.0.0-alpha-161102",
"Microsoft.NETCore.Runtime.CoreCLR": "1.0.2",
"Microsoft.NETCore.DotNetHostPolicy": "1.0.1",
"Microsoft.NETCore.DotNetHost": "1.0.1"
Expand Down
7 changes: 5 additions & 2 deletions src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,14 @@
<Name>FSharp.Core</Name>
</ProjectReference>
<Reference Include="System.ValueTuple" Condition="'$(TargetFramework)' != 'portable47'">
<HintPath>..\..\..\packages\System.ValueTuple.4.4.0-beta-24631-01\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
<HintPath Condition=" '$(TargetFramework)' == 'coreclr' ">..\..\..\packages\System.ValueTuple.4.0.0-rc3-24212-01\lib\netstandard1.1\System.ValueTuple.dll</HintPath>
<HintPath Condition=" '$(TargetFramework)' != 'coreclr' ">..\..\..\packages\System.ValueTuple.4.4.0-beta-24631-01\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="TupleSample" Condition="'$(TargetFramework)' != 'portable47'">
<HintPath Condition=" '$(TargetFramework)' == 'coreclr' ">FSharp.Core\SampleTuples\4.0.0-rc3-24212-01\TupleSample.dll</HintPath>
<HintPath Condition=" '$(TargetFramework)' != 'coreclr' ">FSharp.Core\SampleTuples\4.4.0-beta-24631-01\TupleSample.dll</HintPath>
<Private>True</Private>
<HintPath>..\..\..\src\fsharp\FSharp.Core.Unittests\FSharp.Core\SampleTuples\TupleSample.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'coreclr'">
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System.ValueTuple">
<HintPath>..\..\..\..\..\packages\System.ValueTuple.4.4.0-beta-24631-01\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
<HintPath>..\..\..\..\..\packages\System.ValueTuple.4.0.0-rc3-24212-01\lib\netstandard1.1\System.ValueTuple.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
49 changes: 28 additions & 21 deletions src/fsharp/fsc.fs
Original file line number Diff line number Diff line change
Expand Up @@ -957,22 +957,30 @@ let createMscorlibExportList tcGlobals =
CustomAttrs = mkILCustomAttrs List.empty<ILAttribute> }) |>
Seq.toList

let createSystemNumericsExportList tcGlobals =
let sysAssemblyRef = tcGlobals.sysCcu.ILScopeRef.AssemblyRef
let systemNumericsAssemblyRef =
let refNumericsDllName =
if tcGlobals.usesMscorlib then "System.Numerics"
else "System.Runtime.Numerics"
ILAssemblyRef.Create(refNumericsDllName, sysAssemblyRef.Hash, sysAssemblyRef.PublicKey, sysAssemblyRef.Retargetable, sysAssemblyRef.Version, sysAssemblyRef.Locale)
typesForwardedToSystemNumerics |>
Seq.map (fun t ->
{ ScopeRef = ILScopeRef.Assembly(systemNumericsAssemblyRef)
Name = t
IsForwarder = true
Access = ILTypeDefAccess.Public
Nested = mkILNestedExportedTypes List.empty<ILNestedExportedType>
CustomAttrs = mkILCustomAttrs List.empty<ILAttribute> }) |>
Seq.toList
let createSystemNumericsExportList tcGlobals (tcImports:TcImports) =
let refNumericsDllName =
if tcGlobals.usesMscorlib then "System.Numerics"
else "System.Runtime.Numerics"
let numericsAssemblyRef =
match tcImports.GetImportedAssemblies() |> List.tryFind<ImportedAssembly>(fun a -> a.FSharpViewOfMetadata.AssemblyName = refNumericsDllName) with
| Some asm ->
match asm.ILScopeRef with
| ILScopeRef.Assembly aref -> Some aref
| _ -> None
| None -> None
match numericsAssemblyRef with
| Some aref ->
let systemNumericsAssemblyRef = ILAssemblyRef.Create(refNumericsDllName, aref.Hash, aref.PublicKey, aref.Retargetable, aref.Version, aref.Locale)
typesForwardedToSystemNumerics |>
Seq.map (fun t ->
{ ScopeRef = ILScopeRef.Assembly(systemNumericsAssemblyRef)
Name = t
IsForwarder = true
Access = ILTypeDefAccess.Public
Nested = mkILNestedExportedTypes List.empty<ILNestedExportedType>
CustomAttrs = mkILCustomAttrs List.empty<ILAttribute> }) |>
Seq.toList
| None -> []

module MainModuleBuilder =

Expand Down Expand Up @@ -1009,7 +1017,7 @@ module MainModuleBuilder =


let CreateMainModule
(tcConfig:TcConfig,tcGlobals,
(tcConfig:TcConfig,tcGlobals,tcImports:TcImports,
pdbfile,assemblyName,outfile,topAttrs,
(iattrs,intfDataResources),optDataResources,
codegenResults,assemVerFromAttrib,metadataVersion,secDecls) =
Expand All @@ -1033,7 +1041,7 @@ module MainModuleBuilder =
let exportedTypesList =
if (tcConfig.compilingFslib && tcConfig.compilingFslib40) then
(List.append (createMscorlibExportList tcGlobals)
(if tcConfig.compilingFslibNoBigInt then [] else (createSystemNumericsExportList tcGlobals))
(if tcConfig.compilingFslibNoBigInt then [] else (createSystemNumericsExportList tcGlobals tcImports))
)
else
[]
Expand Down Expand Up @@ -2012,7 +2020,7 @@ let main2(Args(tcConfig, tcImports, frameworkTcImports: TcImports, tcGlobals, er
Args(tcConfig,tcImports,tcGlobals,errorLogger,generatedCcu,outfile,optimizedImpls,topAttrs,pdbfile,assemblyName, (sigDataAttributes, sigDataResources), optDataResources,assemVerFromAttrib,signingInfo,metadataVersion,exiter)

let main2b(Args(tcConfig: TcConfig, tcImports, tcGlobals, errorLogger, generatedCcu: CcuThunk, outfile, optimizedImpls, topAttrs, pdbfile, assemblyName, idata, optDataResources, assemVerFromAttrib, signingInfo, metadataVersion, exiter: Exiter)) =

// Compute a static linker.
let ilGlobals = tcGlobals.ilg
if tcConfig.standalone && generatedCcu.UsesFSharp20PlusQuotations then
Expand All @@ -2035,8 +2043,7 @@ let main2b(Args(tcConfig: TcConfig, tcImports, tcGlobals, errorLogger, generated
let permissionSets = ilxGenerator.CreatePermissionSets securityAttrs
let secDecls = if securityAttrs.Length > 0 then mkILSecurityDecls permissionSets else emptyILSecurityDecls


let ilxMainModule = MainModuleBuilder.CreateMainModule (tcConfig,tcGlobals,pdbfile,assemblyName,outfile,topAttrs,idata,optDataResources,codegenResults,assemVerFromAttrib,metadataVersion,secDecls)
let ilxMainModule = MainModuleBuilder.CreateMainModule (tcConfig,tcGlobals,tcImports,pdbfile,assemblyName,outfile,topAttrs,idata,optDataResources,codegenResults,assemVerFromAttrib,metadataVersion,secDecls)

AbortOnError(errorLogger,tcConfig,exiter)

Expand Down