[llvm-bugs] [Bug 38139] New: ThinLTO build has undefined symbols due to powf-ldexpf translation

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 11 16:44:10 PDT 2018


            Bug ID: 38139
           Summary: ThinLTO build has undefined symbols due to powf-ldexpf
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: dmajor at mozilla.com
                CC: llvm-bugs at lists.llvm.org, llvm at inglorion.net,
                    peter at pcc.me.uk, tejohnson at google.com

Here's another issue from the Firefox ThinLTO build

It's interesting that the source file references `powf` and yet the missing
symbol is `ldexpf`. I assume the compiler is attempting some optimization

Presumably, whatever MSVC library we're linking against would be able to
provide an implementation for `powf`, but it doesn't have one for `ldexpf`
(maybe it's an inline function in the MS headers or something?).

$ cat mathutil.cpp
extern "C" float powf(float, float);
int main(int argc, char** argv) {
  return powf(2.0f, argc);

$ clang-cl -c mathutil.cpp -O1 -flto=thin

$ lld-link -nodefaultlib -entry:main mathutil.obj
lld-link.exe: error: undefined symbol: ldexpf
>>> referenced by lto.tmp:(main)

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/20180711/a1f47b7a/attachment.html>

More information about the llvm-bugs mailing list