[llvm-bugs] [Bug 43722] New: libclang_rt.scudo[_minimal]-<arch>.a contains LLVM IR files when compiling with ThinLTO
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Oct 19 09:04:30 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43722
Bug ID: 43722
Summary: libclang_rt.scudo[_minimal]-<arch>.a contains LLVM IR
files when compiling with ThinLTO
Product: compiler-rt
Version: 9.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: scudo
Assignee: unassignedbugs at nondot.org
Reporter: aaronpuchert at alice-dsl.net
CC: llvm-bugs at lists.llvm.org
The following five object files in libclang_rt.scudo-x86_64.a and
libclang_rt.scudo_minimal-x86_64.a are LLVM IR files instead of ELF objects
when building with LLVM_ENABLE_LTO=Thin:
guarded_pool_allocator_posix.cpp.o
mutex_posix.cpp.o
guarded_pool_allocator.cpp.o
random.cpp.o
backtrace_linux_libc.cpp.o
This is problematic if users want to link with the static library, which then
contains a mix of LLVM IR and ELF object files.
The files come from gwp_asan, where the targets are for some reason built
without SANITIZER_COMMON_CFLAGS (see lib/gwp_asan/CMakeLists.txt), which
contains -fno-lto.
The issue can be reproduced by configuring a build with -DLLVM_ENABLE_LTO=Thin
and then running
> ar x <...>/libclang_rt.scudo-x86_64.a
> file *
backtrace_linux_libc.cpp.o: LLVM IR bitcode
guarded_pool_allocator.cpp.o: LLVM IR bitcode
guarded_pool_allocator_posix.cpp.o: LLVM IR bitcode
interception_linux.cc.o: ELF 64-bit LSB relocatable, x86-64, version
1 (SYSV), with debug_info, not stripped
interception_mac.cc.o: ELF 64-bit LSB relocatable, x86-64, version
1 (SYSV), not stripped
interception_type_test.cc.o: ELF 64-bit LSB relocatable, x86-64, version
1 (SYSV), not stripped
interception_win.cc.o: ELF 64-bit LSB relocatable, x86-64, version
1 (SYSV), not stripped
mutex_posix.cpp.o: LLVM IR bitcode
options_parser.cpp.o: ELF 64-bit LSB relocatable, x86-64, version
1 (SYSV), with debug_info, not stripped
random.cpp.o: LLVM IR bitcode
sancov_flags.cc.o: ELF 64-bit LSB relocatable, x86-64, version
1 (SYSV), with debug_info, not stripped
...
--
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/20191019/2ff4f09e/attachment-0001.html>
More information about the llvm-bugs
mailing list