| load( |
| "//bazel:skia_rules.bzl", |
| "exports_files_legacy", |
| "generate_cpp_files_for_headers", |
| "skia_cc_library", |
| "skia_filegroup", |
| ) |
| |
| package( |
| default_applicable_licenses = ["//:license"], |
| ) |
| |
| licenses(["notice"]) |
| |
| exports_files_legacy( |
| label_list = ["SkBitmaskEnum.h"], |
| visibility = ["//tools/skui:__pkg__"], |
| ) |
| |
| # Headers with no corresponding .cpp files |
| IWYU_HDRS = [ |
| "SkArenaAllocList.h", |
| "SkBitmaskEnum.h", |
| "SkEndian.h", |
| "SkEnumBitMask.h", |
| "SkFixedArray.h", |
| "SkFloatBits.h", |
| "SkLeanWindows.h", |
| "SkMSAN.h", |
| "SkNoDestructor.h", |
| "SkRandom.h", |
| "SkRectMemcpy.h", |
| "SkScopeExit.h", |
| "SkStringView.h", |
| "SkTBlockList.h", |
| "SkTDPQueue.h", |
| "SkTInternalLList.h", |
| "SkTLazy.h", |
| "SkTSort.h", |
| "SkZip.h", |
| ] |
| |
| skia_filegroup( |
| name = "private_hdrs", |
| srcs = IWYU_HDRS + [ |
| "SkArenaAlloc.h", |
| "SkAutoMalloc.h", |
| "SkBase64.h", |
| "SkBezierCurves.h", |
| "SkBlockAllocator.h", |
| "SkBuffer.h", |
| "SkCubics.h", |
| "SkHalf.h", |
| "SkMathPriv.h", |
| "SkQuads.h", |
| "SkSafeMath.h", |
| "SkSharedMutex.h", |
| "SkSpinlock.h", |
| "SkTSearch.h", |
| "SkTime.h", |
| "SkUTF.h", |
| "SkUtils.h", |
| "SkVx.h", # Causes IWYU to crash when compiling. |
| ], |
| visibility = [ |
| "//src:__pkg__", |
| "//src/opts:__pkg__", |
| ], |
| ) |
| |
| # In a separate file group because these files are exported to sksl.gni:skslc_deps. |
| skia_filegroup( |
| name = "skslc_srcs", |
| srcs = [ |
| "SkArenaAlloc.cpp", |
| "SkBlockAllocator.cpp", |
| "SkContainers.cpp", |
| "SkHalf.cpp", |
| "SkMalloc.cpp", |
| "SkMathPriv.cpp", |
| "SkSafeMath.cpp", |
| "SkSemaphore.cpp", |
| "SkThreadID.cpp", |
| "SkUTF.cpp", |
| "SkUtils.cpp", |
| ], |
| ) |
| |
| skia_filegroup( |
| name = "srcs", |
| srcs = [ |
| "SkBase64.cpp", |
| "SkBezierCurves.cpp", |
| "SkBuffer.cpp", |
| "SkCubics.cpp", |
| "SkDebug.cpp", |
| "SkDeque.cpp", |
| "SkFloatingPoint.cpp", |
| "SkQuads.cpp", |
| "SkSharedMutex.cpp", |
| "SkSpinlock.cpp", |
| "SkTDArray.cpp", |
| "SkTSearch.cpp", |
| "SkTime.cpp", |
| ":skslc_srcs", |
| ], |
| visibility = [ |
| "//src:__pkg__", |
| ], |
| ) |
| |
| skia_cc_library( |
| name = "base", |
| srcs = [ |
| ":srcs", |
| "//src/ports:base_srcs", |
| ], |
| hdrs = [ |
| ":private_hdrs", |
| "//include/private/base:private_hdrs", |
| ], |
| features = ["layering_check"], |
| visibility = [ |
| "//bench:__subpackages__", |
| "//modules:__subpackages__", |
| "//src:__subpackages__", |
| "//tests:__subpackages__", |
| "//tools:__subpackages__", |
| ], |
| deps = ["@skia_user_config//:user_config"], |
| ) |
| |
| generate_cpp_files_for_headers( |
| name = "headers_to_compile", |
| headers = IWYU_HDRS, |
| ) |