File tree 4 files changed +13
-4
lines changed
librustc_codegen_ssa/back
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 \
14
14
xz-utils
15
15
16
16
# 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 | \
18
18
tar -xzvC /usr/bin
19
19
20
20
RUN 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> {
1132
1132
}
1133
1133
1134
1134
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
+
1135
1141
:: std:: mem:: replace ( & mut self . cmd , Command :: new ( "" ) )
1136
1142
}
1137
1143
Original file line number Diff line number Diff line change 2
2
3
3
ifeq ($(TARGET ) ,nvptx64-nvidia-cuda)
4
4
all :
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
7
10
else
8
11
all :
9
12
endif
Original file line number Diff line number Diff line change 5
5
extern crate dep;
6
6
7
7
// Verify the default CUDA arch.
8
- // CHECK: .target sm_20
8
+ // CHECK: .target sm_30
9
9
// CHECK: .address_size 64
10
10
11
11
// Make sure declarations are there.
You can’t perform that action at this time.
0 commit comments