Bug 1411187 - Build protobuf with NOGDI on all Windows builds. r?tjr
MozReview-Commit-ID: 3nPgVJYdD3w
--- a/toolkit/components/protobuf/moz.build
+++ b/toolkit/components/protobuf/moz.build
@@ -258,25 +258,27 @@ if CONFIG['GNU_CXX']:
]
if CONFIG['CLANG_CXX']:
CXXFLAGS += [
'-Wno-comma',
'-Wno-null-conversion',
'-Wno-unused-local-typedef',
]
elif CONFIG['_MSC_VER']:
- DEFINES['NOGDI'] = True # wingdi.h defines ERROR as 0 and conflicts with logging.h
CXXFLAGS += [
'-wd4005', # 'WIN32_LEAN_AND_MEAN' : macro redefinition
'-wd4018', # '<' : signed/unsigned mismatch
'-wd4065', # switch statement contains 'default' but no 'case' labels
'-wd4099', # mismatched class/struct tags
'-wd4305', # double to float truncation
'-wd4506', # no definition for inline function (protobuf issue #240)
]
+if CONFIG['OS_TARGET'] == 'WINNT':
+ DEFINES['NOGDI'] = True # wingdi.h defines ERROR as 0 and conflicts with logging.h
+
if CONFIG['MOZ_USE_PTHREADS']:
DEFINES['HAVE_PTHREAD'] = True
# Needed for the gzip streams.
DEFINES['HAVE_ZLIB'] = True
CXXFLAGS += CONFIG['TK_CFLAGS']