Hi, 

I would like to generate LLVM bitcode for Android AOSP and that's why I 
want to build AOSP with clang. 

I have changed the following in the build/core/clang/clear_vars.mk:


LOCAL_CLANG_CFLAGS:=-emit-llvm -S
LOCAL_CLANG_CPPFLAGS:=-emit-llvm -S 
LOCAL_CLANG:=true


However, the AOSP build failed with the following error messages:


prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: 
error: out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o:1:14: 
invalid character

prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: 
error: out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o:1:14: 
syntax error, unexpected $end

prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: 
error: out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o: not an 
object or archive

prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: 
error: 
out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/libhost.a: no 
archive symbol table (run ranlib)

prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: 
error: 
out/host/linux-x86/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/libcompiler_rt-extras.a:
 
no archive symbol table (run ranlib)

prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//sysroot/usr/lib/Scrt1.o(.text+0x20):
 
error: undefined reference to 'main'

clang: error: linker command failed with exit code 1 (use -v to see 
invocation)


Any suggestion to fix this issue would be appreciated.

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to