[clang] [LinkerWrapper] Always pass `-flto` if the linker supports it (PR #102972)

2024-08-13 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > I guess I should just manually pass the optimization level at `O2` for now. > > Would -O3 still pass through? Should, the behavior that was apparently passing was using `-O2`. https://github.com/llvm/llvm-project/pull/102972 ___ cf

[clang] [LinkerWrapper] Always pass `-flto` if the linker supports it (PR #102972)

2024-08-13 Thread Joel E. Denny via cfe-commits
jdenny-ornl wrote: > I guess I should just manually pass the optimization level at `O2` for now. Would -O3 still pass through? https://github.com/llvm/llvm-project/pull/102972 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [LinkerWrapper] Always pass `-flto` if the linker supports it (PR #102972)

2024-08-13 Thread Joseph Huber via cfe-commits
jhuber6 wrote: I'm very familiar with that error message, it's https://github.com/llvm/llvm-project/issues/64863. I guess I should just manually pass the optimization level at `O2` for now. https://github.com/llvm/llvm-project/pull/102972 ___ cfe-com

[clang] [LinkerWrapper] Always pass `-flto` if the linker supports it (PR #102972)

2024-08-13 Thread Joel E. Denny via cfe-commits
jdenny-ornl wrote: Seems like it does what it intends to do. Thanks for working on it. However, there's a side effect. Now that -O1 gets passed along, sometimes it triggers an assert fail for AMD GPU: ``` ld.lld: /tmp/llvm/llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp:151: virtual

[clang] [LinkerWrapper] Always pass `-flto` if the linker supports it (PR #102972)

2024-08-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Joseph Huber (jhuber6) Changes Summary; Now that we use the linker to do LTO / device linking, we need to inform the `clang` invocation to use `-flto` so it forwards arguments like `-On` correctly. --- Fu

[clang] [LinkerWrapper] Always pass `-flto` if the linker supports it (PR #102972)

2024-08-12 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/102972 Summary; Now that we use the linker to do LTO / device linking, we need to inform the `clang` invocation to use `-flto` so it forwards arguments like `-On` correctly. >From b89e843bcca89e53552fead5a8b88e5046c37