title: RCT-Folly error when using hermes with iOS
body: <p>When enabling hermes in the Podfile and rebuilding the build it fails due to RCT-Folly. No idea what it does.</p>
  <p>To re-initialise everything I use the following:</p>
  <p><code>rm -rf node_modules &amp;&amp; rm package-lock.json &amp;&amp; npm install &amp;&amp; cd ios &amp;&amp; rm -rf Pods &amp;&amp; rm Podfile.lock &amp;&amp; pod deintegrate &amp;&amp; pod setup &amp;&amp; pod install &amp;&amp; cd ..</code></p>
  <p>I also start the metro bundler with:</p>
  <p><code>npx react-native --reset-cache</code></p>
  <p>Anyone has a solution?</p>
  <p>The app uses react-native v0.64 and we want to have a better performance using hermes.</p>
  <p>All information:</p>
  <p>ios/Podfile</p>
  <pre><code>require_relative '../node_modules/react-native/scripts/react_native_pods'
  require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
  platform :ios, '10.0'
  
  target 'unblnd' do
    config = use_native_modules!
    use_react_native!(
      :path =&gt; config[:reactNativePath],
      :hermes_enabled =&gt; true
    )
  
    permissions_path = '../node_modules/react-native-permissions/ios'
    pod 'Permission-BluetoothPeripheral', :path =&gt; &quot;#{permissions_path}/BluetoothPeripheral&quot;
    pod 'Permission-Calendars', :path =&gt; &quot;#{permissions_path}/Calendars&quot;
    pod 'Permission-Camera', :path =&gt; &quot;#{permissions_path}/Camera&quot;
    pod 'Permission-Contacts', :path =&gt; &quot;#{permissions_path}/Contacts&quot;
    pod 'Permission-FaceID', :path =&gt; &quot;#{permissions_path}/FaceID&quot;
    pod 'Permission-LocationAlways', :path =&gt; &quot;#{permissions_path}/LocationAlways&quot;
    pod 'Permission-LocationWhenInUse', :path =&gt; &quot;#{permissions_path}/LocationWhenInUse&quot;
    pod 'Permission-MediaLibrary', :path =&gt; &quot;#{permissions_path}/MediaLibrary&quot;
    pod 'Permission-Microphone', :path =&gt; &quot;#{permissions_path}/Microphone&quot;
    pod 'Permission-Motion', :path =&gt; &quot;#{permissions_path}/Motion&quot;
    pod 'Permission-Notifications', :path =&gt; &quot;#{permissions_path}/Notifications&quot;
    pod 'Permission-PhotoLibrary', :path =&gt; &quot;#{permissions_path}/PhotoLibrary&quot;
    pod 'Permission-Reminders', :path =&gt; &quot;#{permissions_path}/Reminders&quot;
    pod 'Permission-Siri', :path =&gt; &quot;#{permissions_path}/Siri&quot;
    pod 'Permission-SpeechRecognition', :path =&gt; &quot;#{permissions_path}/SpeechRecognition&quot;
    pod 'Permission-StoreKit', :path =&gt; &quot;#{permissions_path}/StoreKit&quot;
  
    pod 'Yoga', :path =&gt; '../node_modules/react-native/ReactCommon/yoga', :modular_headers =&gt; true
  
    # add the Firebase pod for Google Analytics
    pod 'Firebase/Analytics'
    # add pods for any other desired Firebase products
    # https://firebase.google.com/docs/ios/setup#available-pods
  
  
    target 'unblndTests' do
      inherit! :complete
      # Pods for testing
    end
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable these next few lines.
    # flipper_pods()
    # post_install do |installer|
    #  flipper_post_install(installer)
    # end
  end
  </code></pre>
  <p>Terminal Output</p>
  <pre><code>In file included from /Users/adriaandebolle/htdocs/unblnd_app/ios/Pods/RCT-Folly/folly/synchronization/DistributedMutex.cpp:17: In file included from /Users/adriaandebolle/htdocs/unblnd_app/ios/Pods/Headers/Private/RCT-Folly/folly/synchronization/DistributedMutex.h:352: /Users/adriaandebolle/htdocs/unblnd_app/ios/Pods/Headers/Private/RCT-Folly/folly/synchronization/DistributedMutex-inl.h:1051:5: error: 'atomic_notify_one&lt;unsigned long&gt;' is unavailable
      atomic_notify_one(state);
      ^ /Users/adriaandebolle/htdocs/unblnd_app/ios/Pods/Headers/Private/RCT-Folly/folly/synchronization/DistributedMutex-inl.h:1573:5: note: in instantiation of function template specialization 'folly::detail::distributed_mutex::wakeTimedWaiters&lt;std::__1::atomic&lt;unsigned long&gt;&gt;' requested here
      wakeTimedWaiters(&amp;state_, proxy.timedWaiters_);
      ^ In file included from /Users/adriaandebolle/htdocs/unblnd_app/ios/Pods/RCT-Folly/folly/synchronization/DistributedMutex.cpp:17: In file included from /Users/adriaandebolle/htdocs/unblnd_app/ios/Pods/Headers/Private/RCT-Folly/folly/synchronization/DistributedMutex.h:19: In file included from /Users/adriaandebolle/htdocs/unblnd_app/ios/Pods/Headers/Private/RCT-Folly/folly/Optional.h:58: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/c++/v1/functional:504: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/c++/v1/memory:681: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/c++/v1/atomic:2140:6: note: 'atomic_notify_one&lt;unsigned long&gt;' has been explicitly marked unavailable here void atomic_notify_one(atomic&lt;_Tp&gt;* __o) _NOEXCEPT
       ^ 1 error generated.
  
  CompileC /Users/adriaandebolle/Library/Developer/Xcode/DerivedData/unblnd-cvaavakypguqqzftojmgjqbtdeij/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/x86_64/Demangle-3c4c6b43c285d16c32230d6f0a7a76ce5af39228ed5c3beeaf7ed7d1344f76b0.o /Users/adriaandebolle/htdocs/unblnd_app/ios/Pods/RCT-Folly/folly/detail/Demangle.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods')
  
  ...
  
  CompileC /Users/adriaandebolle/Library/Developer/Xcode/DerivedData/unblnd-cvaavakypguqqzftojmgjqbtdeij/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/x86_64/Cursor.o /Users/adriaandebolle/htdocs/unblnd_app/ios/Pods/RCT-Folly/folly/io/Cursor.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods')
      cd /Users/adriaandebolle/htdocs/unblnd_app/ios/Pods
      export LANG\=en_US.US-ASCII
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/
  
  ...
  
  ** BUILD FAILED **
  
  
  The following build commands failed:    CompileC /Users/adriaandebolle/Library/Developer/Xcode/DerivedData/unblnd-cvaavakypguqqzftojmgjqbtdeij/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/x86_64/DistributedMutex.o /Users/adriaandebolle/htdocs/unblnd_app/ios/Pods/RCT-Folly/folly/synchronization/DistributedMutex.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (1 failure)
  </code></pre>
  <p><code>npx react-native info</code></p>
  <pre><code>System:
      OS: macOS 11.4
      CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
      Memory: 1.05 GB / 16.00 GB
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 14.17.0 - /usr/local/bin/node
      Yarn: Not Found
      npm: 6.14.13 - ~/htdocs/unblnd_app/node_modules/.bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    Managers:
      CocoaPods: 1.10.1 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
      Android SDK:
        API Levels: 28, 29
        Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2
        System Images: android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom
        Android NDK: Not Found
    IDEs:
      Android Studio: 4.2 AI-202.7660.26.42.7351085
      Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
    Languages:
      Java: 1.8.0_265 - /usr/bin/javac
    npmPackages:
      @react-native-community/cli: Not Found
      react: 17.0.1 =&gt; 17.0.1 
      react-native: 0.64.2 =&gt; 0.64.2 
      react-native-macos: Not Found
    npmGlobalPackages:
      *react-native*: Not Found
  </code></pre>