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

Unified Diff: BUILD.gn

Issue 2381273002: Turn libbase into a component (Closed)
Patch Set: updates 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 46c412626bb14e0f9239fc6f1cd7fa29ae9a926a..134f6a4450d9641aa5a744ba24f6fd255b5f1b88 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
@@ -2149,9 +2156,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",
@@ -2167,6 +2172,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",
@@ -2217,8 +2223,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" ]
}
@@ -2362,6 +2374,7 @@ v8_source_set("fuzzer_support_nocomponent") {
]
public_deps = [
+ ":v8_libbase",
":v8_libplatform",
]
}
@@ -2390,6 +2403,7 @@ if (current_toolchain == v8_snapshot_toolchain) {
deps = [
":v8_base",
+ ":v8_libbase",
":v8_libplatform",
":v8_nosnapshot",
"//build/config/sanitizers:deps",
@@ -2512,6 +2526,7 @@ v8_executable("d8") {
deps = [
":d8_js2c",
":v8",
+ ":v8_libbase",
":v8_libplatform",
"//build/config/sanitizers:deps",
"//build/win:default_exe_manifest",
@@ -2552,6 +2567,7 @@ v8_executable("v8_hello_world") {
deps = [
":v8",
+ ":v8_libbase",
":v8_libplatform",
"//build/config/sanitizers:deps",
"//build/win:default_exe_manifest",
@@ -2576,6 +2592,7 @@ v8_executable("v8_sample_process") {
deps = [
":v8",
+ ":v8_libbase",
":v8_libplatform",
"//build/config/sanitizers:deps",
"//build/win:default_exe_manifest",
@@ -2598,6 +2615,7 @@ v8_executable("v8_parser_shell") {
]
deps = [
+ ":v8_libbase",
":v8_libplatform",
"//build/config/sanitizers:deps",
"//build/win:default_exe_manifest",
@@ -2641,6 +2659,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