Index: test/lit.common.cfg =================================================================== --- test/lit.common.cfg +++ test/lit.common.cfg @@ -61,7 +61,8 @@ config.environment['PATH'] = path # Help MSVS link.exe find the standard libraries. -if platform.system() == 'Windows': +# Make sure we only try to use it when targetting Windows +if platform.system() == 'Windows' and config.target_triple.endswith('win32'): config.environment['LIB'] = os.environ['LIB'] # Use ugly construction to explicitly prohibit "clang", "clang++" etc.