0

I have my own fork of v8 and would like to build it. However, gn and gclient keep failing and telling me that I need to be inside a checkout.

$> git clone <ownRepository>
$> gn gen out/build
gn.py: Could not find checkout in any parent of the current path.
This must be run inside a checkout.
``

How can I build my own fork? `fetch` does not seem to accept custom repositories.
Sim
  • 4,199
  • 4
  • 39
  • 77
  • Does this answer your question? [How to build with targets with Google Chromium GN?](https://stackoverflow.com/questions/42729479/how-to-build-with-targets-with-google-chromium-gn) – Mytch Jun 03 '22 at 15:28
  • @Mytch no it does not. gclient requires configuration to be run. The accepted solution does not work. – Sim Jun 03 '22 at 15:33

1 Answers1

1

The V8 git repository (or a fork of it) simply doesn't contain everything that's required for building; in particular it misses third-party dependencies and shared build configuration logic. The purpose of the official build tools/workflow is to set all that up. So the easiest path forward for you is probably to get a regular V8 checkout (using fetch v8), and then replacing the v8 directory in there with your own. Make sure that the versions match (at least approximately).

The alternative is to figure out what fetch v8, gclient sync and gclient runhooks do, and doing all of that by hand -- totally possible, as they're all just scripts and entirely open source, but it's a lot of work and not much fun, so I wouldn't recommend that.

jmrk
  • 34,271
  • 7
  • 59
  • 74
  • I think using `git diff` to generate a patch from when the repo was forked, then using `fetch v8`, then applying the patch works easier. But fundamentally you are (sadly) correct. – Sim Jun 03 '22 at 20:33