-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Changes to LLVM ExecutionEngine
wrapper
#25627
Conversation
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
I think that this will close #23050 but I want to confirm with Mac users of rusti once this lands. Also, I'm pretty sure that the use of LLVM |
The last part should be a |
@achanda: What I meant to say was that I'm not sure whether disabling a test for Windows is an acceptable solution. Windows is a supported platform for Rust. This API should work on Windows, if at all possible. @huonw or other core developer: Should I disable the test for Windows and have an issue filed for implementing Windows support? |
We haven't had JIT support in the compiler for quite some time now, so could you elaborate on why this is adding a test for it? I'd personally expect these wrappers to get removed. |
@alexcrichton: The I added a test because users of rusti have been experiencing an issue which is actually caused by the code that lives in |
@murarth yeah I'd believe that it's easier for the compiler to build in support for this, but this is an extra hunk of code for us to maintain and fix if it breaks. I also don't think the compiler should necessarily already contain support for all sorts of tools and just not expose them in a stable location. |
@alexcrichton: I'd be glad to put my name on it and be the one responsible for fixing it whenever it breaks. As it's basically a thin wrapper around the LLVM API, I don't anticipate much future breakage. As for stability concerns, the use of |
@murarth sure, but the problem with an API like this that I'm worried about is upgrading LLVM. It's fine to have support for extra features that don't block others, but supporting this would block an LLVM upgrade from otherwise happening (possibly). cc @rust-lang/compiler, there may be some other opinions about whether this should be supported from the compiler. |
I'd be keen to only support what the compiler directly needs. The @murarth is that possible? Or does that break some of your use cases? |
@nrc: It might be possible to use an external LLVM crate, but requiring an installation of LLVM is a pretty big dependency for a REPL. Also, I don't know what changes have been applied to Rust's LLVM fork and what problems may arise from interactions between Rust's LLVM and a mainline LLVM library. The use of If a full-featured REPL (which Rusti is not yet) is still a goal for Rust, it seems reasonable to me to provide support for such a thing at least until some future possible breakage actually happens. As long as the |
After thinking about this a bit more, I don't think using an external LLVM crate is an option at all. Doing so would require passing an LLVM Edit: The |
I started a Discourse thread on this. |
r? @nrc |
@bors r+ |
📌 Commit d81e5bf has been approved by |
⌛ Testing commit d81e5bf with merge cee2594... |
💔 Test failed - auto-win-gnu-64-nopt-t |
@bors: retry On Wed, Jun 3, 2015 at 10:46 PM, bors notifications@github.com wrote:
|
⌛ Testing commit d81e5bf with merge 450a3da... |
💔 Test failed - auto-win-gnu-64-opt |
Okay, that one's a real failure. |
@nrc: Fixed compile error on Windows (I think). |
@bors r+ |
📌 Commit d39d80e has been approved by |
⌛ Testing commit d39d80e with merge e38dd64... |
💔 Test failed - auto-win-gnu-64-nopt-t |
* Removes `RustJITMemoryManager` from public API. This was really sort of an implementation detail to begin with. * `__morestack` is linked to C++ wrapper code and this pointer is used when resolving the symbol for `ExecutionEngine` code. * `__morestack_addr` is also resolved for `ExecutionEngine` code. This function is sometimes referenced in LLVM-generated code, but was not able to be resolved on Mac OS systems. * Added Windows support to `ExecutionEngine` API. * Added a test for basic `ExecutionEngine` functionality.
That was the error I expected on Windows and I believed it's now solved, too. |
@bors r=nrc |
📌 Commit 021e483 has been approved by |
⌛ Testing commit 021e483 with merge b4fc5da... |
💔 Test failed - auto-linux-64-opt |
Never seen an error in the git stage before. Interesting. |
@bors: retry |
* Removes `RustJITMemoryManager` from public API. This was really sort of an implementation detail to begin with. * `__morestack` is linked to C++ wrapper code and this pointer is used when resolving the symbol for `ExecutionEngine` code. * `__morestack_addr` is also resolved for `ExecutionEngine` code. This function is sometimes referenced in LLVM-generated code, but was not able to be resolved on Mac OS systems. * Added Windows support to `ExecutionEngine` API. * Added a test for basic `ExecutionEngine` functionality.
RustJITMemoryManager
from public API.This was really sort of an implementation detail to begin with.
__morestack
is linked to C++ wrapper code and this pointeris used when resolving the symbol for
ExecutionEngine
code.__morestack_addr
is also resolved forExecutionEngine
code.This function is sometimes referenced in LLVM-generated code,
but was not able to be resolved on Mac OS systems.
ExecutionEngine
API.ExecutionEngine
functionality.