1 # Copyright 2016 The SwiftShader Authors. All Rights Reserved.
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 config("swiftshader_config") {
18 "/GS", # Detects some buffer overruns
20 "/D_CRT_SECURE_NO_DEPRECATE",
25 "/Gd", # Default calling convention
29 cflags += [ "/RTC1" ] # Run-Time Error Checks
31 cflags += [ "/DANGLE_DISABLE_TRACE" ]
34 cflags = [ "-std=c++11" ]
39 # All Release builds use function/data sections to make the shared libraries smaller
41 "-ffunction-sections",
43 "-fomit-frame-pointer",
44 "-DANGLE_DISABLE_TRACE",
47 # Choose the right Release architecture
48 if (target_cpu == "x64") {
49 cflags += [ "-march=core2" ]
51 cflags += [ "-march=i686" ]
55 if (target_cpu == "x64") { # 64 bit version
60 } else { # 32 bit version
66 group("swiftshader") {
68 "src/OpenGL/libGLESv2:swiftshader_libGLESv2",
69 "src/OpenGL/libEGL:swiftshader_libEGL",