diff options
| author | Jonas Schievink <jonasschievink@gmail.com> | 2021-02-01 14:29:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-01 14:29:47 +0100 |
| commit | 02e1fd48d183c9a28dc7f78b68fded919a1b9338 (patch) | |
| tree | 657640b240cc83aa584b7b6025cb55721cdd0235 /example/alloc_example.rs | |
| parent | 2b8f2acd5f0f450fb3d9320a3295f5b86dbd31f1 (diff) | |
| parent | a75f9bc3be1d9488de2d13e4afbf724ffadfc70f (diff) | |
| download | rust-02e1fd48d183c9a28dc7f78b68fded919a1b9338.tar.gz rust-02e1fd48d183c9a28dc7f78b68fded919a1b9338.zip | |
Rollup merge of #81618 - bjorn3:sync_cg_clif-2021-02-01, r=bjorn3
Sync rustc_codegen_cranelift The highlight of this sync are abi compatibility with cg_llvm allowing mixing of cg_clif and cg_llvm compiled crates and switching to the x64 cranelift backend based on the new backend framework. r? ``@ghost`` ``@rustbot`` label +A-codegen +A-cranelift +T-compiler
Diffstat (limited to 'example/alloc_example.rs')
| -rw-r--r-- | example/alloc_example.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/example/alloc_example.rs b/example/alloc_example.rs index dc2ad4c676e..f59600ebb33 100644 --- a/example/alloc_example.rs +++ b/example/alloc_example.rs @@ -11,7 +11,8 @@ use alloc_system::System; #[global_allocator] static ALLOC: System = System; -#[link(name = "c")] +#[cfg_attr(unix, link(name = "c"))] +#[cfg_attr(target_env = "msvc", link(name = "msvcrt"))] extern "C" { fn puts(s: *const u8) -> i32; } |
