On Mac OSX (macOS version 12.4, sdk version 12.1) llvm can replace call to strrchr() with call to memrchr() when string length is known at compile time. This results in link error, because memrchr is not present in libSystem. It is needed to disable this optimization in TargetLibraryInfo for affected OSX versions.