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 import("//build/config/ui.gni")
16 import("../swiftshader.gni")
18 # Need a separate config to ensure the warnings are added to the end.
19 config("swiftshader_main_private_config") {
22 "/wd4201", # nameless struct/union
23 "/wd5030", # attribute is not recognized
28 "-Wno-string-conversion",
32 } else if (target_cpu == "x86" || target_cpu == "x64") {
35 [ "NO_SANITIZE_FUNCTION=__attribute__((no_sanitize(\"function\")))" ]
39 swiftshader_source_set("swiftshader_main") {
41 "../Common:swiftshader_common",
50 if (use_ozone && !is_win) {
51 sources += [ "FrameBufferOzone.cpp" ]
52 } else if (is_linux) {
60 sources += [ "FrameBufferOSX.mm" ]
70 libs = [ "dxguid.lib" ] # For FrameBufferDD
73 configs = [ ":swiftshader_main_private_config" ]
75 include_dirs = [ ".." ]
78 include_dirs += [ "../../include" ]