[llvm-dev] Regd LLvm bolt with clang

Bose, Priyanka via llvm-dev llvm-dev at lists.llvm.org
Mon Aug 19 23:19:03 PDT 2019


Hi,

We wanted to experiment as to how we can use the BOLT optimization from LLVM on our Android Platforms.
We referred to the wiki from Facebook that speaks of Bolt
https://github.com/facebookincubator/BOLT

So I was using now the linker flag : "Wl,--emit-relocs"  in the instrumented mode to compile android module , for instance here "libc".
But the build fails with the llvm clang toolchain on android :
============================
FAILED: out/soong/.intermediates/bionic/libc/libc/android_x86_core_shared/libc.so prebuilts/clang/host/linux-x86/clang-4691093/bin/clang++
.....
.....
-Wl,--no-undefined -Wl,--hash-style=gnu -Wl,--emit-relocs -Wl,--hash-style=both -m32 -Wl,--version-script,bionic/libc/libc.x86.map
prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/bin/ld: internal error in do_layout, at /buildbot/src/android/gcc/toolchain/build/../binutils/binutils-2.27/gold/object.cc:1821
clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)
==============================

I am using android clang prebuilts : "clang-4691093". Does the clang based llvm compiler need any special changes to use this compiler relocation compiler flag?

Best Regards
Priyanka


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190820/69174b7a/attachment-0001.html>


More information about the llvm-dev mailing list