Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
std::unique_ptr<TargetMachine> tm {
t->createTargetMachine(target.triple, target.cpu, "", {},
compat::default_reloc_model,
- ::llvm::CodeModel::Default,
+ compat::default_code_model,
::llvm::CodeGenOpt::Default) };
if (!tm)
fail(r_log, build_error(),
#endif
}
+#if HAVE_LLVM >= 0x0600
+ const auto default_code_model = ::llvm::None;
+#else
+ const auto default_code_model = ::llvm::CodeModel::Default;
+#endif
+
#if HAVE_LLVM >= 0x0309
const auto default_reloc_model = ::llvm::None;
#else