Hopefully this isn't off topic since it's more about GN than V8, but figured y'all might have some ideas.
We're using GN as our build system for a project which embeds V8. Right now have the V8 repo living under our project's repo at
/depot/vendor/v8. We build the V8 static library separately (using Make) and then link it into our project using GN:
}
I'd like to do it "correctly" and add V8 as a dependency to our project via GN, but I'm unsure how to do it without mucking around in V8's BUILD.gn files too much. I tried directly adding V8 as a dependency:
deps = [ "//vendor/v8:wee8" ]
}
But then get an error about missing files under //build:
$ gn gen /depot/out/Default ...
ERROR at //vendor/v8/BUILD.gn:5:1: Can't load input file.
import("//build/config/arm.gni")
^------------------------------
Unable to load:
/depot/build/config/arm.gni
It should be looking at /depot/vendor/v8/build/config/arm.gni instead.
To my unfamiliar eye it seems like V8 expects itself to be the root of the project, not in a sub-directory.
Is there any way to tell the V8 targets that it should "rebase" its file references and whatnot into its sub-directory without making edits to V8's BUILD.gn files directly? It'd make upgrading V8 a pain if we have to apply a bunch of build modifications on top of it.
Thanks so much!