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
21 changes: 21 additions & 0 deletions FSharpBuild.Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,27 @@
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net47'">$(MonoLibFolder)/4.7-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net471'">$(MonoLibFolder)/4.7.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net472'">$(MonoLibFolder)/4.7.2-api</FrameworkPathOverride>
<!--
Need Facades search directory as well for some netframework TFMs. THIS IS BAD.
We have to copy/paste in search directories straight out of MSBuild: https://github.com/Microsoft/msbuild/blob/master/src/Tasks/Microsoft.Common.CurrentVersion.targets#L560-L571.
This is because a simple override of `$(FrameworkPathOverride);$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)` resolves before MSBuild's own logic,
and so this default set of paths is never added. This is likely because of the layering order of Directory.Build.props
-->
<AssemblySearchPaths Condition="'$(MonoPackaging)' == 'true'">
{CandidateAssemblyFiles};
$(ReferencePath);
{HintPathFromItem};
{TargetFrameworkDirectory};
$(FrameworkPathOverride);
$(FrameworkPathOverride)/Facades;
$(AssemblyFoldersConfigFileSearchPath)
{Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};
{AssemblyFolders};
{GAC};
{RawFileName};
$(OutDir);
</AssemblySearchPaths>
<!-- <AssemblySearchPaths>$(AssemblySearchPaths);</AssemblySearchPaths> -->
</PropertyGroup>

<!-- signing -->
Expand Down
39 changes: 25 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
Configuration ?= release
DotNetVersion = `cat DotnetCLIToolsVersion.txt`
DotNetToolPath = $(CURDIR)/artifacts/toolset/dotnet
ArtifactsDir ?= $(CURDIR)/artifacts
DotNetToolPath = $(ArtifactsDir)/toolset/dotnet
DotNetExe = "$(DotNetToolPath)/dotnet"

all: proto restore build test

tools:
$(CURDIR)/scripts/dotnet-install.sh --version $(DotNetVersion) --install-dir "$(DotNetToolPath)"

proto: tools
shutdown: tools
$(DotNetExe) build-server shutdown

proto-restore: tools
$(DotNetExe) restore src/buildtools/buildtools.proj
$(DotNetExe) restore src/fsharp/FSharp.Build/FSharp.Build.fsproj
$(DotNetExe) restore src/fsharp/fsc/fsc.fsproj

buildtools: proto-restore
$(DotNetExe) build src/buildtools/buildtools.proj -c Proto
$(DotNetExe) build src/fsharp/FSharp.Build/FSharp.Build.fsproj -f netstandard2.0 -c Proto
$(DotNetExe) build src/fsharp/fsc/fsc.fsproj -f netcoreapp2.1 -c Proto
#ensure destination dir
mkdir -p $(ArtifactsDir)/Bootstrap
cp $(ArtifactsDir)/bin/fslex/Proto/netcoreapp2.0/* $(ArtifactsDir)/Bootstrap
cp $(ArtifactsDir)/bin/fsyacc/Proto/netcoreapp2.0/* $(ArtifactsDir)/Bootstrap

proto: buildtools
$(DotNetExe) build src/fsharp/FSharp.Build/FSharp.Build.fsproj -c Proto
$(DotNetExe) build src/fsharp/fsc/fsc.fsproj -c Proto

restore:
$(DotNetExe) restore src/fsharp/FSharp.Core/FSharp.Core.fsproj
Expand All @@ -29,18 +40,18 @@ restore:

build: proto restore
$(DotNetExe) build-server shutdown
$(DotNetExe) build -c $(Configuration) -f netstandard1.6 src/fsharp/FSharp.Core/FSharp.Core.fsproj
$(DotNetExe) build -c $(Configuration) -f netstandard2.0 src/fsharp/FSharp.Build/FSharp.Build.fsproj
$(DotNetExe) build -c $(Configuration) -f netstandard2.0 src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj
$(DotNetExe) build -c $(Configuration) -f netcoreapp2.1 src/fsharp/fsc/fsc.fsproj
$(DotNetExe) build -c $(Configuration) -f netstandard2.0 src/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj
$(DotNetExe) build -c $(Configuration) -f netcoreapp2.1 src/fsharp/fsi/fsi.fsproj
$(DotNetExe) build -c $(Configuration) -f netcoreapp2.0 tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj
$(DotNetExe) build -c $(Configuration) -f netcoreapp2.0 tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj
$(DotNetExe) build -c $(Configuration) src/fsharp/FSharp.Core/FSharp.Core.fsproj
$(DotNetExe) build -c $(Configuration) src/fsharp/FSharp.Build/FSharp.Build.fsproj
$(DotNetExe) build -c $(Configuration) src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj
$(DotNetExe) build -c $(Configuration) src/fsharp/fsc/fsc.fsproj
$(DotNetExe) build -c $(Configuration) src/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj
$(DotNetExe) build -c $(Configuration) src/fsharp/fsi/fsi.fsproj
$(DotNetExe) build -c $(Configuration) tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj
$(DotNetExe) build -c $(Configuration) tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj

test: build
$(DotNetExe) test -f netcoreapp2.0 -c $(Configuration) --no-restore --no-build tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj -l "trx;LogFileName=$(CURDIR)/tests/TestResults/FSharp.Core.UnitTests.coreclr.trx"
$(DotNetExe) test -f netcoreapp2.0 -c $(Configuration) --no-restore --no-build tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj -l "trx;LogFileName=$(CURDIR)/tests/TestResults/FSharp.Build.UnitTests.coreclr.trx"
$(DotNetExe) test -c $(Configuration) --no-restore --no-build tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj -l "trx;LogFileName=$(CURDIR)/tests/TestResults/FSharp.Core.UnitTests.trx"
$(DotNetExe) test -c $(Configuration) --no-restore --no-build tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj -l "trx;LogFileName=$(CURDIR)/tests/TestResults/FSharp.Build.UnitTests.trx"

clean:
rm -rf $(CURDIR)/artifacts
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,10 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
<Reference Include="ISymWrapper, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<!-- ISymWrapper is only present on Windows, and is late-bound anyway in the compiler, so it doesn't need to be a reference on all platforms. -->
<Reference Include="ISymWrapper" Condition="$([MSBuild]::IsOsPlatform('Windows'))" />
<Reference Include="System.Runtime" />
<Reference Include="System.IO" />
<PackageReference Include="Microsoft.Build" Version="$(MicrosoftBuildPackageVersion)" />
<PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildPackageVersion)" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildPackageVersion)" />
Expand Down