Skip to content

Commit

Permalink
fix: CI arm bare-metal build
Browse files Browse the repository at this point in the history
  • Loading branch information
abeimler committed Jan 26, 2023
1 parent 742777c commit b18054b
Show file tree
Hide file tree
Showing 8 changed files with 120 additions and 82 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/ci.cross.arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,31 @@ jobs:
cmake:
- true
task:
- rpi3:build.cross
- rpi3:build.cross.bare-metal
- rpi4:build.cross
- rpi4:build.cross.aarch64
- rpi4:build.cross.custom-toolchain
- rpi4-vcpkg:build.cross
- rpi4-vcpkg:build.cross.custom-toolchain
- rpi4:build.cross.aarch64
- rpi3:build.cross
- rpi3:build.cross.bare-metal
include:
- task: rpi3:build.cross
install-cross-compiler: gcc-arm-linux-gnueabi g++-arm-linux-gnueabi gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
target: arm-linux-gnueabi
- task: rpi3:build.cross.bare-metal
install-cross-compiler: gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi
target: arm-none-eabi
- task: rpi4:build.cross
install-cross-compiler: g++-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
target: aarch64-linux-gnu
- task: rpi4:build.cross.custom-toolchain
install-cross-compiler: g++-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
target: aarch64-linux-gnu
- task: rpi4-vcpkg:build.cross
- task: rpi4:build.cross.aarch64
install-cross-compiler: g++-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
target: aarch64-linux-gnu
- task: rpi4-vcpkg:build.cross.custom-toolchain
- task: rpi4:build.cross.custom-toolchain
install-cross-compiler: g++-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
target: aarch64-linux-gnu
- task: rpi4:build.cross.aarch64
- task: rpi4-vcpkg:build.cross
install-cross-compiler: g++-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
target: aarch64-linux-gnu
- task: rpi3:build.cross
install-cross-compiler: gcc-arm-linux-gnueabi g++-arm-linux-gnueabi gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
target: arm-linux-gnueabi
- task: rpi3:build.cross.bare-metal
install-cross-compiler: gcc-arm-none-eabi g++-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi
target: arm-none-eabi
steps:
- uses: actions/checkout@v3
with:
Expand Down
12 changes: 6 additions & 6 deletions docker/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ tasks:
rpi3.debug:
- docker-compose up --build build-rpi3-debug
- docker-compose down

rpi3.bare-metal:
- docker-compose up --build build-rpi3-bare-metal
- docker-compose down

rpi4:
- docker-compose up --build build-rpi4
Expand All @@ -42,10 +46,6 @@ tasks:
- docker-compose up --build test-rpi4
- docker-compose down

rpi4.vcpkg:
- docker-compose up --build build-rpi4-vcpkg
- docker-compose down

rpi4.custom:
- docker-compose up --build build-rpi4-custom
- docker-compose down
Expand All @@ -54,8 +54,8 @@ tasks:
- docker-compose up --build build-rpi4-aarch64
- docker-compose down

rpi3.bare-metal:
- docker-compose up --build build-rpi3-bare-metal
rpi4.vcpkg:
- docker-compose up --build build-rpi4-vcpkg
- docker-compose down

rpi4.vcpkg-custsom:
Expand Down
134 changes: 88 additions & 46 deletions src/CrossCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ macro(enable_cross_compiler)
set(_default_triplet ${DEFAULT_TRIPLET})
if(NOT "${EnableCrossCompiler_DEFAULT_TRIPLET}" STREQUAL "")
set(_default_triplet ${EnableCrossCompiler_DEFAULT_TRIPLET})
else()
if("${DEFAULT_TRIPLET}" STREQUAL "")
detect_compiler()
endif()
set(_default_triplet ${CMAKE_SYSTEM_PROCESSOR})
endif()

