Skip to content

Commit 4d87596

Browse files
committed
Use VisualCppTools nuget package for link.exe
1 parent 6afc4f9 commit 4d87596

File tree

6 files changed

+13
-23
lines changed

6 files changed

+13
-23
lines changed

.nuget/NuGet.Config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
1212
<add key="myget.org dotnet-buildtools" value="https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json" />
1313
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
14-
14+
<add key="vctools" value="https://vcppdogfooding.azurewebsites.net/nuget/" />
1515
</packageSources>
1616
</configuration>

build.cmd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,16 +363,15 @@ if '%RestorePackages%' == 'true' (
363363
.\.nuget\NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget\nuget.config
364364
@if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure
365365
)
366-
if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '1' (
367366

367+
if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '1' (
368368
:: Restore the Tools directory
369369
call %~dp0init-tools.cmd
370370
)
371371

372372
set _dotnetexe=%~dp0Tools\dotnetcli\dotnet.exe
373373

374374
if '%BUILD_PROTO_WITH_CORECLR_LKG%' == '1' (
375-
376375
:: Restore the Tools directory
377376
call %~dp0init-tools.cmd
378377

packages.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@
2020
<package id="System.ValueTuple" version="4.0.0-rc3-24212-01" />
2121
<package id="BenchmarkDotNet" version="0.9.8"/>
2222
<package id="BenchmarkDotNet.Diagnostics.Windows" version="0.9.8"/>
23+
<package id="VisualCppTools" version="14.0.24516-Pre"/>
2324
</packages>

tests/RunTests.cmd

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ if not exist "%~dp0..\packages\NUnit.Console.3.0.0\tools\" (
1818
SET NUNIT3_CONSOLE=%~dp0..\packages\NUnit.Console.3.0.0\tools\nunit3-console.exe
1919
SET FSI_TOOL=%~dp0..\%FLAVOR%\net40\bin\Fsi.exe
2020

21+
set link_exe=%~dp0..\packages\VisualCppTools.14.0.24516-Pre\lib\native\bin\link.exe
22+
if not exist "%link_exe%" (
23+
set saved_errorlevel=1
24+
echo Error: failed to find '%link_exe%' use nuget to restore the VisualCppTools package
25+
goto :FINISHED
26+
)
27+
2128
rem "ttags" indicates what test areas will be run, based on the tags in the test.lst files
2229
set TTAGS_ARG=
2330
SET TTAGS=
@@ -382,7 +389,8 @@ echo powershell -File Upload-Results.ps1 "%~1"
382389
powershell -File Upload-Results.ps1 "%~1"
383390

384391
:SKIP_APPVEYOR_UPLOAD
385-
392+
:FINISHED
393+
386394
if NOT %saved_errorlevel% == 0 exit /b 1
387395
goto :EOF
388396

tests/fsharpqa/Source/CompilerOptions/fsc/highentropyva/CheckHighEntropyASLR.bat

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
@echo off
22

3-
REM Search for the Linker
4-
REM Use VS2015 or fall back to VS2014
5-
SET LINK_EXE="%VS150COMNTOOLS%\..\IDE\VC\bin\link.exe"
6-
IF NOT EXIST %LINK_EXE% ( SET LINK_EXE="%VS150COMNTOOLS%..\..\VC\bin\link.exe" )
7-
IF NOT EXIST %LINK_EXE% ( SET LINK_EXE="%VS140COMNTOOLS%..\..\VC\bin\link.exe" )
8-
IF NOT EXIST %LINK_EXE% (
9-
@echo "Test Requires LINK.EXE" --- Not found
10-
@echo "When installing VS please select "Select Visual C++ / Common Tools For Visual C++"
11-
)
3+
REM Use Link.exe from the nuget package
124

135
REM %LINK_EXE% -- Path to link.exe
146
REM %1 -- assembly to check

tests/fsharpqa/Source/CompilerOptions/fsc/subsystemversion/CheckSubsystemVersion.bat

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
@echo off
22

3-
REM Search for the Linker
4-
REM Use VS2015 or fall back to VS2014
5-
SET LINK_EXE="%VS150COMNTOOLS%\..\IDE\VC\bin\link.exe"
6-
IF NOT EXIST %LINK_EXE% ( SET LINK_EXE="%VS150COMNTOOLS%..\..\VC\bin\link.exe" )
7-
IF NOT EXIST %LINK_EXE% ( SET LINK_EXE="%VS140COMNTOOLS%..\..\VC\bin\link.exe" )
8-
IF NOT EXIST %LINK_EXE% (
9-
@echo "Test Requires LINK.EXE" --- Not found
10-
@echo "When installing VS please select "Select Visual C++ / Common Tools For Visual C++"
11-
)
12-
133
REM %LINK_EXE% -- Path to link.exe
144
REM %1 -- assembly to check
155
REM %2 -- expected value ("4.00" etc...)

0 commit comments

Comments
 (0)