https://bugs.llvm.org/show_bug.cgi?id=50646

            Bug ID: 50646
           Summary: LLD crashes when linking libcryptopp with -O2 -flto
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

Created attachment 24934
  --> https://bugs.llvm.org/attachment.cgi?id=24934&action=edit
Build log

Hello, building the library with -O2 and -flto causes the lld to crash. Using
exclusively either -O2 or -flto works just well. I remember that I ran into
this problem a couple of months ago already using older lld too.

Source:
https://github.com/weidai11/cryptopp

Evironment:
$ clang --version
clang version 13.0.0 (https://github.com/llvm/llvm-project.git
9b92ae01ee57e332e52d14c073fa3235498a9f2c)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin

$ uname -a
Linux vps 5.4.0-74-generic #83-Ubuntu SMP Sat May 8 02:35:39 UTC 2021 x86_64
x86_64 x86_64 GNU/Linux

Build commands:
CFLAGS='-O2 -flto' CXXFLAGS='-O2 -flto' LDFLAGS='-flto' CC=clang CXX=clang++
make shared 2>&1 | tee buildlog_O2_flto

Buildlog is attached

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to