File tree Expand file tree Collapse file tree 4 files changed +13
-4
lines changed
librustc_codegen_ssa/back Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1414 xz-utils
1515
1616# FIXME: build the `ptx-linker` instead.
17- RUN curl -sL https://github.com/denzp/rust-ptx-linker/releases/download/v0.9.0-alpha.1 /rust-ptx-linker.linux64.tar.gz | \
17+ RUN curl -sL https://github.com/denzp/rust-ptx-linker/releases/download/v0.9.0-alpha.2 /rust-ptx-linker.linux64.tar.gz | \
1818 tar -xzvC /usr/bin
1919
2020RUN curl -sL https://nodejs.org/dist/v9.2.0/node-v9.2.0-linux-x64.tar.xz | \
Original file line number Diff line number Diff line change @@ -1132,6 +1132,12 @@ impl<'a> Linker for PtxLinker<'a> {
11321132 }
11331133
11341134 fn finalize ( & mut self ) -> Command {
1135+ // Provide the linker with fallback to internal `target-cpu`.
1136+ self . cmd . arg ( "--fallback-arch" ) . arg ( match self . sess . opts . cg . target_cpu {
1137+ Some ( ref s) => s,
1138+ None => & self . sess . target . target . options . cpu
1139+ } ) ;
1140+
11351141 :: std:: mem:: replace ( & mut self . cmd , Command :: new ( "" ) )
11361142 }
11371143
Original file line number Diff line number Diff line change 22
33ifeq ($(TARGET ) ,nvptx64-nvidia-cuda)
44all :
5- $(RUSTC ) main.rs -Clink-arg=--arch=sm_60 --crate-type=" bin" -O --target $(TARGET )
6- FileCheck main.rs --input-file $(TMPDIR ) /main.ptx
5+ $(RUSTC ) main.rs --crate-type=" bin" --target $(TARGET ) -O -C link-arg=--arch=sm_60 -o $(TMPDIR ) /main.link_arg.ptx
6+ $(RUSTC ) main.rs --crate-type=" bin" --target $(TARGET ) -O -C target-cpu=sm_60 -o $(TMPDIR ) /main.target_cpu.ptx
7+
8+ FileCheck main.rs --input-file $(TMPDIR)/main.link_arg.ptx
9+ FileCheck main.rs --input-file $(TMPDIR)/main.target_cpu.ptx
710else
811all :
912endif
Original file line number Diff line number Diff line change 55extern crate dep;
66
77// Verify the default CUDA arch.
8- // CHECK: .target sm_20
8+ // CHECK: .target sm_30
99// CHECK: .address_size 64
1010
1111// Make sure declarations are there.
You can’t perform that action at this time.
0 commit comments