if(DEFINED CMAKE_TOOLCHAIN_FILE OR DEFINED VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
detect_compiler()
endif()
set(_cc ${CMAKE_C_COMPILER})
set(_cxx ${CMAKE_CXX_COMPILER})
if(NOT "${EnableCrossCompiler_CC}" STREQUAL "")
Expand All @@ -56,7 +54,24 @@ macro(enable_cross_compiler)
set(_cross_triplet ${EnableCrossCompiler_CROSS_TRIPLET})
endif()

# detect compiler by triplet
# detect triplet by compiler (fallback)
if("${_default_triplet}" STREQUAL "")
if(_cc MATCHES "x86_64(-w64)?-mingw32-[gc]..?" OR _cxx MATCHES "x86_64(-w64)?-mingw32-[gc]..?")
set(_default_triplet "x64-mingw-dynamic")
elseif(_cc MATCHES "i686(-w64)?-mingw32-[gc]..?" OR _cxx MATCHES "i686(-w64)?-mingw32-[gc]..?")
set(_default_triplet "i686-mingw-dynamic")
elseif(_cc MATCHES "(gcc-)?arm-linux-gnueabi-[gc]..?" OR _cxx MATCHES "(gcc-)?arm-linux-gnueabi-[gc]..?")
set(_default_triplet "arm-linux")
elseif(_cc MATCHES "(gcc-)?arm-linux-gnueabihf-[gc]..?" OR _cxx MATCHES "(gcc-)?arm-linux-gnueabihf-[gc]..?")
set(_default_triplet "arm-linux")
elseif(_cc MATCHES "(gcc-)?aarch64-linux-(gnu-)?[gc]..?" OR _cxx MATCHES "(gcc-)?aarch64-linux-(gnu-)?[gc]..?")
set(_default_triplet "arm64-linux")
elseif(_cc MATCHES "emcc" OR _cxx MATCHES "em..")
set(_default_triplet "wasm32-emscripten")
endif()
endif()

# detect compiler and target_architecture by triplet
if("${_default_triplet}" STREQUAL "x64-mingw-dynamic" OR "${_default_triplet}" STREQUAL "x64-mingw-static")
if("${_cc}" STREQUAL "")
set(_cc "x86_64-w64-mingw32-gcc")
Expand Down Expand Up @@ -96,19 +111,19 @@ macro(enable_cross_compiler)
set(_target_architecture "arm-linux")
endif()
endif()
if("${_cc}" STREQUAL "")
set(_cc $ENV{CC})
endif()
if("${_cxx}" STREQUAL "")
set(_cxx $ENV{CXX})
endif()

if("${_target_architecture}" STREQUAL "")
if("${_cc}" STREQUAL "")
set(_cc $ENV{CC})
endif()
if("${_cxx}" STREQUAL "")
set(_cxx $ENV{CXX})
endif()
if(_cc MATCHES "x86_64(-w64)?-mingw32-[gc]..?" OR _cxx MATCHES "x86_64(-w64)?-mingw32-[gc]..?")
set(_target_architecture "x64")
elseif(_cc MATCHES "i686(-w64)?-mingw32-[gc]..?" OR _cxx MATCHES "i686(-w64)?-mingw32-[gc]..?")
set(_target_architecture "x86")
elseif(_cc MATCHES "emcc" OR _cxx MATCHES "em\\+\\+")
elseif(_cc MATCHES "emcc" OR _cxx MATCHES "em..")
set(_target_architecture "wasm32-emscripten")
else()
# TODO: check for arm compiler
Expand All @@ -117,7 +132,7 @@ macro(enable_cross_compiler)
endif()
endif()

if(NOT DEFINED HOST_TRIPLET)
if("${HOST_TRIPLET}" STREQUAL "")
if(WIN32)
set(HOST_TRIPLET "${_arch}-windows")
elseif(APPLE)
Expand All @@ -129,16 +144,17 @@ macro(enable_cross_compiler)

set(USE_CROSSCOMPILER_MINGW)
set(USE_CROSSCOMPILER_EMSCRIPTEN)
set(USE_CROSSCOMPILER_ARM)
set(USE_CROSSCOMPILER_ARM64)
set(USE_CROSSCOMPILER_AARCH64)
set(USE_CROSSCOMPILER_ARM_LINUX)
set(USE_CROSSCOMPILER_ARM64_LINUX)
set(USE_CROSSCOMPILER_AARCH64_LINUX)
set(USE_CROSSCOMPILER_ARM_NONE)
if(_cc MATCHES "(x86_64|i686)(-w64)?-mingw32-[gc]..?" OR _cxx MATCHES "(x86_64|i686)(-w64)?-mingw32-[gc]..?")
set(MINGW TRUE)
set(USE_CROSSCOMPILER_MINGW TRUE)
elseif(_cc MATCHES "emcc" OR _cxx MATCHES "em\\+\\+")
elseif(_cc MATCHES "emcc" OR _cxx MATCHES "em..")
set(USE_CROSSCOMPILER_EMSCRIPTEN TRUE)
elseif(_cc MATCHES "aarch64-linux-gnu-gcc" OR _cxx MATCHES "aarch64-linux-gnu-g\\+\\+")
set(USE_CROSSCOMPILER_AARCH64 TRUE)
set(USE_CROSSCOMPILER_AARCH64_LINUX TRUE)
elseif(_default_triplet MATCHES "arm64-linux")
set(USE_CROSSCOMPILER_ARM64_LINUX TRUE)
elseif(_default_triplet MATCHES "arm-linux")
Expand All @@ -161,39 +177,56 @@ macro(enable_cross_compiler)
endif()
endif()

if("${_cross_root}" STREQUAL "")
if(_cc MATCHES "x86_64(-w64)?-mingw32-[gc]..?" OR _cxx MATCHES "x86_64(-w64)?-mingw32-[gc]..?")
if(_cc MATCHES "x86_64(-w64)?-mingw32-[gc]..?" OR _cxx MATCHES "x86_64(-w64)?-mingw32-[gc]..?")
if("${_cross_root}" STREQUAL "")
set(_cross_root "/usr/x86_64-w64-mingw32")
elseif(_cc MATCHES "i686(-w64)?-mingw32-[gc]..?" OR _cxx MATCHES "i686(-w64)?-mingw32-[gc]..?")
endif()
set(MINGW TRUE)
set(USE_CROSSCOMPILER_MINGW TRUE)
elseif(_cc MATCHES "i686(-w64)?-mingw32-[gc]..?" OR _cxx MATCHES "i686(-w64)?-mingw32-[gc]..?")
if("${_cross_root}" STREQUAL "")
set(_cross_root "/usr/i686-w64-mingw32")
elseif(_cc MATCHES "(gcc-)?arm-linux-gnueabi-[gc]..?" OR _cxx MATCHES "(gcc-)?arm-linux-gnueabi-[gc]..?")
endif()
set(MINGW TRUE)
set(USE_CROSSCOMPILER_MINGW TRUE)
elseif(_cc MATCHES "(gcc-)?arm-linux-gnueabi-[gc]..?" OR _cxx MATCHES "(gcc-)?arm-linux-gnueabi-[gc]..?")
if("${_cross_root}" STREQUAL "")
set(_cross_root "/usr/gcc-arm-linux-gnueabi")
if("${_cross_triplet}" STREQUAL "")
set(_cross_triplet "arm-linux-gnueabi")
endif()
elseif(_cc MATCHES "(gcc-)?arm-linux-gnueabihf-[gc]..?" OR _cxx MATCHES "(gcc-)?arm-linux-gnueabihf-[gc]..?")
endif()
if("${_cross_triplet}" STREQUAL "")
set(_cross_triplet "arm-linux-gnueabi")
endif()
elseif(_cc MATCHES "(gcc-)?arm-linux-gnueabihf-[gc]..?" OR _cxx MATCHES "(gcc-)?arm-linux-gnueabihf-[gc]..?")
if("${_cross_root}" STREQUAL "")
set(_cross_root "/usr/gcc-arm-linux-gnueabihf")
if("${_cross_triplet}" STREQUAL "")
set(_cross_triplet "arm-linux-gnueabihf")
endif()
elseif(_cc MATCHES "(gcc-)?aarch64-linux-gnu-[gc]..?" OR _cxx MATCHES "(gcc-)?aarch64-linux-gnu-[gc]..?")
endif()
if("${_cross_triplet}" STREQUAL "")
set(_cross_triplet "arm-linux-gnueabihf")
endif()
elseif(_cc MATCHES "(gcc-)?aarch64-linux-(gnu-)?[gc]..?" OR _cxx MATCHES "(gcc-)?aarch64-linux-(gnu-)?[gc]..?")
if("${_cross_root}" STREQUAL "")
set(_cross_root "/usr/gcc-aarch64-linux-gnu")
if("${_cross_triplet}" STREQUAL "")
set(_cross_triplet "gcc-aarch64-linux-gnu")
endif()
elseif(_cc MATCHES "(gcc-)?arm-none-eabi-[gc]..?" OR _cxx MATCHES "(gcc-)?arm-none-eabi-[gc]..?")
endif()
if("${_cross_triplet}" STREQUAL "")
set(_cross_triplet "gcc-aarch64-linux-gnu")
endif()
set(USE_CROSSCOMPILER_AARCH64_LINUX TRUE)
elseif(_cc MATCHES "(gcc-)?arm-none-eabi-[gc]..?" OR _cxx MATCHES "(gcc-)?arm-none-eabi-[gc]..?")
if("${_cross_root}" STREQUAL "")
set(_cross_root "/usr/gcc-arm-none-eabi")
if("${_cross_triplet}" STREQUAL "")
set(_cross_triplet "arm-none-eabi")
endif()
set(USE_CROSSCOMPILER_ARM_NONE TRUE)
endif()
# TODO: check if path is right, check for header files or something
if("${_cross_triplet}" STREQUAL "")
set(_cross_triplet "arm-none-eabi")
endif()
set(USE_CROSSCOMPILER_ARM_NONE TRUE)
endif()
# TODO: check if path is right, check for header files or something
if(NOT "${_cross_root}" STREQUAL "" AND "${_cross_triplet}" STREQUAL "")
message(WARNING "CROSS_ROOT (${_cross_root}) is set, but CROSS_TRIPLET is not")
endif()

set(CROSS_C ${_cc})
set(CROSS_CXX ${_cxx})
set(CROSS_ROOT ${_cross_root})
set(CROSS_TRIPLET ${_cross_triplet})
set(DEFAULT_TRIPLET ${_default_triplet})
Expand Down Expand Up @@ -230,20 +263,27 @@ macro(enable_cross_compiler)
set(CMAKE_CROSSCOMPILING_EMULATOR "$ENV{EMSDK_NODE};--experimental-wasm-threads")
endif()
else()
set(CMAKE_C_COMPILER ${_cc})
set(CMAKE_CXX_COMPILER ${_cxx})
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE AND NOT DEFINED VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
set(CMAKE_C_COMPILER ${_cc})
set(CMAKE_CXX_COMPILER ${_cxx})
endif()
endif()

set(_toolchain_file)
if(${EnableCrossCompiler_TOOLCHAIN_FILE})
if(NOT "${EnableCrossCompiler_TOOLCHAIN_FILE}" STREQUAL "")
set(_toolchain_file ${EnableCrossCompiler_TOOLCHAIN_FILE})
else()
get_toolchain_file(_toolchain_file)
endif()
set(CROSS_TOOLCHAIN_FILE ${_toolchain_file})
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE ${_toolchain_file})
if(NOT DEFINED VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE ${_toolchain_file})
else()
set(CROSS_TOOLCHAIN_FILE ${VCPKG_CHAINLOAD_TOOLCHAIN_FILE})
endif()
else()
set(CROSS_TOOLCHAIN_FILE ${_toolchain_file})
set(CROSS_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_FILE})
endif()
set(CROSSCOMPILING TRUE)

