Skip to content

Commit

Permalink
Compile Skia with -std=c++14 but disable C++17 extension warning.
Browse files Browse the repository at this point in the history
Previously Skia was compiled with -std=c++17. This is dangerous because
there are headers that use the preprocessor to produce different C++
code in C++14 and C++17 builds.

Standalone Skia is now compiling this way. Make Chrome compile Skia this
way, too.

Bug: 1257145
Change-Id: I4064518824708dced89f6ba875f958438fdbc912
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3218673
Reviewed-by: Anders Hartvoll Ruud <[email protected]>
Commit-Queue: Brian Salomon <[email protected]>
Cr-Commit-Position: refs/heads/main@{#931521}
  • Loading branch information
bsalomon authored and Chromium LUCI CQ committed Oct 14, 2021
1 parent d71f6f9 commit 86df2cc
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions skia/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,19 @@ config("skia_library_config") {
"/wd5041", # out-of-line definition for constexpr static data member is
# not needed and is deprecated in C++17
]
cflags_cc = [ "/std:c++17" ]
cflags_cc = [
"/std:c++14",
"-Wno-c++17-extensions",
]
} else {
cflags_cc = [ "-std=c++17" ]
cflags_objcc = [ "-std=c++17" ]
cflags_cc = [
"-std=c++14",
"-Wno-c++17-extensions",
]
cflags_objcc = [
"-std=c++14",
"-Wno-c++17-extensions",
]
}
}

Expand Down

0 comments on commit 86df2cc

Please sign in to comment.