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

fix C++20 compliance with application of upstream PR 965 #15

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix C++20 compliance with application of upstream PR 965
These symbols are no longer valid on macOS and will fail builds if the `NDEBUG` symbol is defined, as it is now in default build settings for all react-native projects since release of react-native 0.76

This same change was applied upstream but never released, and it appears it has not been applied here

google#965 (comment)
  • Loading branch information
mikehardy authored Oct 26, 2024

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
commit dc346ebc29fa755f5193dfc9d0a9f463b42a9d2b
4 changes: 2 additions & 2 deletions util/env_posix.cc
Original file line number Diff line number Diff line change
@@ -837,7 +837,7 @@ class SingletonEnv {
public:
SingletonEnv() {
#if !defined(NDEBUG)
env_initialized_.store(true, std::memory_order::memory_order_relaxed);
env_initialized_.store(true, std::memory_order_relaxed);
#endif // !defined(NDEBUG)
static_assert(sizeof(env_storage_) >= sizeof(EnvType),
"env_storage_ will not fit the Env");
@@ -854,7 +854,7 @@ class SingletonEnv {

static void AssertEnvNotInitialized() {
#if !defined(NDEBUG)
assert(!env_initialized_.load(std::memory_order::memory_order_relaxed));
assert(!env_initialized_.load(std::memory_order_relaxed));
#endif // !defined(NDEBUG)
}