blob: b6e7744eb7b89ed968ce0ce52282c0df1fdc9178 [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/zircon/migrated_targets.gni")
# Note this leads to "$root_out_dir/obj/ABS_PATH/..." files in the build.
lz4_lib = "//third_party/lz4/lib"
zx_library("lz4") {
sdk = "source"
sdk_headers = [
"lz4/lz4.h",
"lz4/lz4frame.h",
]
sources = [
"$lz4_lib/lz4.c",
"$lz4_lib/lz4frame.c",
"$lz4_lib/lz4hc.c",
"$lz4_lib/xxhash.c",
]
defines = [
"XXH_NAMESPACE=LZ4_",
# Preempt the default that will break symbols out of hidden visibility.
"LZ4LIB_VISIBILITY=",
# lz4frame.h doesn't let you just predefine LZ4FLIB_API like you can
# LZ4LIB_VISIBILITY, so this kludge works with how its macros are
# defined so the //third_party/lz4 sources don't need to be touched.
"LZ4_DLL_IMPORT=1",
"__declspec(x)=",
]
configs += [
"//build/config:Wno-implicit-fallthrough",
"//build/config:Wno-missing-declarations",
"//build/config:Wno-missing-prototypes",
]
}
group("tests") {
testonly = true
deps = [ "test:tests" ]
}