With Xcode 26.4, some iOS projects that enable Hardware Memory Tagging under Enhanced Security can fail only when linking for the Simulator with Library 'c++polyfills' not found. In an Apple Developer Forums investigation, Apple DTS reproduced the problem and narrowed it to a combination involving an iOS 17 deployment target, a Simulator destination, MTE, and Objective-C code in the target.
The error
Library 'c++polyfills' not found
Linker command failed with exit code 1
A useful diagnostic clue is that device Debug builds and archives can still succeed while a Simulator build fails at the link step.
Cause
Apple DTS reproduced the issue with Xcode 26.4 by creating a Swift iOS app, setting the deployment target to iOS 17.7, selecting Any iOS Simulator, enabling Hardware Memory Tagging in the Enhanced Security capability, and then adding an Objective-C class.
DTS also inspected the Xcode bundle and found libc++polyfills.a in real-device platform SDKs such as iPhoneOS, while it was absent from Simulator platforms such as iPhoneSimulator. The failing configuration therefore appears to make a Simulator link request for a library that is not present in that Simulator SDK.
Reproduced conditions: Xcode 26.4, an iOS 17-series deployment target, a Simulator build, Hardware Memory Tagging enabled through Enhanced Security, and Objective-C in the target. This is not a generic linker failure affecting every Xcode 26.4 project.
Recommended fix
1. Retest with Xcode 26.5 or later
The original reporter stated that the problem no longer occurred after moving to Xcode 26.5. Update Xcode where practical, clean the build folder, and rebuild the same Simulator configuration.
The forum thread confirms the reporter’s successful result, but it does not by itself establish that Apple documented this exact error as a named Xcode 26.5 fix. Treat Xcode 26.5 as a confirmed successful retest from the report, rather than claiming an explicitly documented release-note fix.
2. If you must stay on Xcode 26.4, raise the Simulator deployment target
Apple DTS found that changing the deployment target from iOS 17.7 to iOS 18.6 made the problem disappear. DTS suggested temporarily targeting iOS 18 for Simulator work when testing specifically on an iOS 17 Simulator is not required.
Do not casually change the shipping app’s minimum supported OS. Apply this workaround with awareness of how your build configurations and test matrix are structured.
3. Check the Enhanced Security and Hardware Memory Tagging requirement
The reproduced failure depends on Hardware Memory Tagging being enabled. If MTE is not required for the current test, changing that condition can help isolate the issue. Disabling a security feature should not be treated as the preferred permanent fix; use it only when appropriate for diagnosis or a temporary test configuration.
Alternatives
If you need to keep both Xcode 26.4 and iOS 17 Simulator coverage, consider running the affected test on a physical device instead. In the original report, device Debug builds and archives worked. Because adding Objective-C was also part of Apple’s reproduction, reviewing when Objective-C entered the target can help confirm that you are dealing with this specific failure.
How to verify the fix
- Select the Simulator destination that previously failed.
- Run Product > Clean Build Folder.
- Build or run the same target again.
- Confirm that
Library 'c++polyfills' not foundno longer appears. - Also verify that device builds and archives still behave as expected.
Cautions
Do not solve this by copying libc++polyfills.a manually from another SDK into the Simulator SDK. Modifying files inside the Xcode bundle can create SDK-integrity, signing, and update problems. Prefer updating Xcode or using the configuration workaround identified by Apple DTS.
Summary
If Library 'c++polyfills' not found appears only for Simulator builds in Xcode 26.4, check for the combination of an iOS 17 deployment target, Enhanced Security with Hardware Memory Tagging, and Objective-C in the target. Apple DTS reproduced that setup and confirmed that raising the deployment target to iOS 18.6 avoids the failure. The reporter later confirmed that the issue no longer occurred with Xcode 26.5, making an Xcode update the first option to test today.
