0

I'm trying to build "v8" as a shared library in Cobalt using GYP. I set the variable "component" to "shared_library". When assembling an error pops up: ninja: error: obj.host/v8/src/v8_libbase.ninja:85: unknown build rule 'solink_host' build lib/host/libv8_libbase lib/host/libv8_libbase.TOC: solink_host $ ^ near here

Does anyone know how to fix this?

  • What is the reason you are trying to build V8 as a shared library? – mmotorny May 06 '20 at 20:02
  • I want to use v8 as shared library because another application also uses v8. – Андрей Лысенко May 07 '20 at 06:32
  • Virtually all third-party dependencies have been modified by Cobalt team for variety of reasons, including portability, updatability, and security. In other words, there is absolutely no guarantee that Cobalt or another app will work as expected, even if they compile. If you are severely constrained on the disk space, try tweaking the fonts package as described in https://cobalt.dev/reference/starboard/gyp-configuration.html. – mmotorny May 07 '20 at 07:48

1 Answers1

1

This is not supported, Cobalt must be build as a monolithic binary.

mmotorny
  • 320
  • 1
  • 7
  • Thanks for the answer. Please tell me where it says that Cobalt must be build as a monolithic binary? – Андрей Лысенко May 07 '20 at 06:36
  • I don't think there is public documentation that states this but it's ingrained in Cobalt's architecture. Just one example: V8 has been modified to run on top of Starboard, a Cobalt's porting layer. If you bypass Starboard by substituting V8 with your own version, you may discover that Cobalt cannot correctly determine the amount of used RAM. – mmotorny May 07 '20 at 07:58