Bug 1185424 - Fix build failures on SunOS due to "NSModules are not ordered appropriately". r=glandium
authorPetr Sumbera <petr.sumbera@oracle.com>
Tue, 22 Aug 2017 01:54:58 -0700
changeset 376385 3fd81dad7c8b68c256f455542f72e880cfeb9c63
parent 376384 e8d712f190baf68efa3d0ad45424a3092d1531ec
child 376386 e2a544ea360c78948ceadbfdae03a1b376df5e8d
push id32383
push userkwierso@gmail.com
push dateThu, 24 Aug 2017 01:07:41 +0000
treeherdermozilla-central@d1c70c20e7b5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1185424
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1185424 - Fix build failures on SunOS due to "NSModules are not ordered appropriately". r=glandium
toolkit/library/StaticXULComponentsEnd/StaticXULComponentsEnd.cpp
toolkit/library/StaticXULComponentsStart.cpp
--- a/toolkit/library/StaticXULComponentsEnd/StaticXULComponentsEnd.cpp
+++ b/toolkit/library/StaticXULComponentsEnd/StaticXULComponentsEnd.cpp
@@ -5,9 +5,12 @@
 #ifdef _MSC_VER
 /* Sections on Windows are in two parts, separated with $. When linking,
  * sections with the same first part are all grouped, and ordered
  * alphabetically with the second part as sort key. */
 #  pragma section(".kPStaticModules$Z", read)
 #  undef NSMODULE_SECTION
 #  define NSMODULE_SECTION __declspec(allocate(".kPStaticModules$Z"), dllexport)
 #endif
-NSMODULE_DEFN(end_kPStaticModules) = nullptr;
+/* This could be null, but this needs a dummy value to ensure it actually ends
+ * up in the same section as other NSMODULE_DEFNs, instead of being moved to a
+ * separate readonly section. */
+NSMODULE_DEFN(end_kPStaticModules) = (mozilla::Module*)&NSMODULE_NAME(end_kPStaticModules);
--- a/toolkit/library/StaticXULComponentsStart.cpp
+++ b/toolkit/library/StaticXULComponentsStart.cpp
@@ -1,3 +1,6 @@
 #include "mozilla/Module.h"
 
-NSMODULE_DEFN(start_kPStaticModules) = nullptr;
+/* This could be null, but this needs a dummy value to ensure it actually ends
+ * up in the same section as other NSMODULE_DEFNs, instead of being moved to a
+ * separate readonly section. */
+NSMODULE_DEFN(start_kPStaticModules) = (mozilla::Module*)&NSMODULE_NAME(start_kPStaticModules);