reenable delay signing and `sn -Vr` for build assemblies to speed up local work
This commit is contained in:
Родитель
ee05187fa0
Коммит
0be804a412
|
@ -192,7 +192,7 @@ For **Release**:
|
|||
|
||||
#### Notes on the Windows .NET Framework build
|
||||
|
||||
1. The `update.cmd` script NGens the compiler and libraries. This requires admin privileges.
|
||||
1. The `update.cmd` script adds required strong name validation skips and NGens the compiler and libraries. This requires admin privileges.
|
||||
1. The compiler binaries produced are "private" and strong-named signed with a test key.
|
||||
1. Some additional tools are required to build the compiler, notably `fslex.exe`, `fsyacc.exe`, `FSharp.PowerPack.Build.Tasks.dll`, `FsSrGen.exe`, `FSharp.SRGen.Build.Tasks.dll`, and the other tools found in the `lkg` directory.
|
||||
1. The overall bootstrapping process executes as follows
|
||||
|
|
|
@ -497,6 +497,8 @@ if "%RestorePackages%"=="" (
|
|||
@echo VSSDKToolsPath: %VSSDKToolsPath%
|
||||
@echo VSSDKIncludes: %VSSDKIncludes%
|
||||
|
||||
@call src\update.cmd signonly
|
||||
|
||||
:: Check prerequisites
|
||||
if not "%VisualStudioVersion%" == "" goto vsversionset
|
||||
if exist "%VS150COMNTOOLS%\..\ide\devenv.exe" set VisualStudioVersion=15.0
|
||||
|
@ -702,12 +704,16 @@ set PATH=%PATH%;%CORDIR%
|
|||
|
||||
set REGEXE32BIT=reg.exe
|
||||
|
||||
IF NOT DEFINED SNEXE32 IF EXIST "%WINSDKNETFXTOOLS%\sn.exe" set SNEXE32=%WINSDKNETFXTOOLS%sn.exe
|
||||
IF NOT DEFINED SNEXE64 IF EXIST "%WINSDKNETFXTOOLS%x64\sn.exe" set SNEXE64=%WINSDKNETFXTOOLS%x64\sn.exe
|
||||
IF NOT DEFINED ildasm IF EXIST "%WINSDKNETFXTOOLS%\ildasm.exe" set ildasm=%WINSDKNETFXTOOLS%ildasm.exe
|
||||
|
||||
echo.
|
||||
echo SDK environment vars
|
||||
echo =======================
|
||||
echo WINSDKNETFXTOOLS: %WINSDKNETFXTOOLS%
|
||||
echo SNEXE32: %SNEXE32%
|
||||
echo SNEXE64: %SNEXE64%
|
||||
echo ILDASM: %ILDASM%
|
||||
echo
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<DefineConstants>$(DefineConstants);DOTNETCORE;FX_ATLEAST_45;FX_ATLEAST_PORTABLE;FX_NO_RUNTIMEENVIRONMENT;FX_RESHAPED_REFLECTION;TODO_REWORK_ASSEMBLY_LOAD;</DefineConstants>
|
||||
<NoWarn>$(NoWarn);44;</NoWarn>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<PublicSign>true</PublicSign>
|
||||
<DelaySign>true</DelaySign>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
<DefineConstants>$(DefineConstants);TODO_REWORK_SERVER</DefineConstants>
|
||||
<NoWarn>$(NoWarn);44;69;65;54;61;75;62;9;2003;</NoWarn>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<PublicSign>true</PublicSign>
|
||||
<DelaySign>true</DelaySign>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>$(FSharpSourcesRoot)\fsharp\msft.pubkey</AssemblyOriginatorKeyFile>
|
||||
<StrongNames>true</StrongNames>
|
||||
<PublicSign>true</PublicSign>
|
||||
<DelaySign>true</DelaySign>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(OS)' != 'Unix'">
|
||||
|
|
|
@ -29,9 +29,8 @@
|
|||
<!-- We have to do unit test DLLs well because they can see the internals of other strong-named DLLs -->
|
||||
<Otherwise>
|
||||
<PropertyGroup>
|
||||
<OtherFlags>$(OtherFlags) --publicsign+</OtherFlags>
|
||||
<DelaySign>true</DelaySign>
|
||||
<StrongNames>true</StrongNames>
|
||||
<ExcludeSigningImport>true</ExcludeSigningImport>
|
||||
<MicroBuildAssemblyVersion>$(FSCoreVersion)</MicroBuildAssemblyVersion>
|
||||
<!-- certain delivered F# VS assemblies use a specific MicroBuildAssemblyVersion, otherwise use FSCoreVersion -->
|
||||
<MicroBuildAssemblyVersion Condition="'$(UseVsMicroBuildAssemblyVersion)' == 'true'">15.4.1.0</MicroBuildAssemblyVersion>
|
||||
|
@ -46,8 +45,7 @@
|
|||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>$(FSharpSourcesRoot)\fsharp\msft.pubkey</AssemblyOriginatorKeyFile>
|
||||
<StrongNames>true</StrongNames>
|
||||
<ExcludeSigningImport>true</ExcludeSigningImport>
|
||||
<PublicSign>true</PublicSign>
|
||||
<DelaySign>true</DelaySign>
|
||||
<MicroBuildAssemblyVersion>$(FSCoreVersion)</MicroBuildAssemblyVersion>
|
||||
<MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
|
||||
if /i "%1" == "debug" goto :ok
|
||||
if /i "%1" == "release" goto :ok
|
||||
if /i "%1" == "signonly" goto :ok
|
||||
|
||||
echo NGening built binaries
|
||||
echo adding required strong name verification skipping and NGening built binaries
|
||||
echo Usage:
|
||||
echo update.cmd debug [-ngen]
|
||||
echo update.cmd release [-ngen]
|
||||
|
@ -37,9 +38,20 @@ if "%WINSDKNETFXTOOLS_x86%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32B
|
|||
set WINSDKNETFXTOOLS_x64=%WINSDKNETFXTOOLS_x86%x64\
|
||||
|
||||
:havesdk
|
||||
set SN32="%WINSDKNETFXTOOLS_x86%sn.exe"
|
||||
set SN64="%WINSDKNETFXTOOLS_x64%sn.exe"
|
||||
|
||||
set NGEN32=%windir%\Microsoft.NET\Framework\v4.0.30319\ngen.exe
|
||||
set NGEN64=%windir%\Microsoft.NET\Framework64\v4.0.30319\ngen.exe
|
||||
|
||||
rem Disable strong-name validation for binaries that are delay-signed with the microsoft key
|
||||
%SN32% -q -Vr *,b03f5f7f11d50a3a
|
||||
|
||||
if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
|
||||
%SN64% -q -Vr *,b03f5f7f11d50a3a
|
||||
)
|
||||
|
||||
if /i "%1" == "signonly" goto :eof
|
||||
if /i "%1" == "debug" set NGEN_FLAGS=/Debug
|
||||
|
||||
rem NGen fsc, fsi, fsiAnyCpu, and FSharp.Build.dll
|
||||
|
|
|
@ -153,6 +153,8 @@ if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT%
|
|||
if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v7.1\WinSDK-NetFx40Tools" /v InstallationFolder 2^>NUL') DO SET WINSDKNETFXTOOLS=%%B
|
||||
if "%WINSDKNETFXTOOLS%"=="" FOR /F "tokens=2* delims= " %%A IN ('%REGEXE32BIT% QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx40Tools" /v InstallationFolder 2^>NUL') DO SET WINSDKNETFXTOOLS=%%B
|
||||
|
||||
set SN32="%WINSDKNETFXTOOLS%sn.exe"
|
||||
set SN64="%WINSDKNETFXTOOLS%x64\sn.exe"
|
||||
set NGEN32=%windir%\Microsoft.NET\Framework\v4.0.30319\ngen.exe
|
||||
set NGEN64=%windir%\Microsoft.NET\Framework64\v4.0.30319\ngen.exe
|
||||
|
||||
|
@ -326,6 +328,46 @@ if "%DEPLOY%" == "yes" if "!ISADMIN!" == "yes" (
|
|||
REG ADD "HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\F# !FSHARPVERSION! Core Assemblies (Open Source)" /ve /t REG_SZ /f /d "!X86_PROGRAMFILES!\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.!FSHARPVERSION!.0\
|
||||
REG ADD "HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.50709\AssemblyFoldersEx\F# !FSHARPVERSION! Core Assemblies (Open Source)" /ve /t REG_SZ /f /d "!X86_PROGRAMFILES!\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.!FSHARPVERSION!.0\
|
||||
|
||||
rem Disable strong-name validation for F# binaries built from open source that are signed with the microsoft key
|
||||
echo.
|
||||
CALL :colorEcho 02 "[!ACTION!] Removing strong-name validation of F# binaries" & echo.
|
||||
!SN32! -Vr FSharp.Core,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN32! -Vr FSharp.Build,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN32! -Vr FSharp.Compiler.Interactive.Settings,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN32! -Vr HostedCompilerServer,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
|
||||
!SN32! -Vr FSharp.Compiler,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN32! -Vr FSharp.Compiler.Server.Shared,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN32! -Vr FSharp.Editor,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN32! -Vr FSharp.LanguageService,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN32! -Vr FSharp.LanguageService.Base,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN32! -Vr FSharp.ProjectSystem.Base,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN32! -Vr FSharp.ProjectSystem.FSharp,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN32! -Vr FSharp.ProjectSystem.PropertyPages,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN32! -Vr FSharp.VS.FSI,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN32! -Vr VisualFSharp.Unittests,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN32! -Vr VisualFSharp.Salsa,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
|
||||
REM Do this *in addition* to the above for x64 systems
|
||||
if /i "!PROCESSOR_ARCHITECTURE!"=="AMD64" (
|
||||
!SN64! -Vr FSharp.Core,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN64! -Vr FSharp.Build,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN64! -Vr FSharp.Compiler.Interactive.Settings,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN64! -Vr HostedCompilerServer,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
|
||||
!SN64! -Vr FSharp.Compiler,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN64! -Vr FSharp.Compiler.Server.Shared,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN64! -Vr FSharp.Editor,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN64! -Vr FSharp.LanguageService,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN64! -Vr FSharp.LanguageService.Base,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN64! -Vr FSharp.ProjectSystem.Base,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN64! -Vr FSharp.ProjectSystem.FSharp,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN64! -Vr FSharp.ProjectSystem.PropertyPages,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN64! -Vr FSharp.VS.FSI,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN64! -Vr VisualFSharp.Unittests,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
!SN64! -Vr VisualFSharp.Salsa,b03f5f7f11d50a3a 1>NUL 2>NUL
|
||||
)
|
||||
|
||||
rem NGen fsc, fsi, fsiAnyCpu, and FSharp.Build.dll
|
||||
|
||||
echo.
|
||||
|
@ -358,6 +400,46 @@ if "%DEPLOY%" == "yes" if "!ISADMIN!" == "no" (
|
|||
rem Re-enable certain settings when restoring, NGEN the original files again, requires admin rights
|
||||
if "%ACTION%" == "restore" if "!ISADMIN!" == "yes" (
|
||||
|
||||
rem Re-enable strong-name validation for F# binaries that were previously installed
|
||||
echo.
|
||||
CALL :colorEcho 02 "[!ACTION!] Re-enabling strong-name validation of original F# binaries" & echo.
|
||||
!SN32! -Vu FSharp.Core,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN32! -Vu FSharp.Build,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN32! -Vu FSharp.Compiler.Interactive.Settings,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN32! -Vu HostedCompilerServer,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
|
||||
!SN32! -Vu FSharp.Compiler,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN32! -Vu FSharp.Compiler.Server.Shared,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN32! -Vu FSharp.Editor,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN32! -Vu FSharp.LanguageService,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN32! -Vu FSharp.LanguageService.Base,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN32! -Vu FSharp.ProjectSystem.Base,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN32! -Vu FSharp.ProjectSystem.FSharp,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN32! -Vu FSharp.ProjectSystem.PropertyPages,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN32! -Vu FSharp.VS.FSI,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN32! -Vu VisualFSharp.Unittests,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN32! -Vu VisualFSharp.Salsa,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
|
||||
REM Do this *in addition* to the above for x64 systems
|
||||
if /i "!PROCESSOR_ARCHITECTURE!"=="AMD64" (
|
||||
!SN64! -Vu FSharp.Core,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN64! -Vu FSharp.Build,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN64! -Vu FSharp.Compiler.Interactive.Settings,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN64! -Vu HostedCompilerServer,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
|
||||
!SN64! -Vu FSharp.Compiler,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN64! -Vu FSharp.Compiler.Server.Shared,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN64! -Vu FSharp.Editor,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN64! -Vu FSharp.LanguageService,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN64! -Vu FSharp.LanguageService.Base,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN64! -Vu FSharp.ProjectSystem.Base,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN64! -Vu FSharp.ProjectSystem.FSharp,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN64! -Vu FSharp.ProjectSystem.PropertyPages,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN64! -Vu FSharp.VS.FSI,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN64! -Vu VisualFSharp.Unittests,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
!SN64! -Vu VisualFSharp.Salsa,b03f5f7f11d50a3a 2>NUL 1>NUL
|
||||
)
|
||||
|
||||
rem NGen fsc, fsi, fsiAnyCpu, and FSharp.Build.dll
|
||||
|
||||
echo.
|
||||
|
|
Загрузка…
Ссылка в новой задаче