Bug 912099 - Part c: Make sure CPP_SOURCES only points to existing files in gfx/angle; r=mshal
authorMs2ger <ms2ger@gmail.com>
Thu, 03 Oct 2013 09:10:00 +0200
changeset 149661 16799dc6bd46b9d4f2cf76cd978b01a1101ae385
parent 149660 ccd2f40d48f89abd4476ec07af89a966f755eb34
child 149662 229a2dde03b3898e9d52efd5869d3c1eb2808381
push idunknown
push userunknown
push dateunknown
reviewersmshal
bugs912099
milestone27.0a1
Bug 912099 - Part c: Make sure CPP_SOURCES only points to existing files in gfx/angle; r=mshal
gfx/angle/moz.build
gfx/angle/src/libEGL/moz.build
gfx/angle/src/libGLESv2/moz.build
python/mozbuild/mozbuild/frontend/emitter.py
--- a/gfx/angle/moz.build
+++ b/gfx/angle/moz.build
@@ -15,35 +15,35 @@ EXPORTS.angle += [
     'include/KHR/khrplatform.h',
 ]
 
 # WARNING: CPP_SOURCES seems very dependent on ordering. Grouping all of these
 # CPP_SOURCES lines into one list may break webgl tests.
 
 # Target: 'preprocessor'
 # src/compiler/preprocessor:
-CPP_SOURCES += [
+CPP_SOURCES += ['src/compiler/preprocessor/' + src for src in [
     'DiagnosticsBase.cpp',
     'DirectiveHandlerBase.cpp',
     'DirectiveParser.cpp',
     'ExpressionParser.cpp',
     'Input.cpp',
     'Lexer.cpp',
     'Macro.cpp',
     'MacroExpander.cpp',
     'Preprocessor.cpp',
     'Token.cpp',
     'Tokenizer.cpp',
-]
+]]
 
 
 # Target: 'translator_common'
 #   Requires: 'preprocessor'
 # src/compiler:
