Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
dsyme committed Feb 21, 2017
2 parents 5a942da + e1b9479 commit ccd58d9
Show file tree
Hide file tree
Showing 43 changed files with 1,544 additions and 1,256 deletions.
19 changes: 8 additions & 11 deletions src/FSharpSource.Settings.targets
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
<!-- Always qualify the IntermediateOutputPath by the TargetFramework if any exists -->
<IntermediateOutputPath>obj\$(Configuration)\$(TargetFramework)\</IntermediateOutputPath>
<IntermediateOutputPath Condition="'$(PortableProfileBeingReferenced)' != ''">obj\$(Configuration)\$(TargetFramework)\$(PortableProfileBeingReferenced)\</IntermediateOutputPath>
<UseMicroBuild>false</UseMicroBuild>
<MonoPackaging>true</MonoPackaging>
</PropertyGroup>

<!--
<PropertyGroup Condition="'$(OS)' != 'Unix'">
<PropertyGroup Condition="'$(MonoPackaging)' != 'true' AND '$(OS)' != 'Unix'">
<UseMicroBuild>true</UseMicroBuild>
<UseSourceLink>true</UseSourceLink>
<UseGatherBinaries>true</UseGatherBinaries>
<AddVsSdkAttributesToSomeCoreComponents>true</AddVsSdkAttributesToSomeCoreComponents>
Expand All @@ -48,7 +48,6 @@
<VsSDKIncludes Condition=" '$(VsSDKIncludes)' == '' ">$(MSBuildThisFileDirectory)..\packages\$(VSSDK_BUILDTOOLS_VERSION)\tools\vssdk\inc</VsSDKIncludes>
<VsixSchemaPath Condition=" '$(VsixSchemaPath)' == '' ">$(MSBuildThisFileDirectory)..\packages\$(VSSDK_BUILDTOOLS_VERSION)\tools\vssdk\schemas\VSIXManifestSchema.xsd</VsixSchemaPath>
</PropertyGroup>
-->

<PropertyGroup Condition=" '$(ProjectLanguage)' == 'FSharp' ">
<!-- Things we do only for F# projects -->
Expand Down Expand Up @@ -122,13 +121,11 @@
<FsiToolExe>fsi.exe</FsiToolExe>
<FsLexToolExe>fslex.exe</FsLexToolExe>
<FsYaccToolExe>fsyacc.exe</FsYaccToolExe>
<!--
<RoslynVersion>2.0.0-rc3-61324-01</RoslynVersion>
<RoslynVSBinariesVersion>14.0</RoslynVSBinariesVersion>
<RoslynVSPackagesVersion>14.3.25407</RoslynVSPackagesVersion>
-->
<MSBuildVersionSuffix>v12.0</MSBuildVersionSuffix>
<MSBuildVersionFull>12.0.0.0</MSBuildVersionFull>

<!-- The version of MSBuild assumed byt the F# compiler in the Mono packaging of F# -->
<MonoPackagingMSBuildVersionSuffix>v12.0</MonoPackagingMSBuildVersionSuffix>
<MonoPackagingMSBuildVersionFull>12.0.0.0</MonoPackagingMSBuildVersionFull>

<!-- FSharp.Compiler.Tools is currently only used to get a working FSI.EXE to execute some scripts during the build -->
<!-- The LKG FSI.EXE requires MSBuild 15 to be installed, which is painful -->
<FsiToolPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.0.1.21\tools</FsiToolPath>
Expand Down
12 changes: 10 additions & 2 deletions src/FSharpSource.targets
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<When Condition="'$(ProjectLanguage)' == 'FSharp'">
<Choose>
<!-- In the open source "Mono" build we always sign the binaries with the public test.snk, apart from FSharp.Core -->
<When Condition="('$(AssemblyName)'!='FSharp.Core') AND ('$(AssemblyName)'!='FSharp.Core.Unittests')" >
<When Condition="('$(MonoPackaging)' == 'true') AND ('$(AssemblyName)'!='FSharp.Core') AND ('$(AssemblyName)'!='FSharp.Core.Unittests')" >
<PropertyGroup>
<OtherFlags>$(OtherFlags) --keyfile:"$(FSharpSourcesRoot)\fsharp\test.snk"</OtherFlags>
<DefineConstants>STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY;$(DefineConstants)</DefineConstants>
Expand Down Expand Up @@ -113,6 +113,11 @@
<DefineConstants>NO_STRONG_NAMES;$(DefineConstants)</DefineConstants>
</PropertyGroup>


<PropertyGroup Condition="'$(MonoPackaging)' != 'true'">
<DefineConstants>MSBUILD_AT_LEAST_14;$(DefineConstants)</DefineConstants>
</PropertyGroup>

