Build against system libjsoncpp
authorMike Hommey <mh@glandium.org>
Wed, 8 Mar 2017 22:17:01 +0000 (07:17 +0900)
committerMike Hommey <glandium@debian.org>
Tue, 10 Mar 2020 21:59:57 +0000 (21:59 +0000)
Gbp-Pq: Topic debian-hacks
Gbp-Pq: Name Build-against-system-libjsoncpp.patch

config/system-headers.mozbuild
toolkit/components/jsoncpp/src/lib_json/moz.build
toolkit/crashreporter/minidump-analyzer/moz.build

index bcf5c4925564ddea7eaaf630b3c5c962a5ed6bde..5950b4e87ac1d1b6ad0f2e946399a1573a5eb3b9 100644 (file)
@@ -1351,3 +1351,7 @@ if CONFIG['OS_TARGET'] == 'Linux' and CONFIG['CPU_ARCH'].startswith('mips'):
     system_headers += [
         'sys/cachectl.h',
     ]
+
+system_headers += [
+    'json/json.h',
+]
index ca40df60b7129000e8293480b2889861df7d2e06..5e20a3d42fd9f60b4fc80a09b127545e2ac643d5 100644 (file)
@@ -4,52 +4,6 @@
 # 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/.
 
-UNIFIED_SOURCES += [
-    'json_reader.cpp',
-    'json_value.cpp',
-    'json_writer.cpp'
-]
-
-LOCAL_INCLUDES += [
-    '/toolkit/components/jsoncpp/include',
-]
-
-# This code is only used in the stand-alone minidump analyzer executable so
-# enabling exceptions should be fine.
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    CXXFLAGS += [
-        '-Xclang',
-        '-fcxx-exceptions',
-    ]
-else:
-    CXXFLAGS += [
-        '-fexceptions',
-    ]
-
-# Required to build with exceptions enabled
-DisableStlWrapping()
-
 Library('jsoncpp')
 
-# Suppress warnings in third-party code.
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    CXXFLAGS += [
-        '-Wno-macro-redefined',
-    ]
-elif CONFIG['CC_TYPE'] in ('clang', 'gcc'):
-    CXXFLAGS += [
-        '-Wno-unused-local-typedefs',
-        '-Wno-shadow',
-    ]
-
-if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
-    CXXFLAGS += [
-        '-Wno-c++11-narrowing',
-    ]
-
-CXXFLAGS += [
-    '-Wno-implicit-fallthrough',
-]
-
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    AllowCompilerWarnings()  # workaround for bug 1090497
+OS_LIBS += ['jsoncpp']
index 59022733ce0d3953a9f7887cae3a3910dbc6f64c..20b9733957d217d8afbef3a67f18a20151fd1ea3 100644 (file)
@@ -48,7 +48,7 @@ USE_LIBS += [
 ]
 
 LOCAL_INCLUDES += [
-    '/toolkit/components/jsoncpp/include',
+    '%/usr/include/jsoncpp',
 ]
 
 if CONFIG['OS_TARGET'] != 'WINNT':