about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/graph.rs
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2025-02-20 14:58:17 -0800
committerGitHub <noreply@github.com>2025-02-20 14:58:17 -0800
commit6d74563b20b0e585d95b1dbdb701d8710633f1e7 (patch)
tree49a4af354c05464aef2de72dd6a90d48acb44eaf /compiler/rustc_mir_transform/src/coverage/graph.rs
parent921ef32467728423107f9b641080642486140977 (diff)
parent831d9f39e9c330934b7c4f35010477ba4a738d96 (diff)
downloadrust-6d74563b20b0e585d95b1dbdb701d8710633f1e7.tar.gz
rust-6d74563b20b0e585d95b1dbdb701d8710633f1e7.zip
Rollup merge of #136608 - kulst:ptx_target_features, r=bjorn3
Pass through of target features to llvm-bitcode-linker and handling them

When using the llvm-bitcode-linker (`linker-flavor=llbc`) target-features are not passed through and are not handled by it.
The llvm-bitcode-linker is mainly used as a self contained linker to link llvm bitcode for the nvptx64 target. It uses `llvm-link`, `opt` and `llc` internally. To produce a `.ptx` file of a specific ptx-version it is necessary to pass the version to llc with the `--mattr` option. Without explicitly setting it, the emitted `.ptx`-version is the minimum supported version of the `--target-cpu`.

I would like to be able to explicitly set the ptx version as [some llvm problems only occur in earlier `.ptx`-versions](https://github.com/llvm/llvm-project/issues/112998).

Therefore this pull request adds support for passing target features to llvm-bitcode-linker and handling them.
I was not quite sure if adding these features to `rustc_target/src/target_features.rs` is necessary or not. If so I will gladly add these.

    r? ``@kjetilkjeka``
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/graph.rs')
0 files changed, 0 insertions, 0 deletions