From 65cce40a8960727955061aae35670443ca9b8c46 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 27 Nov 2018 17:21:05 -0500 Subject: gitignore vim .swp files --- BUILD.gn | 44 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) (limited to 'BUILD.gn') diff --git a/BUILD.gn b/BUILD.gn index 064f8d146..060b024a1 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -218,11 +218,23 @@ v8_executable("test_cc") { configs = [ ":deno_config" ] } +v8_static_library("v8") { + public_deps = [ + "third_party/v8:v8", + "third_party/v8:v8_libbase", + "third_party/v8:v8_libplatform", + "third_party/v8:v8_libsampler", + "//build/win:default_exe_manifest", + ] + 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. -static_library("libdeno") { +v8_static_library("libdeno") { + configs = [ ":deno_config" ] sources = [ "libdeno/api.cc", "libdeno/binding.cc", @@ -231,30 +243,44 @@ static_library("libdeno") { "libdeno/file_util.h", "libdeno/internal.h", ] - public_deps = [ - "third_party/v8:v8_monolith", - ] - configs += [ ":deno_config" ] + if (!use_prebuilt_v8) { + public_deps = [ + ":v8", + ] + } else { + # TODO(ry) It would be nice to have a standalone target for the prebuilt + # library that could simply be added to the deps here, but it wasn't + # obvious how to accomplish that in gn. + if (is_mac) { + libs = [ "//prebuilt/mac/libv8.a" ] + } else if (is_linux) { + libs = [ "//prebuilt/linux64/libv8.a" ] + } else if (is_win) { + libs = [ "//prebuilt/win/v8.lib" ] + } else { + assert(false, "We don't have prebuilt binaries for this platform yet.") + } + } } -static_library("deno_deps") { +v8_static_library("deno_deps") { complete_static_lib = true public_deps = [ ":libdeno", ":msg_rs", ":snapshot", ] - configs += [ ":deno_config" ] + configs = [ ":deno_config" ] } -executable("snapshot_creator") { +v8_executable("snapshot_creator") { sources = [ "libdeno/snapshot_creator.cc", ] deps = [ ":libdeno", ] - configs += [ ":deno_config" ] + configs = [ ":deno_config" ] } # Generates the core TypeScript type library for deno that will be -- cgit v1.2.3