Skip to content

Commit 971805f

Browse files
committed
fix
1 parent 06c22ba commit 971805f

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

lib/Interpreter/Compatibility.h

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,16 @@
2121
#include "llvm/Support/Casting.h"
2222
#include "llvm/Support/Path.h"
2323

24-
/home/maximus/cppyy-interop-dev/CppInterOp/llvm-project/compiler-rt/lib/orc/macho_platform.cpp
25-
26-
#ifdef USE_CLING
27-
28-
#include "cling/Interpreter/DynamicLibraryManager.h"
29-
#include "cling/Interpreter/Interpreter.h"
30-
#include "cling/Interpreter/Transaction.h"
31-
#include "cling/Interpreter/Value.h"
32-
33-
#include "cling/Utils/AST.h"
34-
35-
namespace Cpp {
36-
namespace Cpp_utils = cling::utils;
37-
}
38-
39-
namespace compat {
40-
41-
using Interpreter = cling::Interpreter;
42-
4324
#ifdef __APPLE__
44-
#include <mach-o/dyld.h>
45-
#include <sys/stat.h>
25+
// #include <mach-o/dyld.h>
26+
// #include <sys/stat.h>
27+
#include <dlfcn.h>
4628
// Define a minimal mach header for JIT'd code.
47-
static MachO::mach_header_64 fake_mach_header = {
48-
.magic = MachO::MH_MAGIC_64,
49-
.cputype = MachO::CPU_TYPE_ARM64,
50-
.cpusubtype = MachO::CPU_SUBTYPE_ARM64_ALL,
51-
.filetype = MachO::MH_DYLIB,
29+
static llvm::MachO::mach_header_64 fake_mach_header = {
30+
.magic = llvm::MachO::MH_MAGIC_64,
31+
.cputype = llvm::MachO::CPU_TYPE_ARM64,
32+
.cpusubtype = llvm::MachO::CPU_SUBTYPE_ARM64_ALL,
33+
.filetype = llvm::MachO::MH_DYLIB,
5234
.ncmds = 0,
5335
.sizeofcmds = 0,
5436
.flags = 0,
@@ -77,7 +59,25 @@ int find_dynamic_unwind_sections(uintptr_t addr,
7759
typedef int (*unw_find_dynamic_unwind_sections)(
7860
uintptr_t addr, struct unw_dynamic_unwind_sections* info);
7961

80-
#endif
62+
#endif // #ifdef __APPLE__
63+
64+
65+
#ifdef USE_CLING
66+
67+
#include "cling/Interpreter/DynamicLibraryManager.h"
68+
#include "cling/Interpreter/Interpreter.h"
69+
#include "cling/Interpreter/Transaction.h"
70+
#include "cling/Interpreter/Value.h"
71+
72+
#include "cling/Utils/AST.h"
73+
74+
namespace Cpp {
75+
namespace Cpp_utils = cling::utils;
76+
}
77+
78+
namespace compat {
79+
80+
using Interpreter = cling::Interpreter;
8181

8282
inline void maybeMangleDeclName(const clang::GlobalDecl& GD,
8383
std::string& mangledName) {

0 commit comments

Comments
 (0)