Skip to content

Commit

Permalink
[bug] Fix metal linker error when TI_WITH_METAL=OFF
Browse files Browse the repository at this point in the history
  • Loading branch information
qiao-bo committed Mar 7, 2022
1 parent d8b2229 commit fbb2ff8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions taichi/program/program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,12 @@ Program::Program(Arch desired_arch)
TI_ERROR("This taichi is not compiled with LLVM");
#endif
} else if (config.arch == Arch::metal) {
#ifdef TI_WITH_METAL
TI_ASSERT(metal::is_metal_api_available());
program_impl_ = std::make_unique<MetalProgramImpl>(config);
#else
TI_ERROR("This taichi is not compiled with Metal")
#endif
} else if (config.arch == Arch::vulkan) {
#ifdef TI_WITH_VULKAN
TI_ASSERT(vulkan::is_vulkan_api_available());
Expand Down

0 comments on commit fbb2ff8

Please sign in to comment.