-CPP_SOURCES += [
+CPP_SOURCES += ['src/compiler/' + src for src in [
     'BuiltInFunctionEmulator.cpp',
     'Compiler.cpp',
     'compiler_debug.cpp',
     'DetectCallDepth.cpp',
     'Diagnostics.cpp',
     'DirectiveHandler.cpp',
     'ForLoopUnroll.cpp',
     'glslang_lex.cpp',
@@ -62,61 +62,61 @@ CPP_SOURCES += [
     'QualifierAlive.cpp',
     'RemoveTree.cpp',
     'SymbolTable.cpp',
     'CompilerUniform.cpp',
     'util.cpp',
     'ValidateLimitations.cpp',
     'VariableInfo.cpp',
     'VariablePacker.cpp',
-]
+]]
 
 # src/compiler/depgraph:
-CPP_SOURCES += [
+CPP_SOURCES += ['src/compiler/depgraph/' + src for src in [
     'DependencyGraph.cpp',
     'DependencyGraphBuilder.cpp',
     'DependencyGraphOutput.cpp',
     'DependencyGraphTraverse.cpp',
-]
+]]
 
 # src/compiler/timing:
-CPP_SOURCES += [
+CPP_SOURCES += ['src/compiler/timing/' + src for src in [
     'RestrictFragmentShaderTiming.cpp',
     'RestrictVertexShaderTiming.cpp',
-]
+]]
 
 # src/third_party/compiler:
-CPP_SOURCES += [
+CPP_SOURCES += ['src/third_party/compiler/' + src for src in [
     'ArrayBoundsClamper.cpp',
-]
+]]
 
 # src/third_party/murmurhash:
-CPP_SOURCES += [
+CPP_SOURCES += ['src/third_party/murmurhash/' + src for src in [
     'MurmurHash3.cpp',
-]
+]]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     CPP_SOURCES += [
-        'ossource_win.cpp',
+        'src/compiler/ossource_win.cpp',
     ]
 else:
     CPP_SOURCES += [
-        'ossource_posix.cpp',
+        'src/compiler/ossource_posix.cpp',
     ]
 
 
 # Target: 'translator_glsl'
 #   Requires: 'translator_common'
 # src/compiler:
-CPP_SOURCES += [
+CPP_SOURCES += ['src/compiler/' + src for src in [
     'CodeGenGLSL.cpp',
     'OutputESSL.cpp',
     'OutputGLSLBase.cpp',
     'OutputGLSL.cpp',
     'ShaderLang.cpp',
     'TranslatorESSL.cpp',
     'TranslatorGLSL.cpp',
     'VersionGLSL.cpp',
-]
+]]
 
 LIBRARY_NAME = 'angle'
 LIBXUL_LIBRARY = True
 MSVC_ENABLE_PGO = True
--- a/gfx/angle/src/libEGL/moz.build
+++ b/gfx/angle/src/libEGL/moz.build
@@ -4,20 +4,20 @@
 # 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/.
 
 MODULE = 'libegl'
 
 # Target: 'libEGL'
 #   Requires: 'libGLESv2'
 # src/common:
-CPP_SOURCES += [
+CPP_SOURCES += ['../common/' + src for src in [
     'debug.cpp',
     'RefCountObject.cpp',
-]
+]]
 
 # src/libEGL
 CPP_SOURCES += [
     'Config.cpp',
     'Display.cpp',
     'libEGL.cpp',
     'main.cpp',
     'Surface.cpp',
--- a/gfx/angle/src/libGLESv2/moz.build
+++ b/gfx/angle/src/libGLESv2/moz.build
@@ -3,35 +3,35 @@
 # 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/.
 
 MODULE = 'libglesv2'
 
 # Target: 'preprocessor'
 # src/compiler/preprocessor:
-CPP_SOURCES += [
+CPP_SOURCES += ['../compiler/preprocessor/' + src for src in [
     'DiagnosticsBase.cpp',
     'DirectiveHandlerBase.cpp',
     'DirectiveParser.cpp',
     'ExpressionParser.cpp',
     'Input.cpp',
     'Lexer.cpp',
     'Macro.cpp',
     'MacroExpander.cpp',
     'Preprocessor.cpp',
     'Token.cpp',
     'Tokenizer.cpp',
-]
+]]
 
 
 # Target: 'translator_common'
 #   Requires: 'preprocessor'
 # src/compiler:
-CPP_SOURCES += [
+CPP_SOURCES += ['../compiler/' + src for src in [
     'BuiltInFunctionEmulator.cpp',
     'Compiler.cpp',
     'compiler_debug.cpp',
     'DetectCallDepth.cpp',
     'Diagnostics.cpp',
     'DirectiveHandler.cpp',
     'ForLoopUnroll.cpp',
     'glslang_lex.cpp',
@@ -50,73 +50,73 @@ CPP_SOURCES += [
     'QualifierAlive.cpp',
     'RemoveTree.cpp',
     'SymbolTable.cpp',
     'CompilerUniform.cpp',
     'util.cpp',
     'ValidateLimitations.cpp',
     'VariableInfo.cpp',
     'VariablePacker.cpp',
-]
+]]
 
 # src/compiler/depgraph:
-CPP_SOURCES += [
+CPP_SOURCES += ['../compiler/depgraph/' + src for src in [
     'DependencyGraph.cpp',
     'DependencyGraphBuilder.cpp',
     'DependencyGraphOutput.cpp',
     'DependencyGraphTraverse.cpp',
-]
+]]
 
 # src/compiler/timing:
-CPP_SOURCES += [
+CPP_SOURCES += ['../compiler/timing/' + src for src in [
     'RestrictFragmentShaderTiming.cpp',
     'RestrictVertexShaderTiming.cpp',
-]
+]]
 
 # src/third_party/compiler:
-CPP_SOURCES += [
+CPP_SOURCES += ['../third_party/compiler/' + src for src in [
     'ArrayBoundsClamper.cpp',
-]
+]]
 
 # src/third_party/murmurhash:
-CPP_SOURCES += [
+CPP_SOURCES += ['../third_party/murmurhash/' + src for src in [
     'MurmurHash3.cpp',
-]
+]]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     CPP_SOURCES += [
-        'ossource_win.cpp',
+        '../compiler/ossource_win.cpp',
     ]
 else:
     CPP_SOURCES += [
-        'ossource_posix.cpp',
+        '../compiler/ossource_posix.cpp',
     ]
 
 
 # Target: 'translator_hlsl'
 #   Requires: 'translator_common'
 # src/compiler:
-CPP_SOURCES += [
+CPP_SOURCES += ['../compiler/' + src for src in [
     'ShaderLang.cpp',
     'DetectDiscontinuity.cpp',
     'CodeGenHLSL.cpp',
     'OutputHLSL.cpp',
     'TranslatorHLSL.cpp',
     'UnfoldShortCircuit.cpp',
     'SearchSymbol.cpp',
-]
+]]
 
 
 # Target: 'libGLESv2'
 #   Requires: 'translator_hlsl'
 # src/common:
-CPP_SOURCES += [
+CPP_SOURCES += ['../common/' + src for src in [
     'debug.cpp',
     'RefCountObject.cpp',
-]
+]]
 
 # src/libGLESv2:
 CPP_SOURCES += [
     'precompiled.cpp',
     'Buffer.cpp',
     'Context.cpp',
     'Fence.cpp',
     'Float16ToFloat32.cpp',
@@ -131,17 +131,17 @@ CPP_SOURCES += [
     'ResourceManager.cpp',
     'Shader.cpp',
     'Texture.cpp',
     'Uniform.cpp',
     'utilities.cpp',
 ]
 
 # src/libGLESv2/renderer:
-CPP_SOURCES += [
+CPP_SOURCES += ['renderer/' + src for src in [
     'Blit.cpp',
     'BufferStorage.cpp',
     'BufferStorage9.cpp',
     'BufferStorage11.cpp',
     'Fence9.cpp',
     'Fence11.cpp',
     'Image.cpp',
     'Image11.cpp',
@@ -170,11 +170,11 @@ CPP_SOURCES += [
     'TextureStorage.cpp',
     'TextureStorage11.cpp',
     'TextureStorage9.cpp',
     'VertexBuffer.cpp',
     'VertexBuffer9.cpp',
     'VertexBuffer11.cpp',
     'VertexDataManager.cpp',
     'VertexDeclarationCache.cpp',
-]
+]]
 
 LIBRARY_NAME = 'libGLESv2'
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -121,17 +121,17 @@ class TreeMetadataEmitter(LoggingMixin):
             self.log(logging.WARN, 'mozbuild_warning', dict(
                 path=sandbox.main_path),
                 '{path}: NO_DIST_INSTALL has no effect on XPIDL_SOURCES.')
 
         for idl in sandbox['XPIDL_SOURCES']:
             yield XPIDLFile(sandbox, mozpath.join(sandbox['SRCDIR'], idl),
                 xpidl_module)
 
-        exclusions = ('gfx', 'toolkit/crashreporter')
+        exclusions = ('gfx/layers', 'gfx/skia', 'toolkit/crashreporter')
 
         if sandbox['CPP_SOURCES'] and not sandbox['RELATIVEDIR'].startswith(exclusions) and os.path.join('js', 'src') not in sandbox.main_path:
             for src in sandbox['CPP_SOURCES']:
                 if not os.path.exists(os.path.join(sandbox['SRCDIR'], src)):
                     raise SandboxValidationError('Reference to a file that '
                         'doesn\'t exist in CPP_SOURCES (%s) in %s'
                         % (src, sandbox['RELATIVEDIR']))