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
4 changes: 3 additions & 1 deletion .nuget/NuGet.targets
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
<PackagesConfig>packages.config</PackagesConfig>
<MonoPath Condition="'$(MonoPath)' == '' And Exists('/Library/Frameworks/Mono.framework/Commands/mono')">/Library/Frameworks/Mono.framework/Commands/mono</MonoPath>
<MonoPath Condition="'$(MonoPath)' == ''">mono</MonoPath>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -43,7 +45,7 @@
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>

<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>

<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>

Expand Down
6 changes: 3 additions & 3 deletions before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ fi)
fi)

#TODO: work out how to avoid the need for this
chmod u+x packages/FSharp.Compiler.Tools.4.0.1.19/tools/fsi.exe
chmod u+x packages/FsLexYacc.7.0.3/build/fslex.exe
chmod u+x packages/FsLexYacc.7.0.3/build/fsyacc.exe
chmod u+x packages/FSharp.Compiler.Tools.4.0.1.21/tools/fsi.exe
chmod u+x packages/FsLexYacc.7.0.4/build/fslex.exe
chmod u+x packages/FsLexYacc.7.0.4/build/fsyacc.exe

# The FSharp.Compiler.Tools package doesn't work correctly unless a proper install of F# has been done on the machine.
# OSX can skip this because the OSX Mono installer includes F#.
Expand Down
6 changes: 3 additions & 3 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '1' (
set _dotnetexe=%~dp0Tools\dotnetcli\dotnet.exe
set NUGET_PACKAGES=%~dp0Packages

set _fsiexe="packages\FSharp.Compiler.Tools.4.0.1.19\tools\fsi.exe"
set _fsiexe="packages\FSharp.Compiler.Tools.4.0.1.21\tools\fsi.exe"
if not exist %_fsiexe% echo Error: Could not find %_fsiexe% && goto :failure
%_ngenexe% install %_fsiexe% /nologo

Expand Down Expand Up @@ -522,8 +522,8 @@ if '%BUILD_PROTO%' == '1' (

if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '0' (

echo %_ngenexe% install packages\FSharp.Compiler.Tools.4.0.1.19\tools\fsc.exe /nologo
%_ngenexe% install packages\FSharp.Compiler.Tools.4.0.1.19\tools\fsc.exe /nologo
echo %_ngenexe% install packages\FSharp.Compiler.Tools.4.0.1.21\tools\fsc.exe /nologo
%_ngenexe% install packages\FSharp.Compiler.Tools.4.0.1.21\tools\fsc.exe /nologo

echo %_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj
%_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj
Expand Down
6 changes: 4 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ if [ $rc -ne 0 ]; then
fi

# This is a very, very limited build script for Mono which bootstraps the compiler
xbuild src/fsharp-proto-build.proj
xbuild build-everything.proj /p:Configuration=release
echo "xbuild src/fsharp-proto-build.proj /p:UseMonoPackaging=true"
xbuild src/fsharp-proto-build.proj /p:UseMonoPackaging=true
echo "xbuild build-everything.proj /p:Configuration=release /p:UseMonoPackaging=true"
xbuild build-everything.proj /p:Configuration=release /p:UseMonoPackaging=true
4 changes: 2 additions & 2 deletions packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- Packages for the Visual F# IDE Tools should go in vsintegration\packages.config -->

<!-- CodeGen-->
<package id="FsLexYacc" version="7.0.3" targetFramework="net46" />
<package id="FsLexYacc" version="7.0.4" targetFramework="net46" />

<!-- Build infrastructure-->
<package id="MicroBuild.Core" version="0.2.0" />
Expand Down Expand Up @@ -38,7 +38,7 @@

<!-- FSharp.Compiler.Tools is 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 -->
<package id="FSharp.Compiler.Tools" version="4.0.1.19"/>
<package id="FSharp.Compiler.Tools" version="4.0.1.21"/>

<!-- FSharp.Data is used in some of the scripts ued for the coreclr build -->
<package id="FSharp.Data" version="2.2.5" />
Expand Down
15 changes: 9 additions & 6 deletions src/FSharpSource.Settings.targets
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
<!-- Always qualify the IntermediateOutputPath by the TargetFramework if any exists -->
<IntermediateOutputPath>obj\$(Configuration)\$(TargetFramework)\</IntermediateOutputPath>
<IntermediateOutputPath Condition="'$(PortableProfileBeingReferenced)' != ''">obj\$(Configuration)\$(TargetFramework)\$(PortableProfileBeingReferenced)\</IntermediateOutputPath>

</PropertyGroup>

<PropertyGroup Condition="'$(OS)' != 'Unix'">
<!-- Things we do only on Windows right now -->
<PropertyGroup Condition="'$(MonoPackaging)' != 'true' AND '$(OS)' != 'Unix'">
<UseMicroBuild>true</UseMicroBuild>
<UseSourceLink>true</UseSourceLink>
<UseGatherBinaries>true</UseGatherBinaries>
Expand Down Expand Up @@ -117,19 +117,22 @@

<PropertyGroup>
<!-- Compiler tool locations. -->
<FsSrGenToolPath>$(FSharpSourcesRoot)\..\packages\fssrgen.3.1.0\lib\net46</FsSrGenToolPath>
<FsLexToolPath>$(FSharpSourcesRoot)\..\packages\FsLexYacc.7.0.3\build</FsLexToolPath>
<FsYaccToolPath>$(FSharpSourcesRoot)\..\packages\FsLexYacc.7.0.3\build</FsYaccToolPath>
<FsLexToolPath>$(FSharpSourcesRoot)\..\packages\FsLexYacc.7.0.4\build</FsLexToolPath>
<FsYaccToolPath>$(FSharpSourcesRoot)\..\packages\FsLexYacc.7.0.4\build</FsYaccToolPath>
<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>

<!-- 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.19\tools</FsiToolPath>
<FsiToolPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.0.1.21\tools</FsiToolPath>
</PropertyGroup>

<Import Project="../Tools/Build.Common.props" Condition="'$(TargetFramework)'=='coreclr'"/>
Expand Down
34 changes: 27 additions & 7 deletions src/FSharpSource.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable47'">3.47.41.0</FSCoreVersion>
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable78'">3.78.41.0</FSCoreVersion>
<FSCoreVersion Condition="'$(TargetFramework)' == 'portable259'">3.259.41.0</FSCoreVersion>

</PropertyGroup>
<Choose>
<When Condition="'$(Configuration)' == 'Debug' or '$(Configuration)' == 'Release' ">
Expand All @@ -18,6 +19,16 @@
<Choose>
<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="('$(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>
<StrongNames>true</StrongNames>
<MicroBuildAssemblyVersion>$(FSCoreVersion)</MicroBuildAssemblyVersion>
<MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage>
</PropertyGroup>
</When>
<When Condition="'$(AssemblyName)' == 'FSharp.Core' or '$(AssemblyName)' == 'FSharp.Build' or '$(AssemblyName)' == 'FSharp.Compiler' or '$(AssemblyName)' == 'FSharp.Compiler.Interactive.Settings' or '$(AssemblyName)' == 'FSharp.Compiler.Server.Shared' or '$(AssemblyName)' == 'fsc' or '$(AssemblyName)' == 'fsi' or '$(AssemblyName)' == 'fsiAnyCpu' or '$(AssemblyName)' == 'FSharp.Compiler.Unittests' or '$(AssemblyName)' == 'HostedCompilerServer'" >
<PropertyGroup Condition="'$(AssemblyName)' == 'FSharp.Core' and ('$(TargetFramework)' == 'portable47' or '$(TargetFramework)' == 'portable7' or '$(TargetFramework)' == 'portable78' or '$(TargetFramework)' == 'portable259' or '$(TargetFramework)' == 'coreclr')">
<IsPortableProfile>true</IsPortableProfile>
Expand Down Expand Up @@ -88,10 +99,19 @@
</Otherwise>
</Choose>

<PropertyGroup Condition="'$(UseMicroBuild)' != 'true'">
<OtherFlags >$(OtherFlags) --version:"$(MicroBuildAssemblyVersion)"</OtherFlags>
</PropertyGroup>

<PropertyGroup Condition="'$(StrongNames)' != 'true'">
<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 @@ -108,6 +128,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='net40'">
<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 @@ -348,9 +369,9 @@
<PropertyGroup >
<OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\$(ProtoFlavour)\bin</OutputPath>
<!-- When using coreclr to bootstrap to proto. We acquire the FSharp.Core LKG, targets LKG, the FSharp.Build LKG from the .NET Framework compiler tools LKG package. -->
<FSharpCoreLkgPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.0.1.19\tools</FSharpCoreLkgPath>
<FSharpCoreLkgPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.0.1.21\tools</FSharpCoreLkgPath>
<FSharpNetCoreLkgPath>$(FSharpSourcesRoot)\..\Tools\lkg</FSharpNetCoreLkgPath>
<FSharpTargetsPath>..\packages\FSharp.Compiler.Tools.4.0.1.19\tools\Microsoft.FSharp.Targets</FSharpTargetsPath>
<FSharpTargetsPath>..\packages\FSharp.Compiler.Tools.4.0.1.21\tools\Microsoft.FSharp.Targets</FSharpTargetsPath>
<!-- When using coreclr to bootstrap, the compiler binary comes from the coreclr LKG, invoked using corehost.exe -->
<FscToolPath>$(FSharpSourcesRoot)\..\Tools\dotnetcli</FscToolPath>
<FscToolExe Condition="'$(OS)' != 'Unix'">dotnet.exe</FscToolExe>
Expand All @@ -362,8 +383,8 @@
<!-- Use .NET Framework to bootstrap to proto -->
<PropertyGroup >
<OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\$(ProtoFlavour)\bin</OutputPath>
<FSharpCoreLkgPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.0.1.19\tools</FSharpCoreLkgPath>
<FSharpTargetsPath>..\packages\FSharp.Compiler.Tools.4.0.1.19\tools\Microsoft.FSharp.Targets</FSharpTargetsPath>
<FSharpCoreLkgPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.0.1.21\tools</FSharpCoreLkgPath>
<FSharpTargetsPath>..\packages\FSharp.Compiler.Tools.4.0.1.21\tools\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</When>
<When Condition="'$(BuildWith)' == '' AND ('$(TargetFramework)'=='portable47' OR '$(TargetFramework)'=='portable7' OR '$(TargetFramework)'=='portable78' OR '$(TargetFramework)'=='portable259' OR '$(TargetFramework)'=='coreclr')">
Expand Down Expand Up @@ -393,7 +414,6 @@
<Message Text="FSharpTargetsPath = $(FSharpTargetsPath)" />
<Message Text="FSharpSourcesRoot = $(FSharpSourcesRoot)" />
<Message Text="FscToolPath = $(FscToolPath)" />
<Message Text="FsSrGenToolPath = $(FsSrGenToolPath)" />
<Message Text="FsiToolPath = $(FsiToolPath)" />
<Message Text="FsLexToolPath = $(FsLexToolPath)" />
<Message Text="FsYaccToolPath = $(FsYaccToolPath)" />
Expand All @@ -402,7 +422,6 @@
<Error Text="Expect $(FSharpSourcesRoot)\..\Tools\lkg\fsc.exe to exist when BUILD_PROTO_WITH_CORECLR_LKG==1" Condition="'$(BUILD_PROTO_WITH_CORECLR_LKG)' == 1 AND !Exists('$(FSharpSourcesRoot)\..\Tools\lkg\fsc.exe')" />
<Error Text="Expect $(FscToolPath)\$(FscToolExe) to exist" Condition="!Exists('$(FscToolPath)\$(FscToolExe)')" />
<Error Text="Expect $(DotnetFscCompilerPath) to exist if non-empty" Condition="'$(DotnetFscCompilerPath)' != '' AND !Exists('$(DotnetFscCompilerPath)')" />
<Error Text="Expect $(FsSrGenToolPath)\fssrgen.exe to exist" Condition="!Exists('$(FsSrGenToolPath)\fssrgen.exe')" />
<Error Text="Expect $(FsiToolPath)\$(FsiToolExe) to exist" Condition="!Exists('$(FsiToolPath)\$(FsiToolExe)')" />
<Error Text="Expect $(FsLexToolPath)\$(FsLexToolExe) to exist" Condition="!Exists('$(FsLexToolPath)\$(FsLexToolExe)')" />
<Error Text="Expect $(FsYaccToolPath)\$(FsYaccToolExe) to exist" Condition="!Exists('$(FsYaccToolPath)\$(FsYaccToolExe)')" />
Expand Down Expand Up @@ -451,7 +470,8 @@
Name="CopyAndSubstituteTextFiles"
Inputs="@(CopyAndSubstituteText)"
Outputs="@(CopyAndSubstituteText->'$(OutDir)%(TargetFilename)')" >
<Exec Command="&quot;$(FsiToolPath)\$(FsiToolExe)&quot; --exec &quot;$(MSBuildThisFileDirectory)scripts/subst.fsx&quot; --in:&quot;%(CopyAndSubstituteText.FullPath)&quot; --out:&quot;$(OutDir)%(CopyAndSubstituteText.TargetFilename)&quot; --pattern1:&quot;%(CopyAndSubstituteText.Pattern1)&quot; --replacement1:&quot;%(CopyAndSubstituteText.Replacement1)&quot; --pattern2:&quot;%(CopyAndSubstituteText.Pattern2)&quot; --replacement2:&quot;%(CopyAndSubstituteText.Replacement2)&quot; " />
<Exec Command="&quot;$([System.IO.Path]::GetFullPath('$(FsiToolPath)\$(FsiToolExe)'))&quot; --exec &quot;$(MSBuildThisFileDirectory)scripts/subst.fsx&quot; --in:&quot;%(CopyAndSubstituteText.FullPath)&quot; --out:&quot;$(OutDir)%(CopyAndSubstituteText.TargetFilename)&quot; --pattern1:&quot;%(CopyAndSubstituteText.Pattern1)&quot; --replacement1:&quot;%(CopyAndSubstituteText.Replacement1)&quot; --pattern2:&quot;%(CopyAndSubstituteText.Pattern2)&quot; --replacement2:&quot;%(CopyAndSubstituteText.Replacement2)&quot; " Condition="'$(OS)' != 'Unix'" />
<Exec Command="mono $([System.IO.Path]::GetFullPath('$(FsiToolPath)\$(FsiToolExe)')) --exec &quot;$(MSBuildThisFileDirectory)scripts/subst.fsx&quot; --in:&quot;%(CopyAndSubstituteText.FullPath)&quot; --out:&quot;$(OutDir)%(CopyAndSubstituteText.TargetFilename)&quot; --pattern1:&quot;%(CopyAndSubstituteText.Pattern1)&quot; --replacement1:&quot;%(CopyAndSubstituteText.Replacement1)&quot; --pattern2:&quot;%(CopyAndSubstituteText.Pattern2)&quot; --replacement2:&quot;%(CopyAndSubstituteText.Replacement2)&quot; " Condition="'$(OS)' == 'Unix'" />
<!-- Make sure it will get cleaned -->
<CreateItem Include="$(OutDir)%(CopyAndSubstituteText.TargetFilename)">
<Output TaskParameter="Include" ItemName="FileWrites"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ open System.Runtime.InteropServices
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("fsi, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("fsiAnyCpu, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")>]
#endif
#if STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("fsi, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
[<assembly:System.Runtime.CompilerServices.InternalsVisibleTo("fsiAnyCpu, PublicKey=002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee")>]
#endif
do()
Loading