Preserve public static items across LTO
This commit is contained in:
parent
02d9f29455
commit
892b50ba74
5 changed files with 20 additions and 2 deletions
|
|
@ -9,8 +9,9 @@
|
|||
// except according to those terms.
|
||||
|
||||
extern void foo();
|
||||
extern char FOO_STATIC;
|
||||
|
||||
int main() {
|
||||
foo();
|
||||
return 0;
|
||||
return (int)FOO_STATIC;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,3 +10,6 @@
|
|||
|
||||
#[no_mangle]
|
||||
pub extern fn foo() {}
|
||||
|
||||
#[no_mangle]
|
||||
pub static FOO_STATIC: u8 = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue