-
Notifications
You must be signed in to change notification settings - Fork 11k
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
Partial work on JITLink ARM64-COFF #89697
base: main
Are you sure you want to change the base?
Conversation
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write If you have received no comments on your PR for a week, you can request a review If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
✅ With the latest revision this PR passed the C/C++ code formatter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great. I don't have access to an aarch64/Windows machine to test it, but should be able to get hold of one in a few weeks.
In the mean time if anyone else can help with testing it'd be much appreciated. @vgvassilev -- do you know anyone who uses aarch64/Windows?
I'm ok with this landing as-is, but I think we'll want to revisit the tests at some point and turn them into jitlink-check tests.
@@ -0,0 +1,38 @@ | |||
//===--- COFF_arm64.h - JIT link functions for COFF/arm64 ---*- C++ -*-===// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be padded out to 80 cols:
//===----- COFF_arm64.h - JIT link functions for COFF/arm64 -----*- C++ -*-===//
COFFJITLinker_arm64::link(std::move(Ctx), std::move(G), std::move(Config)); | ||
} | ||
} // namespace jitlink | ||
} // namespace llvm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing newline?
@@ -0,0 +1,32 @@ | |||
# REQUIRES: asserts | |||
# RUN: llvm-mc -filetype=obj -triple=aarch64-windows-msvc %s -o %t | |||
# RUN: llvm-jitlink --debug-only=jitlink -noexec %t 2>&1 | FileCheck %s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-debug-only
can be used with a single dash.
@@ -0,0 +1,32 @@ | |||
# REQUIRES: asserts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would be better written as a jitlink-check
test. I know you mentioned that you didn't have a Windows machine handy to test on, but it should still be possible to write -noexec
tests on any platform (even non-aarch64 ones).
@@ -0,0 +1,347 @@ | |||
//===----- COFF_arm64.cpp - JIT linker implementation for COFF/arm64 ----===// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This header here is not aligned with the one on line 7.
break; | ||
} | ||
case EdgeKind_coff_arm64::Secrel: { | ||
// TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to issue a sensible diagnostic in these cases?
@@ -5,9 +5,6 @@ | |||
# | |||
# Use -sectcreate to create a section from a data file. | |||
|
|||
# Jitlink does not support ARM64 COFF files. | |||
# UNSUPPORTED: target=aarch64-pc-windows-{{.*}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
No, I checked and I could not find a if LLVM has a build bot with that setup. I am fine moving forward even with blind eyes... |
CC @lhames @vgvassilev