Bug 1411187 - Build protobuf with NOGDI on all Windows builds. r?tjr draft
authorFrancois Marier <francois@mozilla.com>
Tue, 24 Oct 2017 13:35:56 -0700
changeset 685625 39c731a747b7d6fe4d3d1d22bbcf818a752b69bc
parent 685447 967c95cee709756596860ed2a3e6ac06ea3a053f
child 737219 8b06defbcfac562272491f7d1dfda8f2b88e0af1
push id86006
push userfmarier@mozilla.com
push dateTue, 24 Oct 2017 23:30:02 +0000
reviewerstjr
bugs1411187
milestone58.0a1
Bug 1411187 - Build protobuf with NOGDI on all Windows builds. r?tjr MozReview-Commit-ID: 3nPgVJYdD3w
toolkit/components/protobuf/moz.build
--- 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']