[llvm-bugs] [Bug 51230] New: BugPoint tests are failing when compiled with LTO
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jul 27 13:02:42 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51230
Bug ID: 51230
Summary: BugPoint tests are failing when compiled with LTO
Product: lld
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: MachO
Assignee: unassignedbugs at nondot.org
Reporter: phosek at chromium.org
CC: gkm at fb.com, jezreel at gmail.com,
llvm-bugs at lists.llvm.org, smeenai at fb.com
I tried enabling the use of ld64.lld in our toolchain build that uses (regular)
LTO but I see a number of BugPoint tests failure which all looks the same:
```
Error opening
'/opt/s/w/ir/x/w/staging/llvm_build/tools/clang/stage2-bins/lib/BugpointPasses.dylib':
dlopen(/opt/s/w/ir/x/w/staging/llvm_build/tools/clang/stage2-bins/lib/BugpointPasses.dylib,
9): Symbol not found: __ZNK4llvm4Pass11getPassNameEv
Referenced from:
/opt/s/w/ir/x/w/staging/llvm_build/tools/clang/stage2-bins/lib/BugpointPasses.dylib
Expected in: flat namespace
in
/opt/s/w/ir/x/w/staging/llvm_build/tools/clang/stage2-bins/lib/BugpointPasses.dylib
-load request ignored.
bugpoint: Unknown command line argument '-bugpoint-crashcalls'. Try:
'/opt/s/w/ir/x/w/staging/llvm_build/tools/clang/stage2-bins/bin/bugpoint
--help'
bugpoint: Did you mean '--print-after-all'?
```
I suspect it's related to the use of -flat_namespace, see
https://github.com/llvm/llvm-project/blob/e69a8c42135606e60446d5e78144357a9e429c77/llvm/cmake/modules/HandleLLVMOptions.cmake#L174,
which should be supported under LTO according to
https://github.com/llvm/llvm-project/blob/d7d2e4545e6b04ea29ffd05ebef2f7c26590b925/lld/MachO/LTO.cpp#L83
but perhaps it doesn't behave the same way as ld64?
--
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/20210727/5c2569b2/attachment.html>
More information about the llvm-bugs
mailing list