Make use of fbjni

Summary: Use fbjni for safer and easier jni bridging. This diff includes all of fbjni as it currently does not live as its own open source project. The code was copied from the react-native open source distribution.

Reviewed By: ritzau

Differential Revision: D3764065

fbshipit-source-id: 7ff566af314dcb5279460c322c476ef6f6ed8131
This commit is contained in:
Emil Sjolander
2016-08-31 05:04:02 -07:00
committed by Facebook Github Bot 2
parent 1051c39a59
commit 94bbbde930
5 changed files with 288 additions and 214 deletions

41
lib/fb/BUCK Normal file
View File

@@ -0,0 +1,41 @@
# Copyright (c) 2014-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
include_defs('//CSSLAYOUT_DEFS')
prebuilt_cxx_library(
name = 'ndklog',
header_only = True,
exported_platform_linker_flags = [
('android.*', ['-llog']),
],
visibility = [CSSLAYOUT_ROOT],
)
cxx_library(
name = 'fbjni',
srcs = glob(['**/*.cpp']),
exported_headers = subdir_glob([('include', '**/*.h')]),
header_namespace = '',
compiler_flags = [
'-DLOG_TAG=\"libfb\"',
'-DDISABLE_CPUCAP',
'-DDISABLE_XPLAT',
'-DHAVE_POSIX_CLOCKS',
'-fno-omit-frame-pointer',
'-fexceptions',
'-frtti',
'-Wall',
'-Werror',
'-Wno-unused-parameter',
'-std=c++11',
],
deps = [
':ndklog',
],
visibility = [CSSLAYOUT_ROOT],
)