Skip to content

Commit

Permalink
Use preprocessor flags to set CREATE_SHARED_LIBRARY instead of mode file
Browse files Browse the repository at this point in the history
Summary: Changelog: [Internal]

Reviewed By: MartinSherburn

Differential Revision: D37600540

fbshipit-source-id: 40cf30ec2960864fc862c31661b1308c57f33bec
  • Loading branch information
javache authored and facebook-github-bot committed Jul 8, 2022
1 parent 468b86b commit b4e6a78
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ReactCommon/hermes/inspector/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,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", "ANDROID", "APPLE", "CXX", "FBCODE", "WINDOWS")
load("@fbsource//tools/build_defs/oss:rn_defs.bzl", "react_native_xplat_target")
load("@fbsource//tools/build_defs/oss:rn_defs.bzl", "get_hermes_shared_library_preprocessor_flags", "react_native_xplat_target")
load("@fbsource//xplat/hermes/defs:hermes.bzl", "hermes_build_mode", "hermes_optimize_flag")

CFLAGS_BY_MODE = {
Expand Down Expand Up @@ -195,6 +195,7 @@ fb_xplat_cxx_library(
labels = ["supermodule:xplat/default/public.hermes"],
macosx_tests_override = [],
platforms = (ANDROID, APPLE, CXX, FBCODE, WINDOWS),
preprocessor_flags = get_hermes_shared_library_preprocessor_flags(),
visibility = [
"PUBLIC",
],
Expand Down
3 changes: 2 additions & 1 deletion ReactCommon/jsinspector/BUCK
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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")
load("//tools/build_defs/oss:rn_defs.bzl", "get_hermes_shared_library_preprocessor_flags", "rn_xplat_cxx_library")

EXPORTED_HEADERS = [
"InspectorInterfaces.h",
Expand Down Expand Up @@ -32,6 +32,7 @@ rn_xplat_cxx_library(
"supermodule:xplat/default/public.react_native.infra",
],
platforms = (ANDROID, APPLE, CXX, FBCODE, WINDOWS),
preprocessor_flags = get_hermes_shared_library_preprocessor_flags(),
visibility = [
"PUBLIC",
],
Expand Down
3 changes: 3 additions & 0 deletions tools/build_defs/oss/rn_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ def get_objc_arc_preprocessor_flags():
"-Qunused-arguments",
]

def get_hermes_shared_library_preprocessor_flags():
return []

IS_OSS_BUILD = True

GLOG_DEP = "//ReactAndroid/build/third-party-ndk/glog:glog"
Expand Down

0 comments on commit b4e6a78

Please sign in to comment.