Skip to content

Commit

Permalink
NVPTX: Enable self-contained for the nvptx target
Browse files Browse the repository at this point in the history
  • Loading branch information
Kjetil Kjeka committed Mar 11, 2024
1 parent 222ce4f commit af42d2a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/rustc_target/src/spec/targets/nvptx64_nvidia_cuda.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::spec::LinkSelfContainedDefault;
use crate::spec::{LinkerFlavor, MergeFunctions, PanicStrategy, Target, TargetOptions};

pub fn target() -> Target {
Expand Down Expand Up @@ -47,6 +48,9 @@ pub fn target() -> Target {
// The LLVM backend does not support stack canaries for this target
supports_stack_protector: false,

// Support using `self-contained` linkers like the llvm-bitcode-linker
link_self_contained: LinkSelfContainedDefault::True,

..Default::default()
},
}
Expand Down

0 comments on commit af42d2a

Please sign in to comment.