<PropertyGroup>
<!-- Disable uwa toolchain nuget package resolve logic. -->
<NuGetTargets Condition="'$(NuGetTargets)' == ''">false</NuGetTargets>
Expand All @@ -129,7 +134,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='net40'">
<DefineConstants>$(DefineConstants);CROSS_PLATFORM_COMPILER</DefineConstants>
<DefineConstants Condition="'$(MonoPackaging)' == 'true'">$(DefineConstants);CROSS_PLATFORM_COMPILER</DefineConstants>
<DefineConstants>$(DefineConstants);ENABLE_MONO_SUPPORT</DefineConstants>
<DefineConstants>$(DefineConstants);BE_SECURITY_TRANSPARENT</DefineConstants>
<DefineConstants>$(DefineConstants);FX_LCIDFROMCODEPAGE</DefineConstants>
Expand Down Expand Up @@ -336,6 +341,7 @@
<DefineConstants>$(DefineConstants);FX_NO_REGISTERED_WAIT_HANDLES</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SECURITY_PERMISSIONS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SYSTEM_CONSOLE</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SYSTEM_BINDINGFLAGS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_THREAD</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_TYPECODE</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_WEB_CLIENT</DefineConstants>
Expand Down Expand Up @@ -370,6 +376,7 @@
<DefineConstants>$(DefineConstants);FX_NO_REGISTERED_WAIT_HANDLES</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SECURITY_PERMISSIONS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SYSTEM_CONSOLE</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SYSTEM_BINDINGFLAGS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_THREAD</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_TPL_PARALLEL</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_TYPECODE</DefineConstants>
Expand Down Expand Up @@ -406,6 +413,7 @@
<DefineConstants>$(DefineConstants);FX_NO_REGISTERED_WAIT_HANDLES</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SECURITY_PERMISSIONS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SYSTEM_CONSOLE</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SYSTEM_BINDINGFLAGS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_THREAD</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_TPL_PARALLEL</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_TYPECODE</DefineConstants>
Expand Down
2 changes: 1 addition & 1 deletion src/fsharp/AugmentWithHashCompare.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ let MakeBindingsForEqualsAugmentation (g: TcGlobals) (tycon:Tycon) =
let rec TypeDefinitelyHasEquality g ty =
if isAppTy g ty && HasFSharpAttribute g g.attrib_NoEqualityAttribute (tcrefOfAppTy g ty).Attribs then
false
elif isTyparTy g ty && (destTyparTy g ty).Constraints |> List.exists (function TyparConstraint.SupportsEquality _ -> true | _ -> false) then
elif isTyparTy g ty && (destTyparTy g ty).Constraints |> List.exists (function TyparConstraint.SupportsEquality _ -> true | _ -> false) then
true
else
match ty with
Expand Down
29 changes: 13 additions & 16 deletions src/fsharp/CompileOps.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3423,23 +3423,20 @@ type TcAssemblyResolutions(results : AssemblyResolution list, unresolved : Unres
member tcResolutions.TryFindByResolvedPath nm = resolvedPathToResolution.TryFind nm
member tcResolutions.TryFindByOriginalReferenceText nm = originalReferenceToResolution.TryFind nm

static member ResolveAssemblyReferences (ctok, tcConfig:TcConfig, assemblyList:AssemblyReference list, knownUnresolved:UnresolvedAssemblyReference list) : TcAssemblyResolutions =
let fallBack() =
let resolutions =
assemblyList
|> List.map (fun assemblyReference ->
try
Choice1Of2 (tcConfig.ResolveLibWithDirectories (CcuLoadFailureAction.RaiseError, assemblyReference) |> Option.get)
with e ->
errorRecovery e assemblyReference.Range
Choice2Of2 assemblyReference)
let successes = resolutions |> List.choose (function Choice1Of2 x -> Some x | _ -> None)
let failures = resolutions |> List.choose (function Choice2Of2 x -> Some (UnresolvedAssemblyReference(x.Text,[x])) | _ -> None)
successes, failures

static member ResolveAssemblyReferences (ctok, tcConfig:TcConfig,assemblyList:AssemblyReference list, knownUnresolved:UnresolvedAssemblyReference list) : TcAssemblyResolutions =
let resolved,unresolved =
if tcConfig.useSimpleResolution then
fallBack()
let resolutions =
assemblyList
|> List.map (fun assemblyReference ->
try
Choice1Of2 (tcConfig.ResolveLibWithDirectories (CcuLoadFailureAction.RaiseError, assemblyReference) |> Option.get)
with e ->
errorRecovery e assemblyReference.Range
Choice2Of2 assemblyReference)
let successes = resolutions |> List.choose (function Choice1Of2 x -> Some x | _ -> None)
let failures = resolutions |> List.choose (function Choice2Of2 x -> Some (UnresolvedAssemblyReference(x.Text,[x])) | _ -> None)
successes, failures
else
RequireCompilationThread ctok // we don't want to do assemby resolution concurrently, we assume MSBuild doesn't handle this
TcConfig.TryResolveLibsUsingMSBuildRules (tcConfig, assemblyList, rangeStartup, ReportErrors)
Expand Down Expand Up @@ -3991,7 +3988,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
entity.ModuleOrNamespaceType.AddProvidedTypeEntity(newEntity)
| None -> ()

entity.Data.entity_tycon_repr <-
entity.entity_tycon_repr <-
match entity.TypeReprInfo with
// This is the first extension
| TNoRepr ->
Expand Down
Loading

0 comments on commit ccd58d9

Please sign in to comment.