1 # Copyright (c) 2017 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 # This file contains configs that need to be added or removed to all
6 # SwiftShader libraries
12 configs_to_delete += [ "//build/config/win:unicode" ]
16 # always build release version of SwiftShader for performance reasons
17 configs_to_delete += [
18 "//build/config:debug",
19 "//build/config/compiler:default_optimization",
22 "//build/config:release",
23 "//build/config/compiler:optimize",
26 configs_to_delete += [ "//build/config/win:default_crt" ]
27 configs_to_add += [ "//build/config/win:release_crt" ]
31 configs_to_delete += [ "//build/config/compiler:chromium_code" ]
33 "//build/config/compiler:no_chromium_code",
34 "//third_party/swiftshader:swiftshader_config",
37 template("swiftshader_source_set") {
38 source_set(target_name) {
39 configs -= configs_to_delete
40 configs += configs_to_add
41 forward_variables_from(invoker, "*", [ "configs" ])
42 if (defined(invoker.configs)) {
43 configs += invoker.configs
48 template("swiftshader_shared_library") {
49 shared_library(target_name) {
50 configs -= configs_to_delete
51 configs += configs_to_add
52 forward_variables_from(invoker, "*", [ "configs" ])
53 if (defined(invoker.configs)) {
54 configs += invoker.configs