# Copyright 2016 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//build/buildflag_header.gni") import("//extensions/buildflags/buildflags.gni") # TODO(crbug.com/41324418): Assert that extensions are enabled. # This file is in a separate directory so all targets in the build can refer to # the buildflag header to get the necessary preprocessor defines without # bringing in all of extensions. Other targets can depend on this target # regardless of whether extensions are enabled. buildflag_header("buildflags") { header = "buildflags.h" flags = [ "ENABLE_EXTENSIONS=$enable_extensions", "ENABLE_DESKTOP_ANDROID_EXTENSIONS=$enable_desktop_android_extensions", "ENABLE_EXTENSIONS_CORE=$enable_extensions_core", "ENABLE_PLATFORM_APPS=$enable_platform_apps", "ENABLE_HOSTED_APPS=$enable_hosted_apps", ] } if (is_android) { import("//build/config/android/rules.gni") java_cpp_template("extensions_buildflags_javagen") { sources = [ "java/templates/ExtensionsBuildflags.template" ] defines = [] if (enable_extensions_core) { defines += [ "_ENABLE_EXTENSIONS_CORE" ] } } android_library("buildflags_java") { srcjar_deps = [ ":extensions_buildflags_javagen" ] } }