[all-commits] [llvm/llvm-project] b052ee: Fix -fuse-ld to be linker flag in feature detectio...
Mehdi Amini via All-commits
all-commits at lists.llvm.org
Tue Sep 20 21:02:33 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b052eead95e0564e1230bcca7dee199de2b7f19f
https://github.com/llvm/llvm-project/commit/b052eead95e0564e1230bcca7dee199de2b7f19f
Author: Kevin Gleason <gleasonk at google.com>
Date: 2022-09-21 (Wed, 21 Sep 2022)
Changed paths:
M llvm/cmake/modules/HandleLLVMOptions.cmake
Log Message:
-----------
Fix -fuse-ld to be linker flag in feature detection check
Discovered an issue working in StableHLO when attempting to build with `-Wall -Werror`:
https://github.com/openxla/stablehlo/pull/137
Currently, if `LLVM_USE_LLD` and `-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -Wall -Werror"`
are both specified for build, the build will error with:
```
-- Performing Test CXX_SUPPORTS_CUSTOM_LINKER - Failed
CMake Error at /usr/local/google/home/gleasonk/Coding/llvm-build/lib/cmake/llvm/HandleLLVMOptions.cmake:309 (message):
Host compiler does not support '-fuse-ld=lld'
...
$ cat <build_dir>/CMakeFiles/CMakeError.log
...
clang: error: argument unused during compilation: '-fuse-ld=lld' [-Werror,-Wunused-command-line-argument]
```
It looks like other repos have hit this same issue:
- https://github.com/golang/go/issues/41527 (mentioned in comment)
- https://github.com/iree-org/iree/pull/7450
This can be reproduced in llvm-project with the following build command:
```
# Compile command taken from https://mlir.llvm.org/getting_started/
# and modified for use case
cmake -G Ninja ../llvm \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_BUILD_EXAMPLES=ON \
-DLLVM_TARGETS_TO_BUILD="X86;NVPTX;AMDGPU" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang \
-DLLVM_ENABLE_LLD=ON \
-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -Wall -Werror"
```
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D134206
Commit: e0a6df53b4b40f7579a3f10fc194880fe9479e49
https://github.com/llvm/llvm-project/commit/e0a6df53b4b40f7579a3f10fc194880fe9479e49
Author: Mehdi Amini <joker.eph at gmail.com>
Date: 2022-09-21 (Wed, 21 Sep 2022)
Changed paths:
M mlir/include/mlir/Dialect/Tensor/Transforms/TransformUtils.h
M mlir/lib/Dialect/Tensor/Transforms/MergeConsecutiveInsertExtractSlicePatterns.cpp
M mlir/test/Dialect/Tensor/fold-consecutive-insert-extract-slice.mlir
Log Message:
-----------
Revert "[mlir][tensor] Support more cases in MergeConsecutiveExtractSlice"
This reverts commit 5d4603a02d0c3e0106b10d245322b1d2072c0c3d.
The Dialect/Tensor/fold-consecutive-insert-extract-slice.mlir test is
failing when built with GCC
Compare: https://github.com/llvm/llvm-project/compare/f5fe92f69385...e0a6df53b4b4
More information about the All-commits
mailing list