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 # Need a separate config to ensure the warnings are added to the end.
16 config("swiftshader_libEGL_private_config") {
17 defines = [ "EGL_EGLEXT_PROTOTYPES" ]
21 "/wd4201", # nameless struct/union
22 "/wd4065", # switch statement contains 'default' but no 'case' labels
23 "/wd5030", # attribute is not recognized
31 cflags = [ "-Wno-sign-compare" ]
33 cflags += [ "-Wno-unused-but-set-variable" ]
37 "LOG_TAG=\"swiftshader_libEGL\"",
38 "EGLAPI=__attribute__((visibility(\"default\")))",
43 shared_library("swiftshader_libEGL") {
45 output_name = "libEGL"
46 output_dir = "$root_out_dir/swiftshader"
50 "//build/config:exe_and_shlib_deps",
54 "../common/Object.cpp",
66 sources += [ "../common/debug.cpp" ]
70 sources += [ "OSXUtils.mm" ]
75 ldflags = [ "-Wl,-install_name,@rpath/libswiftshader_libEGL.dylib" ]
77 configs -= [ "//build/config/win:unicode" ]
78 ldflags = [ "/DEF:" + rebase_path("libGLESv2.def", root_build_dir) ]
79 } else if (is_linux) {
80 sources += [ "../../Main/libX11.cpp" ]
82 [ "-Wl,--version-script=" + rebase_path("exports.map", root_build_dir) ]
85 configs -= [ "//build/config/compiler:chromium_code" ]
87 "//build/config/compiler:no_chromium_code",
88 "//third_party/swiftshader:swiftshader_config",
89 ":swiftshader_libEGL_private_config",