diff --git a/jvm/hermes/BUILD b/jvm/hermes/BUILD index 55a34623b..f8935d9bf 100644 --- a/jvm/hermes/BUILD +++ b/jvm/hermes/BUILD @@ -36,11 +36,11 @@ merge_jni_into_android_library( name = "hermes-android", android_library = ":hermes-android-lib", cc_libs = [ - "@fbjni_artifact//:libc++_shared", - "@fbjni_artifact//:libfbjni", - "//jvm/hermes/libs:libjsi", + "//jvm/hermes/libs:libc++_shared", + "//jvm/hermes/libs:libfbjni", + "//third_party/rn:libjsi", "//jvm/hermes/src/main/jni:hermes_jni_lib", - "@rn_hermes_android//:libhermes", + "//third_party/rn:libhermes", ], cc_name = "hermes_jni", tags = ["maven_coordinates=%s:%s:aar:%s" % (DEFAULT_GROUP, "hermes-android", VERSION)], diff --git a/jvm/hermes/libs/BUILD b/jvm/hermes/libs/BUILD index 3f643f917..85246629f 100644 --- a/jvm/hermes/libs/BUILD +++ b/jvm/hermes/libs/BUILD @@ -3,14 +3,25 @@ cc_import( system_provided = True, ) -# This is the only one we aren't pulling from AARs or building from source (for RN) alias( - name = "libjsi", + name = "libfbjni", actual = select({ - "//:arm64-v8a": "//jvm/hermes/libs/arm64-v8a:libjsi", - "//:armeabi-v7a": "//jvm/hermes/libs/armeabi-v7a:libjsi", - "//:x86": "//jvm/hermes/libs/x86:libjsi", - "//:x86_64": "//jvm/hermes/libs/x86_64:libjsi", + "//:arm64-v8a": "//jvm/hermes/libs/arm64-v8a:libfbjni", + "//:armeabi-v7a": "//jvm/hermes/libs/armeabi-v7a:libfbjni", + "//:x86": "//jvm/hermes/libs/x86:libfbjni", + "//:x86_64": "//jvm/hermes/libs/x86_64:libfbjni", + "//conditions:default": "empty", + }), + visibility = ["//visibility:public"], +) + +alias( + name = "libc++_shared", + actual = select({ + "//:arm64-v8a": "//jvm/hermes/libs/arm64-v8a:libc++_shared", + "//:armeabi-v7a": "//jvm/hermes/libs/armeabi-v7a:libc++_shared", + "//:x86": "//jvm/hermes/libs/x86:libc++_shared", + "//:x86_64": "//jvm/hermes/libs/x86_64:libc++_shared", "//conditions:default": "empty", }), visibility = ["//visibility:public"], diff --git a/jvm/hermes/libs/arm64-v8a/BUILD b/jvm/hermes/libs/arm64-v8a/BUILD index 8ef7305dc..a814306dc 100644 --- a/jvm/hermes/libs/arm64-v8a/BUILD +++ b/jvm/hermes/libs/arm64-v8a/BUILD @@ -1,5 +1,11 @@ cc_import( - name = "libjsi", - shared_library = ":libjsi.so", + name = "libfbjni", + shared_library = ":libfbjni.so", visibility = ["//visibility:public"], ) + +cc_import( + name = "libc++_shared", + shared_library = ":libc++_shared.so", + visibility = ["//visibility:public"], +) \ No newline at end of file diff --git a/jvm/hermes/libs/arm64-v8a/libc++_shared.so b/jvm/hermes/libs/arm64-v8a/libc++_shared.so new file mode 100755 index 000000000..2c72c6546 Binary files /dev/null and b/jvm/hermes/libs/arm64-v8a/libc++_shared.so differ diff --git a/jvm/hermes/libs/arm64-v8a/libfbjni.so b/jvm/hermes/libs/arm64-v8a/libfbjni.so new file mode 100755 index 000000000..7d8990b3f Binary files /dev/null and b/jvm/hermes/libs/arm64-v8a/libfbjni.so differ diff --git a/jvm/hermes/libs/arm64-v8a/libjsi.so b/jvm/hermes/libs/arm64-v8a/libjsi.so deleted file mode 100755 index 44af3a715..000000000 Binary files a/jvm/hermes/libs/arm64-v8a/libjsi.so and /dev/null differ diff --git a/jvm/hermes/libs/armeabi-v7a/BUILD b/jvm/hermes/libs/armeabi-v7a/BUILD index 8ef7305dc..a814306dc 100644 --- a/jvm/hermes/libs/armeabi-v7a/BUILD +++ b/jvm/hermes/libs/armeabi-v7a/BUILD @@ -1,5 +1,11 @@ cc_import( - name = "libjsi", - shared_library = ":libjsi.so", + name = "libfbjni", + shared_library = ":libfbjni.so", visibility = ["//visibility:public"], ) + +cc_import( + name = "libc++_shared", + shared_library = ":libc++_shared.so", + visibility = ["//visibility:public"], +) \ No newline at end of file diff --git a/jvm/hermes/libs/armeabi-v7a/libc++_shared.so b/jvm/hermes/libs/armeabi-v7a/libc++_shared.so new file mode 100755 index 000000000..98651805e Binary files /dev/null and b/jvm/hermes/libs/armeabi-v7a/libc++_shared.so differ diff --git a/jvm/hermes/libs/armeabi-v7a/libfbjni.so b/jvm/hermes/libs/armeabi-v7a/libfbjni.so new file mode 100755 index 000000000..c80462551 Binary files /dev/null and b/jvm/hermes/libs/armeabi-v7a/libfbjni.so differ diff --git a/jvm/hermes/libs/armeabi-v7a/libjsi.so b/jvm/hermes/libs/armeabi-v7a/libjsi.so deleted file mode 100755 index e2cc31adf..000000000 Binary files a/jvm/hermes/libs/armeabi-v7a/libjsi.so and /dev/null differ diff --git a/jvm/hermes/libs/x86/BUILD b/jvm/hermes/libs/x86/BUILD index 8ef7305dc..a814306dc 100644 --- a/jvm/hermes/libs/x86/BUILD +++ b/jvm/hermes/libs/x86/BUILD @@ -1,5 +1,11 @@ cc_import( - name = "libjsi", - shared_library = ":libjsi.so", + name = "libfbjni", + shared_library = ":libfbjni.so", visibility = ["//visibility:public"], ) + +cc_import( + name = "libc++_shared", + shared_library = ":libc++_shared.so", + visibility = ["//visibility:public"], +) \ No newline at end of file diff --git a/jvm/hermes/libs/x86/libc++_shared.so b/jvm/hermes/libs/x86/libc++_shared.so new file mode 100755 index 000000000..8648c4cfc Binary files /dev/null and b/jvm/hermes/libs/x86/libc++_shared.so differ diff --git a/jvm/hermes/libs/x86/libfbjni.so b/jvm/hermes/libs/x86/libfbjni.so new file mode 100755 index 000000000..5ddb20f50 Binary files /dev/null and b/jvm/hermes/libs/x86/libfbjni.so differ diff --git a/jvm/hermes/libs/x86/libjsi.so b/jvm/hermes/libs/x86/libjsi.so deleted file mode 100755 index 8a92477f7..000000000 Binary files a/jvm/hermes/libs/x86/libjsi.so and /dev/null differ diff --git a/jvm/hermes/libs/x86_64/BUILD b/jvm/hermes/libs/x86_64/BUILD index 8ef7305dc..a814306dc 100644 --- a/jvm/hermes/libs/x86_64/BUILD +++ b/jvm/hermes/libs/x86_64/BUILD @@ -1,5 +1,11 @@ cc_import( - name = "libjsi", - shared_library = ":libjsi.so", + name = "libfbjni", + shared_library = ":libfbjni.so", visibility = ["//visibility:public"], ) + +cc_import( + name = "libc++_shared", + shared_library = ":libc++_shared.so", + visibility = ["//visibility:public"], +) \ No newline at end of file diff --git a/jvm/hermes/libs/x86_64/libc++_shared.so b/jvm/hermes/libs/x86_64/libc++_shared.so new file mode 100755 index 000000000..8e3a86822 Binary files /dev/null and b/jvm/hermes/libs/x86_64/libc++_shared.so differ diff --git a/jvm/hermes/libs/x86_64/libfbjni.so b/jvm/hermes/libs/x86_64/libfbjni.so new file mode 100755 index 000000000..0223194c6 Binary files /dev/null and b/jvm/hermes/libs/x86_64/libfbjni.so differ diff --git a/jvm/hermes/libs/x86_64/libjsi.so b/jvm/hermes/libs/x86_64/libjsi.so deleted file mode 100755 index 98fcb1c42..000000000 Binary files a/jvm/hermes/libs/x86_64/libjsi.so and /dev/null differ diff --git a/jvm/hermes/src/main/jni/BUILD b/jvm/hermes/src/main/jni/BUILD index fc73c9bf8..0a4f3c0f8 100644 --- a/jvm/hermes/src/main/jni/BUILD +++ b/jvm/hermes/src/main/jni/BUILD @@ -30,9 +30,12 @@ cc_library( ], copts = CMAKE_BUILD_TYPE_COPTS + select({ # TODO: Using React Natives JSI doesn't contain microtask - come back to this if we build it ourselves - ":should_include_jni": ["-DJSI_MICROTASK"], + ":should_include_jni": [ + "-DJSI_MICROTASK" + ], "//conditions:default": [], }), + linkopts = ["-Wl,-z,max-page-size=16384"], visibility = ["//visibility:public"], deps = select({ # Host build diff --git a/third_party/fbjni/artifact.BUILD b/third_party/fbjni/artifact.BUILD index 5a209a976..f3272b663 100644 --- a/third_party/fbjni/artifact.BUILD +++ b/third_party/fbjni/artifact.BUILD @@ -44,7 +44,7 @@ cc_import( ) alias( - name = "libfbjni", + name = "libfbjni_pulled", actual = select({ "@player//:arm64-v8a": ":arm64-v8a_libfbjni", "@player//:armeabi-v7a": ":armeabi-v7a_libfbjni", @@ -56,7 +56,7 @@ alias( ) alias( - name = "libc++_shared", + name = "libc++_shared_pulled", actual = select({ "@player//:arm64-v8a": ":arm64-v8a_libc++_shared", "@player//:armeabi-v7a": ":armeabi-v7a_libc++_shared", diff --git a/third_party/rn/BUILD b/third_party/rn/BUILD index 487425483..63dbc85cf 100644 --- a/third_party/rn/BUILD +++ b/third_party/rn/BUILD @@ -2,3 +2,27 @@ exports_files([ "react_native.BUILD", "hermes_android.BUILD", ]) + +alias( + name = "libhermes", + actual = select({ + "//:arm64-v8a": "//third_party/rn/arm64-v8a:libhermes", + "//:armeabi-v7a": "//third_party/rn/armeabi-v7a:libhermes", + "//:x86": "//third_party/rn/x86:libhermes", + "//:x86_64": "//third_party/rn/x86_64:libhermes", + "//conditions:default": "empty", + }), + visibility = ["//visibility:public"], +) + +alias( + name = "libjsi", + actual = select({ + "//:arm64-v8a": "//third_party/rn/arm64-v8a:libjsi", + "//:armeabi-v7a": "//third_party/rn/armeabi-v7a:libjsi", + "//:x86": "//third_party/rn/x86:libjsi", + "//:x86_64": "//third_party/rn/x86_64:libjsi", + "//conditions:default": "empty", + }), + visibility = ["//visibility:public"], +) diff --git a/third_party/rn/arm64-v8a/BUILD b/third_party/rn/arm64-v8a/BUILD new file mode 100644 index 000000000..42704da59 --- /dev/null +++ b/third_party/rn/arm64-v8a/BUILD @@ -0,0 +1,11 @@ +cc_import( + name = "libhermes", + shared_library = ":libhermes.so", + visibility = ["//visibility:public"], +) + +cc_import( + name = "libjsi", + shared_library = ":libjsi.so", + visibility = ["//visibility:public"], +) \ No newline at end of file diff --git a/third_party/rn/arm64-v8a/libhermes.so b/third_party/rn/arm64-v8a/libhermes.so new file mode 100644 index 000000000..1999b2577 Binary files /dev/null and b/third_party/rn/arm64-v8a/libhermes.so differ diff --git a/third_party/rn/arm64-v8a/libjsi.so b/third_party/rn/arm64-v8a/libjsi.so new file mode 100644 index 000000000..c3b51ef4c Binary files /dev/null and b/third_party/rn/arm64-v8a/libjsi.so differ diff --git a/third_party/rn/armeabi-v7a/BUILD b/third_party/rn/armeabi-v7a/BUILD new file mode 100644 index 000000000..42704da59 --- /dev/null +++ b/third_party/rn/armeabi-v7a/BUILD @@ -0,0 +1,11 @@ +cc_import( + name = "libhermes", + shared_library = ":libhermes.so", + visibility = ["//visibility:public"], +) + +cc_import( + name = "libjsi", + shared_library = ":libjsi.so", + visibility = ["//visibility:public"], +) \ No newline at end of file diff --git a/third_party/rn/armeabi-v7a/libhermes.so b/third_party/rn/armeabi-v7a/libhermes.so new file mode 100644 index 000000000..80830a576 Binary files /dev/null and b/third_party/rn/armeabi-v7a/libhermes.so differ diff --git a/third_party/rn/armeabi-v7a/libjsi.so b/third_party/rn/armeabi-v7a/libjsi.so new file mode 100644 index 000000000..8d5dd1ef8 Binary files /dev/null and b/third_party/rn/armeabi-v7a/libjsi.so differ diff --git a/third_party/rn/hermes_android.BUILD b/third_party/rn/hermes_android.BUILD index 047de6019..02e3fb5ff 100644 --- a/third_party/rn/hermes_android.BUILD +++ b/third_party/rn/hermes_android.BUILD @@ -24,7 +24,7 @@ cc_import( ) alias( - name = "libhermes", + name = "libhermes_pulled", actual = select({ "@player//:arm64-v8a": ":arm64-v8a_libhermes", "@player//:armeabi-v7a": ":armeabi-v7a_libhermes", diff --git a/third_party/rn/x86/BUILD b/third_party/rn/x86/BUILD new file mode 100644 index 000000000..42704da59 --- /dev/null +++ b/third_party/rn/x86/BUILD @@ -0,0 +1,11 @@ +cc_import( + name = "libhermes", + shared_library = ":libhermes.so", + visibility = ["//visibility:public"], +) + +cc_import( + name = "libjsi", + shared_library = ":libjsi.so", + visibility = ["//visibility:public"], +) \ No newline at end of file diff --git a/third_party/rn/x86/libhermes.so b/third_party/rn/x86/libhermes.so new file mode 100644 index 000000000..6cc3caf78 Binary files /dev/null and b/third_party/rn/x86/libhermes.so differ diff --git a/third_party/rn/x86/libjsi.so b/third_party/rn/x86/libjsi.so new file mode 100644 index 000000000..2536aaca2 Binary files /dev/null and b/third_party/rn/x86/libjsi.so differ diff --git a/third_party/rn/x86_64/BUILD b/third_party/rn/x86_64/BUILD new file mode 100644 index 000000000..42704da59 --- /dev/null +++ b/third_party/rn/x86_64/BUILD @@ -0,0 +1,11 @@ +cc_import( + name = "libhermes", + shared_library = ":libhermes.so", + visibility = ["//visibility:public"], +) + +cc_import( + name = "libjsi", + shared_library = ":libjsi.so", + visibility = ["//visibility:public"], +) \ No newline at end of file diff --git a/third_party/rn/x86_64/libhermes.so b/third_party/rn/x86_64/libhermes.so new file mode 100644 index 000000000..fc1fe5e83 Binary files /dev/null and b/third_party/rn/x86_64/libhermes.so differ diff --git a/third_party/rn/x86_64/libjsi.so b/third_party/rn/x86_64/libjsi.so new file mode 100644 index 000000000..f98dde529 Binary files /dev/null and b/third_party/rn/x86_64/libjsi.so differ