Move jschelpers to fb_xplat_cxx_library

Reviewed By: bestander

Differential Revision: D5035858

fbshipit-source-id: 110fc5140ee4930634ef2ac3453d0a84124516f9
This commit is contained in:
Pieter De Baets 2017-05-11 06:32:41 -07:00 committed by Facebook Github Bot
parent c286da0195
commit 01460873da
2 changed files with 37 additions and 71 deletions

View File

@ -5,3 +5,4 @@ GLOG_DEP = "//ReactAndroid/build/third-party-ndk/glog:glog"
INSPECTOR_FLAGS = [] INSPECTOR_FLAGS = []
JSC_DEPS = [] JSC_DEPS = []
JSC_INTERNAL_DEPS = []

View File

@ -1,3 +1,5 @@
include_defs("//ReactCommon/DEFS")
EXPORTED_HEADERS = [ EXPORTED_HEADERS = [
"InspectorInterfaces.h", "InspectorInterfaces.h",
"JavaScriptCore.h", "JavaScriptCore.h",
@ -8,89 +10,52 @@ EXPORTED_HEADERS = [
"Value.h", "Value.h",
] ]
EXPORTED_HEADER_MAP = subdir_glob( fb_xplat_cxx_library(
(("", header) for header in EXPORTED_HEADERS),
prefix = "jschelpers",
)
if THIS_IS_FBANDROID:
include_defs("//ReactAndroid/DEFS")
cxx_library(
name = "jscinternalhelpers", name = "jscinternalhelpers",
force_static = True, srcs = glob(
["*.cpp"],
excludes = ["systemJSCWrapper.cpp"],
),
compiler_flags = [ compiler_flags = [
"-Wall", "-Wall",
"-fexceptions", "-fexceptions",
"-fvisibility=hidden", "-fvisibility=hidden",
"-std=c++1y", "-std=c++1y",
], ],
exported_headers = EXPORTED_HEADERS, exported_headers = EXPORTED_HEADERS,
headers = glob(["*.h"], excludes=EXPORTED_HEADERS), fbobjc_header_path_prefix = "jschelpers",
header_namespace = "jschelpers", fbobjc_inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS,
srcs = glob(["*.cpp"], excludes=["systemJSCWrapper.cpp"]),
deps = JSC_INTERNAL_DEPS + [
"//xplat/folly:molly",
],
visibility = [
"PUBLIC",
],
)
cxx_library(
name = "jschelpers",
force_static = True, force_static = True,
compiler_flags = [
"-Wall",
"-fexceptions",
"-fvisibility=hidden",
"-std=c++1y",
],
srcs = [],
deps = [ ":jscinternalhelpers" ],
visibility = [
"PUBLIC",
],
)
if THIS_IS_FBOBJC:
fb_apple_library(
name = "jscinternalhelpers",
inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS,
compiler_flags = [
"-Wall",
"-fexceptions",
"-fvisibility=hidden",
"-std=c++1y",
],
exported_headers = EXPORTED_HEADER_MAP,
headers = subdir_glob([("", "*.h")], excludes=EXPORTED_HEADERS, prefix="jschelpers"),
header_namespace = "jschelpers", header_namespace = "jschelpers",
srcs = glob(["*.cpp"], excludes=["systemJSCWrapper.cpp"]), headers = glob(
deps = [ ["*.h"],
"//xplat/folly:molly", excludes = EXPORTED_HEADERS,
], ),
visibility = [ visibility = [
"PUBLIC", "PUBLIC",
], ],
) deps = JSC_INTERNAL_DEPS + [
"//xplat/folly:molly",
],
)
fb_apple_library( fb_xplat_cxx_library(
name = "jschelpers", name = "jschelpers",
inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, srcs = [],
compiler_flags = [ compiler_flags = [
"-Wall", "-Wall",
"-fexceptions", "-fexceptions",
"-fvisibility=hidden", "-fvisibility=hidden",
"-std=c++1y", "-std=c++1y",
], ],
srcs = ["systemJSCWrapper.cpp"], fbobjc_frameworks = [
frameworks = [ "$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework",
"$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework",
], ],
deps = [ ":jscinternalhelpers" ], fbobjc_inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS,
fbobjc_srcs = ["systemJSCWrapper.cpp"],
force_static = True,
visibility = [ visibility = [
"PUBLIC", "PUBLIC",
], ],
) deps = [":jscinternalhelpers"],
)