| # Copyright 2022 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("//build/config/chrome_build.gni") |
| import("//components/nacl/features.gni") |
| |
| if (is_linux) { |
| import("//build/linux/strip_binary.gni") |
| } |
| |
| buildflag_header("buildflags") { |
| header = "buildflags.h" |
| |
| if (is_chrome_for_testing) { |
| flags = [ "CHROME_FOR_TESTING=1" ] |
| } else { |
| flags = [ "CHROME_FOR_TESTING=0" ] |
| } |
| |
| # Note: |
| # - `GOOGLE_CHROME_FOR_TESTING_BRANDING` and `GOOGLE_CHROME_BRANDING` are |
| # mutually exclusive. |
| # - `GOOGLE_CHROME_FOR_TESTING_BRANDING` and `CHROMIUM_BRANDING` are not. |
| if (is_chrome_for_testing_branded) { |
| flags += [ "GOOGLE_CHROME_FOR_TESTING_BRANDING=1" ] |
| } else { |
| flags += [ "GOOGLE_CHROME_FOR_TESTING_BRANDING=0" ] |
| } |
| } |
| |
| if (is_linux && is_chrome_for_testing) { |
| group("strip_linux_files") { |
| deps = [ |
| ":strip_chrome_binary", |
| ":strip_chrome_crashpad_handler", |
| ":strip_chrome_sandbox", |
| ":strip_libEGL_shlib", |
| ":strip_libGLESv2_shlib", |
| ":strip_libvk_swiftshader_shlib", |
| ":strip_libvulkan_shlib", |
| ] |
| if (enable_nacl) { |
| deps += [ |
| ":strip_nacl_helper", |
| ":strip_nacl_helper_bootstrap", |
| ] |
| } |
| } |
| |
| strip_binary("strip_chrome_binary") { |
| binary_input = "$root_out_dir/chrome" |
| deps = [ "//chrome" ] |
| } |
| |
| strip_binary("strip_chrome_crashpad_handler") { |
| binary_input = "$root_out_dir/chrome_crashpad_handler" |
| deps = [ "//components/crash/core/app:chrome_crashpad_handler" ] |
| } |
| |
| strip_binary("strip_chrome_sandbox") { |
| binary_input = "$root_out_dir/chrome_sandbox" |
| deps = [ "//sandbox/linux:chrome_sandbox" ] |
| } |
| |
| strip_binary("strip_libEGL_shlib") { |
| binary_input = "$root_out_dir/libEGL.so" |
| deps = [ "//third_party/angle:libEGL" ] |
| } |
| |
| strip_binary("strip_libGLESv2_shlib") { |
| binary_input = "$root_out_dir/libGLESv2.so" |
| deps = [ "//third_party/angle:libGLESv2" ] |
| } |
| |
| strip_binary("strip_libvulkan_shlib") { |
| binary_input = "$root_out_dir/libvulkan.so.1" |
| deps = [ "//third_party/vulkan-deps/vulkan-loader/src:libvulkan" ] |
| } |
| |
| strip_binary("strip_libvk_swiftshader_shlib") { |
| binary_input = "$root_out_dir/libvk_swiftshader.so" |
| deps = [ "//third_party/swiftshader/src/Vulkan:swiftshader_libvulkan" ] |
| } |
| |
| if (enable_nacl) { |
| strip_binary("strip_nacl_helper") { |
| binary_input = "$root_out_dir/nacl_helper" |
| deps = [ "//components/nacl/loader:nacl_helper" ] |
| } |
| |
| strip_binary("strip_nacl_helper_bootstrap") { |
| binary_input = "$root_out_dir/nacl_helper_bootstrap" |
| deps = [ "//native_client/src/trusted/service_runtime/linux:bootstrap" ] |
| } |
| } |
| } |