summaryrefslogtreecommitdiffstats
path: root/gfx/angle/moz.build.common
blob: 78fae47d6b03f6072cadb026e6de9a99b1d1ed0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
AllowCompilerWarnings()

if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
    CXXFLAGS += [
        '-Wno-final-dtor-non-final-class',
        '-Wno-implicit-const-int-float-conversion',
        '-Wno-range-loop-construct',
    ]

CXXFLAGS += CONFIG['MOZ_X11_CFLAGS']

if CONFIG['INTEL_ARCHITECTURE']:
    CXXFLAGS += CONFIG['SSE2_FLAGS']

if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
    DEFINES['ANGLE_IS_WIN'] = True

    # ANGLE wants NTDDI_WIN10_VB, but:
    # > /builds/worker/checkouts/gecko/vs2017_15.9.6/SDK/include/10.0.17134.0/winrt/wrl/def.h(48,2):
    # > #error WRL requires NTDDI_VERSION to be #defined at least to NTDDI_VISTA or greater
    DEFINES['NTDDI_VERSION'] = 'NTDDI_WIN10_RS2'

    if CONFIG['INTEL_ARCHITECTURE']:
        DEFINES['X86_WINDOWS'] = True
else:
    DEFINES['ANGLE_PLATFORM_EXPORT'] = ''

DEFINES['__NDK_FPABI__'] = ''
DEFINES['ANGLE_SKIP_DXGI_1_2_CHECK'] = True
DEFINES['ANGLE_ENABLE_KEYEDMUTEX'] = True
DEFINES['ANGLE_TRANSLATOR_ESSL_ONLY'] = True

if CONFIG["MOZ_WIDGET_GTK"]:
    CXXFLAGS += [ "-DWL_EGL_PLATFORM" ]