Uh oh!
There was an error while loading. Please reload this page.
trans: Move rust_try into the compiler - #27176
Conversation
rust-highfive
commented
Jul 21, 2015
r? @pcwalton (rust_highfive has picked a reviewer for you, use r? to override) |
alexcrichton
commented
Jul 21, 2015
r? @brson cc @rust-lang/compiler (my knowledge of trans is pretty bad and I may have done egregious things) |
51016bd to
6046fb7Comparebrson
commented
Jul 21, 2015
@bors r+ |
bors
commented
Jul 21, 2015
📌 Commit 6046fb7 has been approved by |
brson
commented
Jul 21, 2015
Awesome patch. |
825860c to
970a3caComparealexcrichton
commented
Jul 21, 2015
@bors: r=brson |
bors
commented
Jul 21, 2015
📌 Commit 970a3ca has been approved by |
There was a problem hiding this comment.
If you are “defining” the shim, declare::define_internal_rust_fn should be used.
This commit moves the IR files in the distribution, rust_try.ll, rust_try_msvc_64.ll, and rust_try_msvc_32.ll into the compiler from the main distribution. There's a few reasons for this change: * LLVM changes its IR syntax from time to time, so it's very difficult to have these files build across many LLVM versions simultaneously. We'll likely want to retain this ability for quite some time into the future. * The implementation of these files is closely tied to the compiler and runtime itself, so it makes sense to fold it into a location which can do more platform-specific checks for various implementation details (such as MSVC 32 vs 64-bit). * This removes LLVM as a build-time dependency of the standard library. This may end up becoming very useful if we move towards building the standard library with Cargo. In the immediate future, however, this commit should restore compatibility with LLVM 3.5 and 3.6.
970a3ca to
c35b2bdComparealexcrichton
commented
Jul 21, 2015
bors
commented
Jul 22, 2015
⌛ Testing commit c35b2bd with merge 3475c5b... |
bors
commented
Jul 22, 2015
💔 Test failed - auto-win-gnu-64-nopt-t |
alexcrichton
commented
Jul 22, 2015
@bors: retry On Tue, Jul 21, 2015 at 9:19 PM, bors notifications@github.com wrote:
|
bors
commented
Jul 22, 2015
This commit moves the IR files in the distribution, rust_try.ll, rust_try_msvc_64.ll, and rust_try_msvc_32.ll into the compiler from the main distribution. There's a few reasons for this change: * LLVM changes its IR syntax from time to time, so it's very difficult to have these files build across many LLVM versions simultaneously. We'll likely want to retain this ability for quite some time into the future. * The implementation of these files is closely tied to the compiler and runtime itself, so it makes sense to fold it into a location which can do more platform-specific checks for various implementation details (such as MSVC 32 vs 64-bit). * This removes LLVM as a build-time dependency of the standard library. This may end up becoming very useful if we move towards building the standard library with Cargo. In the immediate future, however, this commit should restore compatibility with LLVM 3.5 and 3.6.
bors
commented
Jul 22, 2015
vadimcn
commented
Jul 22, 2015
:( |
alexcrichton
commented
Jul 22, 2015
In theory, yes, but that still requires the standard library to have |
vadimcn
commented
Jul 22, 2015
I am not sure I understand this point. Didn't My concern with the new way is that:
|
vadimcn
commented
Jul 22, 2015
(sorry for jumping in late - I was not aware of this change until bors told me that my PR collided with this one) |
alexcrichton
commented
Jul 22, 2015
Ah by this I just mean that the tool The other shims and such in
I don't disagree with this!
I'm not quite sure I follow this. Is this basically saying that it's easier to edit IR than it is to edit the compiler?
No worries! |
vadimcn
commented
Jul 23, 2015
I meant that as a library function in rustrt_native, it could have been overridden. Not so much with it as compiler intrinsic. |
alexcrichton
commented
Jul 23, 2015
How do you override something in a native library? You mean avoiding The ABI of unwinding is very closely tied to the compiler itself, so even though it could be implemented in various locations it kinda makes sense to me to implement this as an intrinsic so the compiler has complete control over all ABI possibilities. |
vadimcn
commented
Jul 23, 2015
I meant that when building rustrt_native for a new target, you could write a custom rust_try. |
alexcrichton
commented
Jul 23, 2015
That's true, but do you know if that's done often? From what I've seen the |
eddyb
commented
Jul 24, 2015
Was it known that this would break unwinding entirely on Individual |
eddyb
commented
Jul 24, 2015
Actually, scratch that, it's because the snapshot compiler doesn't have the |
alexcrichton
commented
Jul 24, 2015
@eddyb yes this was known. |
On the functionality side, morestack is gone (rust-lang/rust#27338), and rustrt_native is gone (rust-lang/rust#27176). On the implementation side, connect has been renamed to join (rust-lang/rust#26957).
rust-lang/rust#27176 "removes LLVM as a build-time dependency of the standard library. This may end up becoming very useful if we move towards building the standard library with Cargo."
This commit moves the IR files in the distribution, rust_try.ll,
rust_try_msvc_64.ll, and rust_try_msvc_32.ll into the compiler from the main
distribution. There's a few reasons for this change:
have these files build across many LLVM versions simultaneously. We'll likely
want to retain this ability for quite some time into the future.
itself, so it makes sense to fold it into a location which can do more
platform-specific checks for various implementation details (such as MSVC 32
vs 64-bit).
end up becoming very useful if we move towards building the standard library
with Cargo.
In the immediate future, however, this commit should restore compatibility with
LLVM 3.5 and 3.6.