blob: 2cdcf78af48ca9b2fc093ef42f8804475003a054 [file] [log] [blame]
Alexis Hetu91f10e32016-06-07 19:53:42 -04001# Copyright 2016 The SwiftShader Authors. All Rights Reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# Need a separate config to ensure the warnings are added to the end.
16config("swiftshader_renderer_private_config") {
17 if (is_clang) {
18 cflags = [
19 "-DLOG_TAG=\"swiftshader_renderer\"",
20 "-fno-operator-names",
21 "-msse2",
22 "-Wno-sign-compare",
23 ]
Alexis Hetu46c1b912016-06-23 11:06:46 -040024 } else {
25 if (host_os == "win") {
26 cflags = [
27 "/wd4201", # nameless struct/union
28 "/wd4324", # structure was padded due to alignment specifier
Alexis Hetu91f10e32016-06-07 19:53:42 -040029 ]
30 }
31 }
Alexis Hetu46c1b912016-06-23 11:06:46 -040032
33 if (!is_debug) {
34 cflags += [
35 "-DANGLE_DISABLE_TRACE",
36 ]
37 }
Alexis Hetu91f10e32016-06-07 19:53:42 -040038}
39
40source_set("swiftshader_renderer") {
41 deps = [
42 "../Common:swiftshader_common",
43 "../Shader:swiftshader_shader",
44 "../Main:swiftshader_main",
45 ]
46
47 sources = [
48 "Blitter.cpp",
49 "Clipper.cpp",
50 "Color.cpp",
51 "Context.cpp",
52 "ETC_Decoder.cpp",
53 "Matrix.cpp",
54 "PixelProcessor.cpp",
55 "Plane.cpp",
56 "Point.cpp",
57 "QuadRasterizer.cpp",
58 "Renderer.cpp",
59 "Sampler.cpp",
60 "SetupProcessor.cpp",
61 "Surface.cpp",
62 "TextureStage.cpp",
63 "Vector.cpp",
64 "VertexProcessor.cpp",
65 ]
66
Alexis Hetu46c1b912016-06-23 11:06:46 -040067 if (host_os == "win") {
68 configs -= [
69 "//build/config/win:unicode"
70 ]
71 }
72
Alexis Hetu91f10e32016-06-07 19:53:42 -040073 configs += [
74 ":swiftshader_renderer_private_config",
75 ]
76
77 include_dirs = [
78 ".",
79 "..",
80 "../Common",
81 "../Main",
82 "../Shader",
83 ]
84}