[PATCH] D129393: [Clang] Fix the wrong features being derivec in the offload packager
Joseph Huber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 8 14:26:40 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG24849c9eb504: [Clang] Fix the wrong features being derivec in the offload packager (authored by jhuber6).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129393/new/
https://reviews.llvm.org/D129393
Files:
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/openmp-offload-gpu-new.c
Index: clang/test/Driver/openmp-offload-gpu-new.c
===================================================================
--- clang/test/Driver/openmp-offload-gpu-new.c
+++ clang/test/Driver/openmp-offload-gpu-new.c
@@ -120,3 +120,9 @@
// RUN: -foffload-lto %s 2>&1 | FileCheck --check-prefix=CHECK-LTO-FEATURES %s
// CHECK-LTO-FEATURES: clang-offload-packager{{.*}}--image={{.*}}feature=+ptx{{[0-9]+}}
+
+// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=sm_52 -nogpulib \
+// RUN: -Xopenmp-target=nvptx64-nvidia-cuda --cuda-feature=+ptx64 -foffload-lto %s 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-SET-FEATURES %s
+
+// CHECK-SET-FEATURES: clang-offload-packager{{.*}}--image={{.*}}feature=+ptx64
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -8325,7 +8325,8 @@
ArgStringList Features;
SmallVector<StringRef> FeatureArgs;
- getTargetFeatures(TC->getDriver(), TC->getTriple(), Args, Features, false);
+ getTargetFeatures(TC->getDriver(), TC->getTriple(), TCArgs, Features,
+ false);
llvm::copy_if(Features, std::back_inserter(FeatureArgs),
[](StringRef Arg) { return !Arg.startswith("-target"); });
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129393.443353.patch
Type: text/x-patch
Size: 1367 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220708/29b59479/attachment-0001.bin>
More information about the cfe-commits
mailing list