Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for top-of-tree LLVM #8223

Merged
merged 2 commits into from
May 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/LLVM_Runtime_Linker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,17 @@ llvm::DataLayout get_data_layout_for_target(Target target) {
return llvm::DataLayout("e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64");
}
} else { // 64-bit
#if LLVM_VERSION >= 190
if (target.os == Target::IOS) {
return llvm::DataLayout("e-m:o-i64:64-i128:128-n32:64-S128-Fn32");
} else if (target.os == Target::OSX) {
return llvm::DataLayout("e-m:o-i64:64-i128:128-n32:64-S128-Fn32");
} else if (target.os == Target::Windows) {
return llvm::DataLayout("e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128-Fn32");
} else {
return llvm::DataLayout("e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32");
}
#else
if (target.os == Target::IOS) {
return llvm::DataLayout("e-m:o-i64:64-i128:128-n32:64-S128");
} else if (target.os == Target::OSX) {
Expand All @@ -369,6 +380,7 @@ llvm::DataLayout get_data_layout_for_target(Target target) {
} else {
return llvm::DataLayout("e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128");
}
#endif
}
} else if (target.arch == Target::POWERPC) {
if (target.bits == 32) {
Expand Down
Loading