mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
25c5d194ad
Summary: LLD, our new iOS linker, is an ongoing effort to migrate our old outdated ld64 linker. As part of our effort to rollout LLD to all apps, we are making sure LLD reaches parity with ld64. Due to Identical Code Folding (ICF), LLD and ld64 handles strings differently. LLD treats each string as a separate object in memory even if the values of the strings are the same. ld64 happens to aggregate these values across files. This behavior creates a subtle difference on our codebase when we start comparing by value or by reference. `char * ` fields from `RawPropsKey.h` are using `==` which compares by its address. Here, we cast the buffer to a string to make the comparison, while avoiding the cast if one happens to be null. Changelog: [Internal] Reviewed By: int3, JoshuaGross Differential Revision: D30444176 fbshipit-source-id: 74216926803adbece05206ddd8478cc3c8e6812e