Skip to content

Commit 5c8e8b7

Browse files
committed
fix build for mono packaging
1 parent dd0e119 commit 5c8e8b7

File tree

23 files changed

+150
-94
lines changed

23 files changed

+150
-94
lines changed

FSharp.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Tests.FSharpSuite",
3131
EndProject
3232
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.UnitTests", "tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj", "{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}"
3333
EndProject
34-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Core.UnitTests", "tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj", "{88E2D422-6852-46E3-A740-83E391DC7973}"
34+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Core.UnitTests", "tests\FSharp.Core.UnitTests\FSharp.Core.Unittests.fsproj", "{88E2D422-6852-46E3-A740-83E391DC7973}"
3535
EndProject
3636
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Compiler", "Compiler", "{3881429D-A97A-49EB-B7AE-A82BA5FE9C77}"
3737
EndProject

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include $(topsrcdir)mono/config.make
22

3-
.PHONY: restore
3+
.PHONY: restore build
44

55
restore:
66
MONO_ENV_OPTIONS=$(monoopts) mono .nuget/NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget/NuGet.Config
@@ -27,7 +27,7 @@ build:
2727
MONO_ENV_OPTIONS=$(monoopts) $(MSBUILD) /p:Configuration=$(Configuration) /p:TargetDotnetProfile=net40 src/fsharp/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj
2828
MONO_ENV_OPTIONS=$(monoopts) $(MSBUILD) /p:Configuration=$(Configuration) /p:TargetDotnetProfile=net40 src/fsharp/fsi/Fsi.fsproj
2929
MONO_ENV_OPTIONS=$(monoopts) $(MSBUILD) /p:Configuration=$(Configuration) /p:TargetDotnetProfile=net40 src/fsharp/fsiAnyCpu/FsiAnyCPU.fsproj
30-
MONO_ENV_OPTIONS=$(monoopts) $(MSBUILD) /p:Configuration=$(Configuration) /p:TargetDotnetProfile=net40 tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj
30+
MONO_ENV_OPTIONS=$(monoopts) $(MSBUILD) /p:Configuration=$(Configuration) /p:TargetDotnetProfile=net40 tests/FSharp.Core.UnitTests/FSharp.Core.Unittests.fsproj
3131
mkdir -p $(Configuration)/fsharp30/net40/bin
3232
mkdir -p $(Configuration)/fsharp31/net40/bin
3333
mkdir -p $(Configuration)/fsharp40/net40/bin

build-everything.proj

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@
5454
<!-- +++++++++++++++++++++++ Project selection for testing +++++++++++++++++++++++++++++++ -->
5555

5656
<ItemGroup Condition="'$(TEST_NET40_COREUNIT_SUITE)'=='1'" >
57-
<ProjectsWithNet40 Include="tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj"/>
57+
<ProjectsWithNet40 Include="tests/FSharp.Core.UnitTests/FSharp.Core.Unittests.fsproj"/>
5858
<ProjectsWithNet40 Include="tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj"/>
5959
</ItemGroup>
6060

6161
<ItemGroup Condition="'$(TEST_CORECLR_COREUNIT_SUITE)'=='1'">
62-
<ProjectsWithCoreClr Include="tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj"/>
62+
<ProjectsWithCoreClr Include="tests/FSharp.Core.UnitTests/FSharp.Core.Unittests.fsproj"/>
6363
<ProjectsWithCoreClr Include="tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj"/>
6464
</ItemGroup>
6565

@@ -80,12 +80,18 @@
8080

8181
<ItemGroup Condition="'$(TEST_NET40_FSHARPQA_SUITE)'=='1' OR '$(TEST_NET40_FSHARP_SUITE)'=='1'" >
8282
<ProjectsWithNet40 Include="tests/fsharpqa/testenv/src/ILComparer/ILComparer.fsproj" />
83-
<ProjectsWithNet40 Include="tests/fsharpqa/testenv/src/HostedCompilerServer/HostedCompilerServer.fsproj" />
83+
8484
<ProjectsWithNet40 Include="tests/fsharpqa/testenv/src/PEVerify/PEVerify.csproj" />
8585

8686
<ProjectsToRestore Include="tests/fsharpqa/testenv/src/PEVerify/PEVerify.csproj" />
8787
</ItemGroup>
8888

