Bug 976898 - Move the sdkdecls.h force-include out of the build system; r=bbondy,glandium
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 28 Feb 2014 08:17:22 -0500
changeset 171253 54bf6247cc5f68821f48470cbd9538c4d7cb2b4a
parent 171252 15061de6e948bb229ad5eb27a0675ba26a4b86e6
child 171254 b87877dfeb496b3839685ca8016069a293c38cf3
push id5371
push userryanvm@gmail.com
push dateFri, 28 Feb 2014 21:09:59 +0000
treeherderfx-team@472fd46c20fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbondy, glandium
bugs976898
milestone30.0a1
Bug 976898 - Move the sdkdecls.h force-include out of the build system; r=bbondy,glandium
mozilla-config.h.in
security/sandbox/Makefile.in
security/sandbox/moz.build
--- a/mozilla-config.h.in
+++ b/mozilla-config.h.in
@@ -45,10 +45,20 @@
  * HUNSPELL_STATIC is defined in extensions/spellcheck/hunspell/src/Makefile.in,
  * unless --enable-system-hunspell is defined.
  */
 #if defined(HUNSPELL_STATIC)
 #include "hunspell_alloc_hooks.h"
 #include "hunspell_fopen_hooks.h"
 #endif
 
+/*
+ * Force-include sdkdecls.h for building the chromium sandbox code.
+ *
+ * CHROMIUM_SANDBOX_BUILD is defined in security/sandbox/moz.build.
+ * Note that this include path relies on the LOCAL_INCLUDES in that file.
+ */
+#if defined(CHROMIUM_SANDBOX_BUILD) && defined(XP_WIN)
+#include "base/shim/sdkdecls.h"
+#endif
+
 #endif /* _MOZILLA_CONFIG_H_ */
 
--- a/security/sandbox/Makefile.in
+++ b/security/sandbox/Makefile.in
@@ -1,18 +1,10 @@
 # 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/.
 
 ifeq ($(OS_ARCH),WINNT)
-EXTRA_SDK_DECLS = $(topsrcdir)/security/sandbox/chromium/base/shim/sdkdecls.h
-
-ifdef _MSC_VER
-OS_CXXFLAGS += -FI $(EXTRA_SDK_DECLS)
-else
-OS_CXXFLAGS += -include $(EXTRA_SDK_DECLS)
-endif
-
 STL_FLAGS =
 MOZ_GLUE_LDFLAGS =
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/security/sandbox/moz.build
+++ b/security/sandbox/moz.build
@@ -116,15 +116,15 @@ elif CONFIG['OS_ARCH'] == 'WINNT':
         'win/src/target_services.cc',
         'win/src/win2k_threadpool.cc',
         'win/src/win_utils.cc',
         'win/src/window.cc',
         'win/src/Wow64.cc',
     ]
 
     for var in ('UNICODE', '_UNICODE', 'NS_NO_XPCOM', 'SANDBOX_EXPORTS',
-                'NOMINMAX', '_CRT_RAND_S'):
+                'NOMINMAX', '_CRT_RAND_S', 'CHROMIUM_SANDBOX_BUILD'):
         DEFINES[var] = True
 
     LOCAL_INCLUDES += ['/security/sandbox/chromium/base/shim']
     LOCAL_INCLUDES += ['/security/sandbox/chromium']
     LOCAL_INCLUDES += ['/security']
     LOCAL_INCLUDES += ['/nsprpub']