summaryrefslogtreecommitdiffstats
path: root/gfx/angle/moz.build
blob: 1dbfaf2cee12b3f678f150bee1c57af02d441d68 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178

#
# WARNING WARNING WARNING
#
# This file is generated by generate_mozbuild.py (from
# https://github.com/mozilla/angle). Do not modify it without also modifying
# generate_mozbuild.py.
#
# WARNING WARNING WARNING
#
UNIFIED_SOURCES += [
    'src/common/angleutils.cpp',
    'src/common/debug.cpp',
    'src/common/Float16ToFloat32.cpp',
    'src/common/mathutil.cpp',
    'src/common/MemoryBuffer.cpp',
    'src/common/string_utils.cpp',
    'src/common/tls.cpp',
    'src/common/utilities.cpp',
    'src/compiler/preprocessor/DiagnosticsBase.cpp',
    'src/compiler/preprocessor/DirectiveHandlerBase.cpp',
    'src/compiler/preprocessor/DirectiveParser.cpp',
    'src/compiler/preprocessor/ExpressionParser.cpp',
    'src/compiler/preprocessor/Input.cpp',
    'src/compiler/preprocessor/Lexer.cpp',
    'src/compiler/preprocessor/Macro.cpp',
    'src/compiler/preprocessor/MacroExpander.cpp',
    'src/compiler/preprocessor/Preprocessor.cpp',
    'src/compiler/preprocessor/Token.cpp',
    'src/compiler/preprocessor/Tokenizer.cpp',
    'src/compiler/translator/AddDefaultReturnStatements.cpp',
    'src/compiler/translator/ArrayReturnValueToOutParameter.cpp',
    'src/compiler/translator/ASTMetadataHLSL.cpp',
    'src/compiler/translator/blocklayout.cpp',
    'src/compiler/translator/blocklayoutHLSL.cpp',
    'src/compiler/translator/BuiltInFunctionEmulator.cpp',
    'src/compiler/translator/BuiltInFunctionEmulatorGLSL.cpp',
    'src/compiler/translator/BuiltInFunctionEmulatorHLSL.cpp',
    'src/compiler/translator/Cache.cpp',
    'src/compiler/translator/CallDAG.cpp',
    'src/compiler/translator/CodeGen.cpp',
    'src/compiler/translator/Compiler.cpp',
    'src/compiler/translator/DeferGlobalInitializers.cpp',
    'src/compiler/translator/depgraph/DependencyGraph.cpp',
    'src/compiler/translator/depgraph/DependencyGraphBuilder.cpp',
    'src/compiler/translator/depgraph/DependencyGraphOutput.cpp',
    'src/compiler/translator/depgraph/DependencyGraphTraverse.cpp',
    'src/compiler/translator/Diagnostics.cpp',
    'src/compiler/translator/DirectiveHandler.cpp',
    'src/compiler/translator/EmulatePrecision.cpp',
    'src/compiler/translator/ExpandIntegerPowExpressions.cpp',
    'src/compiler/translator/ExtensionGLSL.cpp',
    'src/compiler/translator/FlagStd140Structs.cpp',
    'src/compiler/translator/ForLoopUnroll.cpp',
    'src/compiler/translator/InfoSink.cpp',
    'src/compiler/translator/Initialize.cpp',
    'src/compiler/translator/InitializeDll.cpp',
    'src/compiler/translator/InitializeParseContext.cpp',
    'src/compiler/translator/InitializeVariables.cpp',
    'src/compiler/translator/Intermediate.cpp',
    'src/compiler/translator/IntermNode.cpp',
    'src/compiler/translator/IntermNodePatternMatcher.cpp',
    'src/compiler/translator/intermOut.cpp',
    'src/compiler/translator/IntermTraverse.cpp',
    'src/compiler/translator/LoopInfo.cpp',
    'src/compiler/translator/Operator.cpp',
    'src/compiler/translator/OutputESSL.cpp',
    'src/compiler/translator/OutputGLSL.cpp',
    'src/compiler/translator/OutputGLSLBase.cpp',
    'src/compiler/translator/OutputHLSL.cpp',
    'src/compiler/translator/ParseContext.cpp',
    'src/compiler/translator/PoolAlloc.cpp',
    'src/compiler/translator/PruneEmptyDeclarations.cpp',
    'src/compiler/translator/RecordConstantPrecision.cpp',
    'src/compiler/translator/RegenerateStructNames.cpp',
    'src/compiler/translator/RemoveDynamicIndexing.cpp',
    'src/compiler/translator/RemovePow.cpp',
    'src/compiler/translator/RemoveSwitchFallThrough.cpp',
    'src/compiler/translator/RewriteDoWhile.cpp',
    'src/compiler/translator/RewriteElseBlocks.cpp',
    'src/compiler/translator/RewriteTexelFetchOffset.cpp',
    'src/compiler/translator/ScalarizeVecAndMatConstructorArgs.cpp',
    'src/compiler/translator/SearchSymbol.cpp',
    'src/compiler/translator/SeparateArrayInitialization.cpp',
    'src/compiler/translator/SeparateDeclarations.cpp',
    'src/compiler/translator/SeparateExpressionsReturningArrays.cpp',
    'src/compiler/translator/ShaderLang.cpp',
    'src/compiler/translator/ShaderVars.cpp',
    'src/compiler/translator/SimplifyLoopConditions.cpp',
    'src/compiler/translator/SplitSequenceOperator.cpp',
    'src/compiler/translator/StructureHLSL.cpp',
    'src/compiler/translator/SymbolTable.cpp',
    'src/compiler/translator/TextureFunctionHLSL.cpp',
    'src/compiler/translator/timing/RestrictFragmentShaderTiming.cpp',
    'src/compiler/translator/timing/RestrictVertexShaderTiming.cpp',
    'src/compiler/translator/TranslatorESSL.cpp',
    'src/compiler/translator/TranslatorGLSL.cpp',
    'src/compiler/translator/TranslatorHLSL.cpp',
    'src/compiler/translator/Types.cpp',
    'src/compiler/translator/UnfoldShortCircuitAST.cpp',
    'src/compiler/translator/UnfoldShortCircuitToIf.cpp',
    'src/compiler/translator/UniformHLSL.cpp',
    'src/compiler/translator/util.cpp',
    'src/compiler/translator/UtilsHLSL.cpp',
    'src/compiler/translator/ValidateGlobalInitializer.cpp',
    'src/compiler/translator/ValidateLimitations.cpp',
    'src/compiler/translator/ValidateMaxParameters.cpp',
    'src/compiler/translator/ValidateOutputs.cpp',
    'src/compiler/translator/ValidateSwitch.cpp',
    'src/compiler/translator/VariableInfo.cpp',
    'src/compiler/translator/VariablePacker.cpp',
    'src/compiler/translator/VersionGLSL.cpp',
    'src/third_party/compiler/ArrayBoundsClamper.cpp',
]
SOURCES += [
    'src/compiler/translator/EmulateGLFragColorBroadcast.cpp',
    'src/compiler/translator/glslang_lex.cpp',
    'src/compiler/translator/glslang_tab.cpp',
]


