From 93396855fab2287f2b29cc8f191c6b2fbbd86360 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Thu, 9 Mar 2017 07:17:01 +0900 Subject: [PATCH] Build against system libjsoncpp Gbp-Pq: Topic debian-hacks Gbp-Pq: Name Build-against-system-libjsoncpp.patch --- config/system-headers.mozbuild | 4 ++ .../components/jsoncpp/src/lib_json/moz.build | 46 +------------------ .../crashreporter/minidump-analyzer/moz.build | 2 +- 3 files changed, 6 insertions(+), 46 deletions(-) diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild index 0872969ae15..95a8e6af21e 100644 --- a/config/system-headers.mozbuild +++ b/config/system-headers.mozbuild @@ -1344,3 +1344,7 @@ if CONFIG['MOZ_SYSTEM_ICU']: 'unicode/ustring.h', 'unicode/utypes.h', ] + +system_headers += [ + 'json/json.h', +] diff --git a/toolkit/components/jsoncpp/src/lib_json/moz.build b/toolkit/components/jsoncpp/src/lib_json/moz.build index 6920229e1ea..5e20a3d42fd 100644 --- a/toolkit/components/jsoncpp/src/lib_json/moz.build +++ b/toolkit/components/jsoncpp/src/lib_json/moz.build @@ -4,50 +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', - ] -elif CONFIG['CC_TYPE'] not in ('msvc', 'clang-cl'): - CXXFLAGS += [ - '-fexceptions', - ] - -# Required to build with exceptions enabled -DisableStlWrapping() - Library('jsoncpp') -# Suppress warnings in third-party code. -if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'): - CXXFLAGS += [ - '-wd4005', # macro redefinition - ] -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', - ] - -if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'): - CXXFLAGS += [ - '-Wno-implicit-fallthrough', - ] +OS_LIBS += ['jsoncpp'] diff --git a/toolkit/crashreporter/minidump-analyzer/moz.build b/toolkit/crashreporter/minidump-analyzer/moz.build index 70f3b259a9d..923b48bfb66 100644 --- a/toolkit/crashreporter/minidump-analyzer/moz.build +++ b/toolkit/crashreporter/minidump-analyzer/moz.build @@ -52,7 +52,7 @@ USE_LIBS += [ ] LOCAL_INCLUDES += [ - '/toolkit/components/jsoncpp/include', + '%/usr/include/jsoncpp', ] if CONFIG['OS_TARGET'] != 'WINNT': -- 2.30.2