61f0ea4f7a
There are no functional changes to the rules, just a relocation. Change-Id: I90af5ec792fc54ce2978b0bbb1afd2c932e183b4 Bug: skia:12541 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/545719 Reviewed-by: Ben Wagner <bungeman@google.com>
50 lines
2.0 KiB
Python
50 lines
2.0 KiB
Python
# This file will be copied into //third_party/externals/wuffs via the new_local_repository
|
|
# rule in WORKSPACE.bazel, so all files should be relative to that path.
|
|
|
|
cc_library(
|
|
name = "wuffs",
|
|
# We list this file both as a source file and a header file because it will be
|
|
# compiled for symbols *and* included as a header file.
|
|
srcs = ["release/c/wuffs-v0.3.c"],
|
|
# Thankfully, Bazel doesn't mind a .c file being declared as a public "header".
|
|
hdrs = ["release/c/wuffs-v0.3.c"],
|
|
local_defines = [
|
|
# Copy/pasting from "release/c/wuffs-*.c":
|
|
#
|
|
# ----
|
|
#
|
|
# Wuffs ships as a "single file C library" or "header file library" as per
|
|
# https://github.com/nothings/stb/blob/master/docs/stb_howto.txt
|
|
#
|
|
# To use that single file as a "foo.c"-like implementation, instead of a
|
|
# "foo.h"-like header, #define WUFFS_IMPLEMENTATION before #include'ing or
|
|
# compiling it.
|
|
#
|
|
# ----
|
|
"WUFFS_IMPLEMENTATION",
|
|
|
|
# Continuing to copy/paste:
|
|
#
|
|
# ----
|
|
#
|
|
# Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users
|
|
# of Wuffs' .c file specify which parts of Wuffs to build. That file
|
|
# contains the entire Wuffs standard library, implementing a variety of
|
|
# codecs and file formats. Without this macro definition, an optimizing
|
|
# compiler or linker may very well discard Wuffs code for unused codecs,
|
|
# but listing the Wuffs modules we use makes that process explicit.
|
|
# Preprocessing means that such code simply isn't compiled.
|
|
#
|
|
# ----
|
|
#
|
|
# For Skia, we're only interested in particular image codes (e.g. GIF) and
|
|
# their dependencies (e.g. BASE, LZW).
|
|
"WUFFS_CONFIG__MODULES",
|
|
"WUFFS_CONFIG__MODULE__BASE",
|
|
"WUFFS_CONFIG__MODULE__GIF",
|
|
"WUFFS_CONFIG__MODULE__LZW",
|
|
],
|
|
strip_include_prefix = "release/c/",
|
|
visibility = ["//visibility:public"],
|
|
)
|