Skip to content

Commit 67717f8

Browse files
committed
disable proto compiler for fslex/fsyacc
1 parent ddd0ac7 commit 67717f8

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

FSharpBuild.Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
</PropertyGroup>
8181

8282
<!-- SDK targets override -->
83-
<PropertyGroup Condition="'$(Configuration)' != 'Proto' AND '$(DisableCompilerRedirection)'!='true'">
83+
<PropertyGroup Condition="'$(Configuration)' != 'Proto' AND '$(DisableProtoCompiler)'!='true'">
8484
<FSharpTargetsPath>$(ProtoOutputPath)\Microsoft.FSharp.Targets</FSharpTargetsPath>
8585
<FSharpPropsShim>$(ProtoOutputPath)\Microsoft.FSharp.NetSdk.props</FSharpPropsShim>
8686
<FSharpTargetsShim>$(ProtoOutputPath)\Microsoft.FSharp.NetSdk.targets</FSharpTargetsShim>

eng/build.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,18 +209,19 @@ function BuildSolution {
209209

210210
# build bootstrap tools
211211
bootstrap_config=Proto
212-
MSBuild "$repo_root/src/buildtools/buildtools.proj" \
213-
/restore \
214-
/v:$verbosity \
215-
/p:Configuration=$bootstrap_config \
216-
/t:Build
217-
218212
bootstrap_dir=$artifacts_dir/Bootstrap
219-
if [ ! -d "$bootstrap_dir" ]; then
213+
if [ ! -d "$bootstrap_dir/fslex.dll" ]; then
214+
MSBuild "$repo_root/src/buildtools/buildtools.proj" \
215+
/restore \
216+
/v:$verbosity \
217+
/p:Configuration=$bootstrap_config \
218+
/t:Build
219+
220220
mkdir -p "$bootstrap_dir"
221221
cp $artifacts_dir/bin/fslex/$bootstrap_config/$coreclr_target_framework/* $bootstrap_dir
222222
cp $artifacts_dir/bin/fsyacc/$bootstrap_config/$coreclr_target_framework/* $bootstrap_dir
223-
223+
fi
224+
if [ ! -d "$bootstrap_dir/fsc.exe" ]; then
224225
MSBuild "$repo_root/proto.proj" \
225226
/restore \
226227
/v:$verbosity \

fcs/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<ArtifactsObjDir>$(ArtifactsDir)\obj</ArtifactsObjDir>
1818
<OutputPath>$(ArtifactsBinDir)\fcs</OutputPath>
1919
<IntermediateOutputPath>$(ArtifactsObjDir)\fcs</IntermediateOutputPath>
20-
<DisableCompilerRedirection>true</DisableCompilerRedirection>
20+
<DisableProtoCompiler>true</DisableProtoCompiler>
2121
</PropertyGroup>
2222

2323
</Project>

fcs/build.fsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ let isMono = false
2424
// Utilities
2525
// --------------------------------------------------------------------------------------
2626

27-
let coreclrTargetFramework = "netcoreapp2.0"
27+
let fslexyaccTargetFramework = "netcoreapp2.0"
2828

2929
let dotnetExePath =
3030
// Build.cmd normally downloads a dotnet cli to: <repo-root>\artifacts\toolset\dotnet
@@ -94,14 +94,14 @@ Target "BuildVersion" (fun _ ->
9494

9595
Target "Build" (fun _ ->
9696
runDotnet __SOURCE_DIRECTORY__ "build ../src/buildtools/buildtools.proj -v n -c Proto"
97-
let fslexPath = __SOURCE_DIRECTORY__ + "/../artifacts/bin/fslex/Proto/" + coreclrTargetFramework + "/fslex.dll"
98-
let fsyaccPath = __SOURCE_DIRECTORY__ + "/../artifacts/bin/fsyacc/Proto/" + coreclrTargetFramework + "/fsyacc.dll"
97+
let fslexPath = __SOURCE_DIRECTORY__ + "/../artifacts/bin/fslex/Proto/" + fslexyaccTargetFramework + "/fslex.dll"
98+
let fsyaccPath = __SOURCE_DIRECTORY__ + "/../artifacts/bin/fsyacc/Proto/" + fslexyaccTargetFramework + "/fsyacc.dll"
9999
runDotnet __SOURCE_DIRECTORY__ (sprintf "build FSharp.Compiler.Service.sln -v n -c Release /p:FsLexPath=%s /p:FsYaccPath=%s" fslexPath fsyaccPath)
100100
)
101101

102102
Target "Test" (fun _ ->
103103
// This project file is used for the tests to work out reference sets
104-
runDotnet __SOURCE_DIRECTORY__ "build ../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -v n /restore /p:DisableCompilerRedirection=true"
104+
runDotnet __SOURCE_DIRECTORY__ "build ../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -v n /restore /p:DisableProtoCompiler=true"
105105

106106
// Now run the tests
107107
let logFilePath = Path.Combine(__SOURCE_DIRECTORY__, "..", "artifacts", "TestResults", "Release", "FSharp.Compiler.Service.Test.xml")

src/buildtools/buildtools.proj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
5+
<DisableProtoCompiler>true</DisableProtoCompiler>
56
</PropertyGroup>
67

78
<ItemGroup>

0 commit comments

Comments
 (0)