Index: test/fuzzer/lit.cfg =================================================================== --- test/fuzzer/lit.cfg +++ test/fuzzer/lit.cfg @@ -57,8 +57,7 @@ if fuzzer_enabled: sanitizers.append('fuzzer') sanitizers_cmd = ('-fsanitize=%s' % ','.join(sanitizers)) - isysroot_cmd = ('-isysroot %s' % config.osx_sysroot - ) if 'darwin' in config.target_triple else '' + isysroot_cmd = config.osx_sysroot_flag if config.osx_sysroot_flag else '' include_cmd = '-I%s' % libfuzzer_src_root return '%s %s %s -gline-tables-only %s %s %s' % ( compiler_cmd, std_cmd, link_cmd, isysroot_cmd, sanitizers_cmd, include_cmd) Index: test/fuzzer/lit.site.cfg.in =================================================================== --- test/fuzzer/lit.site.cfg.in +++ test/fuzzer/lit.site.cfg.in @@ -6,7 +6,7 @@ config.target_flags = "@LIBFUZZER_TEST_FLAGS@" config.c_compiler = "@LIBFUZZER_TEST_COMPILER@" -config.osx_sysroot = "@CMAKE_OSX_SYSROOT@" +config.osx_sysroot_flag = "@OSX_SYSROOT_FLAG@" config.cmake_binary_dir = "@CMAKE_BINARY_DIR@" config.target_triple = "@TARGET_TRIPLE@"