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>
Anton Korobeynikov via llvm-dev
2019-Aug-21 09:46 UTC
[llvm-dev] Regd LLvm bolt with clang
Looks like a problem with linker (gold) from binutils. You may want to update it, binutils 2.27 release was more than 3 years ago. On Wed, Aug 21, 2019 at 8:23 AM Bose, Priyanka via llvm-dev <llvm-dev at lists.llvm.org> wrote:> > 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 > > > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-- With best regards, Anton Korobeynikov Department of Statistical Modelling, Saint Petersburg State University