Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Chrome V8 port #372

Closed
ab-acx opened this issue Nov 29, 2016 · 16 comments
Closed

Add Chrome V8 port #372

ab-acx opened this issue Nov 29, 2016 · 16 comments
Assignees
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR!

Comments

@ab-acx
Copy link
Contributor

ab-acx commented Nov 29, 2016

It would be nice if someone add port to Google Chrome V8 JavaScript engine: https://developers.google.com/v8/

@ras0219-msft ras0219-msft added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Nov 30, 2016
@ghost
Copy link

ghost commented Oct 18, 2017

@ab-acx Can you upload the generated vcxproject files from these instructions ?

@bertubezz
Copy link

Will try but currently I am a bit busy.

@ghost
Copy link

ghost commented Oct 27, 2017

Actually I looked at this further and it is not so simple. To build, you need to clone a whole list of repositories. You need at least 10 git clones and then you can run the generator. It might not be worth duplicating the effort, when we could just call google's generator ourselves.

@ghost
Copy link

ghost commented Oct 27, 2017

The process would be:

  1. Download gclient from https://storage.googleapis.com/chrome-infra/depot_tools.zip and extract
  2. Clone V8 from https://github.com/v8/v8
  3. Run "gclient sync"
  4. Run tools/dev/v8gen.py x64.release
  5. Build the solution with ninja

It also seems that they've dropped support for MSBUILD, so ninja is required.

@Kwizatz
Copy link
Contributor

Kwizatz commented Jul 22, 2020

Hello, I have been working on a port for this, currently refining details on x64-windows-static (x64-windows is pretty much done).
Is there anything I should know or any particular thread I should follow? Thanks!

@JackBoosY
Copy link
Contributor

@Kwizatz See #12396

@Kwizatz
Copy link
Contributor

Kwizatz commented Jul 23, 2020

@JackBoosY Thanks!, no depot tools, I think that is possible if all you need is GN, Ninja and Python, I'll try that.
I don't think #12396 and my PR would overlap as mine is standalone v8. (no clang, no custom cxxlib, links agains vcpkg ports of zlib and ICU).

@JackBoosY
Copy link
Contributor

@Kwizatz Yes, that's two different ports.

@Kwizatz
Copy link
Contributor

Kwizatz commented Jul 24, 2020

I have a Question, the static library seems to only generate v8_libbase.lib and v8_libplatform.lib, these are tiny libraries which I do not think are the only ones needed despite v8_shell (seemingly) linking only against them.

So, should I/can I just set the static build to monolithic, which seems to be the suggested thing to do for embeddeders going by the comments in the BUILD.gn file.

The monolithic (debug) lib is over 800Mbs.

Let me know, in the meantime, writing this has been a rubber ducky programming moment for me, I'll just go ahead and make the static monolithic unless asked otherwise.

@JackBoosY
Copy link
Contributor

@Kwizatz I think that's okay.

@Yen
Copy link
Contributor

Yen commented Jul 25, 2020

@Kwizatz Is this something that vcpkg feature paragraphs could solve?

There are a large number of build flags that I think most consumers of the V8 libraries will want to configure at some point. As you have noted, some combinations of these flags can have considerable impacts on the resulting binary sizes.

@Kwizatz
Copy link
Contributor

Kwizatz commented Jul 25, 2020

@Yen That may help, however the v8 runtime seems to only depend on zlib and icu, I think you can disable icu, not sure about zlib.

I think the reason the monolithic library is so big is because it has a lot of repeated symbols + debug symbols, this is due to how chrome/google sets the compiler flags and the archaic and liberal use of inline functions within the code... the linker should be able to discard most of it.

I am trying to keep the port as simple as possible right now, but I have already though about adding some form of customization via features, such as building unit tests (which takes longer than building the library itself), building d8, v8_shell and other samples/debugging tools. But right now I just want to get something out there to build upon, if someone needs something added at least that someone won't have to start from scratch.

Working on the v8-config.cmake file now, I really hope to have a PR up soon.

@Kwizatz
Copy link
Contributor

Kwizatz commented Jul 29, 2020

Sorry for the delay, writing target files and making them work by hand has become quite a problem when you have to wait 30 min for each compilation... I'll see if I can add something so the custom target does not run every single time.

Kwizatz added a commit to Kwizatz/vcpkg that referenced this issue Aug 27, 2020
Tested triplets: x64-windows,x64-windows-static,x64-linux
@JackBoosY
Copy link
Contributor

Added,

bartholmberg pushed a commit to bartholmberg/vcpkg that referenced this issue Feb 12, 2021
Adding rtabmap_ros plugin interface
dempo93 pushed a commit to dempo93/vcpkg that referenced this issue Aug 23, 2022
@huiseliming
Copy link

The current version does not support VS2022. Can it be updated to a supported version?

@TomieAi
Copy link
Contributor

TomieAi commented Jul 31, 2024

quite stad ho xD u cant choose specific version u stuck in one version of v8.. but yeah you can build it on your own but that takes away he fun of using vcpkg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR!
Projects
None yet
Development

No branches or pull requests

8 participants