Expand All @@ -262,7 +302,9 @@ macro(enable_cross_compiler)
#message(STATUS "EMSDK: $ENV{EMSDK}")
message(STATUS "use emscripten cross-compiler emulator: ${CMAKE_CROSSCOMPILING_EMULATOR}")
else()
message(STATUS "use SYSROOT: ${CROSS_ROOT}")
if(NOT "${CROSS_ROOT}" STREQUAL "")
message(STATUS "use SYSROOT: ${CROSS_ROOT}")
endif()
endif()
message(STATUS "Target Architecture: ${TARGET_ARCHITECTURE}")
if(NOT "${DEFAULT_TRIPLET}" STREQUAL "")
Expand Down
14 changes: 7 additions & 7 deletions src/Vcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ macro(run_vcpkg)

if(CROSSCOMPILING)
if(NOT MINGW)
if(TARGET_ARCHITECTURE)
if(NOT "${TARGET_ARCHITECTURE}" STREQUAL "")
set(VCPKG_TARGET_TRIPLET "${TARGET_ARCHITECTURE}")
endif()
if(DEFAULT_TRIPLET)
if(NOT "${DEFAULT_TRIPLET}" STREQUAL "")
set(VCPKG_DEFAULT_TRIPLET "${DEFAULT_TRIPLET}")
endif()
if(LIBRARY_LINKAGE)
if(NOT "${LIBRARY_LINKAGE}" STREQUAL "")
set(VCPKG_LIBRARY_LINKAGE "${LIBRARY_LINKAGE}")
endif()
endif()
Expand All @@ -133,13 +133,13 @@ macro(run_vcpkg)
get_toolchain_file(_toolchain_file)
endif()

