chromium/third_party/ijar/BUILD.gn

# Copyright 2015 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# A tool that removes all non-interface-specific parts from a .jar file.

if (is_linux || is_chromeos) {
  config("ijar_compiler_flags") {
    if (is_clang) {
      cflags = [
        "-Wno-shadow",
        "-Wno-unused-but-set-variable",
      ]
    }
  }

  executable("ijar") {
    sources = [
      "classfile.cc",
      "common.h",
      "ijar.cc",
      "mapped_file.h",
      "mapped_file_unix.cc",
      "platform_utils.cc",
      "platform_utils.h",
      "zip.cc",
      "zip.h",
      "zlib_client.cc",
      "zlib_client.h",
    ]

    deps = [ "//third_party/zlib" ]

    configs += [ ":ijar_compiler_flags" ]

    # Always build release since this is a build tool.
    if (is_debug) {
      configs -= [ "//build/config:debug" ]
      configs += [ "//build/config:release" ]
    }
  }
}