-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump CMake to 3.22.1 to properly honor CMAKE_BUILD_TYPE #35857
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
facebook-github-bot
added
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
p: Facebook
Partner: Facebook
Partner
fb-exported
labels
Jan 17, 2023
This pull request was exported from Phabricator. Differential Revision: D42544864 |
Currently blocked by react-native-community/docker-android#192 + subsequent bump of the Docker container |
kelset
reviewed
Jan 18, 2023
Base commit: 60b9d8c |
Summary: Pull Request resolved: facebook#35857 It seems like there is an incompatibility between NDK 23 (shipped in 0.71) and the usage of custom `CMAKE_BUILD_TYPE` we do for Hermes. Specifically the `-DCMAKE_BUILD_TYPE=Release` we specify for the debug variant of Hermes is partially ignored by the new Android native build toolchain. See android/ndk#463 for mentions on how the toolchains requires CMake 3.20+ As AGP 7.3 defaults to use CMake 3.18 unless specified, and NDK 23 unless specified. AGP 7.4 defaults to use CMake 3.22 unless specified, and NDK 23 unless specified. See: https://developer.android.com/studio/releases/gradle-plugin#7-4-0 Here I'm: 1. Bumping the docker image to an image that contains the CMake 3.22 2. Updating the logic for building `react-native` & `hermes-engine` to use 3.22 3. Provide fallbacks if the user specified `CMAKE_VERSION` Template tests will run on AGP 7.3 and will still use CMake 3.18, but I forecast no problem there as the user is not supposed to specify custom `CMAKE_BUILD_TYPE`. This is only a problem as we build `hermes-engine` with custom build types. Changelog: [Android] [Fixed] - Bump CMake to 3.22.1 to properly honor CMAKE_BUILD_TYPE Reviewed By: cipolleschi Differential Revision: D42544864 fbshipit-source-id: d9840b4a14baabf5d20d21d71cc86e2e73a8d0ea
cortinico
force-pushed
the
export-D42544864
branch
from
January 18, 2023 15:34
e46cfdb
to
47082f0
Compare
This pull request was exported from Phabricator. Differential Revision: D42544864 |
kelset
approved these changes
Jan 18, 2023
This pull request has been merged in 477f546. |
kelset
pushed a commit
that referenced
this pull request
Jan 19, 2023
Summary: Pull Request resolved: #35857 It seems like there is an incompatibility between NDK 23 (shipped in 0.71) and the usage of custom `CMAKE_BUILD_TYPE` we do for Hermes. Specifically the `-DCMAKE_BUILD_TYPE=Release` we specify for the debug variant of Hermes is partially ignored by the new Android native build toolchain. See android/ndk#463 for mentions on how the toolchains requires CMake 3.20+ As AGP 7.3 defaults to use CMake 3.18 unless specified, and NDK 23 unless specified. AGP 7.4 defaults to use CMake 3.22 unless specified, and NDK 23 unless specified. See: https://developer.android.com/studio/releases/gradle-plugin#7-4-0 Here I'm: 1. Bumping the docker image to an image that contains the CMake 3.22 2. Updating the logic for building `react-native` & `hermes-engine` to use 3.22 3. Provide fallbacks if the user specified `CMAKE_VERSION` Template tests will run on AGP 7.3 and will still use CMake 3.18, but I forecast no problem there as the user is not supposed to specify custom `CMAKE_BUILD_TYPE`. This is only a problem as we build `hermes-engine` with custom build types. Changelog: [Android] [Fixed] - Bump CMake to 3.22.1 to properly honor CMAKE_BUILD_TYPE Reviewed By: cipolleschi Differential Revision: D42544864 fbshipit-source-id: efd0f51120370fb808337c201df31d71f4ddfdbc
OlimpiaZurek
pushed a commit
to OlimpiaZurek/react-native
that referenced
this pull request
May 22, 2023
Summary: Pull Request resolved: facebook#35857 It seems like there is an incompatibility between NDK 23 (shipped in 0.71) and the usage of custom `CMAKE_BUILD_TYPE` we do for Hermes. Specifically the `-DCMAKE_BUILD_TYPE=Release` we specify for the debug variant of Hermes is partially ignored by the new Android native build toolchain. See android/ndk#463 for mentions on how the toolchains requires CMake 3.20+ As AGP 7.3 defaults to use CMake 3.18 unless specified, and NDK 23 unless specified. AGP 7.4 defaults to use CMake 3.22 unless specified, and NDK 23 unless specified. See: https://developer.android.com/studio/releases/gradle-plugin#7-4-0 Here I'm: 1. Bumping the docker image to an image that contains the CMake 3.22 2. Updating the logic for building `react-native` & `hermes-engine` to use 3.22 3. Provide fallbacks if the user specified `CMAKE_VERSION` Template tests will run on AGP 7.3 and will still use CMake 3.18, but I forecast no problem there as the user is not supposed to specify custom `CMAKE_BUILD_TYPE`. This is only a problem as we build `hermes-engine` with custom build types. Changelog: [Android] [Fixed] - Bump CMake to 3.22.1 to properly honor CMAKE_BUILD_TYPE Reviewed By: cipolleschi Differential Revision: D42544864 fbshipit-source-id: efd0f51120370fb808337c201df31d71f4ddfdbc
Merged
This was referenced Jan 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
fb-exported
Merged
This PR has been merged.
p: Facebook
Partner: Facebook
Partner
Platform: Android
Android applications.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
It seems like there is an incompatibility between NDK 23 (shipped in 0.71)
and the usage of custom
CMAKE_BUILD_TYPE
we do for Hermes.Specifically the
-DCMAKE_BUILD_TYPE=Release
we specify for the debugvariant of Hermes is partially ignored by the new Android native build toolchain.
See android/ndk#463 for mentions on how the
toolchains requires CMake 3.20+
As AGP 7.3 defaults to use CMake 3.18 unless specified, and NDK 23 unless specified.
AGP 7.4 defaults to use CMake 3.22 unless specified, and NDK 23 unless specified.
See: https://developer.android.com/studio/releases/gradle-plugin#7-4-0
Here I'm:
react-native
&hermes-engine
to use 3.22CMAKE_VERSION
Template tests will run on AGP 7.3 and will still use CMake 3.18, but I forecast
no problem there as the user is not supposed to specify custom
CMAKE_BUILD_TYPE
.This is only a problem as we build
hermes-engine
with custom build types.Changelog:
[Android] [Fixed] - Bump CMake to 3.22.1 to properly honor CMAKE_BUILD_TYPE
Differential Revision: D42544864
Fixes #35828