Backed out changeset 5f90362bbc80 (bug 1422368) for Windows static bustage (unresolved externals). r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 06 Dec 2017 20:20:54 +0200
changeset 708648 d0b7abcecda9598ee7d383ac71b27087b6a7afc3
parent 708647 8083a15a4b90297391a4aad6f3c97951909605aa
child 708649 82e312ab3bc24d9a991a35809fbdb0573ae6d2d9
push id92403
push userVYV03354@nifty.ne.jp
push dateWed, 06 Dec 2017 22:18:41 +0000
reviewersbackout
bugs1422368
milestone59.0a1
backs out5f90362bbc80cf7f9b09e41477c244f292fc9f1c
Backed out changeset 5f90362bbc80 (bug 1422368) for Windows static bustage (unresolved externals). r=backout
gfx/ycbcr/clang-cl-workaround.patch
gfx/ycbcr/yuv_row_win.cpp
--- a/gfx/ycbcr/clang-cl-workaround.patch
+++ b/gfx/ycbcr/clang-cl-workaround.patch
@@ -1,28 +1,26 @@
 diff --git a/gfx/ycbcr/yuv_row_win.cpp b/gfx/ycbcr/yuv_row_win.cpp
 --- a/gfx/ycbcr/yuv_row_win.cpp
 +++ b/gfx/ycbcr/yuv_row_win.cpp
-@@ -7,19 +7,21 @@
+@@ -6,16 +6,22 @@
+ #include "mozilla/SSE.h"
  
  #define kCoefficientsRgbU kCoefficientsRgbY + 2048
  #define kCoefficientsRgbV kCoefficientsRgbY + 4096
  
  extern "C" {
  
  #if defined(MOZILLA_MAY_SUPPORT_SSE) && defined(_M_IX86)
- #if defined(__clang__)
--// clang-cl may erroneously discard the symbol `kCoefficientsRgbY`
--// https://bugs.llvm.org/show_bug.cgi?id=35290
--volatile auto keep_kCoefficientsRgbY_alive = &kCoefficientsRgbY;
-+// clang-cl has a bug where it doesn't mangle names in inline asm
-+// so let's do the mangling in the preprocessor (ugh)
-+// (but we still need to declare a dummy extern for the parser)
-+extern void* _kCoefficientsRgbY;
-+#define kCoefficientsRgbY _kCoefficientsRgbY
- #endif
- 
++#if defined(__clang__)
++// clang-cl may erroneously discard the symbol `kCoefficientsRgbY`
++// https://bugs.llvm.org/show_bug.cgi?id=35290
++volatile auto keep_kCoefficientsRgbY_alive = &kCoefficientsRgbY;
++#endif
++
  __declspec(naked)
  void FastConvertYUVToRGB32Row_SSE(const uint8* y_buf,
                                    const uint8* u_buf,
                                    const uint8* v_buf,
                                    uint8* rgb_buf,
                                    int width) {
+   __asm {
+     pushad
--- a/gfx/ycbcr/yuv_row_win.cpp
+++ b/gfx/ycbcr/yuv_row_win.cpp
@@ -7,21 +7,19 @@
 
 #define kCoefficientsRgbU kCoefficientsRgbY + 2048
 #define kCoefficientsRgbV kCoefficientsRgbY + 4096
 
 extern "C" {
 
 #if defined(MOZILLA_MAY_SUPPORT_SSE) && defined(_M_IX86)
 #if defined(__clang__)
-// clang-cl has a bug where it doesn't mangle names in inline asm
-// so let's do the mangling in the preprocessor (ugh)
-// (but we still need to declare a dummy extern for the parser)
-extern void* _kCoefficientsRgbY;
-#define kCoefficientsRgbY _kCoefficientsRgbY
+// clang-cl may erroneously discard the symbol `kCoefficientsRgbY`
+// https://bugs.llvm.org/show_bug.cgi?id=35290
+volatile auto keep_kCoefficientsRgbY_alive = &kCoefficientsRgbY;
 #endif
 
 __declspec(naked)
 void FastConvertYUVToRGB32Row_SSE(const uint8* y_buf,
                                   const uint8* u_buf,
                                   const uint8* v_buf,
                                   uint8* rgb_buf,
                                   int width) {