Skip to content

Commit

Permalink
Fix UWP builds missing storage APIs (microsoft#2649)
Browse files Browse the repository at this point in the history
  • Loading branch information
thhous-msft authored Apr 20, 2022
1 parent d8db4e7 commit 439bc9b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .azure/azure-pipelines.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,31 +242,31 @@ stages:
arch: x64
tls: schannel
extraPrepareArgs: -DisableTest
extraBuildArgs: -DisableTools -DisableTest -EnableTelemetryAsserts
extraBuildArgs: -EnableTelemetryAsserts
- template: ./templates/build-config-user.yml
parameters:
image: windows-2019
platform: uwp
arch: x64
tls: openssl
extraPrepareArgs: -DisableTest
extraBuildArgs: -DisableTools -DisableTest -EnableTelemetryAsserts
extraBuildArgs: -EnableTelemetryAsserts
- template: ./templates/build-config-user.yml
parameters:
image: windows-2019
platform: uwp
arch: x86
tls: openssl
extraPrepareArgs: -DisableTest
extraBuildArgs: -DisableTools -DisableTest -EnableTelemetryAsserts
extraBuildArgs: -EnableTelemetryAsserts
- template: ./templates/build-config-user.yml
parameters:
image: windows-2019
platform: uwp
arch: arm64
tls: openssl
extraPrepareArgs: -DisableTest
extraBuildArgs: -DisableTools -DisableTest -EnableTelemetryAsserts
extraBuildArgs: -EnableTelemetryAsserts
- template: ./templates/build-config-user.yml
parameters:
image: windows-2019
Expand Down
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ option(QUIC_DISABLE_POSIX_GSO "Disable GSO for systems that say they support it
set(QUIC_FOLDER_PREFIX "" CACHE STRING "Optional prefix for source group folders when using an IDE generator")
set(QUIC_LIBRARY_NAME "msquic" CACHE STRING "Override the output library name")

if (QUIC_UWP_BUILD OR QUIC_GAMECORE_BUILD)
message(STATUS "UWP And GameCore builds disable all executables, and force shared CRT")
set(QUIC_BUILD_TOOLS OFF)
set(QUIC_BUILD_TEST OFF)
set(QUIC_BUILD_PERF OFF)
set(QUIC_STATIC_LINK_CRT OFF)
endif()

if (NOT QUIC_BUILD_SHARED)
cmake_minimum_required(VERSION 3.20)
endif()
Expand Down
23 changes: 12 additions & 11 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -359,14 +359,16 @@ function CMake-Generate {
if ($CodeCheck) {
$Arguments += " -DQUIC_CODE_CHECK=on"
}
if (!$DisableTools) {
$Arguments += " -DQUIC_BUILD_TOOLS=on"
}
if (!$DisableTest) {
$Arguments += " -DQUIC_BUILD_TEST=on"
}
if (!$DisablePerf) {
$Arguments += " -DQUIC_BUILD_PERF=on"
if ($Platform -ne "uwp" -and $Platform -ne "gamecore_console") {
if (!$DisableTools) {
$Arguments += " -DQUIC_BUILD_TOOLS=on"
}
if (!$DisableTest) {
$Arguments += " -DQUIC_BUILD_TEST=on"
}
if (!$DisablePerf) {
$Arguments += " -DQUIC_BUILD_PERF=on"
}
}
if (!$IsWindows) {
$ConfigToBuild = $Config;
Expand All @@ -382,11 +384,10 @@ function CMake-Generate {
$Arguments += " -DQUIC_PGO=on"
}
if ($Platform -eq "uwp") {
$Arguments += " -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10 -DQUIC_UWP_BUILD=on -DQUIC_STATIC_LINK_CRT=Off"
$Arguments += " -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10 -DQUIC_UWP_BUILD=on"
}
# On gamecore, only the main binary can be built.
if ($Platform -eq "gamecore_console") {
$Arguments += " -DQUIC_GAMECORE_BUILD=on -DQUIC_STATIC_LINK_CRT=Off -DQUIC_BUILD_TEST=off -DQUIC_BUILD_TOOLS=off -DQUIC_BUILD_PERF=off"
$Arguments += " -DQUIC_GAMECORE_BUILD=on"
}
if ($ToolchainFile -ne "") {
$Arguments += " -DCMAKE_TOOLCHAIN_FILE=""$ToolchainFile"""
Expand Down

0 comments on commit 439bc9b

Please sign in to comment.