Index: lld/trunk/lib/Driver/DarwinLdDriver.cpp =================================================================== --- lld/trunk/lib/Driver/DarwinLdDriver.cpp +++ lld/trunk/lib/Driver/DarwinLdDriver.cpp @@ -232,7 +232,8 @@ while (!buffer.empty()) { // Split off each line in the file. std::pair lineAndRest = buffer.split('\n'); - StringRef line = lineAndRest.first; + // On Windows, line endings can be "\r\n", not just "\n". + StringRef line = lineAndRest.first.rtrim("\r"); StringRef path; if (!dirName.empty()) { // If there is a then prepend dir to each line.