diff --git a/lib/gc/CMakeLists.txt b/lib/gc/CMakeLists.txt index 5d6c09ea7..e06fc8540 100644 --- a/lib/gc/CMakeLists.txt +++ b/lib/gc/CMakeLists.txt @@ -3,8 +3,14 @@ add_subdirectory(Transforms) add_subdirectory(ExecutionEngine) add_subdirectory(Runtime) -gc_add_mlir_library(GcGpuCompiler GpuCompiler.cpp LINK_LIBS PUBLIC GcInterface - GcGpuPasses) +gc_add_mlir_library( + GcGpuCompiler + GpuCompiler.cpp + LINK_LIBS + PUBLIC + GcInterface + GcGpuPasses + GcJitEngine) get_property(GC_MLIR_LIBS GLOBAL PROPERTY GC_MLIR_LIBS) get_property(GC_PASS_LIBS GLOBAL PROPERTY GC_PASS_LIBS) diff --git a/scripts/build.sh b/scripts/build.sh index 9f429dbbd..5eaf5fbe0 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -226,7 +226,9 @@ build_gc() { mkdir -p "$GC_BUILD_DIR" local lit_path="$LLVM_BUILD_DIR/bin/llvm-lit" - [ -f "$lit_path" ] || lit_path=$(which lit) + # -s, not -f: the CI cache truncates unused bin/ files to 0 bytes. + [ -s "$lit_path" ] || lit_path="$LLVM_INSTALL_DIR/bin/llvm-lit" + [ -s "$lit_path" ] || lit_path=$(which lit || true) [ -z "$LLVM_HASH" ] && LLVM_HASH=$(get_llvm_hash "$MLIR_DIR/../../..") GC_HASH=$(repo_hash . "$MLIR_DIR" "$lit_path" $LLVM_HASH $GC_BUILD_TYPE $GC_DYLINK $GC_CMAKE_ARGS) [ "$(get_gc_hash "$GC_INSTALL_DIR")" = "$GC_HASH" ] && echo "GC build is up-to-date" && return 0