Skip to content

Instantly share code, notes, and snippets.

@rhelmer
Created August 24, 2018 20:32
Show Gist options
  • Select an option

  • Save rhelmer/e8938805add284cd9d3288b9e52aa2c5 to your computer and use it in GitHub Desktop.

Select an option

Save rhelmer/e8938805add284cd9d3288b9e52aa2c5 to your computer and use it in GitHub Desktop.
diff --git a/config/external/moz.build b/config/external/moz.build
--- a/config/external/moz.build
+++ b/config/external/moz.build
@@ -8,12 +8,16 @@ external_dirs = []
DIRS += [
'lgpllibs',
- 'prio',
'sqlite',
]
if not CONFIG['MOZ_SYSTEM_JPEG']:
external_dirs += ['media/libjpeg']
+if CONFIG['MOZ_LIBPRIO']:
+ DIRS += [
+ 'prio',
+ ]
+
# There's no "native" brotli or woff2 yet, but probably in the future...
external_dirs += ['modules/brotli']
external_dirs += ['modules/woff2']
diff --git a/config/external/prio/moz.build b/config/external/prio/moz.build
--- a/config/external/prio/moz.build
+++ b/config/external/prio/moz.build
@@ -4,5 +4,5 @@
# 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']
+DIRS += ['/third_party/prio']
diff --git a/dom/chrome-webidl/moz.build b/dom/chrome-webidl/moz.build
--- a/dom/chrome-webidl/moz.build
+++ b/dom/chrome-webidl/moz.build
@@ -44,7 +44,6 @@ WEBIDL_FILES = [
'MozStorageStatementParams.webidl',
'MozStorageStatementRow.webidl',
'PrecompiledScript.webidl',
- 'PrioEncoder.webidl',
'PromiseDebugging.webidl',
'StructuredCloneHolder.webidl',
'WebExtensionContentScript.webidl',
@@ -58,3 +57,9 @@ if CONFIG['MOZ_PLACES']:
'PlacesEvent.webidl',
'PlacesObservers.webidl',
]
+
+if CONFIG['MOZ_LIBPRIO']:
+ WEBIDL_FILES += [
+ 'PrioEncoder.webidl',
+ ]
+
diff --git a/dom/moz.build b/dom/moz.build
--- a/dom/moz.build
+++ b/dom/moz.build
@@ -63,7 +63,6 @@ DIRS += [
'notification',
'offline',
'power',
- 'prio',
'push',
'quota',
'security',
@@ -105,6 +104,9 @@ DIRS += [
'simpledb',
]
+if CONFIG['MOZ_LIBPRIO']:
+ DIRS += 'prio'
+
if CONFIG['OS_ARCH'] == 'WINNT':
DIRS += ['plugins/ipc/hangui']
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -1064,3 +1064,14 @@ def launcher(value, target):
set_config('MOZ_LAUNCHER_PROCESS', launcher)
set_define('MOZ_LAUNCHER_PROCESS', launcher)
+
+# Prio
+# ==============================================================
+@depends(c_compiler)
+def libprio(info):
+ if info.type in ('msvc'):
+ return False
+ return True
+
+set_define('MOZ_LIBPRIO', libprio)
+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment