Bug 1390583 - Stylo: Build Broken with MinGW r?xidorn draft
authorJacek Caban <jacek@codeweavers.com>
Fri, 13 Jul 2018 00:44:30 +0200
changeset 820375 327de488e0175b2bf1517bab09eae94fb5d57bda
parent 820374 3c3454327c657917cf3cf01090f1dcf34a57db05
push id116797
push userbmo:jacek@codeweavers.com
push dateThu, 19 Jul 2018 12:55:19 +0000
reviewersxidorn
bugs1390583
milestone60.1.1
Bug 1390583 - Stylo: Build Broken with MinGW r?xidorn MozReview-Commit-ID: GmgNZQlOTJG
browser/config/mozconfigs/win64/mingwclang
layout/style/ServoBindings.toml
--- a/browser/config/mozconfigs/win64/mingwclang
+++ b/browser/config/mozconfigs/win64/mingwclang
@@ -29,17 +29,17 @@ unset MAKECAB
 ac_add_options --target=x86_64-w64-mingw32
 ac_add_options --with-toolchain-prefix=x86_64-w64-mingw32-
 
 ac_add_options --disable-warnings-as-errors
 
 # Temporary config settings until we get these working on mingw
 ac_add_options --disable-accessibility # https://sourceforge.net/p/mingw-w64/bugs/648/
 
-ac_add_options --disable-stylo # Bug 1390583
+BINDGEN_CFLAGS="-I$TOOLTOOL_DIR/clang/x86_64-w64-mingw32/include/c++/v1 -I$TOOLTOOL_DIR/clang/lib/clang/7.0.0/include -I$TOOLTOOL_DIR/clang/x86_64-w64-mingw32/include"
 
 # For now, we'll disable the sandbox, until we get get Bug 1461421 figured out
 ac_add_options --disable-sandbox
 
 # These aren't supported on mingw at this time
 ac_add_options --disable-webrtc # Bug 1393901
 ac_add_options --disable-maintenance-service
 
--- a/layout/style/ServoBindings.toml
+++ b/layout/style/ServoBindings.toml
@@ -1,11 +1,11 @@
 [build]
 args = [
-    "-x", "c++", "-std=c++14", "-fno-sized-deallocation",
+    "-x", "c++", "-std=gnu++14", "-fno-sized-deallocation",
     "-DTRACING=1", "-DIMPL_LIBXUL", "-DMOZ_STYLO_BINDINGS=1",
     "-DMOZILLA_INTERNAL_API", "-DRUST_BINDGEN", "-DMOZ_STYLO"
 ]
 "family=unix" = ["-DOS_POSIX=1"]
 "os=solaris" = ["-DOS_SOLARIS=1"]
 "os=dragonfly" = ["-DOS_BSD=1", "-DOS_DRAGONFLY=1"]
 "os=freebsd" = ["-DOS_BSD=1", "-DOS_FREEBSD=1"]
 "os=netbsd" = ["-DOS_BSD=1", "-DOS_NETBSD=1"]
@@ -24,33 +24,41 @@ args = ["-DOS_LINUX=1"]
 "arch=x86_64" = ["-m64"]
 
 [build."os=android"]
 args = ["-DOS_ANDROID=1"]
 "arch=aarch64" = ["--target=aarch64-linux-android"]
 "arch=arm" = ["--target=armv7-linux-androideabi"]
 "arch=x86" = ["--target=i686-linux-android"]
 
+[build."os=windows"]
+args = [
+    "-DOS_WIN=1", "-DWIN32=1",
+]
+
 [build."os=windows"."env=msvc"]
 args = [
-    "-DOS_WIN=1", "-DWIN32=1",
     # For compatibility with MSVC 2015
     "-fms-compatibility-version=19",
     # To enable the builtin __builtin_offsetof so that CRT wouldn't
     # use reinterpret_cast in offsetof() which is not allowed inside
     # static_assert().
     "-D_CRT_USE_BUILTIN_OFFSETOF",
     # Enable hidden attribute (which is not supported by MSVC and
     # thus not enabled by default with a MSVC-compatibile build)
     # to exclude hidden symbols from the generated file.
     "-DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1",
 ]
 "arch=x86" = ["--target=i686-pc-win32"]
 "arch=x86_64" = ["--target=x86_64-pc-win32"]
 
+[build."os=windows"."env=gnu"]
+"arch=x86" = ["--target=i686-pc-mingw32"]
+"arch=x86_64" = ["--target=x86_64-w64-mingw32"]
+
 [structs]
 headers = [
     "nsStyleStruct.h",
     "mozilla/ServoPropPrefList.h",
     "mozilla/StyleAnimationValue.h",
     "gfxFontConstants.h",
     "gfxFontFeatures.h",
     "nsThemeConstants.h",