moz.build 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
  2. # This Source Code Form is subject to the terms of the Mozilla Public
  3. # License, v. 2.0. If a copy of the MPL was not distributed with this
  4. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  5. XPIDL_SOURCES += [
  6. 'nsIUrlClassifierDBService.idl',
  7. 'nsIUrlClassifierHashCompleter.idl',
  8. 'nsIUrlClassifierPrefixSet.idl',
  9. 'nsIUrlClassifierStreamUpdater.idl',
  10. 'nsIUrlClassifierUtils.idl',
  11. 'nsIUrlListManager.idl',
  12. ]
  13. XPIDL_MODULE = 'url-classifier'
  14. # Disable RTTI in google protocol buffer
  15. DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
  16. UNIFIED_SOURCES += [
  17. 'ChunkSet.cpp',
  18. 'Classifier.cpp',
  19. 'LookupCache.cpp',
  20. 'LookupCacheV4.cpp',
  21. 'nsCheckSummedOutputStream.cpp',
  22. 'nsUrlClassifierDBService.cpp',
  23. 'nsUrlClassifierProxies.cpp',
  24. 'nsUrlClassifierUtils.cpp',
  25. 'protobuf/safebrowsing.pb.cc',
  26. 'ProtocolParser.cpp',
  27. 'RiceDeltaDecoder.cpp',
  28. ]
  29. # define conflicting LOG() macros
  30. SOURCES += [
  31. 'nsUrlClassifierPrefixSet.cpp',
  32. 'nsUrlClassifierStreamUpdater.cpp',
  33. 'VariableLengthPrefixSet.cpp',
  34. ]
  35. # contains variables that conflict with LookupCache.cpp
  36. SOURCES += [
  37. 'HashStore.cpp',
  38. ]
  39. EXTRA_COMPONENTS += [
  40. 'nsURLClassifier.manifest',
  41. 'nsUrlClassifierHashCompleter.js',
  42. ]
  43. # Same as JS components that are run through the pre-processor.
  44. EXTRA_PP_COMPONENTS += [
  45. 'nsUrlClassifierLib.js',
  46. 'nsUrlClassifierListManager.js',
  47. ]
  48. EXTRA_JS_MODULES += [
  49. 'SafeBrowsing.jsm',
  50. ]
  51. EXPORTS += [
  52. 'Entries.h',
  53. 'LookupCache.h',
  54. 'LookupCacheV4.h',
  55. 'nsUrlClassifierPrefixSet.h',
  56. 'protobuf/safebrowsing.pb.h',
  57. 'VariableLengthPrefixSet.h',
  58. ]
  59. FINAL_LIBRARY = 'xul'
  60. LOCAL_INCLUDES += [
  61. '../build',
  62. '/ipc/chromium/src',
  63. ]
  64. CXXFLAGS += CONFIG['SQLITE_CFLAGS']
  65. if CONFIG['GNU_CXX']:
  66. CXXFLAGS += ['-Wno-error=shadow']
  67. if CONFIG['NIGHTLY_BUILD'] or CONFIG['MOZ_DEBUG']:
  68. DEFINES['MOZ_SAFEBROWSING_DUMP_FAILED_UPDATES'] = True