a676648c3e
Wuffs ships as a "single file C library". Previously, that single file was a .h file. Now it is a .c file. The contents of the file are practically the same. The different file name extension means that the build system (GN/ninja) will treat that file as a .c file, or "something that generates code", and not merely a .h file, or "something #include'd by things that generate code". This should hopefully fix mysterious linker errors when updating the third_party/wuffs checkout results in the builder doing no work, since no .c files changed. Bug: skia:8235 Change-Id: I451e251d8cd23f3f0db359bbe03caa429c00fcea Reviewed-on: https://skia-review.googlesource.com/c/180420 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
52 lines
1.6 KiB
Plaintext
52 lines
1.6 KiB
Plaintext
# Copyright 2018 Google Inc.
|
|
#
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import("../third_party.gni")
|
|
|
|
third_party("wuffs") {
|
|
public_include_dirs = [ "../externals/wuffs/release/c" ]
|
|
|
|
defines = [
|
|
# Copy/pasting from "../externals/wuffs/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 whitelist 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",
|
|
]
|
|
|
|
sources = [
|
|
"../externals/wuffs/release/c/wuffs-v0.2.c",
|
|
]
|
|
}
|