C++14
Change-Id: I4bbf3e5e6d9d4e11e968a0bc88ce43444047a382 Reviewed-on: https://skia-review.googlesource.com/130903 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
This commit is contained in:
parent
728b7f3cdd
commit
7258e97e8e
@ -96,7 +96,7 @@ config("default") {
|
||||
"-fPIC",
|
||||
"-Werror",
|
||||
]
|
||||
cflags_cc += [ "-std=c++11" ]
|
||||
cflags_cc += [ "-std=c++14" ]
|
||||
|
||||
# The main idea is to slim the exported API, but these flags also improve link time on Mac.
|
||||
# These would make stack traces worse on Linux, so we don't just set them willy-nilly.
|
||||
|
@ -207,7 +207,7 @@
|
||||
},
|
||||
{
|
||||
"name": "$result",
|
||||
"reason": "Failed fiddles with their errors:\n\n\n1. https://fiddle.skia.org/c/abc\n\nninja: Entering directory `out/Release'\n[1/7] ACTION //:skia.h(//gn/toolchain:gcc_like)\n[2/7] stamp obj/skia.h.stamp\n[3/7] compile ../../tools/fiddle/draw.cpp\nFAILED: obj/tools/fiddle/fiddle.draw.o \nc++ -MMD -MF obj/tools/fiddle/fiddle.draw.o.d -DNDEBUG -DSK_HAS_HEIF_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_SUPPORT_PDF -DSK_PDF_USE_SFNTLY -DSK_HAS_PNG_LIBRARY -DSK_CODEC_DECODES_RAW -DSK_HAS_WEBP_LIBRARY -DSK_XML -DSK_GAMMA_APPLY_TO_A8 -DSK_ENABLE_DISCRETE_GPU -DGR_TEST_UTILS=1 -DSK_SAMPLES_FOR_X -DSK_SUPPORT_ATLAS_TEXT=1 -I../../tools/flags -I../../include/private -I../../src/c -I../../src/codec -I../../src/core -I../../src/effects -I../../src/fonts -I../../src/image -I../../src/images -I../../src/lazy -I../../src/opts -I../../src/pathops -I../../src/pdf -I../../src/ports -I../../src/sfnt -I../../src/shaders -I../../src/shaders/gradients -I../../src/sksl -I../../src/utils -I../../src/utils/win -I../../src/xml -I../../third_party/gif -I../../src/gpu -I../../tools/gpu -I../../include/android -I../../include/c -I../../include/codec -I../../include/config -I../../include/core -I../../include/effects -I../../include/encode -I../../include/gpu -I../../include/gpu/gl -I../../include/atlastext -I../../include/pathops -I../../include/ports -I../../include/svg -I../../include/utils -I../../include/utils/mac -I../../include/atlastext -Igen -fstrict-aliasing -fPIC -Werror -Wall -Wextra -Winit-self -Wpointer-arith -Wsign-compare -Wvla -Wno-deprecated-declarations -Wno-maybe-uninitialized -Wno-unused-parameter -O3 -fdata-sections -ffunction-sections -g -std=c++11 -fno-exceptions -fno-rtti -Wnon-virtual-dtor -Wno-error -c ../../tools/fiddle/draw.cpp -o obj/tools/fiddle/fiddle.draw.o\n../../tools/fiddle/draw.cpp: In function 'void draw(SkCanvas*)':\ndraw.cpp:5:12: error: aggregate 'SkMask mask' has incomplete type and cannot be defined\n }\n ^ \ndraw.cpp:6:28: error: incomplete type 'SkMask' used in nested name specifier\n \n ^ \ndraw.cpp:14:28: error: incomplete type 'SkMask' used in nested name specifier\n uint8_t bytes[] = { 0, 1, 2, 3, 4, 5, 6, 7 };\n ^~~~~~~~~~\n[4/7] compile ../../tools/fiddle/egl_context.cpp\n[5/7] compile ../../tools/fiddle/fiddle_main.cpp\n[6/7] link libskia.a\nninja: build stopped: subcommand failed.\n\n\n\n",
|
||||
"reason": "Failed fiddles with their errors:\n\n\n1. https://fiddle.skia.org/c/abc\n\nninja: Entering directory `out/Release'\n[1/7] ACTION //:skia.h(//gn/toolchain:gcc_like)\n[2/7] stamp obj/skia.h.stamp\n[3/7] compile ../../tools/fiddle/draw.cpp\nFAILED: obj/tools/fiddle/fiddle.draw.o \nc++ -MMD -MF obj/tools/fiddle/fiddle.draw.o.d -DNDEBUG -DSK_HAS_HEIF_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_SUPPORT_PDF -DSK_PDF_USE_SFNTLY -DSK_HAS_PNG_LIBRARY -DSK_CODEC_DECODES_RAW -DSK_HAS_WEBP_LIBRARY -DSK_XML -DSK_GAMMA_APPLY_TO_A8 -DSK_ENABLE_DISCRETE_GPU -DGR_TEST_UTILS=1 -DSK_SAMPLES_FOR_X -DSK_SUPPORT_ATLAS_TEXT=1 -I../../tools/flags -I../../include/private -I../../src/c -I../../src/codec -I../../src/core -I../../src/effects -I../../src/fonts -I../../src/image -I../../src/images -I../../src/lazy -I../../src/opts -I../../src/pathops -I../../src/pdf -I../../src/ports -I../../src/sfnt -I../../src/shaders -I../../src/shaders/gradients -I../../src/sksl -I../../src/utils -I../../src/utils/win -I../../src/xml -I../../third_party/gif -I../../src/gpu -I../../tools/gpu -I../../include/android -I../../include/c -I../../include/codec -I../../include/config -I../../include/core -I../../include/effects -I../../include/encode -I../../include/gpu -I../../include/gpu/gl -I../../include/atlastext -I../../include/pathops -I../../include/ports -I../../include/svg -I../../include/utils -I../../include/utils/mac -I../../include/atlastext -Igen -fstrict-aliasing -fPIC -Werror -Wall -Wextra -Winit-self -Wpointer-arith -Wsign-compare -Wvla -Wno-deprecated-declarations -Wno-maybe-uninitialized -Wno-unused-parameter -O3 -fdata-sections -ffunction-sections -g -std=c++14 -fno-exceptions -fno-rtti -Wnon-virtual-dtor -Wno-error -c ../../tools/fiddle/draw.cpp -o obj/tools/fiddle/fiddle.draw.o\n../../tools/fiddle/draw.cpp: In function 'void draw(SkCanvas*)':\ndraw.cpp:5:12: error: aggregate 'SkMask mask' has incomplete type and cannot be defined\n }\n ^ \ndraw.cpp:6:28: error: incomplete type 'SkMask' used in nested name specifier\n \n ^ \ndraw.cpp:14:28: error: incomplete type 'SkMask' used in nested name specifier\n uint8_t bytes[] = { 0, 1, 2, 3, 4, 5, 6, 7 };\n ^~~~~~~~~~\n[4/7] compile ../../tools/fiddle/egl_context.cpp\n[5/7] compile ../../tools/fiddle/fiddle_main.cpp\n[6/7] link libskia.a\nninja: build stopped: subcommand failed.\n\n\n\n",
|
||||
"recipe_result": null,
|
||||
"status_code": 1
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ def GenTests(api):
|
||||
"col": 0
|
||||
},
|
||||
{
|
||||
"text": "c++ -MMD -MF obj/tools/fiddle/fiddle.draw.o.d -DNDEBUG -DSK_HAS_HEIF_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_SUPPORT_PDF -DSK_PDF_USE_SFNTLY -DSK_HAS_PNG_LIBRARY -DSK_CODEC_DECODES_RAW -DSK_HAS_WEBP_LIBRARY -DSK_XML -DSK_GAMMA_APPLY_TO_A8 -DSK_ENABLE_DISCRETE_GPU -DGR_TEST_UTILS=1 -DSK_SAMPLES_FOR_X -DSK_SUPPORT_ATLAS_TEXT=1 -I../../tools/flags -I../../include/private -I../../src/c -I../../src/codec -I../../src/core -I../../src/effects -I../../src/fonts -I../../src/image -I../../src/images -I../../src/lazy -I../../src/opts -I../../src/pathops -I../../src/pdf -I../../src/ports -I../../src/sfnt -I../../src/shaders -I../../src/shaders/gradients -I../../src/sksl -I../../src/utils -I../../src/utils/win -I../../src/xml -I../../third_party/gif -I../../src/gpu -I../../tools/gpu -I../../include/android -I../../include/c -I../../include/codec -I../../include/config -I../../include/core -I../../include/effects -I../../include/encode -I../../include/gpu -I../../include/gpu/gl -I../../include/atlastext -I../../include/pathops -I../../include/ports -I../../include/svg -I../../include/utils -I../../include/utils/mac -I../../include/atlastext -Igen -fstrict-aliasing -fPIC -Werror -Wall -Wextra -Winit-self -Wpointer-arith -Wsign-compare -Wvla -Wno-deprecated-declarations -Wno-maybe-uninitialized -Wno-unused-parameter -O3 -fdata-sections -ffunction-sections -g -std=c++11 -fno-exceptions -fno-rtti -Wnon-virtual-dtor -Wno-error -c ../../tools/fiddle/draw.cpp -o obj/tools/fiddle/fiddle.draw.o",
|
||||
"text": "c++ -MMD -MF obj/tools/fiddle/fiddle.draw.o.d -DNDEBUG -DSK_HAS_HEIF_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_SUPPORT_PDF -DSK_PDF_USE_SFNTLY -DSK_HAS_PNG_LIBRARY -DSK_CODEC_DECODES_RAW -DSK_HAS_WEBP_LIBRARY -DSK_XML -DSK_GAMMA_APPLY_TO_A8 -DSK_ENABLE_DISCRETE_GPU -DGR_TEST_UTILS=1 -DSK_SAMPLES_FOR_X -DSK_SUPPORT_ATLAS_TEXT=1 -I../../tools/flags -I../../include/private -I../../src/c -I../../src/codec -I../../src/core -I../../src/effects -I../../src/fonts -I../../src/image -I../../src/images -I../../src/lazy -I../../src/opts -I../../src/pathops -I../../src/pdf -I../../src/ports -I../../src/sfnt -I../../src/shaders -I../../src/shaders/gradients -I../../src/sksl -I../../src/utils -I../../src/utils/win -I../../src/xml -I../../third_party/gif -I../../src/gpu -I../../tools/gpu -I../../include/android -I../../include/c -I../../include/codec -I../../include/config -I../../include/core -I../../include/effects -I../../include/encode -I../../include/gpu -I../../include/gpu/gl -I../../include/atlastext -I../../include/pathops -I../../include/ports -I../../include/svg -I../../include/utils -I../../include/utils/mac -I../../include/atlastext -Igen -fstrict-aliasing -fPIC -Werror -Wall -Wextra -Winit-self -Wpointer-arith -Wsign-compare -Wvla -Wno-deprecated-declarations -Wno-maybe-uninitialized -Wno-unused-parameter -O3 -fdata-sections -ffunction-sections -g -std=c++14 -fno-exceptions -fno-rtti -Wnon-virtual-dtor -Wno-error -c ../../tools/fiddle/draw.cpp -o obj/tools/fiddle/fiddle.draw.o",
|
||||
"line": 0,
|
||||
"col": 0
|
||||
},
|
||||
|
@ -128,7 +128,7 @@ def compile_header(header):
|
||||
args = ([] if fnmatch.fnmatch(header, 'include/c/*') else
|
||||
public_header_args if fnmatch.fnmatch(header, 'include/*') else
|
||||
all_header_args)
|
||||
cmd = ['c++', '--std=c++11'] + args + [ '-o', '/dev/null', '-c', '-x', 'c++', '-']
|
||||
cmd = ['c++', '--std=c++14'] + args + [ '-o', '/dev/null', '-c', '-x', 'c++', '-']
|
||||
proc = subprocess.Popen(cmd, stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
proc.stdin.write('#include "%s"\n#include "%s"\n' % (header, header))
|
||||
|
Loading…
Reference in New Issue
Block a user