Skip to content

Commit feab056

Browse files
committed
Add switch for publicsign, by default use delaysign because of ngen
1 parent 918e557 commit feab056

File tree

3 files changed

+37
-31
lines changed

3 files changed

+37
-31
lines changed

build-everything.proj

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,34 +40,34 @@
4040
<ItemGroup Condition="'$(BUILD_SETUP)'=='1' or '$(BUILD_ALL)'=='1'">
4141
<SetupProjects Include="setup/fsharp-setup-build.proj" />
4242
</ItemGroup>
43-
43+
4444
<Target Name="Build">
45-
<MSBuild Projects="@(ProjectsWithDefaultFramework)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration)" />
46-
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable7" />
47-
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable47" />
48-
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable78" />
49-
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable259" />
50-
<MSBuild Projects="@(ProjectsWithCoreClr)" Targets="Build" BuildInParallel="false" Properties="Configuration=$(Configuration);TargetFramework=coreclr" />
51-
<MSBuild Projects="@(SetupProjects)" Targets="Build" BuildInParallel="false" Properties="Configuration=$(Configuration)" />
45+
<MSBuild Projects="@(ProjectsWithDefaultFramework)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);SIGNTYPE=$(SIGNTYPE)" />
46+
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable7;SIGNTYPE=$(SIGNTYPE)" />
47+
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable47;SIGNTYPE=$(SIGNTYPE)" />
48+
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable78;SIGNTYPE=$(SIGNTYPE)" />
49+
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Build" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable259;SIGNTYPE=$(SIGNTYPE)" />
50+
<MSBuild Projects="@(ProjectsWithCoreClr)" Targets="Build" BuildInParallel="false" Properties="Configuration=$(Configuration);TargetFramework=coreclr;SIGNTYPE=$(SIGNTYPE)" />
51+
<MSBuild Projects="@(SetupProjects)" Targets="Build" BuildInParallel="false" Properties="Configuration=$(Configuration);SIGNTYPE=$(SIGNTYPE)" />
5252
</Target>
5353

5454
<Target Name="Rebuild">
55-
<MSBuild Projects="@(ProjectsWithDefaultFramework)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration)" />
56-
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable7" />
57-
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable47" />
58-
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable78" />
59-
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable259" />
60-
<MSBuild Projects="@(ProjectsWithCoreClr)" Targets="Rebuild" BuildInParallel="false" Properties="Configuration=$(Configuration);TargetFramework=coreclr" />
61-
<MSBuild Projects="@(SetupProjects)" Targets="Rebuild" BuildInParallel="false" Properties="Configuration=$(Configuration)" />
55+
<MSBuild Projects="@(ProjectsWithDefaultFramework)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);SIGNTYPE=$(SIGNTYPE)" />
56+
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable7;SIGNTYPE=$(SIGNTYPE)" />
57+
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable47;SIGNTYPE=$(SIGNTYPE)" />
58+
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable78;SIGNTYPE=$(SIGNTYPE)" />
59+
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable259;SIGNTYPE=$(SIGNTYPE)" />
60+
<MSBuild Projects="@(ProjectsWithCoreClr)" Targets="Rebuild" BuildInParallel="false" Properties="Configuration=$(Configuration);TargetFramework=coreclr;SIGNTYPE=$(SIGNTYPE)" />
61+
<MSBuild Projects="@(SetupProjects)" Targets="Rebuild" BuildInParallel="false" Properties="Configuration=$(Configuration);SIGNTYPE=$(SIGNTYPE)" />
6262
</Target>
6363

