Skip to content

Commit

Permalink
Merge branch 'master' into varfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ovdiiuv authored Dec 13, 2024
2 parents d255a1f + fbf11f1 commit d81e803
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,6 @@ if (NOT CLAD_BUILD_STATIC_ONLY AND NOT LLVM_ENABLE_PLUGINS)
message(FATAL_ERROR "LLVM_ENABLE_PLUGINS is set to OFF. Please build clad with -DCLAD_BUILD_STATIC_ONLY=ON.")
endif()

# Add clad deps if we build together with clang.
if (TARGET intrinsics_gen)
list(APPEND LLVM_COMMON_DEPENDS intrinsics_gen)
endif()
if (TARGET clang-headers)
list(APPEND LLVM_COMMON_DEPENDS clang-headers)
endif()

add_subdirectory(lib)
add_subdirectory(tools)

Expand Down
2 changes: 1 addition & 1 deletion lib/Differentiator/StmtClone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ DEFINE_CLONE_EXPR(SubstNonTypeTemplateParmExpr,
(CloneType(Node->getType()), Node->getValueKind(),
Node->getBeginLoc(), Node->getReplacement(),
Node->getAssociatedDecl(), Node->getIndex(),
Node->getPackIndex(), Node->isReferenceParameter()));
Node->getPackIndex(), Node->isReferenceParameter()))
#endif
DEFINE_CREATE_EXPR(PseudoObjectExpr, (Ctx, Node->getSyntacticForm(), llvm::SmallVector<Expr*, 4>(Node->semantics_begin(), Node->semantics_end()), Node->getResultExprIndex()))
// NOLINTEND(modernize-use-auto)
Expand Down
9 changes: 9 additions & 0 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ if (NOT CLAD_BUILD_STATIC_ONLY)
target_link_libraries(clad PUBLIC ${_enzyme_link_flags})

add_dependencies(clad LLVMEnzyme)

# Add clad deps if we build together with clang.
if (TARGET intrinsics_gen)
add_dependencies(clad intrinsics_gen)
endif()
if (TARGET clang-headers)
add_dependencies(clad clang-headers)
endif()

endif(CLAD_ENABLE_ENZYME_BACKEND)
endif()
set_source_files_properties(ClangPlugin.cpp PROPERTIES COMPILE_DEFINITIONS CLANG_MAJOR_VERSION="${LLVM_VERSION_MAJOR}")

0 comments on commit d81e803

Please sign in to comment.