From d4fb85a2bc96bb2d84221a49865e1c889bd40c5c Mon Sep 17 00:00:00 2001 From: Phillip Pan Date: Mon, 13 Nov 2023 17:03:00 -0800 Subject: [PATCH] RCTDeprecation BUCK integration (#41417) Summary: Changelog: [Internal] BUCK boilerplate to integrate the first RCTFoundation library. decided to split this up so we can reference it easily in the future when adding new libs Differential Revision: D51101009 --- .../RCTDeprecation/Exported/RCTDeprecation.h | 16 ++++++++++++++++ .../RCTFoundation/RCTDeprecation/README.md | 1 + 2 files changed, 17 insertions(+) create mode 100644 packages/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation/Exported/RCTDeprecation.h create mode 100644 packages/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation/README.md diff --git a/packages/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation/Exported/RCTDeprecation.h b/packages/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation/Exported/RCTDeprecation.h new file mode 100644 index 00000000000000..dc7b92b3d88036 --- /dev/null +++ b/packages/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation/Exported/RCTDeprecation.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#ifndef RCT_DEPRECATED_DECLARATIONS +#define RCT_DEPRECATED_DECLARATIONS 0 +#endif + +#if RCT_DEPRECATED_DECLARATIONS +#define RCT_DEPRECATED __attribute__((deprecated)) +#else +#define RCT_DEPRECATED +#endif diff --git a/packages/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation/README.md b/packages/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation/README.md new file mode 100644 index 00000000000000..9f0d87aaa6d759 --- /dev/null +++ b/packages/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation/README.md @@ -0,0 +1 @@ +RCTDeprecation contains C macros to identify deprecated APIs at build-time.