Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
e0e7a432db38ac26355e7c60219c27720b9ec42f
rust/tests/ui/lto/weak-works.rs

29 lines
365 B
Rust
Raw Normal View History

[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
2024-02-16 20:02:50 +00:00
//@ run-pass
Add `// run-pass` to collection of tests.
2018-09-06 14:41:12 +02:00
[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
2024-02-16 20:02:50 +00:00
//@ compile-flags: -C codegen-units=8 -Z thinlto
//@ ignore-windows
rustc: Further tweak linkage in ThinLTO In #46382 the logic around linkage preservation with ThinLTO ws tweaked but the loop that registered all otherwise exported GUID values as "don't internalize me please" was erroneously too conservative and only asking "external" linkage items to not be internalized. Instead we actually want the inversion of that condition, everything *without* "local" linkage to be internalized. This commit updates the condition there, adds a test, and... Closes #46543
2017-12-06 17:59:33 -08:00
#![feature(linkage)]
pub mod foo {
#[linkage = "weak"]
#[no_mangle]
pub extern "C" fn FOO() -> i32 {
0
}
}
mod bar {
extern "C" {
fn FOO() -> i32;
}
pub fn bar() -> i32 {
unsafe { FOO() }
}
}
fn main() {
bar::bar();
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3750ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API