summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>2017-11-22 16:38:19 +0100
committerGitHub <noreply@github.com>2017-11-22 16:38:19 +0100
commit776690aad2bf8f5ecf69ea7b26c66bcd17489637 (patch)
treef92779c4a95fc481b8959258873208e112580e17
parent3d09d01424a1c5b61bc84016834d40263b1a67e0 (diff)
downloadcoreclr-776690aad2bf8f5ecf69ea7b26c66bcd17489637.tar.gz
coreclr-776690aad2bf8f5ecf69ea7b26c66bcd17489637.tar.bz2
coreclr-776690aad2bf8f5ecf69ea7b26c66bcd17489637.zip
Ask buildtools to also restore ILAsm (#15103)
We should start with having this restored before we start using it to make sure that nobody has tools downloaded/initialized without ILAsm.
-rw-r--r--ILAsmVersion.txt1
-rw-r--r--init-tools.cmd5
-rwxr-xr-xinit-tools.sh10
3 files changed, 15 insertions, 1 deletions
diff --git a/ILAsmVersion.txt b/ILAsmVersion.txt
new file mode 100644
index 0000000000..f6cfb93586
--- /dev/null
+++ b/ILAsmVersion.txt
@@ -0,0 +1 @@
+2.1.0-preview1-25916-01
diff --git a/init-tools.cmd b/init-tools.cmd
index f658d4e48a..7e77566199 100644
--- a/init-tools.cmd
+++ b/init-tools.cmd
@@ -71,6 +71,9 @@ if NOT exist "%BUILD_TOOLS_PATH%init-tools.cmd" (
:afterbuildtoolsrestore
+:: Ask init-tools to also restore ILAsm
+set /p ILASMCOMPILER_VERSION=< "%~dp0ILAsmVersion.txt"
+
echo %__MsgPrefix%Initializing BuildTools...
echo %__MsgPrefix%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%" >> "%INIT_TOOLS_LOG%"
@@ -91,4 +94,4 @@ exit /b 0
:error
echo %__MsgPrefix%Please check the detailed log that follows. 1>&2
type "%INIT_TOOLS_LOG%" 1>&2
-exit /b 1 \ No newline at end of file
+exit /b 1
diff --git a/init-tools.sh b/init-tools.sh
index 98a3ce30fd..387499d832 100755
--- a/init-tools.sh
+++ b/init-tools.sh
@@ -10,6 +10,7 @@ if [ -z "$__BUILDTOOLS_SOURCE" ]; then __BUILDTOOLS_SOURCE=https://dotnet.myget.
export __BUILDTOOLS_USE_CSPROJ=true
__BUILD_TOOLS_PACKAGE_VERSION=$(cat $__scriptpath/BuildToolsVersion.txt)
__DOTNET_TOOLS_VERSION=$(cat $__scriptpath/DotnetCLIVersion.txt)
+__ILASM_VERSION=$(cat $__scriptpath/ILAsmVersion.txt)
__BUILD_TOOLS_PATH=$__PACKAGES_DIR/microsoft.dotnet.buildtools/$__BUILD_TOOLS_PACKAGE_VERSION/lib
__INIT_TOOLS_RESTORE_PROJECT=$__scriptpath/init-tools.msbuild
__BUILD_TOOLS_SEMAPHORE=$__TOOLRUNTIME_DIR/$__BUILD_TOOLS_PACKAGE_VERSION/init-tools.complete
@@ -146,6 +147,15 @@ if [ ! -e $__BUILD_TOOLS_PATH ]; then
fi
fi
+if [ -z "$__ILASM_RID" ]; then
+ __ILASM_RID=$__PKG_RID-$__PKG_ARCH
+fi
+
+echo "Using RID $__ILASM_RID for BuildTools native tools"
+
+export ILASMCOMPILER_VERSION=$__ILASM_VERSION
+export NATIVE_TOOLS_RID=$__ILASM_RID
+
echo "Initializing BuildTools..."
echo "Running: $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR" >> $__init_tools_log