6464
<Target Name="Clean">
65-
<MSBuild Projects="@(ProjectsWithDefaultFramework)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration)" />
66-
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable7" />
67-
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable47" />
68-
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable78" />
69-
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable259" />
70-
<MSBuild Projects="@(ProjectsWithCoreClr)" Targets="Clean" BuildInParallel="false" Properties="Configuration=$(Configuration);TargetFramework=coreclr" />
71-
<MSBuild Projects="@(SetupProjects)" Targets="Clean" BuildInParallel="false" Properties="Configuration=$(Configuration)" />
65+
<MSBuild Projects="@(ProjectsWithDefaultFramework)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);SIGNTYPE=$(SIGNTYPE)" />
66+
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable7;SIGNTYPE=$(SIGNTYPE)" />
67+
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable47;SIGNTYPE=$(SIGNTYPE)" />
68+
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable78;SIGNTYPE=$(SIGNTYPE)" />
69+
<MSBuild Projects="@(ProjectsWithPortableFramework)" Targets="Clean" BuildInParallel="true" Properties="Configuration=$(Configuration);TargetFramework=portable259;SIGNTYPE=$(SIGNTYPE)" />
70+
<MSBuild Projects="@(ProjectsWithCoreClr)" Targets="Clean" BuildInParallel="false" Properties="Configuration=$(Configuration);TargetFramework=coreclr;SIGNTYPE=$(SIGNTYPE)" />
71+
<MSBuild Projects="@(SetupProjects)" Targets="Clean" BuildInParallel="false" Properties="Configuration=$(Configuration);SIGNTYPE=$(SIGNTYPE)" />
7272
</Target>
7373
</Project>

build.cmd

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ echo.
1414
echo Usage:
1515
echo.
1616
echo build.cmd ^<all^|proto^|protofx^|build^|debug^|release^|diag^|compiler^|coreclr^|pcls^|vs^|ci^|ci_part1^|ci_part2^|microbuild^>
17-
echo ^<test-coreunit^|test-corecompile^|test-smoke^|test-coreclr^|test-pcls^|test-fsharp^|test-fsharpqa^|test-vs^>
17+
echo ^<test-coreunit^|test-corecompile^|test-smoke^|test-coreclr^|test-pcls^|test-fsharp^|test-fsharpqa^|test-vs^|publicsign^>
1818
echo.
1919
echo No arguments default to 'build'
2020
echo.
@@ -41,6 +41,7 @@ set BUILD_VS=0
4141
set BUILD_CONFIG=release
4242
set BUILD_CONFIG_LOWERCASE=release
4343
set BUILD_DIAG=
44+
set BUILD_PUBLICSIGN=0
4445

4546
set TEST_COMPILERUNIT=0
4647
set TEST_NET40_COREUNIT=0
@@ -260,6 +261,10 @@ if /i '%ARG%' == 'test-fsharp' (
260261
set TEST_FSHARP_SUITE=1
261262
)
262263

264+
if /i '%ARG%' == 'publicsign' (
265+
set BUILD_PUBLICSIGN=1
266+
)
267+
263268
goto :EOF
264269

265270
:MAIN
@@ -277,6 +282,7 @@ echo BUILD_VS=%BUILD_VS%
277282
echo BUILD_SETUP=%BUILD_SETUP%
278283
echo BUILD_CONFIG=%BUILD_CONFIG%
279284
echo BUILD_CONFIG_LOWERCASE=%BUILD_CONFIG_LOWERCASE%
285+
echo BUILD_PUBLICSIGN=%BUILD_PUBLICSIGN%
280286
echo.
281287
echo TEST_COMPILERUNIT=%TEST_COMPILERUNIT%
282288
echo TEST_NET40_COREUNIT=%TEST_NET40_COREUNIT%
@@ -397,8 +403,8 @@ if '%BUILD_PROTO%' == '1' (
397403
@if ERRORLEVEL 1 echo Error: NGen of proto failed && goto :failure
398404
)
399405

400-
%_msbuildexe% %msbuildflags% build-everything.proj /p:Configuration=%BUILD_CONFIG% %BUILD_DIAG%
401-
@if ERRORLEVEL 1 echo Error: '%_msbuildexe% %msbuildflags% build-everything.proj /p:Configuration=%BUILD_CONFIG% %BUILD_DIAG%' failed && goto :failure
406+
%_msbuildexe% %msbuildflags% build-everything.proj /p:Configuration=%BUILD_CONFIG% %BUILD_DIAG% /p:SIGNTYPE=%BUILD_PUBLICSIGN%
407+
@if ERRORLEVEL 1 echo Error: '%_msbuildexe% %msbuildflags% build-everything.proj /p:Configuration=%BUILD_CONFIG% %BUILD_DIAG% /p:SIGNTYPE=%BUILD_PUBLICSIGN%' failed && goto :failure
402408

