Summary: Adds a subclass of `YogaNodeJNIBase` that uses `PhantomReference` for deallocating native memory rather than `Object#finalize()`. This should help making garbage collection more efficient. Reviewed By: amir-shalem Differential Revision: D16182667 fbshipit-source-id: d310fdb6af184168c43462b24f5e18ab5d0d7ad0
46 lines
1.2 KiB
Python
46 lines
1.2 KiB
Python
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
#
|
|
# This source code is licensed under the MIT license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
load("//tools/build_defs/oss:yoga_defs.bzl", "ANDROID", "JNI_TARGET", "YOGA_ROOTS", "subdir_glob", "yoga_cxx_library", "yoga_prebuilt_cxx_library")
|
|
|
|
yoga_prebuilt_cxx_library(
|
|
name = "ndklog",
|
|
exported_platform_linker_flags = [
|
|
(
|
|
"^android.*",
|
|
["-llog"],
|
|
),
|
|
],
|
|
header_only = True,
|
|
visibility = YOGA_ROOTS,
|
|
)
|
|
|
|
yoga_cxx_library(
|
|
name = "fbjni",
|
|
srcs = glob(["src/main/cpp/**/*.cpp"]),
|
|
header_namespace = "",
|
|
exported_headers = subdir_glob([("src/main/cpp/include", "**/*.h")]),
|
|
compiler_flags = [
|
|
"-DLOG_TAG=\"libfb\"",
|
|
"-DDISABLE_CPUCAP",
|
|
"-DDISABLE_XPLAT",
|
|
"-DHAVE_POSIX_CLOCKS",
|
|
"-fno-omit-frame-pointer",
|
|
"-fexceptions",
|
|
"-frtti",
|
|
"-Wall",
|
|
"-Werror",
|
|
"-Wno-unused-parameter",
|
|
"-Wno-unused-variable",
|
|
"-std=c++11",
|
|
],
|
|
platforms = (ANDROID,),
|
|
soname = "libfbjni.$(ext)",
|
|
visibility = ["PUBLIC"],
|
|
deps = [
|
|
":ndklog",
|
|
JNI_TARGET,
|
|
],
|
|
)
|