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

Rollup of 16 pull requests #62355

Merged
merged 47 commits into from
Jul 4, 2019
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
fc918a3
rename InterpretCx -> InterpCx
RalfJung Jun 27, 2019
a02d436
wfcheck: resolve the type-vars in `AdtField` types
arielb1 Jun 29, 2019
f7061db
Update mem::replace example to not be identical to mem::take
czipperz Jun 30, 2019
3f39dc1
syntax: Unsupport `foo! bar { ... }` macros in the parser
petrochenkov Jun 30, 2019
d0dc41a
Address review comments
petrochenkov Jul 1, 2019
8d6b1d1
Clean up inherent_impls
Zoxc Apr 16, 2019
b49fb76
miri realloc: do not require giving old size+align
RalfJung Jul 1, 2019
8a3797b
Use mem::take instead of mem::replace with default
czipperz Jun 30, 2019
636f5e6
Convert more usages over
czipperz Jun 30, 2019
b0c199a
Enable mem_take feature in relevant crates
czipperz Jun 30, 2019
1443abc
Revert change in compiletest
czipperz Jun 30, 2019
eddfad3
Fix import of take in collapse_docs.rs
czipperz Jul 2, 2019
dc088b2
refactor check_for_substitution
matklad Jul 2, 2019
db16e17
When possible without changing semantics, implement Iterator::last in…
khuey Jul 2, 2019
c004451
Migrate compile-pass annotations to build-pass
JohnTitor Jul 2, 2019
8d2f80b
Use link attributes on extern "C" blocks with llvm-libuwind
petrhosek Jul 2, 2019
87e8613
Remove needless lifetimes
jeremystucki Jun 21, 2019
0477e07
Remove needless lifetimes
jeremystucki Jun 21, 2019
6ae80cf
Remove needless lifetimes
jeremystucki Jun 21, 2019
d50a3a7
Remove needless lifetimes
jeremystucki Jun 21, 2019
ec71176
Remove needless lifetimes
jeremystucki Jun 21, 2019
d28832d
Remove needless lifetimes
jeremystucki Jun 21, 2019
3cd4df7
Add missing lifetime specifier
jeremystucki Jun 23, 2019
80f4c49
Add missing lifetime specifier
jeremystucki Jun 23, 2019
b17cec5
Add missing lifetime specifier
jeremystucki Jun 23, 2019
edcde70
Add missing lifetime specifier
jeremystucki Jun 24, 2019
88c515d
Revert changes to the standard library
jeremystucki Jun 25, 2019
b4712f0
Fix bucket in CPU usage script
Mark-Simulacrum Jul 3, 2019
c51802a
simplify Option::get_or_insert
matklad Jul 3, 2019
4dd5edc
enable a few more tests in Miri and update the comment for others
RalfJung Jul 3, 2019
6225607
remove bogus example from drop_in_place
RalfJung Jul 3, 2019
e8a88f7
Rollup merge of #62039 - jeremystucki:needless_lifetimes, r=eddyb
Centril Jul 3, 2019
740d5bd
Rollup merge of #62173 - RalfJung:miri-interp, r=oli-obk
Centril Jul 3, 2019
6cfd474
Rollup merge of #62240 - arielb1:resolve-wf-fields, r=pnkfelix
Centril Jul 3, 2019
88c007c
Rollup merge of #62249 - czipperz:use-mem-take-instead-of-replace-def…
Centril Jul 3, 2019
944bda9
Rollup merge of #62252 - czipperz:change-mem-replace-doc-example, r=d…
Centril Jul 3, 2019
8867ba1
Rollup merge of #62258 - petrochenkov:idclean, r=Centril
Centril Jul 3, 2019
d7e42cc
Rollup merge of #62268 - Zoxc:inherent_impls, r=eddyb
Centril Jul 3, 2019
d93b52f
Rollup merge of #62287 - petrhosek:libunwind-link-attribute, r=tmandry
Centril Jul 3, 2019
44f22e6
Rollup merge of #62295 - RalfJung:miri-realloc, r=cramertj
Centril Jul 3, 2019
c0ec567
Rollup merge of #62297 - matklad:peek-delimited, r=petrochenkov
Centril Jul 3, 2019
4049a3c
Rollup merge of #62316 - khuey:efficient_last, r=sfackler
Centril Jul 3, 2019
9193497
Rollup merge of #62317 - JohnTitor:move-tests-to-build-pass, r=Centril
Centril Jul 3, 2019
cd1fa00
Rollup merge of #62337 - Mark-Simulacrum:fix-cpu-usage-script, r=alex…
Centril Jul 3, 2019
839e89c
Rollup merge of #62344 - matklad:simplify-option, r=sfackler
Centril Jul 3, 2019
144ed02
Rollup merge of #62346 - RalfJung:miri-tests, r=Centril
Centril Jul 3, 2019
6363a58
Rollup merge of #62351 - RalfJung:drop-in-place, r=cramertj
Centril Jul 3, 2019
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
Prev Previous commit
Next Next commit
Use link attributes on extern "C" blocks with llvm-libuwind
When llvm-libunwind feature is enabled, we need to use link attribute on
extern "C" blocks to make sure that symbols provided by LLVM's libunwind
that's built as part of Rust's libunwind crate are re-exported.