if(${_toolchain_file})
if(NOT "${_toolchain_file}" STREQUAL "")
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE
${_toolchain_file}
CACHE STRING "vcpkg chainload toolchain file")
message(STATUS "Setup cross-compiler for ${VCPKG_TARGET_TRIPLET}")
message(STATUS "Use cross-compiler toolchain for vcpkg: ${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}")
CACHE STRING "vcpkg chainload toolchain file" FORCE)
endif()
endif()
message(STATUS "Setup cross-compiler for ${VCPKG_TARGET_TRIPLET}")
message(STATUS "Use cross-compiler toolchain for vcpkg: ${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}")
endif()
endmacro()
2 changes: 1 addition & 1 deletion tests/rpi3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if(ENABLE_BARE_METAL_CROSS_COMPILING)
CXX "arm-none-eabi-g++"
TARGET_ARCHITECTURE "arm"
CROSS_ROOT "/usr/arm-none-eabi-gcc"
CROSS_TRIPLET "arm-none-eabi-gcc"
CROSS_TRIPLET "arm-none-eabi"
)

# some more custom compiler settings
Expand Down
4 changes: 2 additions & 2 deletions tests/rpi3/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ tasks:
cmds:
- task: build.debug
vars:
CMAKE_ARGS: -DENABLE_CHECKING:BOOL=ON -DENABLE_CROSS_COMPILING:BOOL=ON -DCMAKE_C_COMPILER={{.CROSS_CC | default "arm-linux-gnueabihf-gcc"}} -DCMAKE_CXX_COMPILER={{.CROSS_CXX | default "arm-linux-gnueabihf-g++"}} -DDEFAULT_TRIPLET=arm-linux -DCROSS_ROOT=/usr/gcc-arm-linux-gnueabihf
CMAKE_ARGS: -DENABLE_CHECKING:BOOL=ON -DENABLE_CROSS_COMPILING:BOOL=ON -DCMAKE_C_COMPILER={{.CROSS_CC | default "arm-linux-gnueabihf-gcc"}} -DCMAKE_CXX_COMPILER={{.CROSS_CXX | default "arm-linux-gnueabihf-g++"}} -DDEFAULT_TRIPLET=arm-linux

