From 97dd57df5affed43a82441b987c4504b72ac64c5 Mon Sep 17 00:00:00 2001 From: agrieve Date: Tue, 5 Jan 2016 11:26:27 -0800 Subject: GN: Don't compile battor_agent, imagediff, bitmaptools on Android Came across this because battor_agent doesn't link without --gc-sections. I don't think there's a use for running these tools on-device. BUG=159847 Review URL: https://codereview.chromium.org/1545963003 Cr-Commit-Position: refs/heads/master@{#367609} --- BUILD.gn | 5 ++++- device/serial/BUILD.gn | 3 +++ tools/battor_agent/BUILD.gn | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index bd0395e..9b2bc8d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -196,7 +196,6 @@ group("both_gn_and_gyp") { "//third_party/mojo/src/mojo/edk/test:mojo_public_system_unittests", "//third_party/mojo/src/mojo/edk/test:mojo_public_utility_unittests", "//third_party/smhasher:pmurhash", - "//tools/battor_agent", "//tools/imagediff($host_toolchain)", "//tools/telemetry:bitmaptools($host_toolchain)", "//ui/display:display_unittests", @@ -224,6 +223,10 @@ group("both_gn_and_gyp") { } } + if (is_mac || is_win || is_linux) { + deps += [ "//tools/battor_agent" ] + } + deps += root_extra_deps if (enable_extensions) { diff --git a/device/serial/BUILD.gn b/device/serial/BUILD.gn index 474317e..ae6e00a 100644 --- a/device/serial/BUILD.gn +++ b/device/serial/BUILD.gn @@ -5,6 +5,9 @@ import("//build/config/features.gni") import("//mojo/public/tools/bindings/mojom.gni") +# Library works only on desktop platforms. +assert(is_win || is_linux || is_mac) + # GYP version: device/serial/serial.gyp:device_serial static_library("serial") { output_name = "device_serial" diff --git a/tools/battor_agent/BUILD.gn b/tools/battor_agent/BUILD.gn index 03c5594..07d3af5 100644 --- a/tools/battor_agent/BUILD.gn +++ b/tools/battor_agent/BUILD.gn @@ -4,6 +4,9 @@ import("//testing/test.gni") +# Works only on desktop platforms. +assert(is_win || is_linux || is_mac) + executable("battor_agent") { sources = [ "battor_agent_bin.cc", -- cgit v1.1