mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
TM iOS: removed CoreModulesAppleHeader BUCK workaround
Summary: We should be able to just use `header_path_prefix` and normal `glob(["**/*.h"])` patterns, and that should be compatible with the build system. This also allows `RCTPlatform.mm` to import `"RCTPlatform.h"` directly without any namespace. Reviewed By: RSNara Differential Revision: D16096779 fbshipit-source-id: b17b79baf958f1e9a63085a928b64663cb29bbbb
This commit is contained in:
1 parent
c92cc11bed
commit
737b784b8c
2 files changed
+5
-51
No files matched your search
+3
-50
@@ -1,5 +1,5 @@
|
||||
load("@fbsource//tools/build_defs/apple:flag_defs.bzl", "OBJC_ARC_PREPROCESSOR_FLAGS", "get_debug_preprocessor_flags", "get_fbobjc_enable_exception_lang_compiler_flags_DEPRECATED")
|
||||
load("@fbsource//tools/build_defs/oss:rn_defs.bzl", "rn_apple_library", "rn_debug_flags", "subdir_glob")
|
||||
load("@fbsource//tools/build_defs/oss:rn_defs.bzl", "rn_apple_library", "rn_debug_flags")
|
||||
load(
|
||||
"@fbsource//xplat/configurations/buck/apple/plugins/sad_xplat_hosted_configurations:react_module_registration.bzl",
|
||||
"react_module_plugin_providers",
|
||||
@@ -13,7 +13,7 @@ rn_apple_library(
|
||||
"**/*.mm",
|
||||
],
|
||||
),
|
||||
headers = ["CoreModulesPlugins.h"],
|
||||
exported_headers = glob(["**/*.h"]),
|
||||
compiler_flags = [
|
||||
"-Wno-error=unguarded-availability-new",
|
||||
"-Wno-unknown-warning-option",
|
||||
@@ -30,6 +30,7 @@ rn_apple_library(
|
||||
"Foundation",
|
||||
"UIKit",
|
||||
],
|
||||
header_path_prefix = "React",
|
||||
lang_compiler_flags = get_fbobjc_enable_exception_lang_compiler_flags_DEPRECATED(),
|
||||
link_whole = True,
|
||||
platform_preprocessor_flags = [(
|
||||
@@ -47,53 +48,5 @@ rn_apple_library(
|
||||
exported_deps = [
|
||||
"fbsource//xplat/js/react-native-github:ReactInternalApple",
|
||||
"fbsource//xplat/js/react-native-github/Libraries/FBReactNativeSpec:FBReactNativeSpecApple",
|
||||
":CoreModulesAppleHeader",
|
||||
],
|
||||
)
|
||||
|
||||
# Workaround: define exported headers target separately so that the header
|
||||
# namespace can be specified correctly.
|
||||
rn_apple_library(
|
||||
name = "CoreModulesAppleHeader",
|
||||
srcs = [],
|
||||
header_namespace = "",
|
||||
exported_headers = subdir_glob(
|
||||
[
|
||||
(
|
||||
"",
|
||||
"*.h",
|
||||
),
|
||||
],
|
||||
exclude = ["CoreModulesPlugins.h"],
|
||||
prefix = "React",
|
||||
),
|
||||
compiler_flags = [
|
||||
"-Wno-error=unguarded-availability-new",
|
||||
"-Wno-unknown-warning-option",
|
||||
],
|
||||
contacts = ["oncall+react_native@xmail.facebook.com"],
|
||||
exported_linker_flags = [
|
||||
"-weak_framework",
|
||||
"UserNotifications",
|
||||
"-weak_framework",
|
||||
"WebKit",
|
||||
],
|
||||
exported_preprocessor_flags = rn_debug_flags(),
|
||||
frameworks = [
|
||||
"Foundation",
|
||||
"UIKit",
|
||||
],
|
||||
lang_compiler_flags = get_fbobjc_enable_exception_lang_compiler_flags_DEPRECATED(),
|
||||
link_whole = True,
|
||||
platform_preprocessor_flags = [(
|
||||
"linux",
|
||||
["-D PIC_MODIFIER=@PLT"],
|
||||
)],
|
||||
preprocessor_flags = OBJC_ARC_PREPROCESSOR_FLAGS + get_debug_preprocessor_flags() + rn_debug_flags() + [
|
||||
"-DRN_DISABLE_OSS_PLUGIN_HEADER",
|
||||
],
|
||||
visibility = ["PUBLIC"],
|
||||
exported_deps = [
|
||||
"fbsource//xplat/js/react-native-github:ReactInternalApple",
|
||||
],
|
||||
)
|
||||
@@ -5,10 +5,11 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import "RCTPlatform.h"
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import <FBReactNativeSpec/FBReactNativeSpec.h>
|
||||
#import <React/RCTPlatform.h>
|
||||
#import <React/RCTUtils.h>
|
||||
#import <React/RCTVersion.h>
|
||||
|
||||
|
||||
Reference in new issue
Block a user