[clang] [flang] [clang] Add option to specify opt pipeline during offload lto (PR #114401)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 31 14:37:44 PDT 2024


jhuber6 wrote:

> > Can this be done through `-Xoffload-linker`?
> 
> No. I tried several different things, but was not able to get the right command line option passed to lld (in the clang->clang-linker-wrapper->clang->lld chain).

This works for me,
```console
$ clang input.c -fopenmp --offload-arch=gfx1030 -Xoffload-linker --lto-newpm-passes='default<O3>' -v
ld.lld ... --lto-newpm-passes=default<O3> ...
```

https://github.com/llvm/llvm-project/pull/114401


More information about the cfe-commits mailing list