2019-10-31 12:03:44 -04:00
|
|
|
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
2019-11-19 17:48:50 -05:00
|
|
|
import("//v8/gni/v8.gni")
|
2019-10-31 12:03:44 -04:00
|
|
|
|
|
|
|
v8_static_library("rusty_v8") {
|
2020-04-12 18:48:47 -04:00
|
|
|
sources = [ "src/binding.cc" ]
|
2019-10-31 12:03:44 -04:00
|
|
|
deps = [
|
|
|
|
":v8",
|
2019-11-15 12:57:34 -05:00
|
|
|
"//build/config:shared_library_deps",
|
2019-10-31 12:03:44 -04:00
|
|
|
]
|
|
|
|
configs = [ ":rusty_v8_config" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
v8_source_set("v8") {
|
|
|
|
deps = [
|
2019-11-19 17:48:50 -05:00
|
|
|
"//v8:v8",
|
|
|
|
"//v8:v8_libbase",
|
|
|
|
"//v8:v8_libplatform",
|
|
|
|
"//v8:v8_libsampler",
|
2019-10-31 12:03:44 -04:00
|
|
|
]
|
|
|
|
configs = [ ":rusty_v8_config" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
config("rusty_v8_config") {
|
2019-11-19 17:48:50 -05:00
|
|
|
configs = [ "//v8:external_config" ]
|
2019-10-31 12:03:44 -04:00
|
|
|
cflags = []
|
|
|
|
|
2020-04-12 20:18:05 -04:00
|
|
|
# We need these directories in the search path to be able to include some
|
|
|
|
# internal V8 headers.
|
|
|
|
include_dirs = [
|
|
|
|
"v8",
|
|
|
|
"$target_gen_dir/v8",
|
|
|
|
]
|
|
|
|
|
2019-10-31 12:03:44 -04:00
|
|
|
if (is_debug) {
|
|
|
|
defines = [ "DEBUG" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (is_clang) {
|
|
|
|
cflags += [
|
|
|
|
"-fcolor-diagnostics",
|
|
|
|
"-fansi-escape-codes",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (is_debug && is_clang && !is_win) {
|
|
|
|
cflags += [ "-glldb" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (is_win) {
|
|
|
|
# The `/Zl` ("omit default library name") flag makes the compiler produce
|
|
|
|
# object files that can link with both the static and dynamic CRT.
|
|
|
|
cflags += [ "/Zl" ]
|
|
|
|
}
|
|
|
|
}
|