Merge mozilla-beta to b2g34. a=merge
[gecko.git] / gfx / angle / moz.build
blobc8da8f0c5a8fc14884d47040ce8b626ebfdd7b19
2 # Please note this file is autogenerated from generate_mozbuild.py, so do not modify it directly
4 UNIFIED_SOURCES += [
5     'src/common/blocklayout.cpp',
6     'src/common/debug.cpp',
7     'src/common/event_tracer.cpp',
8     'src/common/mathutil.cpp',
9     'src/common/RefCountObject.cpp',
10     'src/common/utilities.cpp',
11     'src/compiler/preprocessor/DiagnosticsBase.cpp',
12     'src/compiler/preprocessor/DirectiveHandlerBase.cpp',
13     'src/compiler/preprocessor/DirectiveParser.cpp',
14     'src/compiler/preprocessor/ExpressionParser.cpp',
15     'src/compiler/preprocessor/Input.cpp',
16     'src/compiler/preprocessor/Lexer.cpp',
17     'src/compiler/preprocessor/Macro.cpp',
18     'src/compiler/preprocessor/MacroExpander.cpp',
19     'src/compiler/preprocessor/Preprocessor.cpp',
20     'src/compiler/preprocessor/Token.cpp',
21     'src/compiler/preprocessor/Tokenizer.cpp',
22     'src/compiler/translator/BuiltInFunctionEmulator.cpp',
23     'src/compiler/translator/CodeGen.cpp',
24     'src/compiler/translator/Compiler.cpp',
25     'src/compiler/translator/compilerdebug.cpp',
26     'src/compiler/translator/depgraph/DependencyGraph.cpp',
27     'src/compiler/translator/depgraph/DependencyGraphBuilder.cpp',
28     'src/compiler/translator/depgraph/DependencyGraphOutput.cpp',
29     'src/compiler/translator/depgraph/DependencyGraphTraverse.cpp',
30     'src/compiler/translator/DetectCallDepth.cpp',
31     'src/compiler/translator/DetectDiscontinuity.cpp',
32     'src/compiler/translator/Diagnostics.cpp',
33     'src/compiler/translator/DirectiveHandler.cpp',
34     'src/compiler/translator/FlagStd140Structs.cpp',
35     'src/compiler/translator/ForLoopUnroll.cpp',
36     'src/compiler/translator/InfoSink.cpp',
37     'src/compiler/translator/Initialize.cpp',
38     'src/compiler/translator/InitializeDll.cpp',
39     'src/compiler/translator/InitializeParseContext.cpp',
40     'src/compiler/translator/InitializeVariables.cpp',
41     'src/compiler/translator/Intermediate.cpp',
42     'src/compiler/translator/intermOut.cpp',
43     'src/compiler/translator/IntermTraverse.cpp',
44     'src/compiler/translator/LoopInfo.cpp',
45     'src/compiler/translator/OutputESSL.cpp',
46     'src/compiler/translator/OutputGLSL.cpp',
47     'src/compiler/translator/OutputGLSLBase.cpp',
48     'src/compiler/translator/OutputHLSL.cpp',
49     'src/compiler/translator/parseConst.cpp',
50     'src/compiler/translator/ParseContext.cpp',
51     'src/compiler/translator/PoolAlloc.cpp',
52     'src/compiler/translator/QualifierAlive.cpp',
53     'src/compiler/translator/RemoveTree.cpp',
54     'src/compiler/translator/RewriteElseBlocks.cpp',
55     'src/compiler/translator/SearchSymbol.cpp',
56     'src/compiler/translator/ShaderLang.cpp',
57     'src/compiler/translator/SymbolTable.cpp',
58     'src/compiler/translator/timing/RestrictFragmentShaderTiming.cpp',
59     'src/compiler/translator/timing/RestrictVertexShaderTiming.cpp',
60     'src/compiler/translator/TranslatorESSL.cpp',
61     'src/compiler/translator/TranslatorGLSL.cpp',
62     'src/compiler/translator/TranslatorHLSL.cpp',
63     'src/compiler/translator/Types.cpp',
64     'src/compiler/translator/UnfoldShortCircuit.cpp',
65     'src/compiler/translator/UnfoldShortCircuitAST.cpp',
66     'src/compiler/translator/util.cpp',
67     'src/compiler/translator/ValidateLimitations.cpp',
68     'src/compiler/translator/ValidateOutputs.cpp',
69     'src/compiler/translator/VariableInfo.cpp',
70     'src/compiler/translator/VariablePacker.cpp',
71     'src/compiler/translator/VersionGLSL.cpp',
72     'src/third_party/compiler/ArrayBoundsClamper.cpp',
74 SOURCES += [
75     'src/compiler/translator/glslang_lex.cpp',
76     'src/compiler/translator/glslang_tab.cpp',
78 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gonk'):
79     UNIFIED_SOURCES += [
80         'src/compiler/translator/ossource_posix.cpp',
81     ]
82 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
83     UNIFIED_SOURCES += [
84         'src/compiler/translator/ossource_posix.cpp',
85     ]
86 if CONFIG['MOZ_WIDGET_GTK']:
87     UNIFIED_SOURCES += [
88         'src/compiler/translator/ossource_posix.cpp',
89     ]
90 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
91     UNIFIED_SOURCES += [
92         'src/compiler/translator/ossource_posix.cpp',
93     ]
94 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
95     UNIFIED_SOURCES += [
96         'src/compiler/translator/ossource_win.cpp',
97     ]
100 if CONFIG['GNU_CXX']:
101     CXXFLAGS += [
102         '-Wno-attributes',
103         '-Wno-sign-compare',
104         '-Wno-unknown-pragmas',
105     ]
106     if CONFIG['CLANG_CXX']:
107         CXXFLAGS += ['-Wno-unused-private-field']
109 if CONFIG['MOZ_DIRECTX_SDK_PATH'] and not CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
110     CXXFLAGS += ['-I\'%s/include/\'' % CONFIG['MOZ_DIRECTX_SDK_PATH']]
112 DEFINES['NOMINMAX'] = True
113 DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
114 DEFINES['_HAS_EXCEPTIONS'] = 0
116 if not CONFIG['MOZ_DEBUG']:
117     DEFINES['_SECURE_SCL'] = 0
119 DEFINES['ANGLE_ENABLE_D3D9'] = True
120 if CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
121     DEFINES['ANGLE_ENABLE_D3D11'] = True
123 DEFINES['ANGLE_COMPILE_OPTIMIZATION_LEVEL'] = 'D3DCOMPILE_OPTIMIZATION_LEVEL1'
124 DEFINES['ANGLE_NO_EXCEPTIONS'] = True
126 # We need these defined to nothing so that we don't get bogus dllimport declspecs
127 DEFINES['GL_APICALL'] = ""
128 DEFINES['GL_GLEXT_PROTOTYPES'] = ""
129 DEFINES['EGLAPI'] = ""
131 # ANGLE uses the STL, so we can't use our derpy STL wrappers.
132 DISABLE_STL_WRAPPING = True
135 # Only build libEGL/libGLESv2 on Windows
136 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
137     DIRS += [ 'src/libGLESv2', 'src/libEGL' ]
139 EXPORTS.angle += [ 'include/GLSLANG/ShaderLang.h' ]
140 EXPORTS.angle.KHR += [ 'include/KHR/khrplatform.h' ]
142 LOCAL_INCLUDES += [ 'include', 'src' ]
144 MSVC_ENABLE_PGO = True
146 if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
147     NO_VISIBILITY_FLAGS = True
149 # This tells ANGLE to build the translator with declspec(dllexport) on Windows
150 # which we need to get these symbols exported from gkmedias
151 DEFINES['COMPONENT_BUILD'] = True
152 DEFINES['ANGLE_TRANSLATOR_IMPLEMENTATION'] = True
154 FINAL_LIBRARY = 'gkmedias'