Skip to content

Commit

Permalink
Fix TVM compile without LLVM (apache#7621)
Browse files Browse the repository at this point in the history
* Fix TVM compile without LLVM

* Fix formatting
  • Loading branch information
Trevor Morris authored and trevor-m committed May 11, 2021
1 parent 866c418 commit 8b89ca7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/target/metadata_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,12 @@ runtime::Module CreateMetadataModule(
crt_exportable_modules.push_back(target_module);
target_module = CreateCSourceCrtMetadataModule(crt_exportable_modules, target);
} else if (target->kind->name == "llvm") {
#ifdef TVM_LLVM_VERSION
crt_exportable_modules.push_back(target_module);
target_module = CreateLLVMCrtMetadataModule(crt_exportable_modules, target);
#else // TVM_LLVM_VERSION
LOG(FATAL) << "TVM was not built with LLVM enabled.";
#endif // TVM_LLVM_VERSION
}
} else {
if (!non_crt_exportable_modules.empty()) {
Expand Down

0 comments on commit 8b89ca7

Please sign in to comment.