================
@@ -1107,13 +1107,22 @@ std::string LLJIT::mangle(StringRef UnmangledName) 
const {
   return MangledName;
 }
 
-Error LLJIT::applyDataLayout(Module &M) {
+Error LLJIT::applyTargetConfig(Module &M) {
+  if (M.getTargetTriple().empty()) {
+    M.setTargetTriple(TT);
+  } else if (!M.getTargetTriple().isCompatibleWith(TT)) {
+    return make_error<StringError>("added module has an incompatible triple: " 
+
+                                       M.getTargetTriple().str() +
+                                       " (module) vs " + TT.str() + " (jit)",
+                                   inconvertibleErrorCode());
+  }
----------------
lhames wrote:

This error should be removed: some LLJIT clients do use lli and llvm-jitlink to 
cross-execute Linux objects on Darwin and vice versa. We could consider locking 
this down, but it would be a separate discussion.

https://github.com/llvm/llvm-project/pull/216132
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to