diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 32189e606d00..212090991ab7 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - llvm: ["15", "16", "17", "18", "19", "20"] + llvm: ["15", "16", "17", "18", "19", "20", "21"] build: ["Release"] # "RelWithDebInfo" os: [ubuntu-22.04] diff --git a/enzyme/BCLoad/BCLoader.cpp b/enzyme/BCLoad/BCLoader.cpp index 70a220a9ea33..29122761fd54 100644 --- a/enzyme/BCLoad/BCLoader.cpp +++ b/enzyme/BCLoad/BCLoader.cpp @@ -132,7 +132,11 @@ bool provideDefinitions(Module &M, std::set ignoreFunctions, } toReplace.push_back(name.str()); } - BC->setTargetTriple(""); +#if LLVM_VERSION_MAJOR >= 21 + BC->setTargetTriple(llvm::Triple("")); +#else + BC->setTargetTriple(""); +#endif Linker L(M); L.linkInModule(std::move(BC)); for (auto name : toReplace) { diff --git a/enzyme/CMakeLists.txt b/enzyme/CMakeLists.txt index 71fd95cf45be..54dfe25ddd40 100644 --- a/enzyme/CMakeLists.txt +++ b/enzyme/CMakeLists.txt @@ -32,6 +32,7 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) option(ENZYME_ENABLE_PLUGINS "Enable Clang/LLD/Opt plugins" ON) +option(ENZYME_BC_LOADER "Enable bitcode loader" ON) option(ENZYME_CLANG "Build enzyme clang plugin" ON) option(ENZYME_FLANG "Build enzyme flang symlink" OFF) option(ENZYME_MLIR "Build enzyme mlir plugin" OFF) @@ -286,7 +287,9 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}/include") add_subdirectory(tools) add_subdirectory(Enzyme) -add_subdirectory(BCLoad) +if (ENZYME_BC_LOADER) + add_subdirectory(BCLoad) +endif() if (ENZYME_ENABLE_PLUGINS) add_subdirectory(test) endif() diff --git a/enzyme/test/CMakeLists.txt b/enzyme/test/CMakeLists.txt index 9340c883eaa0..8f781a0f04cc 100644 --- a/enzyme/test/CMakeLists.txt +++ b/enzyme/test/CMakeLists.txt @@ -23,7 +23,9 @@ endif() if (ENZYME_IFX) add_subdirectory(Fortran) endif() -add_subdirectory(BCLoader) +if (ENZYME_BC_LOADER) + add_subdirectory(BCLoader) +endif() if (ENZYME_MLIR) add_subdirectory(MLIR) endif()