Files
react-native/scripts/cocoapods/__tests__/test_utils/XcodebuildMock.rb
T
Riccardo Cipolleschi 740c40187f Fix Xcode 15 RC issues (#39474)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39474

When it comes to Xcode 15 RC, we are aware of two issues:
1. `unary_function` and `binary_function` not available in Cxx17
2. [Weak linking](https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking) is not supported anymore.

This change should fix both of the issues, adding the flags to allow for `unary_function`and `binary_function` to be called and adding the `-Wl -ld_classic` flag to `OTHER_LDFLAGS` in case Xcode 15 is detected.

[Internal] - add the `_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION` and the `-Wl -ld_classic` flags to projects when needed

Reviewed By: dmytrorykun

Differential Revision: D49319256

fbshipit-source-id: bb895f1e60db915db79684f71fa436ce80b42111
2023-09-19 13:40:17 +02:00

27 lines
569 B
Ruby

# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
class XcodebuildMock < Xcodebuild
@@version = ""
@@version_invocation_count = 0
def self.set_version=(v)
@@version = v
end
def self.version
@@version_invocation_count += 1
@@version
end
def self.version_invocation_count
@@version_invocation_count
end
def self.reset()
@@version_invocation_count = 0
end
end