BUILD.gn 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Copyright 2019 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("//ash/components/tpm/buildflags.gni")
  5. import("//build/buildflag_header.gni")
  6. import("//build/config/chromeos/ui_mode.gni")
  7. import("//testing/test.gni")
  8. assert(is_chromeos_ash)
  9. buildflag_header("buildflags") {
  10. header = "buildflags.h"
  11. flags = [ "NSS_SLOTS_SOFTWARE_FALLBACK=$nss_slots_software_fallback" ]
  12. }
  13. component("tpm") {
  14. defines = [ "IS_ASH_COMPONENTS_TPM_IMPL" ]
  15. deps = [
  16. ":buildflags",
  17. "//base",
  18. "//chromeos/ash/components/cryptohome",
  19. "//chromeos/ash/components/dbus/cryptohome",
  20. "//chromeos/ash/components/dbus/cryptohome:cryptohome_proto",
  21. "//chromeos/ash/components/dbus/userdataauth",
  22. "//chromeos/ash/components/dbus/userdataauth:userdataauth_proto",
  23. "//chromeos/dbus/constants",
  24. "//chromeos/dbus/tpm_manager",
  25. "//chromeos/dbus/tpm_manager:tpm_manager_proto",
  26. "//chromeos/login/login_state",
  27. "//components/account_id",
  28. "//crypto",
  29. ]
  30. sources = [
  31. "prepare_tpm.cc",
  32. "prepare_tpm.h",
  33. "tpm_token_info_getter.cc",
  34. "tpm_token_info_getter.h",
  35. "tpm_token_loader.cc",
  36. "tpm_token_loader.h",
  37. ]
  38. }
  39. source_set("unit_tests") {
  40. testonly = true
  41. deps = [
  42. ":tpm",
  43. "//base/test:test_support",
  44. "//chromeos/ash/components/cryptohome",
  45. "//chromeos/ash/components/dbus:test_support",
  46. "//chromeos/ash/components/dbus/cryptohome",
  47. "//chromeos/ash/components/dbus/cryptohome:cryptohome_proto",
  48. "//chromeos/ash/components/dbus/userdataauth",
  49. "//chromeos/ash/components/dbus/userdataauth:userdataauth_proto",
  50. "//chromeos/dbus/constants",
  51. "//chromeos/dbus/tpm_manager",
  52. "//chromeos/dbus/tpm_manager:tpm_manager_proto",
  53. "//testing/gtest",
  54. ]
  55. sources = [
  56. "prepare_tpm_unittest.cc",
  57. "tpm_token_info_getter_unittest.cc",
  58. ]
  59. }