summaryrefslogtreecommitdiff
path: root/libdeno
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2018-12-13 22:19:17 +0100
committerBert Belder <bertbelder@gmail.com>2018-12-19 17:50:25 +0100
commit73e80b0763cf2e14f7dc26d679d3b457106597cc (patch)
treee26c631f52723c063990c79cbf7b36733a14987b /libdeno
parent3a316330417945d46c8137e3d5e54325fd7b22ec (diff)
build: make `cargo build` work
Diffstat (limited to 'libdeno')
-rw-r--r--libdeno/BUILD.gn27
1 files changed, 21 insertions, 6 deletions
diff --git a/libdeno/BUILD.gn b/libdeno/BUILD.gn
index c9471e5bd..16006fa92 100644
--- a/libdeno/BUILD.gn
+++ b/libdeno/BUILD.gn
@@ -16,23 +16,37 @@ config("deno_config") {
}
}
-v8_static_library("v8") {
- public_deps = [
- "//build/win:default_exe_manifest",
+# The `/Zl` ("omit default library name") flag makes the compiler produce object
+# files that can link with both static and dynamic libc.
+config("win_crt_agnostic") {
+ if (is_win) {
+ cflags = [ "/Zl" ]
+ }
+}
+
+v8_source_set("v8") {
+ configs = [
+ ":deno_config",
+ ":win_crt_agnostic",
+ ]
+ deps = [
"//third_party/v8:v8",
"//third_party/v8:v8_libbase",
"//third_party/v8:v8_libplatform",
"//third_party/v8:v8_libsampler",
]
- configs = [ ":deno_config" ]
}
# Only functionality needed for libdeno_test and snapshot_creator
# In particular no flatbuffers, no assets, no rust, no msg handlers.
# Because snapshots are slow, it's important that snapshot_creator's
# dependencies are minimal.
+# The cargo-driven build links with libdeno to pull in all non-rust code.
v8_static_library("libdeno") {
- configs = [ ":deno_config" ]
+ configs = [
+ ":deno_config",
+ ":win_crt_agnostic",
+ ]
sources = [
"api.cc",
"binding.cc",
@@ -41,8 +55,9 @@ v8_static_library("libdeno") {
"file_util.h",
"internal.h",
]
- public_deps = [
+ deps = [
":v8",
+ "//build/config:shared_library_deps",
]
}