build.cross:
cmds:
- task: build
vars:
CMAKE_ARGS: -DENABLE_CROSS_COMPILING:BOOL=ON -DENABLE_CROSS_COMPILING:BOOL=ON -DCMAKE_C_COMPILER={{.CROSS_CC | default "arm-linux-gnueabihf-gcc"}} -DCMAKE_CXX_COMPILER={{.CROSS_CXX | default "arm-linux-gnueabi-g++"}} -DDEFAULT_TRIPLET=arm-linux -DCROSS_ROOT=/usr/gcc-arm-linux-gnueabihf
CMAKE_ARGS: -DENABLE_CROSS_COMPILING:BOOL=ON -DCMAKE_C_COMPILER={{.CROSS_CC | default "arm-linux-gnueabihf-gcc"}} -DCMAKE_CXX_COMPILER={{.CROSS_CXX | default "arm-linux-gnueabi-g++"}} -DDEFAULT_TRIPLET=arm-linux

build.cross.bare-metal:
cmds:
Expand Down
2 changes: 1 addition & 1 deletion tests/rpi4-vcpkg/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tasks:
cmds:
- task: build
vars:
CMAKE_ARGS: -DENABLE_CROSS_COMPILING:BOOL=ON -DCMAKE_C_COMPILER={{.CROSS_CC | default "gcc-aarch64-linux-gnu-gcc"}} -DCMAKE_CXX_COMPILER={{.CROSS_CXX | default "gcc-aarch64-linux-gnu-g++"}} -DDEFAULT_TRIPLET=arm64-linux -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=./cmake/my-toolchain.cmake
CMAKE_ARGS: -DENABLE_CROSS_COMPILING:BOOL=ON -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE={{.CWD}}/tests/rpi4-vcpkg/cmake/my-toolchain.cmake -DDEFAULT_TRIPLET=arm64-linux

