Do not use glob in the hdrs list of libyuv library

Some headers in the include/libyuv directory are private headers and
should not be visible to the clients of the libyuv library target. List
the public headers explicitly in the hdrs list of the libyuv library
target.

Ideally those private headers should be moved to some other directory
such as the source/ directory.

Change-Id: I04b1e209f6891f06c688fcf0bf5d167e82a27818
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/8308801
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Reviewed-by: Frank Barchard <fbarchard@google.com>
This commit is contained in:
Wan-Teh Chang 2026-08-28 13:29:33 -07:00 committed by libyuv-scoped@luci-project-accounts.iam.gserviceaccount.com
parent 8585efd4bd
commit 7ad044836d
2 changed files with 25 additions and 2 deletions

View File

@ -85,7 +85,30 @@ ALL_DEPS = NEON_DEPS + SVE_DEPS + PLATFORM_DEPS
cc_library(
name = "libyuv",
hdrs = native.glob([PREFIX + "include/**/*.h"]),
hdrs = [
PREFIX + "include/libyuv.h",
# Headers included by libyuv.h.
PREFIX + "include/libyuv/basic_types.h",
PREFIX + "include/libyuv/compare.h",
PREFIX + "include/libyuv/convert.h",
PREFIX + "include/libyuv/convert_argb.h",
PREFIX + "include/libyuv/convert_from.h",
PREFIX + "include/libyuv/convert_from_argb.h",
PREFIX + "include/libyuv/cpu_id.h",
PREFIX + "include/libyuv/mjpeg_decoder.h",
PREFIX + "include/libyuv/planar_functions.h",
PREFIX + "include/libyuv/rotate.h",
PREFIX + "include/libyuv/rotate_argb.h",
PREFIX + "include/libyuv/row.h", # Bug 553148013: Should be private.
PREFIX + "include/libyuv/scale.h",
PREFIX + "include/libyuv/scale_argb.h",
PREFIX + "include/libyuv/scale_rgb.h",
PREFIX + "include/libyuv/scale_uv.h",
PREFIX + "include/libyuv/version.h",
PREFIX + "include/libyuv/video_common.h",
# Headers included by libyuv/row.h.
PREFIX + "include/libyuv/cpu_support.h", # Bug 553148013: Should be private.
],
strip_include_prefix = PREFIX + "include",
visibility = ["//visibility:public"],
deps = [":libyuv_impl"],

View File

@ -21,7 +21,7 @@ def libyuv_hdrs(prefix = ""):
prefix + "include/libyuv/convert.h",
prefix + "include/libyuv/convert_from_argb.h",
prefix + "include/libyuv/cpu_id.h",
prefix + "include/libyuv/row.h",
prefix + "include/libyuv/row.h", # Bug 553148013: Should be private.
]
def libyuv_neon_srcs(prefix = ""):