Support building Perfetto as part of Chrome
Change-Id: I4ea39895852e8fa02df7e0ad45f6b4b103ec3195
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
new file mode 100644
index 0000000..d6b4315
--- /dev/null
+++ b/gn/BUILD.gn
@@ -0,0 +1,68 @@
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import("perfetto.gni")
+
+group("gtest_deps") {
+ testonly = true
+
+ if (!build_with_chromium) {
+ public_deps = [
+ "//buildtools:gmock",
+ "//buildtools:gtest",
+ "//buildtools:gtest_main",
+ ]
+ } else {
+ public_deps = [
+ "//testing/gmock",
+ "//testing/gtest",
+ "//testing/gtest:gtest_main",
+ ]
+ }
+}
+
+group("protoc_lib_deps") {
+ if (!build_with_chromium) {
+ if (current_toolchain == host_toolchain) {
+ public_deps = [
+ "//buildtools:protoc_lib",
+ ]
+ }
+ } else {
+ public_deps = [
+ "//third_party/protobuf:protoc_lib",
+ ]
+ }
+}
+
+group("protobuf_full_deps") {
+ if (!build_with_chromium) {
+ public_deps = [
+ "//buildtools:protobuf_full",
+ ]
+ } else {
+ public_deps = [
+ "//third_party/protobuf:protobuf_full",
+ ]
+ }
+}
+
+group("default_deps") {
+ if (!build_with_chromium) {
+ public_deps = [
+ "//build/libc++:deps",
+ "//build/sanitizers:deps",
+ ]
+ }
+}