Skip to content
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

Use modern Android libc++ in Yoga and React Native OSS #39795

Closed
wants to merge 3 commits into from

Conversation

NickGerleman
Copy link
Contributor

@NickGerleman NickGerleman commented Oct 4, 2023

Summary:
Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang (17, released this year), and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang.
This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case).

Changelog:
[Android][Changed] - Use NDK 26

Differential Revision: D49895949

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 4, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49895949

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49895949

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Oct 4, 2023
)

Summary:
X-link: facebook/yoga#1412

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang, and later NDK versions will now also bump libc++ as part of bumping LLVM/Clang.

This requires an Alpha AGP version, which is... spooky, and we would need to update that before shipping RN 0.74/Yoga 3.0. It does bring us closer to what we want to ship then however.

Differential Revision: D49895949
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Oct 4, 2023
Summary:
X-link: facebook/react-native#39795

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang, and later NDK versions will now also bump libc++ as part of bumping LLVM/Clang.

This requires an Alpha AGP version, which is... spooky, and we would need to update that before shipping RN 0.74/Yoga 3.0. It does bring us closer to what we want to ship then however.

Differential Revision: D49895949
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Oct 4, 2023
)

Summary:
X-link: facebook/yoga#1412

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang, and later NDK versions will now also bump libc++ as part of bumping LLVM/Clang.

This requires an Alpha AGP version, which is... spooky, and we would need to update that before shipping RN 0.74/Yoga 3.0. It does bring us closer to what we want to ship then however.

Differential Revision: D49895949
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49895949

NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Oct 4, 2023
Summary:
X-link: facebook/react-native#39795

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang, and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang.

This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case).

Changelog:
[Android][Changed] - Use NDK 26

Differential Revision: D49895949
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Oct 4, 2023
Summary:
X-link: facebook/yoga#1412

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang, and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang.

This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case).

Changelog:
[Android][Changed] - Use NDK 26

Differential Revision: D49895949
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49895949

NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Oct 4, 2023
Summary:
X-link: facebook/react-native#39795
Pull Request resolved: facebook#1412

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang, and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang.

This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case).

Changelog:
[Android][Changed] - Use NDK 26

Differential Revision: D49895949

fbshipit-source-id: 4682087ddf42a7cfc85958e7258d8d38a72d630c
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49895949

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Oct 4, 2023
Summary:
Pull Request resolved: facebook#39795
X-link: facebook/yoga#1412

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang, and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang.

This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case).

Changelog:
[Android][Changed] - Use NDK 26

Differential Revision: D49895949

fbshipit-source-id: 5e0045da5a8a4ee31980d0f082afd47d3f5f977e
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49895949

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Oct 4, 2023
Summary:
Pull Request resolved: facebook#39795
X-link: facebook/yoga#1412

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang, and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang.

This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case).

Changelog:
[Android][Changed] - Use NDK 26

Differential Revision: D49895949

fbshipit-source-id: af1345ba5095eb3d67b5ce32e386222ffa4ece13
@NickGerleman NickGerleman changed the title Try using modern Android libc++ in Yoga and React Native Use modern Android libc++ in Yoga and React Native OSS Oct 4, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49895949

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Oct 4, 2023
Summary:
Pull Request resolved: facebook#39795
X-link: facebook/yoga#1412

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang (17, released this year), and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang.

This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case).

Changelog:
[Android][Changed] - Use NDK 26

Differential Revision: D49895949

fbshipit-source-id: 36b7777f4fcd6b8f577aa1dc654237ff53bda8bd
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49895949

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Oct 4, 2023
Summary:
Pull Request resolved: facebook#39795
X-link: facebook/yoga#1412

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang (17, released this year), and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang.

This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case).

Changelog:
[Android][Changed] - Use NDK 26

Reviewed By: yungsters

Differential Revision: D49895949

fbshipit-source-id: 0bdfafbf4e7f217f67ea40abbaaa1814d8143b91
@analysis-bot
Copy link

analysis-bot commented Oct 4, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 17,317,597 +423,277
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 20,685,719 +312,667
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 7d88ac4
Branch: main

NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Oct 4, 2023
Summary:
X-link: facebook/react-native#39795
Pull Request resolved: facebook#1412

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang (17, released this year), and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang.

This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case).

Changelog:
[Android][Changed] - Use NDK 26

Reviewed By: yungsters

Differential Revision: D49895949

fbshipit-source-id: 0ff69ef8495d67ccf15deaa67576dc2a99a70a02
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Oct 5, 2023
Summary:
X-link: facebook/react-native#39795
Pull Request resolved: facebook#1412

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang (17, released this year), and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang.

This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case).

Changelog:
[Android][Changed] - Use NDK 26

Reviewed By: yungsters

Differential Revision: D49895949

fbshipit-source-id: 1b27bc0284a16c5883b9898f857c059c0d8be852
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49895949

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Oct 5, 2023
Summary:
Pull Request resolved: facebook#39795
X-link: facebook/yoga#1412

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang (17, released this year), and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang.

