Index: BUILD.gn |
diff --git a/BUILD.gn b/BUILD.gn |
index 0ee906c8c342241a9ac65d0a2de78d022be3a388..7f3b1ed5cce415f8bfedf864ae6706a0aab6a6d0 100644 |
--- a/BUILD.gn |
+++ b/BUILD.gn |
@@ -128,6 +128,9 @@ config("internal_config_base") { |
# This config should be applied to code using the libplatform. |
config("libplatform_config") { |
include_dirs = [ "include" ] |
+ if (is_component_build) { |
+ defines = [ "USING_V8_PLATFORM_SHARED" ] |
+ } |
} |
# This config should be applied to code using the libbase. |
@@ -2295,9 +2298,10 @@ v8_component("v8_libbase") { |
# TODO(jochen): Add support for qnx, freebsd, openbsd, netbsd, and solaris. |
} |
-v8_source_set("v8_libplatform") { |
+v8_component("v8_libplatform") { |
sources = [ |
"//base/trace_event/common/trace_event_common.h", |
+ "include/libplatform/libplatform-export.h", |
"include/libplatform/libplatform.h", |
"include/libplatform/v8-tracing.h", |
"src/libplatform/default-platform.cc", |
@@ -2317,6 +2321,10 @@ v8_source_set("v8_libplatform") { |
configs = [ ":internal_config_base" ] |
+ if (is_component_build) { |
+ defines = [ "BUILDING_V8_PLATFORM_SHARED" ] |
+ } |
+ |
public_configs = [ ":libplatform_config" ] |
deps = [ |
@@ -2354,6 +2362,7 @@ v8_source_set("fuzzer_support") { |
] |
public_deps = [ |
+ ":v8_libbase", |
":v8_libplatform", |
] |
} |