Index: BUILD.gn |
diff --git a/BUILD.gn b/BUILD.gn |
index e736f99430356e0696442d7ae2c7e69cc396df93..0ee906c8c342241a9ac65d0a2de78d022be3a388 100644 |
--- a/BUILD.gn |
+++ b/BUILD.gn |
@@ -130,6 +130,17 @@ |
include_dirs = [ "include" ] |
} |
+# This config should be applied to code using the libbase. |
+config("libbase_config") { |
+ if (is_component_build) { |
+ defines = [ "USING_V8_BASE_SHARED" ] |
+ } |
+ libs = [] |
+ if (is_android && current_toolchain != host_toolchain) { |
+ libs += [ "log" ] |
+ } |
+} |
+ |
# This config should be applied to code using the libsampler. |
config("libsampler_config") { |
include_dirs = [ "include" ] |
@@ -144,10 +155,6 @@ |
include_dirs = [ "include" ] |
if (v8_enable_inspector_override) { |
include_dirs += [ "$target_gen_dir/include" ] |
- } |
- libs = [] |
- if (is_android && current_toolchain != host_toolchain) { |
- libs += [ "log" ] |
} |
} |
@@ -2150,9 +2157,7 @@ |
} |
} |
-v8_source_set("v8_libbase") { |
- visibility = [ ":*" ] # Only targets in this file can depend on this. |
- |
+v8_component("v8_libbase") { |
sources = [ |
"src/base/adapters.h", |
"src/base/atomic-utils.h", |
@@ -2168,6 +2173,7 @@ |
"src/base/atomicops_internals_x86_gcc.cc", |
"src/base/atomicops_internals_x86_gcc.h", |
"src/base/atomicops_internals_x86_msvc.h", |
+ "src/base/base-export.h", |
"src/base/bits.cc", |
"src/base/bits.h", |
"src/base/build_config.h", |
@@ -2218,7 +2224,13 @@ |
configs = [ ":internal_config_base" ] |
+ public_configs = [ ":libbase_config" ] |
+ |
defines = [] |
+ |
+ if (is_component_build) { |
+ defines = [ "BUILDING_V8_BASE_SHARED" ] |
+ } |
if (is_posix) { |
sources += [ "src/base/platform/platform-posix.cc" ] |
@@ -2363,6 +2375,7 @@ |
] |
public_deps = [ |
+ ":v8_libbase", |
":v8_libplatform", |
] |
} |
@@ -2391,6 +2404,7 @@ |
deps = [ |
":v8_base", |
+ ":v8_libbase", |
":v8_libplatform", |
":v8_nosnapshot", |
"//build/config/sanitizers:deps", |
@@ -2513,6 +2527,7 @@ |
deps = [ |
":d8_js2c", |
":v8", |
+ ":v8_libbase", |
":v8_libplatform", |
"//build/config/sanitizers:deps", |
"//build/win:default_exe_manifest", |
@@ -2553,6 +2568,7 @@ |
deps = [ |
":v8", |
+ ":v8_libbase", |
":v8_libplatform", |
"//build/config/sanitizers:deps", |
"//build/win:default_exe_manifest", |
@@ -2577,6 +2593,7 @@ |
deps = [ |
":v8", |
+ ":v8_libbase", |
":v8_libplatform", |
"//build/config/sanitizers:deps", |
"//build/win:default_exe_manifest", |
@@ -2599,6 +2616,7 @@ |
] |
deps = [ |
+ ":v8_libbase", |
":v8_libplatform", |
"//build/config/sanitizers:deps", |
"//build/win:default_exe_manifest", |
@@ -2642,6 +2660,7 @@ |
deps = [ |
":v8", |
+ ":v8_libbase", |
":v8_libplatform", |
"//build/config/sanitizers:deps", |
"//build/win:default_exe_manifest", |