2019-10-31 16:03:44 +00:00
|
|
|
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
2020-10-31 12:32:33 +00:00
|
|
|
import("//build/config/host_byteorder.gni")
|
2019-10-31 16:03:44 +00:00
|
|
|
|
2020-08-27 00:09:12 +00:00
|
|
|
static_library("rusty_v8") {
|
|
|
|
complete_static_lib = true
|
2020-04-12 22:48:47 +00:00
|
|
|
sources = [ "src/binding.cc" ]
|
2019-10-31 16:03:44 +00:00
|
|
|
deps = [
|
2019-11-15 17:57:34 +00:00
|
|
|
"//build/config:shared_library_deps",
|
2019-11-19 22:48:50 +00:00
|
|
|
"//v8:v8",
|
|
|
|
"//v8:v8_libbase",
|
|
|
|
"//v8:v8_libplatform",
|
2019-10-31 16:03:44 +00:00
|
|
|
]
|
2020-08-27 00:09:12 +00:00
|
|
|
configs -= [
|
|
|
|
"//build/config/compiler:default_init_stack_vars",
|
|
|
|
"//build/config/compiler:thin_archive",
|
|
|
|
]
|
|
|
|
configs += [ ":rusty_v8_config" ]
|
2019-10-31 16:03:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
config("rusty_v8_config") {
|
2020-10-31 12:32:33 +00:00
|
|
|
configs = [ "//v8:external_config", "//v8:toolchain", "//v8:features" ]
|
2019-10-31 16:03:44 +00:00
|
|
|
cflags = []
|
|
|
|
|
2020-04-13 00:18:05 +00: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 16:03:44 +00: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" ]
|
|
|
|
}
|
|
|
|
}
|