89+
<ItemGroup Condition="'$(TEST_NET40_FSHARPQA_SUITE)'=='1'" >
90+
<ProjectsWithNet40 Include="tests/fsharpqa/testenv/src/ILComparer/ILComparer.fsproj" />
91+
<ProjectsWithNet40 Include="tests/fsharpqa/testenv/src/PEVerify/PEVerify.csproj" />
92+
93+
<ProjectsToRestore Include="tests/fsharpqa/testenv/src/PEVerify/PEVerify.csproj" />
94+
</ItemGroup>
8995
<ItemGroup Condition="'$(TEST_VS_IDEUNIT_SUITE)'=='1'" >
9096
<ProjectsWithNet40 Include="vsintegration/fsharp-vsintegration-unittests-build.proj"/>
9197
</ItemGroup>

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,15 +361,15 @@ if [ "$BUILD_PROTO" = "1" ]; then
361361
# { printeval "$_ngenexe install Proto/net40/bin/fsc-proto.exe /nologo"; } || failwith "NGen of proto failed"
362362
else
363363
# Build proto-compiler and libs
364-
{ printeval "$_msbuildexe $msbuildflags src/fsharp-proto-build.proj /p:UseMonoPackaging=true /p:Configuration=Proto /p:DisableLocalization=true"; } || failwith "compiler proto build failed"
364+
{ printeval "$_msbuildexe $msbuildflags src/fsharp-proto-build.proj /p:Configuration=Proto /p:DisableLocalization=true"; } || failwith "compiler proto build failed"
365365
fi
366366
fi
367367

368368

369369
build_status "Done with proto, starting build"
370370

371371
if [ "$BUILD_PHASE" = "1" ]; then
372-
cmd="$_msbuildexe $msbuildflags build-everything.proj /p:UseMonoPackaging=true /p:Configuration=$BUILD_CONFIG $BUILD_DIAG /p:BUILD_PUBLICSIGN=$BUILD_PUBLICSIGN"
372+
cmd="$_msbuildexe $msbuildflags build-everything.proj /p:Configuration=$BUILD_CONFIG $BUILD_DIAG /p:BUILD_PUBLICSIGN=$BUILD_PUBLICSIGN"
373373
{ printeval "$cmd"; } || failwith "'$cmd' failed"
374374
fi
375375

build/targets/GitHash.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Copied from RepoToolset. Might be slightly modified to adjust for the current F# build system specifics if necessary.
66
-->
77

8-
<Project>
8+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
99
<!--
1010
1111
Defines the following properties:

mono/appveyor.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
# the version under development, update after a release
3-
$version = '4.1.28'
3+
$version = '4.1.31'
44

