gecko-dev/gfx/gl/moz.build
Nicholas Nethercote f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00

165 lines
4.6 KiB
Python

# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
gl_provider = 'Null'
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
gl_provider = 'WGL'
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
gl_provider = 'CGL'
elif CONFIG['MOZ_WIDGET_GTK']:
if CONFIG['MOZ_EGL_XRENDER_COMPOSITE']:
gl_provider = 'EGL'
else:
gl_provider = 'GLX'
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
gl_provider = 'GLX'
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
gl_provider = 'EGL'
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
gl_provider = 'EGL'
if CONFIG['MOZ_GL_PROVIDER']:
gl_provider = CONFIG['MOZ_GL_PROVIDER']
EXPORTS += [
'AndroidNativeWindow.h',
'AndroidSurfaceTexture.h',
'DecomposeIntoNoRepeatTriangles.h',
'EGLUtils.h',
'ForceDiscreteGPUHelperCGL.h',
'GfxTexturesReporter.h',
'GLBlitHelper.h',
'GLConsts.h',
'GLContext.h',
'GLContextEGL.h',
'GLContextProvider.h',
'GLContextProviderImpl.h',
'GLContextSymbols.h',
'GLContextTypes.h',
'GLDefs.h',
'GLLibraryEGL.h',
'GLLibraryLoader.h',
'GLReadTexImageHelper.h',
'GLScreenBuffer.h',
'GLTextureImage.h',
'GLTypes.h',
'GLUploadHelpers.h',
'HeapCopyOfStackArray.h',
'ScopedGLHelpers.h',
'SharedSurface.h',
'SharedSurfaceEGL.h',
'SharedSurfaceGL.h',
'SurfaceTypes.h',
'TextureGarbageBin.h',
]
if CONFIG['MOZ_X11']:
EXPORTS += [
'GLContextGLX.h',
'GLXLibrary.h',
]
# Win32 is a special snowflake, for ANGLE
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
EXPORTS += [
'GLContextWGL.h',
'SharedSurfaceANGLE.h', # Needs <windows.h> for `HANDLE`.
'WGLLibrary.h',
]
UNIFIED_SOURCES += [
'GLContextProviderEGL.cpp',
'SharedSurfaceANGLE.cpp',
]
if CONFIG['MOZ_ENABLE_SKIA_GPU']:
EXPORTS += ['SkiaGLGlue.h']
UNIFIED_SOURCES += [
'SkiaGLGlue.cpp',
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
UNIFIED_SOURCES += ['SharedSurfaceGralloc.cpp']
EXPORTS += ['SharedSurfaceGralloc.h']
LOCAL_INCLUDES += ['/widget/gonk']
CXXFLAGS += ['-I%s/%s' % (CONFIG['ANDROID_SOURCE'], 'hardware/libhardware/include')]
if gl_provider == 'CGL':
# These files include Mac headers that are unfriendly to unified builds
SOURCES += [
"GLContextProviderCGL.mm",
"TextureImageCGL.mm"
]
EXPORTS += [
'GLContextCGL.h',
'SharedSurfaceIO.h',
]
# SharedSurfaceIO.cpp includes MacIOSurface.h which include Mac headers
# which define Size and Point types in root namespace with often conflict with
# our own types. While I haven't actually hit this issue in the present case,
# it's been an issue in gfx/layers so let's not risk it.
SOURCES += [
'SharedSurfaceIO.cpp',
]
elif gl_provider == 'GLX':
# GLContextProviderGLX.cpp needs to be kept out of UNIFIED_SOURCES
# as it includes X11 headers which cause conflicts.
SOURCES += [
'GLContextProviderGLX.cpp',
'SharedSurfaceGLX.cpp'
]
EXPORTS += [
'SharedSurfaceGLX.h'
]
else:
UNIFIED_SOURCES += [
'GLContextProvider%s.cpp' % gl_provider,
]
UNIFIED_SOURCES += [
'AndroidNativeWindow.cpp',
'AndroidSurfaceTexture.cpp',
'DecomposeIntoNoRepeatTriangles.cpp',
'EGLUtils.cpp',
'GfxTexturesReporter.cpp',
'GLBlitHelper.cpp',
'GLContext.cpp',
'GLContextFeatures.cpp',
'GLContextTypes.cpp',
'GLDebugUtils.cpp',
'GLLibraryEGL.cpp',
'GLLibraryLoader.cpp',
'GLReadTexImageHelper.cpp',
'GLScreenBuffer.cpp',
'GLTextureImage.cpp',
'GLUploadHelpers.cpp',
'ScopedGLHelpers.cpp',
'SharedSurface.cpp',
'SharedSurfaceEGL.cpp',
'SharedSurfaceGL.cpp',
'SurfaceTypes.cpp',
'TextureGarbageBin.cpp',
'TextureImageEGL.cpp',
]
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
if CONFIG['MOZ_D3DCOMPILER_VISTA_DLL']:
DEFINES['MOZ_D3DCOMPILER_VISTA_DLL'] = CONFIG['MOZ_D3DCOMPILER_VISTA_DLL']
if CONFIG['MOZ_D3DCOMPILER_XP_DLL']:
DEFINES['MOZ_D3DCOMPILER_XP_DLL'] = CONFIG['MOZ_D3DCOMPILER_XP_DLL']
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
CXXFLAGS += CONFIG['TK_CFLAGS']
CFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
CFLAGS += CONFIG['TK_CFLAGS']
LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
if CONFIG['OS_ARCH'] == 'WINNT':
del DEFINES['UNICODE']