Preserve public static items across LTO

This commit is contained in:
arcnmx 2015-11-06 04:51:03 -05:00
parent 02d9f29455
commit 892b50ba74
5 changed files with 20 additions and 2 deletions

View file

@ -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;
}

View file

@ -10,3 +10,6 @@
#[no_mangle]
pub extern fn foo() {}
#[no_mangle]
pub static FOO_STATIC: u8 = 0;