Index: test/unittests/BUILD.gn |
diff --git a/test/unittests/BUILD.gn b/test/unittests/BUILD.gn |
index 2d5726b0b35f61ed384a08f6ae1d619ab8dab028..9c50280ec5692b0523b7627913a688c8ce0236b0 100644 |
--- a/test/unittests/BUILD.gn |
+++ b/test/unittests/BUILD.gn |
@@ -185,7 +185,7 @@ v8_executable("unittests") { |
#}], |
deps = [ |
- "../..:v8", |
+ "../..:v8_builtins_generators", |
"../..:v8_libbase", |
"../..:v8_libplatform", |
"//build/config/sanitizers:deps", |
@@ -198,6 +198,17 @@ v8_executable("unittests") { |
deps += [ "//third_party/icu" ] |
} |
+ defines = [] |
+ |
+ if (is_component_build) { |
+ # unittests can't be built against a shared library, so we |
+ # need to depend on the underlying static target in that case. |
+ deps += [ "../..:v8_maybe_snapshot" ] |
+ defines += [ "BUILDING_V8_SHARED" ] |
+ } else { |
+ deps += [ "../..:v8" ] |
+ } |
+ |
if (is_win) { |
# This warning is benignly triggered by the U16 and U32 macros in |
# bytecode-utils.h. |