| # Copyright 2021 The Cobalt Authors. All Rights Reserved. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| declare_args() { |
| is_clang = true |
| |
| build_type = "devel" |
| } |
| |
| assert(build_type == "debug" || build_type == "devel" || build_type == "qa" || |
| build_type == "gold") |
| if (build_type == "debug") { |
| is_debug = true |
| } else if (build_type == "devel") { |
| is_devel = true |
| } else if (build_type == "qa") { |
| is_qa = true |
| } else { |
| is_gold = true |
| } |
| |
| assert(target_os != "") |
| |
| starboard_path = "//starboard/$target_os/$target_cpu" |
| |
| host_toolchain = "$starboard_path/toolchain:host" # TODO(andrewsavage) |
| shlib_extension = ".so" # TODO(andrewsavage) |
| set_default_toolchain(host_toolchain) |
| |
| default_compiler_configs = [ |
| "//starboard/build/config:base_configuration", |
| "$starboard_path/platform_configuration", |
| ] |
| set_defaults("static_library") { |
| configs = default_compiler_configs |
| } |
| set_defaults("source_set") { |
| configs = default_compiler_configs |
| } |
| set_defaults("executable") { |
| configs = default_compiler_configs |
| } |
| set_defaults("shared_library") { |
| configs = default_compiler_configs |
| } |
| set_defaults("loadable_module") { |
| configs = default_compiler_configs |
| } |