lint:
- ~/vcpkg/vcpkg format-manifest ./vcpkg.json
6 changes: 3 additions & 3 deletions tests/rpi4/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ tasks:
cmds:
- task: build
vars:
CMAKE_ARGS: -DENABLE_CROSS_COMPILING:BOOL=ON -DCMAKE_C_COMPILER={{.CROSS_CC | default "gcc-aarch64-linux-gnu-gcc"}} -DCMAKE_CXX_COMPILER={{.CROSS_CXX | default "gcc-aarch64-linux-gnu-g++"}} -DDEFAULT_TRIPLET=arm64-linux
CMAKE_ARGS: -DENABLE_CROSS_COMPILING:BOOL=ON -DCMAKE_C_COMPILER={{.CROSS_CC | default "aarch64-linux-gnu-gcc"}} -DCMAKE_CXX_COMPILER={{.CROSS_CXX | default "aarch64-linux-gnu-g++"}}

build.cross.debug:
cmds:
- task: build.debug
vars:
CMAKE_ARGS: -DENABLE_CHECKING:BOOL=ON -DENABLE_CROSS_COMPILING:BOOL=ON -DCMAKE_C_COMPILER={{.CROSS_CC | default "gcc-aarch64-linux-gnu-gcc"}} -DCMAKE_CXX_COMPILER={{.CROSS_CXX | default "gcc-aarch64-linux-gnu-g++"}} -DDEFAULT_TRIPLET=arm64-linux
CMAKE_ARGS: -DENABLE_CHECKING:BOOL=ON -DENABLE_CROSS_COMPILING:BOOL=ON -DCMAKE_C_COMPILER={{.CROSS_CC | default "aarch64-linux-gnu-gcc"}} -DCMAKE_CXX_COMPILER={{.CROSS_CXX | default "aarch64-linux-gnu-g++"}}

build.cross.custom-toolchain:
cmds:
- task: build
vars:
CMAKE_ARGS: -DENABLE_CROSS_COMPILING:BOOL=ON -DCMAKE_C_COMPILER={{.CROSS_CC | default "gcc-aarch64-linux-gnu-gcc"}} -DCMAKE_CXX_COMPILER={{.CROSS_CXX | default "gcc-aarch64-linux-gnu-g++"}} -DDEFAULT_TRIPLET=arm64-linux -DCMAKE_TOOLCHAIN_FILE=./cmake/my-toolchain.cmake
CMAKE_ARGS: -DCMAKE_TOOLCHAIN_FILE={{.CWD}}/tests/rpi4/cmake/my-toolchain.cmake

build.cross.aarch64:
cmds:
Expand Down

0 comments on commit b18054b

Please sign in to comment.