Re: [v8-users] Specify toolchain when use_custom_libcxx=false?

46 views
Skip to first unread message

Jakob Kummerow

unread,
Feb 14, 2022, 7:59:59 AM2/14/22
to v8-users
There are two related GN args:

clang_base_path = "/usr"
clang_use_chrome_plugins = false

which I've successfully used to use the system-installed Clang on an arm64 device for which we have no prebuilt toolchain. I haven't seen the specific error you're reporting before though, so I'm not sure whether this helps in your case.


On Wed, Feb 9, 2022 at 4:00 AM Jeff Witthuhn <jeff...@gmail.com> wrote:
Hi, I'm trying to embed v8, currently via prebuilding v8 shared libraries and linking with them. Currently on Linux. 

Unfortunately, when use_custom_libcxx=true (seems to be the gm.py default?), I'm getting undefined symbols. stderr: ld.lld: error: undefined symbol: v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::unique_ptr<v8::TracingController, std::default_delete<v8::TracingController> >) 

nm -gAC libv8_libplatform.so | grep "v8::platform::NewDefaultPlatform" shows: 

libv8_libplatform.so:0000000000013240 T v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::__Cr::unique_ptr<v8::TracingController, std::__Cr::default_delete<v8::TracingController> >) 

So my build system is expecting std::unique_ptr for NewDefaultPlatform(), and the shared lib uses std::__Cr. 


My current solution is to try to avoid using the custom toolchain via use_custom_libcxx=false

gn args:
        is_component_build=true
        use_custom_libcxx=false
        is_debug = false
        v8_use_external_startup_data = false
        v8_enable_backtrace = true
        v8_enable_disassembler = true
        v8_enable_object_print = true
        v8_enable_verify_heap = true
        dcheck_always_on = false
However, I'm seeing this error from the system toolchain: version `GLIBCXX_3.4.26' not found (required by ./torque) I'd like to pass a path to the same toolchain that my build system is using. So I imagine I need a way to pass a specific path into gm/gn. Is there any way to do this?
Reply all
Reply to author
Forward
0 new messages