Skip to content

Commit

Permalink
Allow inspector to compile in fbcode
Browse files Browse the repository at this point in the history
Summary:
The fbcode version of Skylight needs this and it is already compiling fine

Changelog: [Internal]

Reviewed By: dulinriley

Differential Revision: D27765879

fbshipit-source-id: 18aca2756f39326fb90397a10a67583db84076fd
  • Loading branch information
Pedro Veras authored and facebook-github-bot committed Apr 17, 2021
1 parent 2824b68 commit 2052bb6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ReactCommon/hermes/inspector/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
load("@fbsource//tools/build_defs:fb_xplat_cxx_binary.bzl", "fb_xplat_cxx_binary")
load("@fbsource//tools/build_defs:fb_xplat_cxx_library.bzl", "fb_xplat_cxx_library")
load("@fbsource//tools/build_defs:fb_xplat_cxx_test.bzl", "fb_xplat_cxx_test")
load("@fbsource//tools/build_defs:platform_defs.bzl", "APPLE", "CXX")
load("@fbsource//tools/build_defs:platform_defs.bzl", "ANDROID", "APPLE", "CXX", "FBCODE", "WINDOWS")
load("@fbsource//tools/build_defs/oss:rn_defs.bzl", "react_native_xplat_target")
load("@fbsource//xplat/hermes/defs:hermes.bzl", "hermes_build_mode", "hermes_optimize_flag")

Expand Down Expand Up @@ -53,6 +53,7 @@ fb_xplat_cxx_library(
fbobjc_header_path_prefix = "hermes/inspector/chrome",
labels = ["supermodule:xplat/default/public.hermes"],
macosx_tests_override = [],
platforms = (ANDROID, APPLE, CXX, FBCODE, WINDOWS),
tests = [":chrome-tests"],
visibility = [
"PUBLIC",
Expand All @@ -64,7 +65,6 @@ fb_xplat_cxx_library(
":inspectorlib",
"//third-party/glog:glog",
"//xplat/folly:futures",
"//xplat/folly:molly",
"//xplat/hermes/API:HermesAPI",
"//xplat/jsi:JSIDynamic",
"//xplat/jsi:jsi",
Expand All @@ -83,6 +83,7 @@ fb_xplat_cxx_test(
cxx_deps = [react_native_xplat_target("jsinspector:jsinspector")],
fbandroid_deps = [react_native_xplat_target("jsinspector:jsinspector")],
fbobjc_deps = [react_native_xplat_target("jsinspector:jsinspector")],
platforms = (ANDROID, APPLE, CXX, FBCODE, WINDOWS),
visibility = [
"PUBLIC",
],
Expand Down Expand Up @@ -120,13 +121,14 @@ fb_xplat_cxx_library(
fbobjc_header_path_prefix = "hermes/inspector/detail",
labels = ["supermodule:xplat/default/public.hermes"],
macosx_tests_override = [],
platforms = (ANDROID, APPLE, CXX, FBCODE, WINDOWS),
tests = [":detail-tests"],
visibility = [
"PUBLIC",
],
xcode_public_headers_symlinks = True,
deps = [
"//xplat/folly:molly",
"//xplat/folly:executor",
],
)

Expand All @@ -139,6 +141,7 @@ fb_xplat_cxx_test(
"detail/tests/*.h",
]),
compiler_flags = CFLAGS_BY_MODE[hermes_build_mode()],
platforms = (ANDROID, APPLE, CXX, FBCODE, WINDOWS),
visibility = [
"PUBLIC",
],
Expand Down Expand Up @@ -193,6 +196,7 @@ fb_xplat_cxx_library(
fbobjc_header_path_prefix = "hermes/inspector",
labels = ["supermodule:xplat/default/public.hermes"],
macosx_tests_override = [],
platforms = (ANDROID, APPLE, CXX, FBCODE, WINDOWS),
visibility = [
"PUBLIC",
],
Expand All @@ -201,7 +205,6 @@ fb_xplat_cxx_library(
":detail",
"//third-party/glog:glog",
"//xplat/folly:futures",
"//xplat/folly:molly",
"//xplat/hermes/API:HermesAPI",
"//xplat/jsi:jsi",
],
Expand Down
2 changes: 2 additions & 0 deletions ReactCommon/jsinspector/BUCK
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@fbsource//tools/build_defs:glob_defs.bzl", "subdir_glob")
load("@fbsource//tools/build_defs:platform_defs.bzl", "ANDROID", "APPLE", "CXX", "FBCODE", "WINDOWS")
load("//tools/build_defs/oss:rn_defs.bzl", "rn_xplat_cxx_library")

EXPORTED_HEADERS = [
Expand Down Expand Up @@ -32,6 +33,7 @@ rn_xplat_cxx_library(
],
fbandroid_preferred_linkage = "shared",
labels = ["supermodule:xplat/default/public.react_native.infra"],
platforms = (ANDROID, APPLE, CXX, FBCODE, WINDOWS),
visibility = [
"PUBLIC",
],
Expand Down

0 comments on commit 2052bb6

Please sign in to comment.