diff --git a/build_tools/ci/build_test_cpp.sh b/build_tools/ci/build_test_cpp.sh index 3e98d4c40..593e81009 100644 --- a/build_tools/ci/build_test_cpp.sh +++ b/build_tools/ci/build_test_cpp.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -eu -o errtrace +set -eux -o errtrace this_dir="$(cd $(dirname $0) && pwd)" repo_root="$(cd $this_dir/../.. && pwd)" @@ -60,19 +60,10 @@ echo '{ cd $iree_dir CMAKE_ARGS="\ - -S $iree_dir \ - -B $build_dir \ -GNinja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=$install_dir \ -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \ - -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \ - -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \ - -DCMAKE_C_COMPILER="${CC}" \ - -DCMAKE_CXX_COMPILER="${CXX}" \ - -DLLVM_TARGET_ARCH=X86 \ - -DLLVM_TARGETS_TO_BUILD=X86 \ -DIREE_ENABLE_ASSERTIONS=ON \ -DIREE_BUILD_SAMPLES=OFF \ -DIREE_BUILD_PYTHON_BINDINGS=ON \ @@ -89,11 +80,21 @@ CMAKE_ARGS="\ -DIREE_CMAKE_PLUGIN_PATHS=$PWD/../iree-amd-aie" if [[ "$OSTYPE" != "darwin"* ]]; then - CMAKE_ARGS="$CMAKE_ARGS -DIREE_EXTERNAL_HAL_DRIVERS=xrt" + cmake "$CMAKE_ARGS" \ + -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \ + -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \ + -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \ + -DCMAKE_C_COMPILER="${CC}" \ + -DCMAKE_CXX_COMPILER="${CXX}" \ + -DLLVM_TARGET_ARCH=X86 \ + -DLLVM_TARGETS_TO_BUILD=X86 \ + -DIREE_EXTERNAL_HAL_DRIVERS=xrt \ + -S $iree_dir -B $build_dir +else + cmake "$CMAKE_ARGS" \ + -S $iree_dir -B $build_dir fi -cmake $CMAKE_ARGS - echo "Building all" echo "------------" cmake --build "$build_dir" -- -k 0