blob: 38dcd9fea97aa082cd14cfee37679029d906a8e2 [file] [log] [blame]
# Copyright 2022 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.
static_library("cpp14_supported") {
sources = [
"cpp14_constexpr.cc",
"cpp14_initialization.cc",
]
cflags_cc = [ "-std=c++14" ]
deps = [ "//starboard:starboard_group" ]
}
if (sb_enable_cpp17_audit) {
static_library("cpp17_supported") {
sources = [ "cpp17_support.cc" ]
deps = [
":cpp17_supported_config_shim",
"//starboard:starboard_group",
]
}
# We do this to ensure the -std=c++17 flag is added after any other -std flag
# so it overrides any other one.
group("cpp17_supported_config_shim") {
public_configs = [ ":cpp17_supported_config" ]
}
config("cpp17_supported_config") {
cflags_cc = [ "-std=c++17" ]
}
}
if (sb_enable_cpp20_audit) {
static_library("cpp20_supported") {
sources = [ "cpp20_support.cc" ]
deps = [
":cpp20_supported_config_shim",
"//starboard:starboard_group",
]
configs -= [ "//starboard/build/config:default_cpp_standard" ]
}
# We do this to ensure the -std=c++20 flag is added after any other -std flag
# so it overrides any other one.
group("cpp20_supported_config_shim") {
public_configs = [ "//starboard/build/config:cpp20_supported_config" ]
}
}