From 20c3f148db2039c23f59699186a9c568a3240639 Mon Sep 17 00:00:00 2001 From: Robert Helmer Date: Thu, 7 Jun 2018 19:14:53 -0700 Subject: [PATCH] Bug 1421501 - build system integration for libprio r=gps MozReview-Commit-ID: FYHgLmEhr03 --HG-- extra : rebase_source : def9cb0e882c42035758e589c23cfe405ea3404a --- config/external/moz.build | 1 + config/external/prio/moz.build | 8 +++++ third_party/moz.build | 3 ++ third_party/prio/moz.build | 55 ++++++++++++++++++++++++++++++++++ 4 files changed, 67 insertions(+) create mode 100644 config/external/prio/moz.build create mode 100644 third_party/prio/moz.build diff --git a/config/external/moz.build b/config/external/moz.build index 55929fd5e2b1..21667e0543f8 100644 --- a/config/external/moz.build +++ b/config/external/moz.build @@ -8,6 +8,7 @@ external_dirs = [] DIRS += [ 'lgpllibs', + 'prio', 'sqlite', ] if not CONFIG['MOZ_SYSTEM_JPEG']: diff --git a/config/external/prio/moz.build b/config/external/prio/moz.build new file mode 100644 index 000000000000..b8a167496189 --- /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'] + diff --git a/third_party/moz.build b/third_party/moz.build index bd65e7c1abab..837b425eafc9 100644 --- a/third_party/moz.build +++ b/third_party/moz.build @@ -9,3 +9,6 @@ with Files('rust/**'): with Files('webkit/**'): BUG_COMPONENT = ('Firefox Build System', 'General') + +with Files('prio/**'): + BUG_COMPONENT = ('Firefox Build System', 'General') diff --git a/third_party/prio/moz.build b/third_party/prio/moz.build new file mode 100644 index 000000000000..3fdb66ff48f3 --- /dev/null +++ b/third_party/prio/moz.build @@ -0,0 +1,55 @@ +# 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_comba.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'