Skip to content

Commit

Permalink
Fix podspecs building with C++ 14 (facebook#39464)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#39464

We currently have 854 warnings emitted due to nested namespaces being a C++ 17 extension lol.

This sets the standard explicitly to C++ 20 in the specs emitting the warnings (mostly RCT-Text).

It is undesirable that we add hundreds of warnings to the CocoaPods build without signal. Our Buck build and OSS Android build both treat warnings as errors. But... that is for another day.

Changelog: [Intenrnal]

Reviewed By: cortinico

Differential Revision: D49303081

fbshipit-source-id: 786d4fcdf4871433c3e0dbaec2cf02eef9e08978
  • Loading branch information
NickGerleman authored and facebook-github-bot committed Sep 15, 2023
1 parent b9617b9 commit db8379d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/react-native/Libraries/Text/React-RCTText.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Pod::Spec.new do |s|
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.header_dir = "RCTText"
s.framework = ["MobileCoreServices"]
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++20" }

s.dependency "Yoga"
s.dependency "React-Core/RCTTextHeaders", version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Pod::Spec.new do |s|
s.source = source
s.source_files = "react/config/*.{m,mm,cpp,h}"
s.header_dir = "react/config"
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++20" }

if ENV['USE_FRAMEWORKS']
s.header_mappings_dir = './'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ Pod::Spec.new do |s|

s.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
"HEADER_SEARCH_PATHS" => header_search_paths.join(" "),
"DEFINES_MODULE" => "YES" }
"DEFINES_MODULE" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20" }

s.dependency "glog"
s.dependency "RCT-Folly/Fabric", folly_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ Pod::Spec.new do |s|
s.source = source
s.source_files = "**/*.{cpp,h}"
s.header_dir = "reactperflogger"
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++20" }
end

0 comments on commit db8379d

Please sign in to comment.