[sanitizer_common] Disable sanitizer_redefine_builtins on Apple platforms #153381
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This currently generates many linker warnings of this form, due to defining mem(cpy|move|set) in every object file:
In order for this to actually replace these symbols on mach-o, they would need a leading underscore, e.g.
.set _memcpy, ___sanitizer_internal_memcpy. However doing so does not fix the warnings, and furthermore it ends up replacingREAL(memcpy)calls with__sanitizer_internal_memcpyin places such as__asan::Allocator::Reallocate. There is no way on Apple platforms to recreate the intended behaviour, so let's just disable this on them to reduce warning noise.rdar://123771479