[all-commits] [llvm/llvm-project] 2e18c9: [Clang] Forward arguments to the device compiler b...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Thu Feb 6 08:42:38 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2e18c94ad17e53d4c594baaf6bfd40460ceebc1e
https://github.com/llvm/llvm-project/commit/2e18c94ad17e53d4c594baaf6bfd40460ceebc1e
Author: Joseph Huber <huberjn at outlook.com>
Date: 2025-02-06 (Thu, 06 Feb 2025)
Changed paths:
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/test/Driver/amdgpu-openmp-sanitize-options.c
M clang/test/Driver/amdgpu-openmp-toolchain.c
M clang/test/Driver/openmp-offload.c
Log Message:
-----------
[Clang] Forward arguments to the device compiler better (#125957)
Summary:
Currently we have a subset of arguments that are handled specially to
keep them consistent between host and device compiles, however, this is
extremely hacky as it only works on a few predetermined options. This is
a holdover from the days before the linker wrapper shuttled all of its
arguments through `clang`. Now that we just use clang, all we need to do
is just use the `--device-compiler=` option to forward it there and let
the normal toolchain handle it.
For example,
```console
clang -fopenmp --offload-arch=gfx1030,sm_89 -Xarch_nvptx64 -O3 -foffload-lto
```
will forward the `-O3` to the LTO compilation only for the NVPTX
compilation.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list