Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NOREVIEW] Fix HttpStress and SslStress build for Windows #99955

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 20 additions & 3 deletions eng/docker/build-docker-sdk.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,23 @@ $dockerFilePrefix="$PSScriptRoot/libraries-sdk"

if ($buildWindowsContainers)
{
write-host "Dumping present MSVC versions"

gci "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/*"

# gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130"

gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130/bin"
gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130/bin/HostX64"
gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130/bin/HostX64/x64"
gi "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.38.33130/bin/HostX64/x64/cl.exe"

write-host "specifying explicit MSVC version"

$ENV:CMAKE_VS_PLATFORM_TOOLSET="v143,version=14.38"
$ENV:CMAKE_GENERATOR_TOOLSET="v143,version=14.38"
$ENV:CMAKE_GENERATOR="Visual Studio 17 2022"

# Due to size concerns, we don't currently do docker builds on windows.
# Build on the host machine, then simply copy artifacts to the target docker image.
# This should result in significantly lower build times, for now.
Expand All @@ -29,7 +46,7 @@ if ($buildWindowsContainers)
}

$dockerFile="$dockerFilePrefix.windows.Dockerfile"

# Collect the following artifacts to folder, that will be used as build context for the container,
# so projects can build and test against the live-built runtime:
# 1. Reference assembly pack (microsoft.netcore.app.ref)
Expand All @@ -54,13 +71,13 @@ if ($buildWindowsContainers)
-Destination $dockerContext\targetingpacks.targets
Copy-Item -Recurse -Path $REPO_ROOT_DIR\src\libraries\System.Net.Quic\src\System\Net\Quic\Interop `
-Destination $dockerContext\msquic-interop

# In case of non-CI builds, testhost may already contain Microsoft.AspNetCore.App (see build-local.ps1 in HttpStress):
$testHostAspNetCorePath="$dockerContext\testhost\net$dotNetVersion-windows-$configuration-x64/shared/Microsoft.AspNetCore.App"
if (Test-Path $testHostAspNetCorePath) {
Remove-Item -Recurse -Force $testHostAspNetCorePath
}

docker build --tag $imageName `
--build-arg CONFIGURATION=$configuration `
--file $dockerFile `
Expand Down
2 changes: 2 additions & 0 deletions eng/native/gen-buildsys.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ if not "%__ConfigureOnly%" == "1" (
)
)

echo %path%

if /i "%__UseEmcmake%" == "1" (
call "!EMSDK_PATH!/emsdk_env.bat" > nul 2>&1 && emcmake "%CMakePath%" %__ExtraCmakeParams% --no-warn-unused-cli -G "%__CmakeGenerator%" -B %__IntermediatesDir% -S %__SourceDir%
) else (
Expand Down