Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Update MsQuic to current main #149

Merged
merged 2 commits into from
Sep 18, 2023
Merged

Update MsQuic to current main #149

merged 2 commits into from
Sep 18, 2023

Conversation

ManickaP
Copy link
Member

@ManickaP ManickaP commented Aug 12, 2023

@wfurt
Copy link
Member

wfurt commented Aug 12, 2023

This got broken by microsoft/msquic#3738
Hardcoding toolchain will not work .NET or anybody who needs to cross-compile on their own.

   if ($IsLinux) {
         switch ($Arch) {
             "arm"   {
                 $Arguments += " -DCMAKE_TOOLCHAIN_FILE=""cmake/toolchains/arm-linux.cmake"""
                 $SkipCIBuildCheck = $true
             }
             "arm64" {
                 $Arguments += " -DCMAKE_TOOLCHAIN_FILE=""cmake/toolchains/aarch64-linux.cmake"""
                 $SkipCIBuildCheck = $true
             }
         }
     }

build should still respect toolchain if it was set - just like it was done before.

cc: @nibanks @csujedihy

@csujedihy
Copy link

Being addressed in microsoft/msquic#3828

@wfurt
Copy link
Member

wfurt commented Sep 14, 2023

This still fails because microsoft/msquic#3828 did not bring back the old behavior. .NET does not use specific toolchain files but --target=aarch64-linux-gnu to express desired outcome without need to maintain any particular platforms files - cmake can do all that out of the box.

for me the easiest local "fix" is

furt@ubu18:~/github/dotnet-msquic/src/msquic$ git diff .
diff --git a/scripts/build.ps1 b/scripts/build.ps1
index 1ab1ca786..c0d6ff2e7 100644
--- a/scripts/build.ps1
+++ b/scripts/build.ps1
@@ -403,7 +403,7 @@ function CMake-Generate {
        }
     }
     if ($ToolchainFile -ne "") {
-        $Arguments += " -DCMAKE_TOOLCHAIN_FILE=""$ToolchainFile"""
+#//        $Arguments += " -DCMAKE_TOOLCHAIN_FILE=""$ToolchainFile"""
     }

e.g. avoiding the CMAKE_TOOLCHAIN_FILE altogether.

There are different ways how to fix this @csujedihy
Perhaps best would be keep the if ($ToolchainFile -eq "") but pass it in via new argument from for OneBranch builds or wrap all this with if ($OneBranch). That may make it harder for developers to do local cross-builds but I'm not sure if anybody builds the way how current OneBranch build does.

I'd be happy to test any proposed fix and/or submit PR to msquic. Please let us know.

@csujedihy
Copy link

@wfurt FYI. I have a PR open microsoft/msquic#3855.

@ManickaP ManickaP merged commit bbb1252 into main Sep 18, 2023
9 checks passed
@ManickaP ManickaP deleted the mapichov/update-msquic branch September 18, 2023 11:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants