diff options
| author | bors <bors@rust-lang.org> | 2024-11-02 23:04:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-11-02 23:04:42 +0000 |
| commit | 8ccb78e0d5b1775b42153730d49de6456cf10a70 (patch) | |
| tree | 04a49315b274b3008c17f7a3ecc1abe52b7429c9 /compiler/rustc_codegen_gcc | |
| parent | b3f75cc872cfd306860c3ad76a239e719015f855 (diff) | |
| parent | ba481518da240b5e532785fce51106c962dcd5fa (diff) | |
| download | rust-8ccb78e0d5b1775b42153730d49de6456cf10a70.tar.gz rust-8ccb78e0d5b1775b42153730d49de6456cf10a70.zip | |
Auto merge of #125579 - Noratrieb:print-host, r=davidtwco
Add `--print host-tuple` to print host target tuple People often parse `-vV` output to get to the host tuple, which is annoying to do. It's easier to just get it directly. I called it "host-tuple" instead of "host" because it's clearer that it's just the target name. I'm open to different names, but I think this one is fine. a quick GitHub search for `'^host` reveals many instances of people doing the parsing, for example: https://github.com/japaric/xargo/blob/68e0ca57cd90837fe02f262f074182f9cfeb6227/README.md?plain=1#L369 https://github.com/taiki-e/setup-cross-toolchain-action/blob/0e38473b0c562d6db19a98d3ec20a80f7ac189ae/main.sh#L96 https://github.com/taiki-e/cargo-llvm-cov/blob/8a3553b86551eabf9c30c060b1f72a5bbccb98c6/README.md?plain=1#L625 https://github.com/SiliconLabs/cpc-nvm3/blob/43f3ec39709b30700ef7f39d91fa647974323bf1/do.sh#L35 needs a compiler FCP. I could also do an MCP but I think just an FCP here makes the most sense.
Diffstat (limited to 'compiler/rustc_codegen_gcc')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/consts.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_gcc/src/consts.rs b/compiler/rustc_codegen_gcc/src/consts.rs index 3029b934179..660badb6a50 100644 --- a/compiler/rustc_codegen_gcc/src/consts.rs +++ b/compiler/rustc_codegen_gcc/src/consts.rs @@ -146,7 +146,7 @@ impl<'gcc, 'tcx> StaticCodegenMethods for CodegenCx<'gcc, 'tcx> { // Wasm statics with custom link sections get special treatment as they // go into custom sections of the wasm executable. - if self.tcx.sess.opts.target_triple.triple().starts_with("wasm32") { + if self.tcx.sess.opts.target_triple.tuple().starts_with("wasm32") { if let Some(_section) = attrs.link_section { unimplemented!(); } |
