Skip to content

Commit 40ba599

Browse files
Rollup merge of #47568 - EdSchouten:cloudabi-linker, r=alexcrichton
Give TargetOptions::linker a sane default value for CloudABI. Though some parts of rust use cc-rs to invoke a compiler/linker, Cargo seems to make use of the TargetOptions::linker property. Make the out of the box experience for CloudABI a bit better by using the same compiler name as cc-rs.
2 parents ea65bad + 8d7f554 commit 40ba599

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

src/librustc_back/target/aarch64_unknown_cloudabi.rs

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ pub fn target() -> TargetResult {
1515
let mut base = super::cloudabi_base::opts();
1616
base.max_atomic_width = Some(128);
1717
base.abi_blacklist = super::arm_base::abi_blacklist();
18+
base.linker = "aarch64-unknown-cloudabi-cc".to_string();
1819

1920
Ok(Target {
2021
llvm_target: "aarch64-unknown-cloudabi".to_string(),

src/librustc_back/target/armv7_unknown_cloudabi_eabihf.rs

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pub fn target() -> TargetResult {
1717
base.max_atomic_width = Some(64);
1818
base.features = "+v7,+vfp3,+neon".to_string();
1919
base.abi_blacklist = super::arm_base::abi_blacklist();
20+
base.linker = "armv7-unknown-cloudabi-eabihf-cc".to_string();
2021

2122
Ok(Target {
2223
llvm_target: "armv7-unknown-cloudabi-eabihf".to_string(),

src/librustc_back/target/i686_unknown_cloudabi.rs

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ pub fn target() -> TargetResult {
1515
let mut base = super::cloudabi_base::opts();
1616
base.cpu = "pentium4".to_string();
1717
base.max_atomic_width = Some(64);
18+
base.linker = "i686-unknown-cloudabi-cc".to_string();
1819
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m32".to_string());
1920
base.stack_probes = true;
2021

src/librustc_back/target/x86_64_unknown_cloudabi.rs

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ pub fn target() -> TargetResult {
1515
let mut base = super::cloudabi_base::opts();
1616
base.cpu = "x86-64".to_string();
1717
base.max_atomic_width = Some(64);
18+
base.linker = "x86_64-unknown-cloudabi-cc".to_string();
1819
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
1920
base.stack_probes = true;
2021

0 commit comments

Comments
 (0)