diff options
author | Juan Hoyos <juan.hoyos@microsoft.com> | 2019-11-11 15:40:59 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-11 15:40:59 -0800 |
commit | fd44c0fd4d749d2ad4a57f09e6a33814d60fc2a7 (patch) | |
tree | 4efec3b7bc4acb34e216054ed08cf5b8fb6a148f /init-tools.cmd | |
parent | 816d9ee684202b21c91ac1480b517022a97a39b6 (diff) | |
download | coreclr-fd44c0fd4d749d2ad4a57f09e6a33814d60fc2a7.tar.gz coreclr-fd44c0fd4d749d2ad4a57f09e6a33814d60fc2a7.tar.bz2 coreclr-fd44c0fd4d749d2ad4a57f09e6a33814d60fc2a7.zip |
[release/3.1] Fix use of ilasm during test builds when using a 3.0 SDK (#27818)
* Add fix for restore of ilasm
The restore logic in buildtools tried to use a netcoreapp2.1 TFM for Linux-musl.
This ended up restoring Linux-x64 binaries which then broke the test build.
This change works around this by saving a copy of the depproj that BuildTools used into
the tree and restore it as a 3.0 app manually in init-tools on our side of the build.
* Change to a 3.0 SDK for servicing
Diffstat (limited to 'init-tools.cmd')
-rw-r--r-- | init-tools.cmd | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/init-tools.cmd b/init-tools.cmd index 0905e913b9..b483d72571 100644 --- a/init-tools.cmd +++ b/init-tools.cmd @@ -105,9 +105,6 @@ if NOT exist "%BUILD_TOOLS_PATH%\init-tools.cmd" ( :afterbuildtoolsrestore -:: Ask init-tools to also restore ILAsm -set /p ILASMCOMPILER_VERSION=< "%~dp0ILAsmVersion.txt" - echo Initializing BuildTools... echo Running: "%BUILD_TOOLS_PATH%\init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%" call "%BUILD_TOOLS_PATH%\init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" "%PACKAGES_DIR%" >> "%INIT_TOOLS_LOG%" @@ -117,6 +114,12 @@ if not [%INIT_TOOLS_ERRORLEVEL%]==[0] ( goto :error ) +REM ILasm/ILDasm used to be restored by buildtools. The reference there was a netocreapp2.0, which was prior to our support of linux-musl. We initialize it locally as a 3.0 with the new SDK. +set /p ILASM_VERSION=< "%~dp0ILAsmVersion.txt" +if [%NATIVE_TOOLS_RID%] == [] set NATIVE_TOOLS_RID=win-x64 +echo Running: call "%DOTNET_CMD%" build "%~dp0tests\ilasm-restore\ilasm.depproj" --no-cache --packages "%PACKAGES_DIR%" -r "%NATIVE_TOOLS_RID%" /p:ILAsmPackageVersion="%ILASM_VERSION%" /p:ExpectedILAsmPath="%TOOLRUNTIME_DIR%\ilasm" >> "%INIT_TOOLS_LOG%" +call "%DOTNET_CMD%" build "%~dp0tests\ilasm-restore\ilasm.depproj" --no-cache --packages "%PACKAGES_DIR%" -r "%NATIVE_TOOLS_RID%" /p:ILAsmPackageVersion="%ILASM_VERSION%" /p:ExpectedILAsmPath="%TOOLRUNTIME_DIR%\ilasm" + :: Create semaphore file echo Done initializing tools. if NOT exist "%BUILD_TOOLS_SEMAPHORE_DIR%" mkdir "%BUILD_TOOLS_SEMAPHORE_DIR%" |