Yes, but there's no *libandroid_support.a* for ARM64. This file exists only 
for ARM and x86 in the NDKs. Also as far as I know, API levels >= 21 do not 
need this file anymore.

Looking at this line 
here: 
https://chromium.googlesource.com/chromium/src/build.git/+/refs/heads/master/config/android/BUILD.gn#120

libs += [ "android_support" ]

It looks like V8 is *always *trying to link to *libandroid_support.a*. If I 
put a condition there:

if (current_cpu != "arm64") {
    libs += [ "android_support" ]
}

then everything seems to build and work fine.

On Wednesday, February 20, 2019 at 12:20:01 PM UTC+2, Jakob Gruber wrote:
>
> You are building with target_os="android"; would you expect this to not 
> need libandroid_support?
>
> On Wed, Feb 20, 2019 at 10:23 AM Darin Dimitrov <darin.d...@gmail.com 
> <javascript:>> wrote:
>
>> I am trying to cross compile V8 for ARM64 with *is_component_build=true* 
>> for ARM64:
>>
>> gn gen outgn/release --args="is_component_build=true is_debug=false 
>> symbol_level=0 target_cpu=\"arm64\" v8_target_cpu=\"arm64\" 
>> target_os=\"android\""
>> ninja -v -C outgn/release v8_libplatform
>>
>> And getting the following compilation error when linking libc++:
>>
>> [85/89] python "../../build/toolchain/gcc_solink_wrapper.py" --readelf=
>> "../../third_party/android_ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-readelf"
>>  
>> --nm=
>> "../../third_party/android_ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-nm"
>>  
>> --strip=../../buildtools/third_party/eu-strip/bin/eu-strip --sofile=
>> "./lib.unstripped/libc++.cr.so" --tocfile="./libc++.cr.so.TOC" --output=
>> "./libc++.cr.so" -- ../../third_party/llvm-build/Release+Asserts/bin/
>> clang++ -shared -Wl,--fatal-warnings -fPIC -Wl,-z,noexecstack -Wl,-z,relro 
>> -Wl,-z,defs -Wl,--as-needed --gcc-toolchain=../../third_party/android_ndk
>> /toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64 -fuse-ld=lld 
>> -Wl,-z,max-page-size=4096 -Wl,--icf=all -Wl,--color-diagnostics 
>> -Wl,--no-rosegment 
>> -Wl,--exclude-libs=libgcc.a -Wl,--exclude-libs=libvpx_assembly_arm.a --
>> target=aarch64-linux-android -Wl,--warn-shared-textrel -Wl,-O2 
>> -Wl,--gc-sections 
>> --sysroot=../../third_party/android_ndk/platforms/android-21/arch-arm64 
>> -nostdlib 
>> -Wl,--warn-shared-textrel -Werror -Wl,-u_sanitizer_options_link_helper -L
>> ../../third_party/android_ndk/sources/cxx-stl/llvm-libc++/libs/arm64-v8a 
>> -o "./lib.unstripped/libc++.cr.so" -Wl,-soname="libc++.cr.so" @
>> "./libc++.cr.so.rsp"
>> FAILED: libc++.cr.so libc++.cr.so.TOC lib.unstripped/libc++.cr.so
>> python "../../build/toolchain/gcc_solink_wrapper.py" --readelf=
>> "../../third_party/android_ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-readelf"
>>  
>> --nm=
>> "../../third_party/android_ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-nm"
>>  
>> --strip=../../buildtools/third_party/eu-strip/bin/eu-strip --sofile=
>> "./lib.unstripped/libc++.cr.so" --tocfile="./libc++.cr.so.TOC" --output=
>> "./libc++.cr.so" -- ../../third_party/llvm-build/Release+Asserts/bin/
>> clang++ -shared -Wl,--fatal-warnings -fPIC -Wl,-z,noexecstack -Wl,-z,relro 
>> -Wl,-z,defs -Wl,--as-needed --gcc-toolchain=../../third_party/android_ndk
>> /toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64 -fuse-ld=lld 
>> -Wl,-z,max-page-size=4096 -Wl,--icf=all -Wl,--color-diagnostics 
>> -Wl,--no-rosegment 
>> -Wl,--exclude-libs=libgcc.a -Wl,--exclude-libs=libvpx_assembly_arm.a --
>> target=aarch64-linux-android -Wl,--warn-shared-textrel -Wl,-O2 
>> -Wl,--gc-sections 
>> --sysroot=../../third_party/android_ndk/platforms/android-21/arch-arm64 
>> -nostdlib 
>> -Wl,--warn-shared-textrel -Werror -Wl,-u_sanitizer_options_link_helper -L
>> ../../third_party/android_ndk/sources/cxx-stl/llvm-libc++/libs/arm64-v8a 
>> -o "./lib.unstripped/libc++.cr.so" -Wl,-soname="libc++.cr.so" @
>> "./libc++.cr.so.rsp"
>> ld.lld: error: unable to find library -landroid_support
>>
>> So the question is why is the linker trying to find *libandroid_supprt* 
>> for ARM64 builds and how to fix this error?
>>
>>
>>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to