This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case).

Changelog:
[Android][Changed] - Use NDK 26

Reviewed By: yungsters

Differential Revision: D49895949

fbshipit-source-id: 622b526b983f6db5e3dd626e99b24d9651e13dae
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Oct 5, 2023
Summary:
X-link: facebook/react-native#39795
Pull Request resolved: facebook#1412

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang (17, released this year), and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang.

This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case).

Changelog:
[Android][Changed] - Use NDK 26

Reviewed By: yungsters

Differential Revision: D49895949

fbshipit-source-id: 6adf8d6f818a53568cd2e4c8539c5994aa0ffd51
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49895949

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Oct 5, 2023
Summary:
Pull Request resolved: facebook#39795
X-link: facebook/yoga#1412

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang (17, released this year), and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang.

This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case).

Changelog:
[Android][Changed] - Use NDK 26

Reviewed By: yungsters

Differential Revision: D49895949

fbshipit-source-id: 147990c3543b5f15e3944e89855c20ed698e3bdd
NickGerleman and others added 3 commits October 4, 2023 18:32
Summary:
This is what Folly is built against internally. Bump the version we use, and the standard we compile with, to take some different paths, and see if we fix some warnings caused by FMT with the ndk bump.

Changelog: [Internal]

Pull Request resolved: facebook#39799

Test Plan: Passes in CircleCI

Differential Revision: D49900112

fbshipit-source-id: f33f9684d0836530409a553bb4c88bbc082a1f57
Summary:
This bumps folly, to absorb facebook/folly@45fffa6 which fixes warnings in XCode 15, and NDK 26 (treated as error bc we have better hygiene there). We then bump a little bit further to get past a new warning added, then fixed later.

Need to manually set `FOLLY_HAVE_GETTIME` on Apple because of the silliness described in facebook/folly#1470 (comment)

There is not a combination of Folly, and Android libc++, that has fixes for warnings, but doesn't require the new libc++ in NDK 26. It is expected then that this commit will fail the build, but the next should succeed, and the two must be landed at the same time.

Changelog: [Internal]

Pull Request resolved: facebook#39798

Differential Revision: D49897681

fbshipit-source-id: 21ddba73d0434bf82c15f3a18e6a15d14c18c503
Summary:
Pull Request resolved: facebook#39795
X-link: facebook/yoga#1412

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang (17, released this year), and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang.

This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case).

Changelog:
[Android][Changed] - Use NDK 26

Reviewed By: yungsters

Differential Revision: D49895949

fbshipit-source-id: f1ba61bb86b580edeb423cd9dede2ee95e2427e6
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49895949

@github-actions
Copy link

github-actions bot commented Oct 5, 2023

Warnings
⚠️ One hour and a half have passed and the E2E jobs haven't finished yet.

Generated by 🚫 dangerJS against cf147db

facebook-github-bot pushed a commit to facebook/yoga that referenced this pull request Oct 5, 2023
Summary:
X-link: facebook/react-native#39795
Pull Request resolved: #1412

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang (17, released this year), and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang.

This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case).

Changelog:
[Android][Changed] - Use NDK 26

Reviewed By: yungsters

Differential Revision: D49895949

fbshipit-source-id: 37bb4d1fdf81137be7f14f6675b4e079c6f861e4
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Oct 5, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 9ce7b56.

blakef pushed a commit to blakef/template that referenced this pull request Feb 28, 2024
Summary:
Pull Request resolved: facebook/react-native#39795
X-link: facebook/yoga#1412

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang (17, released this year), and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang.

This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case).

Changelog:
[Android][Changed] - Use NDK 26

Reviewed By: yungsters

Differential Revision: D49895949

fbshipit-source-id: 37bb4d1fdf81137be7f14f6675b4e079c6f861e4

Original: facebook/react-native@9ce7b56
blakef pushed a commit to react-native-community/template that referenced this pull request Feb 29, 2024
Summary:
Pull Request resolved: facebook/react-native#39795
X-link: facebook/yoga#1412

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang (17, released this year), and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang.

This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case).

Changelog:
[Android][Changed] - Use NDK 26

Reviewed By: yungsters

Differential Revision: D49895949

fbshipit-source-id: 37bb4d1fdf81137be7f14f6675b4e079c6f861e4

Original-Commit: facebook/react-native@9ce7b56
blakef pushed a commit to react-native-community/template that referenced this pull request Feb 29, 2024
Summary:
Pull Request resolved: facebook/react-native#39795
X-link: facebook/yoga#1412

Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang (17, released this year), and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang.

This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case).

Changelog:
[Android][Changed] - Use NDK 26

Reviewed By: yungsters

Differential Revision: D49895949

fbshipit-source-id: 37bb4d1fdf81137be7f14f6675b4e079c6f861e4

Original-Commit: facebook/react-native@9ce7b56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants