forked from OSchip/llvm-project
b052eead95
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 |
||
---|---|---|
.. | ||
benchmarks | ||
bindings | ||
cmake | ||
docs | ||
examples | ||
include | ||
lib | ||
projects | ||
resources | ||
runtimes | ||
test | ||
tools | ||
unittests | ||
utils | ||
.clang-format | ||
.clang-tidy | ||
.gitattributes | ||
.gitignore | ||
CMakeLists.txt | ||
CODE_OWNERS.TXT | ||
CREDITS.TXT | ||
LICENSE.TXT | ||
README.txt | ||
RELEASE_TESTERS.TXT | ||
configure | ||
llvm.spec.in |
README.txt
The LLVM Compiler Infrastructure ================================ This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments. LLVM is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt. Please see the documentation provided in docs/ for further assistance with LLVM, and in particular docs/GettingStarted.rst for getting started with LLVM and docs/README.txt for an overview of LLVM's documentation setup. If you are writing a package for LLVM, see docs/Packaging.rst for our suggestions.