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

Add compiler flag for the new Arch when enabled. #35672

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions scripts/cocoapods/__tests__/new_architecture-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def test_installModulesDependencies_whenNewArchEnabledAndNewArchAndNoSearchPaths
assert_equal(spec.compiler_flags, NewArchitectureHelper.folly_compiler_flags)
assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "\"$(PODS_ROOT)/boost\"")
assert_equal(spec.pod_target_xcconfig["CLANG_CXX_LANGUAGE_STANDARD"], "c++17")
assert_equal(spec.pod_target_xcconfig["OTHER_CPLUSPLUSFLAGS"], "$(inherited) -DRCT_NEW_ARCH_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1")
assert_equal(
spec.dependencies,
[
Expand Down
5 changes: 4 additions & 1 deletion scripts/cocoapods/new_architecture.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,13 @@ def self.install_modules_dependencies(spec, new_arch_enabled, folly_version)
spec.compiler_flags = compiler_flags.empty? ? @@folly_compiler_flags : "#{compiler_flags} #{@@folly_compiler_flags}"
current_config["HEADER_SEARCH_PATHS"] = current_headers.empty? ? boost_search_path : "#{current_headers} #{boost_search_path}"
current_config["CLANG_CXX_LANGUAGE_STANDARD"] = @@cplusplus_version
spec.pod_target_xcconfig = current_config


spec.dependency "React-Core"
spec.dependency "RCT-Folly", '2021.07.22.00'

if new_arch_enabled
current_config["OTHER_CPLUSPLUSFLAGS"] = @@new_arch_cpp_flags
spec.dependency "React-RCTFabric" # This is for Fabric Component
spec.dependency "React-Codegen"

Expand All @@ -90,6 +91,8 @@ def self.install_modules_dependencies(spec, new_arch_enabled, folly_version)
spec.dependency "ReactCommon/turbomodule/bridging"
spec.dependency "ReactCommon/turbomodule/core"
end

spec.pod_target_xcconfig = current_config
end

def self.folly_compiler_flags
Expand Down