blob: f9b09ee1aeadfc69ca38fe7a7d29e731cae6bd20 [file] [log] [blame]
# 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.
import("//starboard/build/platforms.gni")
declare_args() {
is_clang = true
build_type = "devel"
target_platform = "stub"
is_starboard = true
}
is_debug = build_type == "debug"
is_devel = build_type == "devel"
is_qa = build_type == "qa"
is_gold = build_type == "gold"
assert(is_debug || is_devel || is_qa || is_gold)
sb_allows_memory_tracking = !is_gold
starboard_path = platforms["$target_platform"]
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",
"//$starboard_path/platform_configuration",
]
if (is_starboard) {
default_compiler_configs += [ "//starboard/build/config:starboard" ]
}
import("//$starboard_path/platform_configuration/configuration.gni")
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
}