Skip to content

Commit

Permalink
Fix linking issue
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Jan 26, 2024
1 parent cce389e commit ee55f6c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 0 additions & 2 deletions enzyme/BCLoad/BCLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ bool provideDefinitions(Module &M, std::set<std::string> ignoreFunctions = {}) {
std::vector<StringRef> todo;
bool seen32 = false;
bool seen64 = false;
bool seenGemm = false;
for (auto &F : M) {
if (!F.empty())
continue;
Expand All @@ -52,7 +51,6 @@ bool provideDefinitions(Module &M, std::set<std::string> ignoreFunctions = {}) {
seen32 = true;
if (index == 2)
seen64 = true;
if (endsWith(str, "gemm")) seenGemm = true;
break;
}
index++;
Expand Down
8 changes: 8 additions & 0 deletions enzyme/Enzyme/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ set(LLVM_LINK_COMPONENTS Demangle)
file(GLOB ENZYME_SRC CONFIGURE_DEPENDS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
"*.cpp"
)
list(REMOVE_ITEM ENZYME_SRC "eopt.cpp")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

Expand All @@ -54,6 +55,7 @@ list(APPEND ENZYME_SRC TypeAnalysis/TypeTree.cpp TypeAnalysis/TypeAnalysis.cpp T
if ((WIN32 OR CYGWIN) AND LLVM_LINK_LLVM_DYLIB)
add_llvm_library( LLVMEnzyme-${LLVM_VERSION_MAJOR}
${ENZYME_SRC}
PARTIAL_SOURCES_INTENDED
MODULE
DEPENDS
intrinsics_gen
Expand All @@ -64,6 +66,7 @@ if (${Clang_FOUND})
add_llvm_library( ClangEnzyme-${LLVM_VERSION_MAJOR}
${ENZYME_SRC} Clang/EnzymeClang.cpp
Clang/EnzymePassLoader.cpp
PARTIAL_SOURCES_INTENDED
MODULE
DEPENDS
intrinsics_gen
Expand All @@ -74,6 +77,7 @@ target_compile_definitions(ClangEnzyme-${LLVM_VERSION_MAJOR} PUBLIC ENZYME_RUNPA
endif()
add_llvm_library( LLDEnzyme-${LLVM_VERSION_MAJOR}
${ENZYME_SRC} Clang/EnzymePassLoader.cpp
PARTIAL_SOURCES_INTENDED
MODULE
DEPENDS
intrinsics_gen
Expand All @@ -84,6 +88,7 @@ target_compile_definitions(LLDEnzyme-${LLVM_VERSION_MAJOR} PUBLIC ENZYME_RUNPASS
else()
add_llvm_library( LLVMEnzyme-${LLVM_VERSION_MAJOR}
${ENZYME_SRC}
PARTIAL_SOURCES_INTENDED
MODULE
DEPENDS
intrinsics_gen
Expand All @@ -94,6 +99,7 @@ if (${Clang_FOUND})
add_llvm_library( ClangEnzyme-${LLVM_VERSION_MAJOR}
${ENZYME_SRC} Clang/EnzymeClang.cpp
Clang/EnzymePassLoader.cpp
PARTIAL_SOURCES_INTENDED
MODULE
DEPENDS
intrinsics_gen
Expand All @@ -104,6 +110,7 @@ target_compile_definitions(ClangEnzyme-${LLVM_VERSION_MAJOR} PUBLIC ENZYME_RUNPA
endif()
add_llvm_library( LLDEnzyme-${LLVM_VERSION_MAJOR}
${ENZYME_SRC} Clang/EnzymePassLoader.cpp
PARTIAL_SOURCES_INTENDED
MODULE
DEPENDS
intrinsics_gen
Expand All @@ -116,6 +123,7 @@ endif()
if (${ENZYME_STATIC_LIB})
add_llvm_library( EnzymeStatic-${LLVM_VERSION_MAJOR}
${ENZYME_SRC}
PARTIAL_SOURCES_INTENDED
STATIC
DEPENDS
intrinsics_gen
Expand Down

0 comments on commit ee55f6c

Please sign in to comment.