diff options
author | Joseph Huber <huberjn@outlook.com> | 2025-07-04 16:20:53 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-04 16:20:53 -0500 |
commit | 6db02dc4311b3ee52ec6e7e5e5cafb2600e7b30f (patch) | |
tree | 6cdbdbe738836c70a352dec2cf690544ae5e046a /flang | |
parent | 454e4e3e29d835d4487799c014223a045f3d1d84 (diff) | |
download | llvm-6db02dc4311b3ee52ec6e7e5e5cafb2600e7b30f.zip llvm-6db02dc4311b3ee52ec6e7e5e5cafb2600e7b30f.tar.gz llvm-6db02dc4311b3ee52ec6e7e5e5cafb2600e7b30f.tar.bz2 |
[Clang] Introduce `--offload-targets` for `-fopenmp-targets` (#146594)
Summary:
This patch is mostly an NFC that renames the existing `-fopenmp-targets`
into `--offload-targets`. Doing this early to simplify a follow-up patch
that will hopefully allow this syntax to be used more generically over
the existing `--offload` syntax (which I think is mostly unmaintained
now.). Following in the well-trodden path of trying to pull language
specific offload options into generic ones, but right now this is still
just OpenMP specific.
Diffstat (limited to 'flang')
-rw-r--r-- | flang/lib/Frontend/CompilerInvocation.cpp | 2 | ||||
-rw-r--r-- | flang/test/Driver/omp-driver-offload.f90 | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index 30d81f3..8e4c210 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -1248,7 +1248,7 @@ static bool parseOpenMPArgs(CompilerInvocation &res, llvm::opt::ArgList &args, // Get the OpenMP target triples if any. if (auto *arg = - args.getLastArg(clang::driver::options::OPT_fopenmp_targets_EQ)) { + args.getLastArg(clang::driver::options::OPT_offload_targets_EQ)) { enum ArchPtrSize { Arch16Bit, Arch32Bit, Arch64Bit }; auto getArchPtrSize = [](const llvm::Triple &triple) { if (triple.isArch16Bit()) diff --git a/flang/test/Driver/omp-driver-offload.f90 b/flang/test/Driver/omp-driver-offload.f90 index 335bfad..f4f0c21 100644 --- a/flang/test/Driver/omp-driver-offload.f90 +++ b/flang/test/Driver/omp-driver-offload.f90 @@ -225,8 +225,8 @@ ! RUN: | FileCheck %s --check-prefix=OFFLOAD-TARGETS ! OFFLOAD-TARGETS: "{{[^"]*}}flang" "-fc1" "-triple" "x86_64-unknown-linux-gnu" -! OFFLOAD-TARGETS-SAME: "-fopenmp-targets=amdgcn-amd-amdhsa" +! OFFLOAD-TARGETS-SAME: "--offload-targets=amdgcn-amd-amdhsa" ! OFFLOAD-TARGETS-NEXT: "{{[^"]*}}flang" "-fc1" "-triple" "amdgcn-amd-amdhsa" -! OFFLOAD-TARGETS-NOT: -fopenmp-targets +! OFFLOAD-TARGETS-NOT: --offload-targets ! OFFLOAD-TARGETS: "{{[^"]*}}flang" "-fc1" "-triple" "x86_64-unknown-linux-gnu" -! OFFLOAD-TARGETS-SAME: "-fopenmp-targets=amdgcn-amd-amdhsa" +! OFFLOAD-TARGETS-SAME: "--offload-targets=amdgcn-amd-amdhsa" |