#include <iostream>
int main(int argc, char* argv[]) { std::cout << "hello world\n"; return 0; }
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER clang)
SET(CMAKE_CXX_COMPILER clang++)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CLANG_COMPILER_FLAGS)
list(APPEND --target=aarch64-linux-gnu
--gcc-toolchain=/home/saber/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu
--sysroot=/home/saber/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/libc)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CLANG_COMPILER_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CLANG_COMPILER_FLAGS}")
#add_compile_options(--target=aarch64-linux-gnu)
#add_compile_options(-fuse-ld=gold)
#add_compile_options(-mcpu=cortex-a72)
#add_compile_options(--gcc-toolchain=/home/saber/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu)
#add_compile_options(--sysroot=/home/saber/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/libc)
Many thanks for help =)
--
You received this message because you are subscribed to the Google Groups "iree-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iree-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iree-discuss/77a49161-29d1-409d-a3ce-6722c6969349o%40googlegroups.com.
However, if you’re using Clang, the driver might not be up-to-date with your specific Linux distribution, version or GCC layout, so you’ll need to fudge.
In addition to the ones above, you’ll also need:
'-target arm-linux-gnueabihf'
or whatever is the triple of your cross GCC.'--sysroot=/usr/arm-linux-gnueabihf'
,'--sysroot=/opt/gcc/arm-linux-gnueabihf'
or whatever is the location of your GCC’s sysroot (where /lib, /bin etc are).- Appropriate use of
-I
and-L
, ...
To view this discussion on the web visit https://groups.google.com/d/msgid/iree-discuss/CAGhUxBDjqWXn6tj2XDnM4rTd7kuRd5CLEC5UyfRkdySDhbrNOQ%40mail.gmail.com.
[1860/2057] Generating check_dylib-llvm-aot_dylib_success.mlir_module.module
FAILED: iree/modules/check/test/check_dylib-llvm-aot_dylib_success.mlir_module.module
cd /home/saber/img-iree-build/gcc-aarch64-2/iree/modules/check/test && /home/saber/img-iree-build/gcc-aarch64-2/host/bin/iree-translate -iree-mlir-to-vm-bytecode-module --iree-hal-target-backends=dylib-llvm-aot /home/cycheng/mlir-project/iree/iree/modules/check/test/success.mlir -o check_dylib-llvm-aot_dylib_success.mlir_module.module
/home/cycheng/mlir-project/iree/iree/modules/check/test/success.mlir:58:13: error: Can't link executable and generate target dylib using lld::elf::link
%result = "mhlo.add"(%c5, %c5) : (tensor<i32>, tensor<i32>) -> tensor<i32>
^