skia2/include/core
Kevin Lubick 7a14f783bd [bazel] Sketching out HelloWorld sk_app using GL
bazel run //example:hello_world --config=clang
causes a window to open and draws a circle and a square.
Text to follow in a future CL.

To make this work, I had to get rid of musl and use glibc.
All the shared libraries (.so files) that were pre-built
and available for download (e.g. from https://packages.debian.org/bullseye/amd64/libgl1/download)
were compiled against glibc. When I tried to run a
program statically linked with musl and dynamically linked
against things using glibc, I got a segmentation fault
on things like calloc().

Initial attempts to use glibc had failed because it was thought
that the libc.so.6 file could only be referred to by absolute
path (and thus Bazel would not be happy about it). As it turns out,
that was simply a misconfiguration of the builtin_sysroot
parameter to cc_common.create_cc_toolchain_config_info
(see //toolchain/clang_toolchain_config.bzl). By setting that
to `external/clang_linux_amd64` and not
`external/clang_linux_amd64/usr`, the libc binary which had
been extracted to `external/clang_linux_amd64/lib/x86_64-linux-gnu`
was perfectly reachable from
`external/clang_linux_amd64/usr/usr/lib/x86_64-linux-gnu/libc.so`

To bring in the shared libraries to link against (e.g. X11, GL)
I made build_toolchain.bzl easier to modify in that we simply need
to add a debian download url and sha256 hash to a list (rather than
having to plumb this through via arguments).

Recommended Review Order:
 - example/BUILD.bazel (not sure if we always want to set bare
   link arguments like that or if we want to use "features" to
   pass those along to the toolchain).
 - tools/sk_app/BUILD.bazel to see initial cc_library for
   wrapping sk_app code.
 - toolchain/build_toolchain.bzl to see removal of musl and
   new list of debs.
 - toolchain/clang_toolchain_config.bzl (where use of the
   no-canonical-prefixes was key to compilation success).
   Notice also that we statically linked libc++ (I did not
   have any shared libraries for it locally, so I guessed
   a typical developer might not either).
 - Rest of toolchain/ for trivial renames.
 - bazel/Makefile to see extra docs on those targets and
   a new target that compiles all the exes so far for a
   quick way to test the build.
 - third_party/BUILD.bazel and src/gpu/BUILD.bazel which have
   non-generated changes. (all other BUILD.bazel files do).
 - go.mod, which needed to update the infra repo version in
   order to pick up http://review.skia.org/491736).

Change-Id: I8687bd227353040eca2dffa9465798d8bd395027
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/492117
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-01-11 13:06:19 +00:00
..
BUILD.bazel [bazel] Sketching out HelloWorld sk_app using GL 2022-01-11 13:06:19 +00:00
SkAnnotation.h
SkBBHFactory.h Reenable Wdeprecated-copy-dtor 2021-02-16 17:53:28 +00:00
SkBitmap.h Remove supported for (removed) inheriting paint filter-quality 2021-03-09 00:58:09 +00:00
SkBlender.h Move Mode() factory into SkBlender 2021-07-06 13:39:05 +00:00
SkBlendMode.h [androidkit] bind SkImageFilters to java shared library 2021-07-16 16:18:55 +00:00
SkBlurTypes.h
SkCanvas.h Add SKSL guard to SkCustomMesh APIs 2022-01-06 18:10:57 +00:00
SkCanvasVirtualEnforcer.h Pass sampling to drawImageSet 2021-01-05 19:40:31 +00:00
SkClipOp.h Remove SK_SUPPORT_DEPRECATED_CLIPOPS and expanding clip op defs 2021-08-06 19:15:13 +00:00
SkColor.h Support luminance-alpha GL format for YUVA planes 2020-12-17 14:54:25 +00:00
SkColorFilter.h Move WithWorkingFormat to SkColorFilterPriv 2021-11-03 20:30:50 +00:00
SkColorPriv.h move SkTPin to include/private 2020-10-16 19:45:11 +00:00
SkColorSpace.h Enable ClangTidy check llvm-namespace-comment. 2020-08-06 19:07:52 +00:00
SkContourMeasure.h [canvaskit] Flesh out remaining docs for core CanvasKit. 2020-10-05 11:47:40 +00:00
SkCoverageMode.h
SkCubicMap.h
SkCustomMesh.h Add SKSL guard to SkCustomMesh APIs 2022-01-06 18:10:57 +00:00
SkData.h Zero-initialize uniform data in SkRuntimeEffectBuilder 2021-11-18 17:15:07 +00:00
SkDataTable.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkDeferredDisplayList.h Reland "Purge ccpr" 2021-06-19 18:42:38 +00:00
SkDeferredDisplayListRecorder.h Move more GPU-specific code behind SK_SUPPORT_GPU flag 2021-11-03 14:12:52 +00:00
SkDocument.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkDrawable.h
SkDrawLooper.h Hide (unused) SkDrawLooper 2021-02-07 12:49:53 +00:00
SkEncodedImageFormat.h Reland "heif: Add AVIF type and AVIF sniffing" 2020-11-05 15:25:52 +00:00
SkExecutor.h Reenable Wdeprecated-copy-dtor 2021-02-16 17:53:28 +00:00
SkFlattenable.h Fixup enum name in SkFlattenable. 2021-07-30 18:19:11 +00:00
SkFont.h Expose intercepts on SkFont 2021-05-14 14:50:42 +00:00
SkFontArguments.h Remove SkFontArguments::Axis. 2020-07-15 20:59:22 +00:00
SkFontMetrics.h SkCustomTypefaceBuilder to set SkFontStyle 2020-08-19 00:09:55 +00:00
SkFontMgr.h Purge 2020 picture versions 2021-07-19 19:35:49 +00:00
SkFontParameters.h Fix DWrite axis design parameters. 2020-12-01 15:00:33 +00:00
SkFontStyle.h move SkTPin to include/private 2020-10-16 19:45:11 +00:00
SkFontTypes.h
SkGraphics.h remove {Get,Set}FontCachePointSizeLimit() from API 2021-03-22 20:47:27 +00:00
SkICC.h
SkImage.h Remove SkM44.h include from SkImage.h. 2021-12-23 13:45:20 +00:00
SkImageEncoder.h Bitmap.asImage() 2020-12-23 15:54:57 +00:00
SkImageFilter.h Move more virtuals into ...Base to hide them from public api 2021-06-18 20:20:06 +00:00
SkImageGenerator.h Fix origin in SkImage_Lazy for GrAhardwareBufferImageGenerator. 2022-01-10 16:09:20 +00:00
SkImageInfo.h Remove SK_HAS_SRGBA_COLOR_TYPE guard 2021-09-01 13:46:13 +00:00
SkM44.h [androidkit] optimize JNI calls in AndroidKit.Matrix transformations 2021-05-07 16:17:09 +00:00
SkMallocPixelRef.h Enable ClangTidy check llvm-namespace-comment. 2020-08-06 19:07:52 +00:00
SkMaskFilter.h Move more virtuals into ...Base to hide them from public api 2021-06-18 20:20:06 +00:00
SkMath.h impl SkMulDiv255Round with SkMul16ShiftRound 2020-09-09 17:01:17 +00:00
SkMatrix.h Document SkMatrix default constructs to identity 2021-07-24 16:04:39 +00:00
SkMilestone.h Update Skia milestone to 99 2021-12-10 14:47:56 +00:00
SkOverdrawCanvas.h introduce SkCanvas::onDrawGlyphRunList 2021-04-15 19:44:24 +00:00
SkPaint.h SkFilterQuality is gone. 2021-07-22 12:41:49 +00:00
SkPath.h Add query to test our cached convexity 2021-01-19 14:54:44 +00:00
SkPathBuilder.h Set SkPath.fLastMoveToIndex field from SkPathBuilder 2021-08-06 14:12:11 +00:00
SkPathEffect.h Pass CTM to path effects (experimental) 2021-07-13 18:42:55 +00:00
SkPathMeasure.h [canvaskit] Flesh out remaining docs for core CanvasKit. 2020-10-05 11:47:40 +00:00
SkPathTypes.h Move convexity enum out of public 2020-08-30 13:04:22 +00:00
SkPicture.h Remove legacy support for inheriting sampling from the paint. 2021-03-19 16:17:42 +00:00
SkPictureRecorder.h Almost remove GrContext 2020-10-20 15:52:01 +00:00
SkPixelRef.h Remove dead references to filter-quality 2021-03-21 00:26:07 +00:00
SkPixmap.h Remove dead references to filter-quality 2021-03-21 00:26:07 +00:00
SkPngChunkReader.h
SkPoint3.h
SkPoint.h
SkPromiseImageTexture.h Remove all unused uniqueKey support from SkPromiseImageTexture. 2021-12-21 21:32:43 +00:00
SkRasterHandleAllocator.h Reenable Wdeprecated-copy-dtor 2021-02-16 17:53:28 +00:00
SkRect.h Make simple coord/size getters on Sk[I]Rect constexpr 2021-12-09 22:17:30 +00:00
SkRefCnt.h
SkRegion.h remove enum docs 2020-02-11 21:43:07 +00:00
SkRRect.h Add halfWidth/halfHeight functions to SkRectPriv 2020-12-22 20:42:43 +00:00
SkRSXform.h
SkSamplingOptions.h SkFilterQuality is gone. 2021-07-22 12:41:49 +00:00
SkScalar.h Format and comment SkScalarInterpFunc 2020-08-26 20:50:34 +00:00
SkSerialProcs.h
SkShader.h Generalize composing imagefilters and shaders to blenders 2021-07-26 21:07:51 +00:00
SkSize.h Remove GrSurfaceDesc 2020-02-07 19:48:13 +00:00
SkSpan.h reject sizes that will overflow in SkSpan 2021-05-13 19:42:43 +00:00
SkStream.h Add SkFILEStream constructor which takes a size. 2020-09-11 19:50:24 +00:00
SkString.h Fix stringop-overflow in SkString 2021-08-23 17:19:44 +00:00
SkStringView.h Switched DSL error handling from const char* to string_view 2021-09-07 18:48:04 +00:00
SkStrokeRec.h Relax SkStrokeRec::hasEqualEffect 2020-09-15 20:05:40 +00:00
SkSurface.h Store whether or not a VkImage is from a swapchain and return it in drawable info. 2021-11-16 21:14:59 +00:00
SkSurfaceCharacterization.h Move more GPU-specific code behind SK_SUPPORT_GPU flag 2021-11-03 14:12:52 +00:00
SkSurfaceProps.h Move the DMSAA surface flag into the public API 2021-07-13 19:21:00 +00:00
SkSwizzle.h
SkTextBlob.h Expose experimental iterator on SkParagraph 2021-04-16 16:50:33 +00:00
SkTileMode.h
SkTime.h Reland "Add format-specifier warnings to SkDebugf." 2021-06-25 17:57:43 +00:00
SkTraceMemoryDump.h Add ability to trace wrapped objects and be able to differentiate 2021-04-08 18:38:14 +00:00
SkTypeface.h Serialize foreground color caching requirement specialisation 2021-11-03 19:56:47 +00:00
SkTypes.h More angle brackets for system includes for third_party deps 2021-11-23 18:35:52 +00:00
SkUnPreMultiply.h
SkVertices.h Remove custom SkVertices data and runtime effect varying support 2021-04-19 17:49:25 +00:00
SkYUVAInfo.h Reland "Push SkYUVAInfo into GrYUVToRGBEffect." 2021-01-13 22:08:44 +00:00
SkYUVAPixmaps.h Remove SkYUVASizeInfo, make SkYUVAIndex a private part of SkYUVAInfo 2021-01-12 15:06:26 +00:00