Skip to content

Commit

Permalink
Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ManickaP committed May 13, 2024
1 parent 3d11c4b commit aff5c5f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .azure/obtemplates/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ jobs:
target: ubuntu_2004_x86_64
${{ else }}:
target: ubuntu_2204_x86_64
xdp: true
inputs:
pwsh: true
filePath: scripts/build.ps1
arguments: -Tls ${{ parameters.tls }} -Config ${{ parameters.config }} -Platform ${{ parameters.platform }} -Arch x64 -CI -UseSystemOpenSSLCrypto -OneBranch -OfficialRelease
arguments: -Tls ${{ parameters.tls }} -Config ${{ parameters.config }} -Platform ${{ parameters.platform }} -EnableLinuxXDP ${{ xdp }} -Arch x64 -CI -UseSystemOpenSSLCrypto -OneBranch -OfficialRelease
- task: PowerShell@2
displayName: arm64
${{ if eq(parameters.tls, 'openssl') }}:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ option(QUIC_STATIC_LINK_PARTIAL_CRT "Statically links the compiler-specific port
option(QUIC_UWP_BUILD "Build for UWP" OFF)
option(QUIC_GAMECORE_BUILD "Build for GameCore" OFF)
option(QUIC_PGO "Enables profile guided optimizations" OFF)
option(QUIC_XDP_ENABLED "Enables XDP support" OFF)
option(QUIC_LINUX_XDP_ENABLED "Enables XDP support" OFF)
option(QUIC_SOURCE_LINK "Enables source linking on MSVC" ON)
option(QUIC_EMBED_GIT_HASH "Embed git commit hash in the binary" ON)
option(QUIC_PDBALTPATH "Enable PDBALTPATH setting on MSVC" ON)
Expand Down
14 changes: 7 additions & 7 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ This script provides helpers for building msquic.
.PARAMETER PGO
Builds msquic with profile guided optimization support (Windows-only).
.PARAMETER EnableXDP
.PARAMETER EnableLinuxXDP
Enables XDP support (Linux-only).
.PARAMETER Generator
Expand Down Expand Up @@ -170,7 +170,7 @@ param (
[switch]$PGO = $false,

[Parameter(Mandatory = $false)]
[switch]$EnableXDP = $false,
[switch]$EnableLinuxXDP = $false,

[Parameter(Mandatory = $false)]
[string]$Generator = "",
Expand Down Expand Up @@ -271,9 +271,9 @@ if ($Arch -eq "arm64ec") {
}
}

if (!$IsLinux -Or $Arch -ne "x64") {
if ($EnableXDP) {
Write-Error "XDP is supported only on Linux x64"
if ($IsLinux -And $Arch -ne "x64") {
if ($EnableLinuxXDP) {
Write-Error "Linux XDP is supported only on x64 platforms"
}
}

Expand Down Expand Up @@ -469,8 +469,8 @@ function CMake-Generate {
if ($PGO) {
$Arguments += " -DQUIC_PGO=on"
}
if ($EnableXDP) {
$Arguments += " -DQUIC_XDP_ENABLED=on"
if ($EnableLinuxXDP) {
$Arguments += " -DQUIC_LINUX_XDP_ENABLED=on"
}
if ($Platform -eq "uwp") {
$Arguments += " -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 -DQUIC_UWP_BUILD=on"
Expand Down
3 changes: 1 addition & 2 deletions scripts/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ fn main() {
config
.define("QUIC_ENABLE_LOGGING", logging_enabled)
.define("QUIC_TLS", "openssl")
.define("QUIC_OUTPUT_DIR", "../lib")
.define("QUIC_CARGO_BUILD", "on");
.define("QUIC_OUTPUT_DIR", "../lib");

match target.as_str() {
"x86_64-apple-darwin" => config
Expand Down
6 changes: 3 additions & 3 deletions src/platform/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ else()
set(SOURCES ${SOURCES} inline.c platform_posix.c storage_posix.c cgroup.c datapath_unix.c)
if(CX_PLATFORM STREQUAL "linux" AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
set(SOURCES ${SOURCES} datapath_linux.c datapath_epoll.c)
if (QUIC_XDP_ENABLED)
if (QUIC_LINUX_XDP_ENABLED)
set(SOURCES ${SOURCES} datapath_xplat.c datapath_raw.c datapath_raw_linux.c datapath_raw_socket.c datapath_raw_socket_linux.c datapath_raw_xdp_linux.c)
else()
set(SOURCES ${SOURCES} datapath_xplat.c datapath_raw_dummy.c)
Expand Down Expand Up @@ -61,7 +61,7 @@ if("${CX_PLATFORM}" STREQUAL "windows")
PUBLIC
wbemuuid)
target_link_libraries(platform PUBLIC winmm)
elseif(QUIC_XDP_ENABLED)
elseif(QUIC_LINUX_XDP_ENABLED)
find_library(NL_LIB nl-3)
find_library(NL_ROUTE_LIB nl-route-3)
find_library(XDP_LIB libxdp.so)
Expand Down Expand Up @@ -111,7 +111,7 @@ if ("${CX_PLATFORM}" STREQUAL "windows")
PRIVATE
${EXTRA_PLATFORM_INCLUDE_DIRECTORIES}
${PROJECT_SOURCE_DIR}/submodules/xdp-for-windows/published/external)
elseif(QUIC_XDP_ENABLED)
elseif(QUIC_LINUX_XDP_ENABLED)
include_directories(/usr/include/libnl3)
target_include_directories(platform PRIVATE ${EXTRA_PLATFORM_INCLUDE_DIRECTORIES})
endif()
Expand Down

0 comments on commit aff5c5f

Please sign in to comment.