blob: 2b7312e1c6327b0ffbdac93303a2b8f23a06be41 [file] [log] [blame]
# Copyright 2024 Google, LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
import("../mesa.gni")
config("common_config") {
# Version file not present
mesa_version = "unknown"
defines = [
# Pretend to be Linux for now so we avoid the need to
# introduce DETECT_OS_FUCHSIA into mesa.
"DETECT_OS_LINUX=1",
"DETECT_OS_UNIX=1",
"HAVE_PROGRAM_INVOCATION_NAME=1",
"HAVE_ENDIAN_H=1",
"HAVE_PTHREAD=1",
"HAVE_STRUCT_TIMESPEC=1",
"HAVE_TIMESPEC_GET=1",
"HAVE_UNISTD_H=1",
"HAVE_DLFCN_H=1",
"HAVE___BUILTIN_BSWAP32=1",
"HAVE___BUILTIN_BSWAP64=1",
"HAVE___BUILTIN_CLZ=1",
"HAVE___BUILTIN_CLZLL=1",
"HAVE___BUILTIN_CTZ=1",
"HAVE___BUILTIN_EXPECT=1",
"HAVE___BUILTIN_FFS=1",
"HAVE___BUILTIN_FFSLL=1",
"HAVE___BUILTIN_POPCOUNT=1",
"HAVE___BUILTIN_POPCOUNTLL=1",
"HAVE___BUILTIN_UNREACHABLE=1",
"HAVE_FUNC_ATTRIBUTE_CONST=1",
"HAVE_FUNC_ATTRIBUTE_FLATTEN=1",
"HAVE_FUNC_ATTRIBUTE_FORMAT=1",
"HAVE_FUNC_ATTRIBUTE_MALLOC=1",
"HAVE_FUNC_ATTRIBUTE_PACKED=1",
"HAVE_FUNC_ATTRIBUTE_PURE=1",
"HAVE_FUNC_ATTRIBUTE_UNUSED=1",
"HAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT=1",
"HAVE_FUNC_ATTRIBUTE_NORETURN=1",
"HAVE_DLADDR=1",
"HAVE_DL_ITERATE_PHDR=1",
"PACKAGE_VERSION=\"$mesa_version\" ",
"_DEFAULT_SOURCE",
"_GNU_SOURCE=1",
]
if (is_debug) {
defines += [ "DEBUG=1" ]
}
cflags = [
"-Wno-sign-compare",
"-Wno-unused-function",
"-Wno-extra-semi",
"-Wno-newline-eof",
"-Wno-tautological-constant-out-of-range-compare",
"-Wno-unknown-pragmas",
"-Wno-int-in-bool-context",
"-Wno-conversion",
"-Wno-deprecated-anon-enum-enum-conversion",
"-Wno-strict-prototypes",
]
}