Index: tools/imagediff/BUILD.gn |
diff --git a/tools/imagediff/BUILD.gn b/tools/imagediff/BUILD.gn |
index 7688cfea54b562ed91b549bcaac092972869fba2..70faa4b3fa9bca384c5d798ec2cc39d2ab921c73 100644 |
--- a/tools/imagediff/BUILD.gn |
+++ b/tools/imagediff/BUILD.gn |
@@ -2,20 +2,30 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
-executable("imagediff") { |
- output_name = "image_diff" # Different than dir nam for historical reasons. |
- sources = [ |
- "image_diff.cc", |
- "image_diff_png.cc", |
- "image_diff_png.h", |
- ] |
+import("//build/symlink.gni") |
- configs += [ "//build/config/compiler:wexit_time_destructors" ] |
+if (current_toolchain == host_toolchain) { |
+ executable("imagediff") { |
+ output_name = "image_diff" # Different than dir nam for historical reasons. |
+ sources = [ |
+ "image_diff.cc", |
+ "image_diff_png.cc", |
+ "image_diff_png.h", |
+ ] |
- deps = [ |
- "//base", |
- "//build/config/sanitizers:deps", |
- "//third_party/libpng", |
- "//third_party/zlib", |
- ] |
+ configs += [ "//build/config/compiler:wexit_time_destructors" ] |
+ |
+ deps = [ |
+ "//base", |
+ "//build/config/sanitizers:deps", |
+ "//third_party/libpng", |
+ "//third_party/zlib", |
+ ] |
+ } |
+} else { |
+ # Aliases for compatibility with GYP. |
+ binary_symlink("imagediff") { |
+ binary_label = ":$target_name($host_toolchain)" |
+ binary_output_name = "image_diff" |
+ } |
} |