403409
@echo on
404410
call src\update.cmd %BUILD_CONFIG_LOWERCASE% -ngen

src/FSharpSource.targets

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
<IsPortableProfile>true</IsPortableProfile>
2525
</PropertyGroup>
2626
<PropertyGroup>
27-
<OtherFlags Condition="'$(TargetFramework)' == 'coreclr'">$(OtherFlags) --delaysign+</OtherFlags>
28-
<OtherFlags Condition="'$(TargetFramework)' != 'coreclr'">$(OtherFlags) --publicsign+</OtherFlags>
27+
<OtherFlags Condition="'$(TargetFramework)' == 'coreclr' or $(SIGNTYPE) != '1'">$(OtherFlags) --delaysign+</OtherFlags>
28+
<OtherFlags Condition="'$(TargetFramework)' != 'coreclr' and $(SIGNTYPE) == '1'">$(OtherFlags) --publicsign+</OtherFlags>
2929
<OtherFlags>$(OtherFlags) --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags>
3030
<DefineConstants>STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)</DefineConstants>
3131
<StrongNames>true</StrongNames>
@@ -35,8 +35,8 @@
3535
</When>
3636
<When Condition="'$(AssemblyName)' == 'FSharp.LanguageService' or '$(AssemblyName)' == 'FSharp.LanguageService.Compiler' or '$(AssemblyName)' == 'FSharp.Editor' or '$(AssemblyName)' == 'FSharp.VS.FSI' or '$(AssemblyName)' == 'FSharp.ProjectSystem.FSharp'">
3737
<PropertyGroup>
38-
<OtherFlags Condition="'$(TargetFramework)' == 'coreclr'">$(OtherFlags) --delaysign+</OtherFlags>
39-
<OtherFlags Condition="'$(TargetFramework)' != 'coreclr'">$(OtherFlags) --publicsign+</OtherFlags>
38+
<OtherFlags Condition="'$(TargetFramework)' == 'coreclr' or $(SIGNTYPE) != '1'">$(OtherFlags) --delaysign+</OtherFlags>
39+
<OtherFlags Condition="'$(TargetFramework)' != 'coreclr' and $(SIGNTYPE) == '1'">$(OtherFlags) --publicsign+</OtherFlags>
4040
<OtherFlags>$(OtherFlags) --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags>
4141
<DefineConstants>STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)</DefineConstants>
4242
<StrongNames>true</StrongNames>
@@ -55,8 +55,8 @@
5555
</When>
5656
<Otherwise>
5757
<PropertyGroup Condition="'$(SIGN_WITH_MSFT_KEY)' == 'true'">
58-
<OtherFlags Condition="'$(TargetFramework)' == 'coreclr'">$(OtherFlags) --delaysign+</OtherFlags>
59-
<OtherFlags Condition="'$(TargetFramework)' != 'coreclr'">$(OtherFlags) --publicsign+</OtherFlags>
58+
<OtherFlags Condition="'$(TargetFramework)' == 'coreclr' or $(SIGNTYPE) != '1'">$(OtherFlags) --delaysign+</OtherFlags>
59+
<OtherFlags Condition="'$(TargetFramework)' != 'coreclr' and $(SIGNTYPE) == '1'">$(OtherFlags) --publicsign+</OtherFlags>
6060
<OtherFlags>$(OtherFlags) --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags>
6161
<DefineConstants>STRONG_NAME_AND_DELAY_SIGN_FSHARP_COMPILER_WITH_MSFT_KEY;$(DefineConstants)</DefineConstants>
6262
<StrongNames>true</StrongNames>

0 commit comments

Comments
 (0)