[llvm-bugs] [Bug 42101] New: cmake Minsizerel with LTO fails on Linux
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Jun 1 19:46:04 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42101
Bug ID: 42101
Summary: cmake Minsizerel with LTO fails on Linux
Product: Build scripts
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: cmake
Assignee: unassignedbugs at nondot.org
Reporter: milind at uber.com
CC: llvm-bugs at lists.llvm.org
Configure llvm project with Minsizerel and enable LTO and set clang/clang++ as
the compiler and LLD as the linker (example below).
cmake -DCMAKE_BUILD_TYPE=Minsizerel -DLLVM_ENABLE_LTO=Full
-DLLVM_ENABLE_PROJECTS=clang -DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++ -DLLVM_ENABLE_LLD=1 -G "Ninja" ../llvm
The build fails with the following error:
ld.lld: error: -plugin-opt=Os: number expected, but got 's'
clang-9: error: linker command failed with exit code 1 (use -v to see
invocation)
Clearly, the -Os flag passed to the linker is not getting recognized. If the
linker does not support -Os, the build scripts should make sure that they do
not pass -Os down to the linker.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190602/9c401df3/attachment.html>
More information about the llvm-bugs
mailing list