This addresses issue #62088.
petrhosek committed Jul 2, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 8d2f80bab308b7abe62fc6d817f12f21e66bfa53
8 changes: 5 additions & 3 deletions src/libunwind/build.rs
Original file line number Diff line number Diff line change
@@ -4,11 +4,13 @@ fn main() {
println!("cargo:rerun-if-changed=build.rs");
let target = env::var("TARGET").expect("TARGET was not set");

if cfg!(feature = "llvm-libunwind") &&
// FIXME: the not(bootstrap) part is needed because of the issue addressed by #62286,
// and could be removed once that change is in beta.
if cfg!(all(not(bootstrap), feature = "llvm-libunwind")) &&
(target.contains("linux") ||
target.contains("fuchsia")) {
// Build the unwinding from libunwind C/C++ source code.
#[cfg(feature = "llvm-libunwind")]
#[cfg(all(not(bootstrap), feature = "llvm-libunwind"))]
llvm_libunwind::compile();
} else if target.contains("linux") {
if target.contains("musl") {
@@ -42,7 +44,7 @@ fn main() {
}
}

#[cfg(feature = "llvm-libunwind")]
#[cfg(all(not(bootstrap), feature = "llvm-libunwind"))]
mod llvm_libunwind {
use std::env;
use std::path::Path;
10 changes: 10 additions & 0 deletions src/libunwind/libunwind.rs
Original file line number Diff line number Diff line change
@@ -67,6 +67,8 @@ pub enum _Unwind_Context {}

pub type _Unwind_Exception_Cleanup_Fn = extern "C" fn(unwind_code: _Unwind_Reason_Code,
exception: *mut _Unwind_Exception);
#[cfg_attr(all(not(bootstrap), feature = "llvm-libunwind"),
link(name = "unwind", kind = "static"))]
extern "C" {
#[unwind(allowed)]
pub fn _Unwind_Resume(exception: *mut _Unwind_Exception) -> !;
@@ -91,6 +93,8 @@ if #[cfg(all(any(target_os = "ios", target_os = "netbsd", not(target_arch = "arm
}
pub use _Unwind_Action::*;

#[cfg_attr(all(not(bootstrap), feature = "llvm-libunwind"),
link(name = "unwind", kind = "static"))]
extern "C" {
pub fn _Unwind_GetGR(ctx: *mut _Unwind_Context, reg_index: c_int) -> _Unwind_Word;
pub fn _Unwind_SetGR(ctx: *mut _Unwind_Context, reg_index: c_int, value: _Unwind_Word);
@@ -144,6 +148,8 @@ if #[cfg(all(any(target_os = "ios", target_os = "netbsd", not(target_arch = "arm
pub const UNWIND_POINTER_REG: c_int = 12;
pub const UNWIND_IP_REG: c_int = 15;

#[cfg_attr(all(not(bootstrap), feature = "llvm-libunwind"),
link(name = "unwind", kind = "static"))]
extern "C" {
fn _Unwind_VRS_Get(ctx: *mut _Unwind_Context,
regclass: _Unwind_VRS_RegClass,
@@ -206,6 +212,8 @@ if #[cfg(all(any(target_os = "ios", target_os = "netbsd", not(target_arch = "arm
cfg_if::cfg_if! {
if #[cfg(not(all(target_os = "ios", target_arch = "arm")))] {
// Not 32-bit iOS
#[cfg_attr(all(not(bootstrap), feature = "llvm-libunwind"),
link(name = "unwind", kind = "static"))]
extern "C" {
#[unwind(allowed)]
pub fn _Unwind_RaiseException(exception: *mut _Unwind_Exception) -> _Unwind_Reason_Code;
@@ -215,6 +223,8 @@ if #[cfg(not(all(target_os = "ios", target_arch = "arm")))] {
}
} else {
// 32-bit iOS uses SjLj and does not provide _Unwind_Backtrace()
#[cfg_attr(all(not(bootstrap), feature = "llvm-libunwind"),
link(name = "unwind", kind = "static"))]
extern "C" {
#[unwind(allowed)]
pub fn _Unwind_SjLj_RaiseException(e: *mut _Unwind_Exception) -> _Unwind_Reason_Code;