Skip to content

Commit 714f1aa

Browse files
committed
Revert "[LinkerWrapper] Update deprecated fatbin command line option (#163571)"
This reverts commit 79d8a26.
1 parent 9991e33 commit 714f1aa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clang/test/Driver/linker-wrapper.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ __attribute__((visibility("protected"), used)) int x;
106106

107107
// CUDA: clang{{.*}} -o [[IMG_SM70:.+]] -dumpdir a.out.nvptx64.sm_70.img. --target=nvptx64-nvidia-cuda -march=sm_70
108108
// CUDA: clang{{.*}} -o [[IMG_SM52:.+]] -dumpdir a.out.nvptx64.sm_52.img. --target=nvptx64-nvidia-cuda -march=sm_52
109-
// CUDA: fatbinary{{.*}}-64 --create {{.*}}.fatbin --image3=kind=elf,sm=70,file=[[IMG_SM70]] --image3=kind=elf,sm=52,file=[[IMG_SM52]]
109+
// CUDA: fatbinary{{.*}}-64 --create {{.*}}.fatbin --image=profile=sm_70,file=[[IMG_SM70]] --image=profile=sm_52,file=[[IMG_SM52]]
110110
// CUDA: usr/bin/ld{{.*}} {{.*}}.openmp.image.{{.*}}.o {{.*}}.cuda.image.{{.*}}.o
111111

112112
// RUN: llvm-offload-binary -o %t.out \
@@ -240,7 +240,7 @@ __attribute__((visibility("protected"), used)) int x;
240240
// RUN: %t.o -o a.out 2>&1 | FileCheck %s --check-prefix=RELOCATABLE-LINK-CUDA
241241

242242
// RELOCATABLE-LINK-CUDA: clang{{.*}} -o {{.*}}.img -dumpdir a.out.nvptx64.sm_89.img. --target=nvptx64-nvidia-cuda
243-
// RELOCATABLE-LINK-CUDA: fatbinary{{.*}} -64 --create {{.*}}.fatbin --image3=kind=elf,sm=89,file={{.*}}.img
243+
// RELOCATABLE-LINK-CUDA: fatbinary{{.*}} -64 --create {{.*}}.fatbin --image=profile=sm_89,file={{.*}}.img
244244
// RELOCATABLE-LINK-CUDA: /usr/bin/ld.lld{{.*}}-r
245245
// RELOCATABLE-LINK-CUDA: llvm-objcopy{{.*}}a.out --remove-section .llvm.offloading
246246

clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,8 @@ fatbinary(ArrayRef<std::pair<StringRef, StringRef>> InputFiles,
479479
CmdArgs.push_back("--create");
480480
CmdArgs.push_back(*TempFileOrErr);
481481
for (const auto &[File, Arch] : InputFiles)
482-
CmdArgs.push_back(Args.MakeArgString(
483-
"--image3=kind=elf,sm=" + Arch.drop_front(3) + ",file=" + File));
482+
CmdArgs.push_back(
483+
Args.MakeArgString("--image=profile=" + Arch + ",file=" + File));
484484

485485
if (Error Err = executeCommands(*FatBinaryPath, CmdArgs))
486486
return std::move(Err);

0 commit comments

Comments
 (0)