Skip to content

Commit

Permalink
Set default toolchain file only for OneBranch/container builds (#3855)
Browse files Browse the repository at this point in the history
  • Loading branch information
csujedihy authored Sep 15, 2023
1 parent 3b54185 commit 998e558
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -388,18 +388,18 @@ function CMake-Generate {
if ($HostArch -ne $Arch) {
if ($OneBranch) {
$Arguments += " -DONEBRANCH=1"
if ($ToolchainFile -eq "") {
switch ($Arch) {
"arm" { $ToolchainFile = "cmake/toolchains/arm-linux.cmake" }
"arm64" { $ToolchainFile = "cmake/toolchains/aarch64-linux.cmake" }
}
}
}
$Arguments += " -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_CROSSCOMPILING=1 -DCMAKE_SYSROOT=$SysRoot"
switch ($Arch) {
"arm64" { $Arguments += " -DCMAKE_CXX_COMPILER_TARGET=aarch64-linux-gnu -DCMAKE_C_COMPILER_TARGET=aarch64-linux-gnu -DCMAKE_TARGET_ARCHITECTURE=arm64" }
"arm" { $Arguments += " -DCMAKE_CXX_COMPILER_TARGET=arm-linux-gnueabihf -DCMAKE_C_COMPILER_TARGET=arm-linux-gnueabihf -DCMAKE_TARGET_ARCHITECTURE=arm" }
}
if ($ToolchainFile -eq "") {
switch ($Arch) {
"arm" { $ToolchainFile = "cmake/toolchains/arm-linux.cmake" }
"arm64" { $ToolchainFile = "cmake/toolchains/aarch64-linux.cmake" }
}
}
}
}
if ($ToolchainFile -ne "") {
Expand Down

0 comments on commit 998e558

Please sign in to comment.