Index: BUILD.gn |
diff --git a/BUILD.gn b/BUILD.gn |
index 13943c9078e9b1440a536fe98a585ab0153f70aa..82023a4add3362f46abc61738c6608a66fc35ca9 100644 |
--- a/BUILD.gn |
+++ b/BUILD.gn |
@@ -105,6 +105,11 @@ config("libplatform_config") { |
include_dirs = [ "include" ] |
} |
+# This config should be applied to code using the libsampler. |
+config("libsampler_config") { |
+ include_dirs = [ "include" ] |
+} |
+ |
# This config should only be applied to code using V8 and not any V8 code |
# itself. |
config("external_config") { |
@@ -1329,8 +1334,6 @@ v8_source_set("v8_base") { |
"src/profiler/profile-generator-inl.h", |
"src/profiler/profile-generator.cc", |
"src/profiler/profile-generator.h", |
- "src/profiler/sampler.cc", |
- "src/profiler/sampler.h", |
"src/profiler/sampling-heap-profiler.cc", |
"src/profiler/sampling-heap-profiler.h", |
"src/profiler/strings-storage.cc", |
@@ -1816,6 +1819,7 @@ v8_source_set("v8_base") { |
defines = [] |
deps = [ |
":v8_libbase", |
+ ":v8_libsampler", |
] |
if (is_win) { |
@@ -1970,6 +1974,23 @@ v8_source_set("v8_libplatform") { |
] |
} |
+v8_source_set("v8_libsampler") { |
+ sources = [ |
+ "src/libsampler/hashmap.h", |
+ "src/libsampler/utils.h", |
+ "src/libsampler/v8-sampler.cc", |
+ "src/libsampler/v8-sampler.h", |
+ ] |
+ |
+ configs = [ ":internal_config_base" ] |
+ |
+ public_configs = [ ":libsampler_config" ] |
+ |
+ deps = [ |
+ ":v8_libbase", |
+ ] |
+} |
+ |
v8_source_set("fuzzer_support") { |
visibility = [ ":*" ] # Only targets in this file can depend on this. |