From d4c66a41ae50ecfb905ebe66eb296de4e5c146d7 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Thu, 16 Feb 2023 16:40:16 +0100 Subject: [PATCH 2/2] [cling] Set DataLayout from our TargetMachine Otherwise LLJIT's constructor will ask the LLJITBuilder's JTMB to create a DataLayout. As we don't propagate the JTMB (yet -- we probably should!), this will be wrong if target features influence the DataLayout. This should fix #12293. (cherry picked from commit 254bac6cfad78ed671ec3af3d2001c52487b4c86) --- interpreter/cling/lib/Interpreter/IncrementalJIT.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/interpreter/cling/lib/Interpreter/IncrementalJIT.cpp b/interpreter/cling/lib/Interpreter/IncrementalJIT.cpp index 80b6761491..e1721a4d45 100644 --- a/interpreter/cling/lib/Interpreter/IncrementalJIT.cpp +++ b/interpreter/cling/lib/Interpreter/IncrementalJIT.cpp @@ -358,6 +358,7 @@ IncrementalJIT::IncrementalJIT( ErrorAsOutParameter _(&Err); LLJITBuilder Builder; + Builder.setDataLayout(TM->createDataLayout()); Builder.setExecutorProcessControl(std::move(EPC)); // Create ObjectLinkingLayer with our own MemoryManager. -- 2.39.2