Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: BUILD.gn

Issue 2395553002: Reland "Turn libbase into a component" (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | samples/samples.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 @@ config("libplatform_config") {
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" ]
@@ -145,10 +156,6 @@ config("external_config") {
if (v8_enable_inspector_override) {
include_dirs += [ "$target_gen_dir/include" ]
}
- libs = []
- if (is_android && current_toolchain != host_toolchain) {
- libs += [ "log" ]
- }
}
# This config should only be applied to code that needs to be explicitly
@@ -2150,9 +2157,7 @@ v8_source_set("v8_base") {
}
}
-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 @@ v8_source_set("v8_libbase") {
"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,8 +2224,14 @@ v8_source_set("v8_libbase") {
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 @@ v8_source_set("fuzzer_support_nocomponent") {
]
public_deps = [
+ ":v8_libbase",
":v8_libplatform",
]
}
@@ -2391,6 +2404,7 @@ if (current_toolchain == v8_snapshot_toolchain) {
deps = [
":v8_base",
+ ":v8_libbase",
":v8_libplatform",
":v8_nosnapshot",
"//build/config/sanitizers:deps",
@@ -2513,6 +2527,7 @@ v8_executable("d8") {
deps = [
":d8_js2c",
":v8",
+ ":v8_libbase",
":v8_libplatform",
"//build/config/sanitizers:deps",
"//build/win:default_exe_manifest",
@@ -2553,6 +2568,7 @@ v8_executable("v8_hello_world") {
deps = [
":v8",
+ ":v8_libbase",
":v8_libplatform",
"//build/config/sanitizers:deps",
"//build/win:default_exe_manifest",
@@ -2577,6 +2593,7 @@ v8_executable("v8_sample_process") {
deps = [
":v8",
+ ":v8_libbase",
":v8_libplatform",
"//build/config/sanitizers:deps",
"//build/win:default_exe_manifest",
@@ -2599,6 +2616,7 @@ v8_executable("v8_parser_shell") {
]
deps = [
+ ":v8_libbase",
":v8_libplatform",
"//build/config/sanitizers:deps",
"//build/win:default_exe_manifest",
@@ -2642,6 +2660,7 @@ if (want_v8_shell) {
deps = [
":v8",
+ ":v8_libbase",
":v8_libplatform",
"//build/config/sanitizers:deps",
"//build/win:default_exe_manifest",
« no previous file with comments | « no previous file | samples/samples.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698