Current implementation does not work if CMAKE_OSX_SYSROOT is not specified.
It silently generates invalid command with the following flags:
-std=c++11 -lc++ -gline-tables-only -isysroot -fsanitize=address,fuzzer
and then fails with the following error:
warning: no such sysroot directory: '-fsanitize=address,fuzzer' [-Wmissing-sysroot]" <...>/RepeatedBytesTest.cpp:5:10: fatal error: 'assert.h' file not found #include <assert.h> ^~~~~~~~~~ 1 error generated.
However, if you have Command Line Tools installed, you have '/usr/include' dir.
In that case, it is not necessary to specify isysroot path.
Also, with the patch, in case of '/usr/include' does not exist, the '-sysroot'
path would be resolved automatically in compiler-rt/cmake/base-config-ix.cmake.
For more context, see the comment at compiler-rt/cmake/base-config-ix.cmake#L76