if CONFIG['GNU_CXX']:
    CXXFLAGS += [
        '-Wno-attributes',
        '-Wno-shadow',
        '-Wno-sign-compare',
        '-Wno-unknown-pragmas',
        '-Wno-unreachable-code',
    ]
    if CONFIG['CLANG_CXX']:
        CXXFLAGS += [
            '-Wno-inconsistent-missing-override',
            '-Wno-unused-private-field',
        ]
    else:
        CXXFLAGS += [
            '-Wno-shadow-compatible-local',
            '-Wno-shadow-local',
        ]

DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
DEFINES['_HAS_EXCEPTIONS'] = 0

if not CONFIG['MOZ_DEBUG']:
    DEFINES['_SECURE_SCL'] = 0

DEFINES['ANGLE_ENABLE_D3D9'] = True
DEFINES['ANGLE_SKIP_DXGI_1_2_CHECK'] = True
if CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
    DEFINES['ANGLE_ENABLE_D3D11'] = True

DEFINES['ANGLE_COMPILE_OPTIMIZATION_LEVEL'] = 'D3DCOMPILE_OPTIMIZATION_LEVEL1'
DEFINES['ANGLE_NO_EXCEPTIONS'] = True

# We need these defined to nothing so that we don't get bogus dllimport declspecs
DEFINES['GL_APICALL'] = ""
DEFINES['GL_GLEXT_PROTOTYPES'] = ""
DEFINES['EGLAPI'] = ""


# Only build libEGL/libGLESv2 on Windows
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
    DIRS += [ 'src/libANGLE', 'src/libGLESv2', 'src/libEGL' ]

DEFINES['ANGLE_ENABLE_HLSL'] = "1"
DEFINES['ANGLE_ENABLE_GLSL'] = "1"
DEFINES['ANGLE_ENABLE_ESSL'] = "1"
DEFINES['ANGLE_ENABLE_KEYEDMUTEX'] = "1"

EXPORTS.angle += [ 'include/GLSLANG/ShaderLang.h', 'include/GLSLANG/ShaderVars.h', 'include/platform/Platform.h' ]
EXPORTS.angle.KHR += [ 'include/KHR/khrplatform.h' ]

LOCAL_INCLUDES += [ 'include', 'src', 'src/common/third_party/numerics' ]

# We allow warnings for third-party code that can be updated from upstream.
ALLOW_COMPILER_WARNINGS = True

FINAL_LIBRARY = 'gkmedias'