Commit Graph

7 Commits

Author SHA1 Message Date
Nicola Corti a6f24a5eaa Cleanup custom LOG_TAG in our CMakeLists files. (#51622)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51622

We currently support an optional 3rd params for `target_compile_reactnative_options` which allows to specify a LOG_TAG macro.
No one is actually reading that Macro. The only usage would be logging from the Android SDK which we don't explicitely use.

Here I'm updating our build to specify a LOG_TAG as `ReactNative` for all the targets without allowing to customize it as it just complicates our build setup.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D75445577

fbshipit-source-id: a426ce77ba6d1dfd0800e874d9f7838bfdc5b877
2025-05-28 02:36:26 -07:00
Nicola Corti 6ced6fe1b5 Move react_codegen_* + react_nativemodules_* libraries to static linking (#45639)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45639

There is a circular dependency between libreactnative.so and libreact_codegen_rncore.so which I'm breaking here.

Changelog:
[Internal] [Changed] - Move react_codegen_* + react_nativemodules_* libraries to static linking

Reviewed By: cipolleschi

Differential Revision: D55799200

fbshipit-source-id: 53f814636f016a8c93f40b0456686228dfb46888
2024-07-26 07:00:32 -07:00
Nicola Corti 52de8c70f2 Move several libs from default App CMake setup to static linking (#43909)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43909

As we're moving towards a single `libreactnative.so` file, we need to remove several of our prefab targets. Here I'm cleaning up those that are not having an OnLoad.cpp file which needs to be loaded from SoLoader.

This is breaking for libraries using native dependencies via Prefab (i.e. search for `ReactAndroid::` in CMakeLists.txt files for your project).

If so, the CMakeLists.txt files should be updated as follows:

```diff
- ReactAndroid::react_render_debug
+ ReactAndroid::reactnative
```

This applies to every prefab dependencies (the example is just for `react_render_debug`

Changelog:
[General] [Breaking] - Remove several libs from default App CMake setup

Reviewed By: cipolleschi

Differential Revision: D55751683

fbshipit-source-id: 3aca7897852b5f323d60ede3c5036cae2f81e6c3
2024-07-26 07:00:32 -07:00
Nick Gerleman 7c444dea6a Remove suppressions for Wgnu-zero-variadic-macro-arguments (#42136)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42136

`Wpedantic` flags usage of variadic macros with zero arguments. This is widely supported by different compilers (including MSVC), but was previously forbidden by the standard.

C++ 20 explicitly allows them, so, theoretically Clang should know not to warn about these now. Let's try that.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D52534129

fbshipit-source-id: e27a75081fac6b4196c6dbb5242812877b0bd679
2024-01-04 04:42:38 -08:00
Nick Gerleman 17154a661f C++ 20 all the things (#39454)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39454

1. Build with C++ 20 everywhere.
2. Update folly in OSS build to avoid a warning, and let us opt out of heavy bits required for supporting coroutines (we are still more than a year behind).
3. Update the folly podspec for the new version of folly
4. Update the many, many, copy/pasted header search paths for folly dependencies to be able to resolve fmt, now exposed to folly headers
4. Replaces a deprecated atomic usage with equivalent.
5. Fixes a deprecated implicit capturing `this` by value in lambda (same behavior, added a TODO because it seems sus)

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D49271685

fbshipit-source-id: 16610f7bcd1032d5796cc11f1cfa92a33d8c2593
2023-09-15 01:17:55 -07:00
Nicola Corti 67e794ab40 Fix broken Gradle Sync when opening the project with Android Studio (#39412)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39412

This fixes an issue that I got reported by users attempting to open the react-native GitHub project in Android Studio.

The error is:
```
  Cannot specify include directories for target "react_codegen_AppSpecs" which is  not built by this project.
```

Changelog:
[Internal] [Changed] - Fix broken Gradle Sync when opening the project with Android Studio

Reviewed By: huntie

Differential Revision: D49189331

fbshipit-source-id: 632063a7e1afc53284231be263bec352dc7057c5
2023-09-12 08:33:54 -07:00
Christoph Purrer d07575b1c6 react-native code-gen > Add a C++ only TurboModule example (for Android/iOS/macOS/Windows) (#35138)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35138

Changelog:

[General][Added] - Add a C++ only TurboModule example (for Android/iOS/macOS/Windows)

react-native@0.69 introduced a new bridging layer to ease integration for pure C++ TurboModules using C++ std:: types directly instead of the lower level jsi:: types:
https://github.com/facebook/react-native/tree/v0.69.0/ReactCommon/react/bridging

This bridging layer can be used in JSI functions or more conveniently in C++ TurboModules.

Here is a example of an C++ only TurboModule which will work on Android and iOS and macOS/Windows (using microsoft/react-native-macos|windows) only using flow/TypeScript and standard C++ types.

C++ only TurboModules are very handy as they do not require to work with JSI APIs - instead std:: or custom C++ can by used.

Reviewed By: javache

Differential Revision: D39011736

fbshipit-source-id: 84c833d8540671fde8505f1aeb0265074b248730
2022-11-09 10:48:49 -08:00