Bug 1443471 - Support mingw clang in skia moz.build r?glandium draft
authorJacek Caban <jacek@codeweavers.com>
Mon, 25 Jun 2018 21:22:02 +0200
changeset 811376 f61961e6d1d74b10a6bbbdc8af73cdf3f3c3e7a7
parent 811375 2b5356e88b7934b2ce3b4040f2407871c4353814
push id114282
push userbmo:jacek@codeweavers.com
push dateWed, 27 Jun 2018 14:19:01 +0000
reviewersglandium
bugs1443471
milestone63.0a1
Bug 1443471 - Support mingw clang in skia moz.build r?glandium MozReview-Commit-ID: 4H8bkHyczGM
gfx/skia/generate_mozbuild.py
gfx/skia/moz.build
--- a/gfx/skia/generate_mozbuild.py
+++ b/gfx/skia/generate_mozbuild.py
@@ -63,17 +63,17 @@ LOCAL_INCLUDES += [
     'skia/src/shaders',
     'skia/src/sksl',
     'skia/src/utils',
     'skia/src/utils/mac',
     'skia/src/utils/win',
 ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
-    if CONFIG['CC_TYPE'] == 'gcc':
+    if CONFIG['CC_TYPE'] in ('gcc', 'clang'):
         DEFINES['SK_JUMPER_USE_ASSEMBLY'] = 0
     elif CONFIG['CPU_ARCH'] == 'x86':
         SOURCES['skia/src/jumper/SkJumper_generated_win.S'].flags += ['-safeseh']
     DEFINES['UNICODE'] = True
     DEFINES['_UNICODE'] = True
     UNIFIED_SOURCES += [
         'skia/src/fonts/SkFontMgr_indirect.cpp',
         'skia/src/fonts/SkRemotableFontMgr.cpp',
@@ -451,17 +451,17 @@ def write_mozbuild(sources):
 
   f.write("if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'uikit'):\n")
   write_sources(f, sources['mac'], 4)
 
   f.write("if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':\n")
   write_sources(f, sources['linux'], 4)
 
   f.write("if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':\n")
-  f.write("    if CONFIG['CC_TYPE'] != 'gcc':\n")
+  f.write("    if CONFIG['CC_TYPE'] not in ('gcc', 'clang'):\n")
   write_list(f, "SOURCES", sources['no-mingw'], 8)
   # Windows-specific files don't get unification because of nasty headers.
   # Luckily there are not many files in this.
   write_list(f, "SOURCES", sources['win'], 4)
 
   f.write("if CONFIG['INTEL_ARCHITECTURE']:\n")
   write_sources(f, sources['intel'], 4)
   write_cflags(f, sources['intel'], opt_whitelist, 'skia_opt_flags', 4)
--- a/gfx/skia/moz.build
+++ b/gfx/skia/moz.build
@@ -621,17 +621,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3
         'skia/src/ports/SkTLS_pthread.cpp',
     ]
     SOURCES += [
         'skia/src/jumper/SkJumper_generated.S',
         'skia/src/ports/SkFontHost_cairo.cpp',
         'skia/src/ports/SkFontHost_FreeType_common.cpp',
     ]
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
-    if CONFIG['CC_TYPE'] != 'gcc':
+    if CONFIG['CC_TYPE'] not in ('gcc', 'clang'):
         SOURCES += [
             'skia/src/jumper/SkJumper_generated_win.S',
         ]
     SOURCES += [
         'skia/src/ports/SkDebug_win.cpp',
         'skia/src/ports/SkFontHost_win.cpp',
         'skia/src/ports/SkFontMgr_win_dw.cpp',
         'skia/src/ports/SkFontMgr_win_dw_factory.cpp',
@@ -737,17 +737,17 @@ LOCAL_INCLUDES += [
     'skia/src/shaders',
     'skia/src/sksl',
     'skia/src/utils',
     'skia/src/utils/mac',
     'skia/src/utils/win',
 ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
-    if CONFIG['CC_TYPE'] == 'gcc':
+    if CONFIG['CC_TYPE'] in ('gcc', 'clang'):
         DEFINES['SK_JUMPER_USE_ASSEMBLY'] = 0
     elif CONFIG['CPU_ARCH'] == 'x86':
         SOURCES['skia/src/jumper/SkJumper_generated_win.S'].flags += ['-safeseh']
     DEFINES['UNICODE'] = True
     DEFINES['_UNICODE'] = True
     UNIFIED_SOURCES += [
         'skia/src/fonts/SkFontMgr_indirect.cpp',
         'skia/src/fonts/SkRemotableFontMgr.cpp',