Bug 1421501 - build system integration for libprio r=gps
authorRobert Helmer <rhelmer@mozilla.com>
Thu, 07 Jun 2018 19:14:53 -0700
changeset 433171 22e788de6e255ecf9e74bedcb10f04ca5b022716
parent 433170 5599309f2879ce75d53d5723c7ab818771902b73
child 433172 6857282a711cf693aed3813cc5dd997868573452
push id34500
push usertoros@mozilla.com
push dateFri, 24 Aug 2018 09:42:33 +0000
treeherdermozilla-central@043aff7fda61 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1421501
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1421501 - build system integration for libprio r=gps MozReview-Commit-ID: FYHgLmEhr03
config/external/moz.build
config/external/prio/moz.build
third_party/moz.build
third_party/prio/moz.build
--- a/config/external/moz.build
+++ b/config/external/moz.build
@@ -3,16 +3,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 external_dirs = []
 
 DIRS += [
     'lgpllibs',
+    'prio',
     'sqlite',
 ]
 if not CONFIG['MOZ_SYSTEM_JPEG']:
     external_dirs += ['media/libjpeg']
 
 # There's no "native" brotli or woff2 yet, but probably in the future...
 external_dirs += ['modules/brotli']
 external_dirs += ['modules/woff2']
new file mode 100644
--- /dev/null
+++ b/config/external/prio/moz.build
@@ -0,0 +1,8 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+DIRS += ['../../../third_party/prio']
+
--- a/third_party/moz.build
+++ b/third_party/moz.build
@@ -4,8 +4,11 @@ with Files('moz.build'):
 with Files('aom/**'):
     BUG_COMPONENT = ('Core', 'Audio/Video: Playback')
 
 with Files('rust/**'):
     BUG_COMPONENT = ('Firefox Build System', 'General')
 
 with Files('webkit/**'):
     BUG_COMPONENT = ('Firefox Build System', 'General')
+
+with Files('prio/**'):
+    BUG_COMPONENT = ('Firefox Build System', 'General')
new file mode 100644
--- /dev/null
+++ b/third_party/prio/moz.build
@@ -0,0 +1,54 @@
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+DEFINES['PRIO_BUILD_LIBRARY'] = True
+
+LOCAL_INCLUDES += [
+    '/security/nss/lib/freebl/mpi',
+    '/third_party/msgpack/include',
+    'include',
+]
+
+EXPORTS += [
+    'include/mprio.h',
+]
+
+# We allow warnings for third-party code that can be updated from upstream.
+AllowCompilerWarnings()
+
+NoVisibilityFlags()
+
+SOURCES += [
+    '/security/nss/lib/freebl/mpi/montmulf.c',
+    '/security/nss/lib/freebl/mpi/mp_gf2m.c',
+    '/security/nss/lib/freebl/mpi/mpcpucache.c',
+    '/security/nss/lib/freebl/mpi/mpi.c',
+    '/security/nss/lib/freebl/mpi/mplogic.c',
+    '/security/nss/lib/freebl/mpi/mpmontg.c',
+    '/security/nss/lib/freebl/mpi/mpprime.c',
+]
+
+SOURCES += [
+    '/third_party/msgpack/src/objectc.c',
+    '/third_party/msgpack/src/unpack.c',
+    '/third_party/msgpack/src/version.c',
+    '/third_party/msgpack/src/vrefbuffer.c',
+    '/third_party/msgpack/src/zone.c',
+]
+
+SOURCES += [
+    'prio/client.c',
+    'prio/config.c',
+    'prio/encrypt.c',
+    'prio/mparray.c',
+    'prio/poly.c',
+    'prio/prg.c',
+    'prio/rand.c',
+    'prio/serial.c',
+    'prio/server.c',
+    'prio/share.c',
+]
+
+FINAL_LIBRARY = 'xul'