blob: 05508a136938652fe5391c885e788dea78d7b4ef [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("//build/config/win/visual_studio_version.gni")
config("platform_configuration") {
configs = [
"//starboard/build/config/sabi",
"//starboard/build/config/win:common",
]
defines = [
# Disable warnings. These options were inherited from Chromium.
"_CRT_SECURE_NO_DEPRECATE",
"_CRT_NONSTDC_NO_WARNINGS",
"_CRT_NONSTDC_NO_DEPRECATE",
"_SCL_SECURE_NO_DEPRECATE",
# Disable suggestions to switch to Microsoft-specific secure CRT.
"_CRT_SECURE_NO_WARNINGS",
"__STDC_FORMAT_MACROS", # so that we get PRI*
# By defining this, M_PI will get #defined.
"_USE_MATH_DEFINES",
# min and max collide with std::min and std::max
"NOMINMAX",
# Conform with C99 spec.
"_CRT_STDIO_ISO_WIDE_SPECIFIERS",
]
include_dirs = [
# POSIX emulation headers - these need to come *before* system include_dirs.
"//starboard/shared/win32/posix_emu/include",
]
ldflags = [
# Suppress import library warning caused by the win32/posix_emu
"/ignore:4286",
]
}
config("no_pedantic_warnings") {
cflags = [
# Enable some warnings, even those that are disabled by default.
# See https://msdn.microsoft.com/en-us/library/23k5d385.aspx
"/W2",
]
}
config("pedantic_warnings") {
cflags = [
# Enable some warnings, even those that are disabled by default.
# See https://msdn.microsoft.com/en-us/library/23k5d385.aspx
"/W4",
# Warn if an enumeration value is unhandled in switch (C4062).
# This warning is off by default, so it must be turned on explicitly.
"/w44062",
]
}