looks like we still have some failures: http://lab.llvm.org:8011/builders/clang-native-arm-cortex-a9/builds/7365/steps/check-all/logs/Clang%20%3A%3A%20Tooling__clang-check-pwd.cpp
On 26 April 2013 21:14, Chad Rosier <[email protected]> wrote: > Author: mcrosier > Date: Fri Apr 26 20:14:43 2013 > New Revision: 180661 > > URL: http://llvm.org/viewvc/llvm-project?rev=180661&view=rev > Log: > [driver] Revert r180652 and 180658 and temporarily #define MAXPATHLEN to > make the gdb tests and the Windows bots happy. > > The Path::GetCurrentDirectory API is not equivalent to ::getcwd(), so > r180652 causes a gdb tests to fail. On the other hand, <sys/param.h> > isn't defined on Windows systems, so that causes Windows builds to fail. > rdar://12237559 > > Modified: > cfe/trunk/lib/Driver/Tools.cpp > > Modified: cfe/trunk/lib/Driver/Tools.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=180661&r1=180660&r2=180661&view=diff > ============================================================================== > --- cfe/trunk/lib/Driver/Tools.cpp (original) > +++ cfe/trunk/lib/Driver/Tools.cpp Fri Apr 26 20:14:43 2013 > @@ -1775,6 +1775,9 @@ static bool shouldUseLeafFramePointer(co > return true; > } > > +// FIXME: This is a temporary hack until I can find a fix that works for all > +// platforms. > +#define MAXPATHLEN 4096 > /// If the PWD environment variable is set, add a CC1 option to specify the > /// debug compilation directory. > static void addDebugCompDirArg(const ArgList &Args, ArgStringList &CmdArgs) { > @@ -1792,8 +1795,8 @@ static void addDebugCompDirArg(const Arg > return; > } > // Fall back to using getcwd. > - std::string cwd = llvm::sys::Path::GetCurrentDirectory().str(); > - if (pwd && !cwd.empty()) { > + char *cwd; > + if (pwd && ::getcwd(cwd, MAXPATHLEN)) { > CmdArgs.push_back("-fdebug-compilation-dir"); > CmdArgs.push_back(Args.MakeArgString(cwd)); > } > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
