features.gni 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. # Copyright 2017 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//build/config/chromecast_build.gni")
  5. import("//build/config/chromeos/ui_mode.gni")
  6. import("//build/config/chromeos/ui_mode.gni")
  7. import("//chrome/version.gni")
  8. declare_args() {
  9. # Should ANGLE be linked statically?
  10. use_static_angle = is_android
  11. # Should EGL support be compiled?
  12. # Can be overriden to test during bring up of EGL support on other platforms.
  13. use_egl =
  14. is_win || is_android || is_linux || is_chromeos || is_fuchsia || is_mac
  15. # Should Dawn support be compiled to back the WebGPU implementation?
  16. # Also controls linking Dawn dependencies in such as SPIRV-Tools/SPIRV-Cross.
  17. use_dawn = is_mac || is_win || is_chromeos_ash || (is_linux && !is_castos) ||
  18. is_chromeos_lacros
  19. # Should Dawn test binaries (unittests, end2end_tests, perf_tests) be built?
  20. # Independent of use_dawn, which controls whether Dawn is used in Chromium.
  21. build_dawn_tests = is_mac || is_win || is_linux || is_chromeos
  22. }
  23. declare_args() {
  24. enable_swiftshader = (is_win || is_linux || is_chromeos ||
  25. (is_mac && use_egl) || is_chromeos_ash || is_fuchsia) &&
  26. (target_cpu == "x86" || target_cpu == "x64" ||
  27. target_cpu == "arm" || target_cpu == "arm64" ||
  28. target_cpu == "mipsel" || target_cpu == "mips64el")
  29. }