summaryrefslogtreecommitdiffstats
path: root/third_party/mesa
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-07-09 20:57:01 -0700
committerNico Weber <thakis@chromium.org>2015-07-10 03:58:26 +0000
commit1ced9276898ada0eee82716bbb871732a5a519fe (patch)
treee253f16c04037a5758186ab7b304369a05ac57c7 /third_party/mesa
parent5629a028e32ca73cbf975762281c50277f769817 (diff)
downloadchromium_src-1ced9276898ada0eee82716bbb871732a5a519fe.zip
chromium_src-1ced9276898ada0eee82716bbb871732a5a519fe.tar.gz
chromium_src-1ced9276898ada0eee82716bbb871732a5a519fe.tar.bz2
clang/win: Try to get bots green after https://codereview.chromium.org/1226583002
More than just the "mesa" target need the YY_USE_CONST define, for example mesa_libglslcommon. Add it to the defines set for all mesa targets. src/src/glsl/glcpp/glcpp-lex.l(319,21) : error: passing 'const char *' to parameter of type 'char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] glcpp__scan_string(shader,parser->scanner); ^~~~~~ src/chromium_gensrc/mesa/glcpp-lex.c(2104,52) : note: passing argument to parameter 'yystr' here YY_BUFFER_STATE glcpp__scan_string (yyconst char * yystr , yyscan_t yyscanner) ^ 1 error generated. BUG=504696 R=sammc@chromium.org TBR=sammc@chromium.org Review URL: https://codereview.chromium.org/1230113002. Cr-Commit-Position: refs/heads/master@{#338236}
Diffstat (limited to 'third_party/mesa')
-rw-r--r--third_party/mesa/BUILD.gn14
-rw-r--r--third_party/mesa/mesa.gyp12
2 files changed, 17 insertions, 9 deletions
diff --git a/third_party/mesa/BUILD.gn b/third_party/mesa/BUILD.gn
index 67caf8e..60caeb6 100644
--- a/third_party/mesa/BUILD.gn
+++ b/third_party/mesa/BUILD.gn
@@ -89,6 +89,15 @@ config("mesa_internal_config") {
defines += [ "_GNU_SOURCE" ]
}
+ if (is_win) {
+ defines += [
+ # Generated files use const only if __cplusplus or __STDC__ is defined.
+ # On Windows, neither is defined, so define YY_USE_CONST to explicitly
+ # enable const.
+ "YY_USE_CONST",
+ ]
+ }
+
if (is_posix) {
defines += [
"HAVE_DLOPEN",
@@ -647,11 +656,6 @@ static_library("mesa") {
defines = [
# Because we're building as a static library
"_GLAPI_NO_EXPORTS",
-
- # Generated files use const only if __cplusplus or __STDC__ is defined.
- # On Windows, neither is defined, so define YY_USE_CONST to explicitly
- # enable const.
- "YY_USE_CONST",
]
}
diff --git a/third_party/mesa/mesa.gyp b/third_party/mesa/mesa.gyp
index 870b135..4cb1012 100644
--- a/third_party/mesa/mesa.gyp
+++ b/third_party/mesa/mesa.gyp
@@ -51,6 +51,14 @@
'_GNU_SOURCE',
],
}],
+ ['OS=="win"', {
+ 'defines': [
+ # Generated files use const only if __cplusplus or __STDC__ is
+ # defined. On Windows, neither is defined, so define YY_USE_CONST
+ # to explicitly enable const.
+ 'YY_USE_CONST',
+ ],
+ }],
['os_posix == 1', {
'defines': [
'HAVE_DLOPEN',
@@ -650,10 +658,6 @@
'defines': [
# Because we're building as a static library
'_GLAPI_NO_EXPORTS',
- # Generated files use const only if __cplusplus or __STDC__ is
- # defined. On Windows, neither is defined, so define YY_USE_CONST
- # to explicitly enable const.
- 'YY_USE_CONST',
],
}],
],