bug 1485946 - skip building libprio on MSVC r=froydnj
authorRobert Helmer <rhelmer@mozilla.com>
Mon, 27 Aug 2018 20:07:51 +0000
changeset 481958 0400aff8c51861ba348964dce82dfa5742a901b5
parent 481957 915c5fb7087f541fa93aa187cbd213004c9d3bef
child 481959 88fa28d336fa5ec92bc272682fb4ee9fe85c7487
push id232
push userfmarier@mozilla.com
push dateWed, 05 Sep 2018 20:45:54 +0000
reviewersfroydnj
bugs1485946
milestone63.0a1
bug 1485946 - skip building libprio on MSVC r=froydnj libprio does not currently build with MSVC (since it only supports C90 as a compiler), this is being worked on upstream at https://github.com/mozilla/libprio/issues/17 As we are almost certainly not going to ship Firefox build with MSVC anymore, let's disable this to get it working on this Tier-2 platform. Differential Revision: https://phabricator.services.mozilla.com/D4292
config/external/moz.build
config/external/msgpack/moz.build
config/external/prio/moz.build
dom/bindings/moz.build
dom/chrome-webidl/moz.build
dom/moz.build
toolkit/moz.configure
--- a/config/external/moz.build
+++ b/config/external/moz.build
@@ -3,22 +3,26 @@
 # 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']
 
+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']
 
 external_dirs += ['modules/xz-embedded']
 
 if CONFIG['MOZ_VORBIS']:
     external_dirs += ['media/libvorbis']
--- a/config/external/msgpack/moz.build
+++ b/config/external/msgpack/moz.build
@@ -1,8 +1,9 @@
 # -*- 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/msgpack']
+if CONFIG['MOZ_LIBPRIO']:
+    DIRS += ['/third_party/msgpack']
 
--- a/config/external/prio/moz.build
+++ b/config/external/prio/moz.build
@@ -1,8 +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']
+DIRS += ['/third_party/prio']
 
--- a/dom/bindings/moz.build
+++ b/dom/bindings/moz.build
@@ -90,19 +90,21 @@ LOCAL_INCLUDES += [
     '/layout/generic',
     '/layout/style',
     '/layout/xul/tree',
     '/media/mtransport',
     '/media/webrtc/',
     '/media/webrtc/signaling/src/common/time_profiling',
     '/media/webrtc/signaling/src/peerconnection',
     '/media/webrtc/trunk/',
-    '/third_party/msgpack/include',
 ]
 
+if CONFIG['MOZ_LIBPRIO']:
+    LOCAL_INCLUDES += ['/third_party/msgpack/include']
+
 DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
 DEFINES['GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER'] = True
 
 UNIFIED_SOURCES += [
     'BindingUtils.cpp',
     'CallbackInterface.cpp',
     'CallbackObject.cpp',
     'Date.cpp',
--- a/dom/chrome-webidl/moz.build
+++ b/dom/chrome-webidl/moz.build
@@ -39,22 +39,27 @@ WEBIDL_FILES = [
     'MatchPattern.webidl',
     'MessageManager.webidl',
     'MozDocumentObserver.webidl',
     'MozSharedMap.webidl',
     'MozStorageAsyncStatementParams.webidl',
     'MozStorageStatementParams.webidl',
     'MozStorageStatementRow.webidl',
     'PrecompiledScript.webidl',
-    'PrioEncoder.webidl',
     'PromiseDebugging.webidl',
     'StructuredCloneHolder.webidl',
     'WebExtensionContentScript.webidl',
     'WebExtensionPolicy.webidl',
     'XULFrameElement.webidl',
     'XULScrollElement.webidl'
 ]
 
 if CONFIG['MOZ_PLACES']:
     WEBIDL_FILES += [
         'PlacesEvent.webidl',
         'PlacesObservers.webidl',
     ]
+
+if CONFIG['MOZ_LIBPRIO']:
+    WEBIDL_FILES += [
+        'PrioEncoder.webidl',
+    ]
+
--- a/dom/moz.build
+++ b/dom/moz.build
@@ -58,17 +58,16 @@ DIRS += [
     'jsurl',
     'asmjscache',
     'mathml',
     'media',
     'midi',
     'notification',
     'offline',
     'power',
-    'prio',
     'push',
     'quota',
     'security',
     'storage',
     'svg',
     'locales',
     'network',
     'permission',
@@ -100,16 +99,19 @@ DIRS += [
     'worklet',
     'script',
     'payments',
     'websocket',
     'serviceworkers',
     'simpledb',
 ]
 
+if CONFIG['MOZ_LIBPRIO']:
+    DIRS += ['prio']
+
 if CONFIG['OS_ARCH'] == 'WINNT':
     DIRS += ['plugins/ipc/hangui']
 
 DIRS += ['presentation']
 
 TEST_DIRS += [
     'tests',
     'imptests',
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -1059,8 +1059,21 @@ def launcher(value, target):
     enabled = bool(value)
     if enabled and target.os != 'WINNT':
         die('Cannot enable launcher process on %s', target.os)
     if enabled:
         return True
 
 set_config('MOZ_LAUNCHER_PROCESS', launcher)
 set_define('MOZ_LAUNCHER_PROCESS', launcher)
+
+# Prio
+# ==============================================================
+@depends(c_compiler)
+def libprio(info):
+    if info:
+      if info.type in ('msvc'):
+        return None
+    else:
+      return True
+
+set_config('MOZ_LIBPRIO', libprio)
+