forked from microsoft/Azure-Kinect-Sensor-SDK
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds ARM64 toolchain file and logic to determine target architecture * Enables non-sse version of rgbz transformation * Adds arm64 cross compile support to Dockerfile * Add ARM64 builds to pipeline * Enabling Functional Testing on ARM64 * Updating Display for ARM64 and glxinfo * fixing up build artifact names * Switch to publishing GNU binaries * Moving DepthEngine properly * Moving DepthEngine properly * fixing case * Don't run multi device tests on ARM64 Co-authored-by: Matt Schulte <[email protected]> Co-authored-by: Matt Schulte <[email protected]>
- Loading branch information
1 parent
52cfb4a
commit 6dea37e
Showing
11 changed files
with
336 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
function(determine_target_arch OUTPUT_VARIABLE) | ||
if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") | ||
if("${MSVC_C_ARCHITECTURE_ID}" STREQUAL "X86") | ||
set(ARCH "i686") | ||
elseif("${MSVC_C_ARCHITECTURE_ID}" STREQUAL "x64") | ||
set(ARCH "x86_64") | ||
elseif("${MSVC_C_ARCHITECTURE_ID}" STREQUAL "ARM") | ||
set(ARCH "arm") | ||
elseif("${MSVC_C_ARCHITECTURE_ID}" STREQUAL "ARM64") | ||
set(ARCH "arm64") | ||
else() | ||
message(FATAL_ERROR "Unrecognized architecture ${MSVC_C_ARCHITECTURE_ID} from ${CMAKE_C_COMPILER}") | ||
endif() | ||
elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") | ||
if("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") | ||
set(CMD_ARGS "-target" "${CMAKE_C_COMPILER_TARGET}" "-dumpmachine") | ||
else() | ||
set(CMD_ARGS "-dumpmachine") | ||
endif() | ||
execute_process( | ||
COMMAND | ||
${CMAKE_C_COMPILER} ${CMD_ARGS} | ||
RESULT_VARIABLE | ||
RESULT | ||
OUTPUT_VARIABLE | ||
ARCH | ||
ERROR_QUIET) | ||
if(RESULT) | ||
message(FATAL_ERROR "Failed to determine target architecture triplet: ${RESULT}") | ||
endif() | ||
string(REGEX MATCH "([^-]+).*" ARCH_MATCH ${ARCH}) | ||
if(NOT CMAKE_MATCH_1 OR NOT ARCH_MATCH) | ||
message(FATAL_ERROR "Failed to match the target architecture triplet: ${ARCH}") | ||
endif() | ||
set(ARCH ${CMAKE_MATCH_1}) | ||
|
||
if("${ARCH}" STREQUAL "x86_64") | ||
# Do nothing | ||
elseif("${ARCH}" STREQUAL "aarch64") | ||
set(ARCH "arm64") | ||
elseif("${ARCH}" STREQUAL "i686") | ||
# Do nothing | ||
elseif("${ARCH}" STREQUAL "i386") | ||
# Do nothing | ||
else() | ||
message(FATAL_ERROR "Unrecognized architecture ${ARCH} from ${CMAKE_C_COMPILER}") | ||
endif() | ||
else() | ||
message(FATAL_ERROR "Unrecognized Compiler ${CMAKE_C_COMPILER_ID}") | ||
endif() | ||
message(STATUS "Target architecture - ${ARCH}") | ||
set(${OUTPUT_VARIABLE} ${ARCH} PARENT_SCOPE) | ||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
# the name of the target OS and arch | ||
SET(CMAKE_SYSTEM_NAME Linux) | ||
SET(CMAKE_SYSTEM_PROCESSOR arm64) | ||
SET(triple aarch64-linux-gnu) | ||
|
||
# which compilers to use | ||
SET(CMAKE_C_COMPILER "clang-6.0") | ||
SET(CMAKE_C_COMPILER_TARGET ${triple}) | ||
SET(CMAKE_CXX_COMPILER "clang++-6.0") | ||
SET(CMAKE_CXX_COMPILER_TARGET ${triple}) | ||
|
||
# Tell pkgconfig to use aarch64 | ||
SET(ENV{PKG_CONFIG_PATH} "/usr/lib/aarch64-linux-gnu/pkgconfig") | ||
|
||
# Tell CMake to use qemu to emulate | ||
# Note: This should be automatically done by Ubuntu using binfmt_misc, but that | ||
# seems to be broken on WSL (https://github.com/microsoft/WSL/issues/2620) so | ||
# explicitly setting the emulator for now. | ||
SET(CMAKE_CROSSCOMPILING_EMULATOR qemu-aarch64-static) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
# the name of the target OS and arch | ||
SET(CMAKE_SYSTEM_NAME Linux) | ||
SET(CMAKE_SYSTEM_PROCESSOR arm64) | ||
|
||
# which compilers to use | ||
SET(CMAKE_C_COMPILER aarch64-linux-gnu-gcc) | ||
SET(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++) | ||
|
||
# Tell pkgconfig to use arm64 | ||
SET(ENV{PKG_CONFIG_PATH} "/usr/lib/aarch64-linux-gnu/pkgconfig") | ||
|
||
# Tell CMake to use qemu to emulate | ||
# Note: This should be automatically done by Ubuntu using binfmt_misc, but that | ||
# seems to be broken on WSL (https://github.com/microsoft/WSL/issues/2620) so | ||
# explicitly setting the emulator for now. | ||
SET(CMAKE_CROSSCOMPILING_EMULATOR qemu-aarch64-static) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.