55
function isVersionTag($tag){
66
$v = New-Object Version

packages.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
<package id="Microsoft.DiaSymReader" version="1.1.0" />
2222
<package id="System.ValueTuple" version="4.3.1" />
2323
<package id="Microsoft.VisualFSharp.Msbuild.15.0" version="1.0.1" />
24+
<package id="Microsoft.Build" version="14.3.0" />
25+
<package id="Microsoft.Build.Framework" version="14.3.0" />
26+
<package id="Microsoft.Build.Utilities.Core" version="14.3.0" />
27+
<package id="Microsoft.Build.Tasks.Core" version="14.3.0" />
2428

2529
<!-- Testing -->
2630
<package id="FsCheck" version="2.6.2" />

scripts/dotnet-install.sh

100644100755
File mode changed.

src/FSharpSource.Profiles.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
44

55
<PropertyGroup Condition="'$(TargetDotnetProfile)'=='net40'">
6+
<DefineConstants Condition="'$(MonoPackaging)' == 'true'">$(DefineConstants);CROSS_PLATFORM_COMPILER</DefineConstants>
67
<DefineConstants>$(DefineConstants);PREFERRED_UI_LANG</DefineConstants>
78
<DefineConstants>$(DefineConstants);ENABLE_MONO_SUPPORT</DefineConstants>
89
<DefineConstants>$(DefineConstants);BE_SECURITY_TRANSPARENT</DefineConstants>

src/FSharpSource.Settings.targets

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,19 +98,27 @@
9898
<NUnitLibDir>$(FSharpSourcesRoot)\..\packages\NUnit.$(NUnitVersion)\lib\net45</NUnitLibDir>
9999
<NUnitToolsLibDir>$(FSharpSourcesRoot)\..\packages\NUnit.ConsoleRunner\$(NUnitVersion)\tools\</NUnitToolsLibDir>
100100

101+
<MonoPackaging Condition="'$(TargetDotnetProfile)' != 'coreclr' AND '$(OS)' == 'Unix'">true</MonoPackaging>
102+
101103
<!-- Localization -->
104+
<DisableLocalization Condition="'$(MonoPackaging)' == 'true'">true</DisableLocalization>
102105
<UpdateXlfOnBuild Condition="'$(CI)' != '1'">true</UpdateXlfOnBuild>
103106
<XliffTasksVersion>0.2.0-beta-000076</XliffTasksVersion>
107+
104108
</PropertyGroup>
105109

110+
<!-- Default setting. Some get modified later in FSharpSource.targets -->
106111
<PropertyGroup>
112+
<SkipSigning>false</SkipSigning>
113+
<UseOpenSourceSign>true</UseOpenSourceSign>
107114
<SignAssembly>true</SignAssembly>
108115
<AssemblyOriginatorKeyFile>$(FSharpSourcesRoot)\fsharp\msft.pubkey</AssemblyOriginatorKeyFile>
109116
<StrongNames>true</StrongNames>
110117
<DelaySign>true</DelaySign>
111118
</PropertyGroup>
112119

113-
<PropertyGroup Condition="'$(OS)' != 'Unix'">
120+
<!-- On windows, VS packaging -->
121+
<PropertyGroup Condition="'$(MonoPackaging)' != 'true' AND '$(OS)' != 'Unix'">
114122
<UseMicroBuild>true</UseMicroBuild>
115123
<UseSourceLink Condition = " '$(UseSourceLink)' == '' AND '$(Configuration)'=='Release' ">false</UseSourceLink>
116124
<UseGatherBinaries>true</UseGatherBinaries>
@@ -130,6 +138,7 @@
130138
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
131139
<!-- Settings for Debug mode -->
132140
<DebugType>full</DebugType>
141+
<DebugType Condition="'$(OS)' == 'Unix'">portable</DebugType> <!-- no longer use MDB on Mono -->
133142

134143
<Optimize Condition=" '$(Optimize)' == '' ">false</Optimize>
135144
<ErrorReport Condition=" '$(ErrorReport)' == '' ">prompt</ErrorReport>
@@ -142,6 +151,7 @@
142151
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
143152
<!-- Flags used for Release mode. -->
144153
<DebugType>pdbonly</DebugType>
154+
<DebugType Condition="'$(OS)' == 'Unix'">portable</DebugType> <!-- no longer use MDB on Mono -->
145155

146156
<Optimize Condition=" '$(Optimize)' == '' ">true</Optimize>
147157
<EmbedAllSource>false</EmbedAllSource>
@@ -153,6 +163,7 @@
153163
<PropertyGroup Condition="'$(Configuration)'=='Proto'">
154164
<!-- Flags used when running the Proto compiler. -->
155165
<DebugType Condition=" '$(DebugType)' == '' ">full</DebugType>
166+
<DebugType Condition="'$(OS)' == 'Unix'">portable</DebugType> <!-- no longer use MDB on Mono -->
156167
<Optimize>true</Optimize>
157168
<DefineConstants>DEBUG;NO_STRONG_NAMES;$(DefineConstants)</DefineConstants>
158169
</PropertyGroup>
@@ -196,6 +207,11 @@
196207
<!-- FSharp.Compiler.Tools is currently only used to get a working FSI.EXE to execute some scripts during the build -->
197208
<!-- The LKG FSI.EXE requires MSBuild 15 to be installed, which is painful -->
198209
<FsiToolPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools</FsiToolPath>
210+
211+
212+
<!-- The version of MSBuild assumed byt the F# compiler in the Mono packaging of F# -->
213+
<MonoPackagingMSBuildVersionFull>14.0.0.0</MonoPackagingMSBuildVersionFull>
214+
199215
</PropertyGroup>
200216

201217
<Import Project="$(MSBuildThisFileDirectory)..\packages\XliffTasks.$(XliffTasksVersion)\build\XliffTasks.props" Condition="'$(DisableLocalization)' != 'true'" />

0 commit comments

Comments
 (0)