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

via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 13 08:40:29 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 0889809c706fd926b786bc2f8852646a17d7e21c 4e2834e33249f16b2f30574020c60e5bb62fe4b9 --extensions cpp,c -- clang/test/Driver/linker-wrapper.c clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp offload/test/api/omp_dynamic_shared_memory_amdgpu.c offload/test/api/omp_dynamic_shared_memory_mixed_amdgpu.c offload/test/jit/empty_kernel_lvl2.c offload/test/offloading/bug51781.c offload/test/offloading/bug51982.c
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/offload/test/api/omp_dynamic_shared_memory_amdgpu.c b/offload/test/api/omp_dynamic_shared_memory_amdgpu.c
index 7ddb13f40e..8d76980f74 100644
--- a/offload/test/api/omp_dynamic_shared_memory_amdgpu.c
+++ b/offload/test/api/omp_dynamic_shared_memory_amdgpu.c
@@ -1,4 +1,5 @@
-// RUN: %libomptarget-compile-amdgcn-amd-amdhsa -O2 -mllvm -openmp-opt-inline-device
+// RUN: %libomptarget-compile-amdgcn-amd-amdhsa -O2 -mllvm
+// -openmp-opt-inline-device
 // RUN: env LIBOMPTARGET_SHARED_MEMORY_SIZE=256 \
 // RUN:   %libomptarget-run-amdgcn-amd-amdhsa | %fcheck-amdgcn-amd-amdhsa
 // REQUIRES: amdgcn-amd-amdhsa
diff --git a/offload/test/api/omp_dynamic_shared_memory_mixed_amdgpu.c b/offload/test/api/omp_dynamic_shared_memory_mixed_amdgpu.c
index 175f15cf7e..ab9293204a 100644
--- a/offload/test/api/omp_dynamic_shared_memory_mixed_amdgpu.c
+++ b/offload/test/api/omp_dynamic_shared_memory_mixed_amdgpu.c
@@ -1,4 +1,5 @@
-// RUN: %libomptarget-compile-amdgcn-amd-amdhsa -O2 -mllvm -openmp-opt-inline-device -I %S
+// RUN: %libomptarget-compile-amdgcn-amd-amdhsa -O2 -mllvm
+// -openmp-opt-inline-device -I %S
 // RUN: env LIBOMPTARGET_NEXTGEN_PLUGINS=1 \
 // RUN:   %libomptarget-run-amdgcn-amd-amdhsa | %fcheck-amdgcn-amd-amdhsa
 // REQUIRES: amdgcn-amd-amdhsa

``````````

</details>


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


More information about the cfe-commits mailing list