Bug 1443471 - Take clang mingw into account in moz.build files r=glandium draft
authorJacek Caban <jacek@codeweavers.com>
Mon, 25 Jun 2018 20:01:39 +0200
changeset 815614 0380c0a34c461480fb17b22270c88d4c33706e1a
parent 815613 1505596d8f414feab9791881de24306c7a4b59cf
child 815615 fb49b6676cf87e734affe8b1f5f165a3bcb1528f
push id115578
push userbmo:jacek@codeweavers.com
push dateMon, 09 Jul 2018 15:15:59 +0000
reviewersglandium
bugs1443471
milestone63.0a1
Bug 1443471 - Take clang mingw into account in moz.build files r=glandium MozReview-Commit-ID: 2vKiHjmI9Hn
config/external/ffi/moz.build
toolkit/crashreporter/minidump-analyzer/moz.build
toolkit/crashreporter/test/moz.build
xpcom/base/moz.build
xpcom/build/moz.build
--- a/config/external/ffi/moz.build
+++ b/config/external/ffi/moz.build
@@ -93,17 +93,17 @@ else:
             asm = GENERATED_FILES['win32.asm']
             asm.inputs = ['/js/src/ctypes/libffi/src/x86/win32.S']
             asm.script = 'preprocess_libffi_asm.py'
             asm.flags = ['$(DEFINES)', '$(LOCAL_INCLUDES)']
             SOURCES += ['!win32.asm']
             ASFLAGS += ['-safeseh']
     elif CONFIG['FFI_TARGET'] == 'X86_WIN64':
         ffi_srcs = ['ffi.c']
-        if CONFIG['CC_TYPE'] == 'gcc':
+        if CONFIG['CC_TYPE'] in ('gcc', 'clang'):
             ffi_srcs += ['win64.S']
         else:
             # libffi asm needs to be preprocessed for MSVC
             GENERATED_FILES += ['win64.asm']
             asm = GENERATED_FILES['win64.asm']
             asm.inputs = ['/js/src/ctypes/libffi/src/x86/win64.S']
             asm.script = 'preprocess_libffi_asm.py'
             asm.flags = ['$(DEFINES)', '$(LOCAL_INCLUDES)']
--- a/toolkit/crashreporter/minidump-analyzer/moz.build
+++ b/toolkit/crashreporter/minidump-analyzer/moz.build
@@ -24,17 +24,17 @@ if CONFIG['OS_TARGET'] != 'Android':
                 'Win64ModuleUnwindMetadata.cpp',
             ]
 
             OS_LIBS += [
                 'dbghelp',
                 'imagehlp'
             ]
 
-    if CONFIG['OS_TARGET'] == 'WINNT' and CONFIG['CC_TYPE'] == 'gcc':
+    if CONFIG['OS_TARGET'] == 'WINNT' and CONFIG['CC_TYPE'] in ('gcc', 'clang'):
         # This allows us to use wmain as the entry point on mingw
         LDFLAGS += [
             '-municode',
         ]
 
 else:
     Library('minidump-analyzer')
 
--- a/toolkit/crashreporter/test/moz.build
+++ b/toolkit/crashreporter/test/moz.build
@@ -20,17 +20,17 @@ UNIFIED_SOURCES += [
     'nsTestCrasher.cpp',
 ]
 
 SOURCES += [
   'ExceptionThrower.cpp',
 ]
 
 if CONFIG['OS_TARGET'] == 'WINNT' and CONFIG['CPU_ARCH'] == 'x86_64':
-    if CONFIG['CC_TYPE'] != 'gcc':
+    if CONFIG['CC_TYPE'] not in ('gcc', 'clang'):
         SOURCES += [
             'win64UnwindInfoTests.asm',
         ]
 
 if CONFIG['CC_TYPE'] == 'clang-cl':
     SOURCES['ExceptionThrower.cpp'].flags += [
         '-Xclang',
         '-fcxx-exceptions',
--- a/xpcom/base/moz.build
+++ b/xpcom/base/moz.build
@@ -86,17 +86,17 @@ EXPORTS += [
     'nsWeakPtr.h',
     'nsWeakReference.h',
 ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     EXPORTS += [
         'nsWindowsHelpers.h',
     ]
-    if CONFIG['CC_TYPE'] != 'gcc':
+    if CONFIG['CC_TYPE'] not in ('gcc', 'clang'):
         OS_LIBS += [
             'wscapi',
         ]
 
 EXPORTS.mozilla += [
     'AutoRestore.h',
     'AvailableMemoryTracker.h',
     'ClearOnShutdown.h',
--- a/xpcom/build/moz.build
+++ b/xpcom/build/moz.build
@@ -25,17 +25,17 @@ EXPORTS.mozilla += [
     'XREAppData.h',
 ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     EXPORTS.mozilla += [
         'perfprobe.h',
     ]
     SOURCES += ['perfprobe.cpp']
-    if CONFIG['CC_TYPE'] != 'gcc':
+    if CONFIG['CC_TYPE'] not in ('gcc', 'clang'):
         SOURCES += [
             'PoisonIOInterposerBase.cpp',
             'PoisonIOInterposerWin.cpp',
         ]
     else:
         SOURCES += ['PoisonIOInterposerStub.cpp']
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     UNIFIED_SOURCES += [