[PATCH] D63648: [Preprocessor] Honor absolute paths in diagnostics

2019-08-21 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Maybe we should just implement full /FC mode that affects paths everywhere (diagnostics, `__FILE__`, etc). Then people who need this more than deterministic, build-directory-independent builds can use that. (But it does break distributed build caching, so it's not that g

[PATCH] D63648: [Preprocessor] Honor absolute paths in diagnostics

2019-08-20 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. In D63648#1593619 , @thakis wrote: > - Does fastbuild have something like distcc-pump? Fastbuild works like plain distcc and unfortunately it does not have pump mode. > - IIRC we used to use fdiagnostics-absolute-paths in Chromiu

[PATCH] D63648: [Preprocessor] Honor absolute paths in diagnostics

2019-07-19 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. In D63648#1591469 , @aganea wrote: > It totally makes sense, thanks for the explanation Nico! Let's forget about > `cl` compatibility, that wasn't my initial intent. > > We always pass //relative// paths on the cmd-line, for all th

[PATCH] D63648: [Preprocessor] Honor absolute paths in diagnostics

2019-07-18 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. It totally makes sense, thanks for the explanation Nico! Let's forget about `cl` compatibility, that wasn't my initial intent. We always pass //relative// paths on the cmd-line, for all the reasons you've mentioned. We also pass `-fdiagnostics-absolute-paths` hoping to f

[PATCH] D63648: [Preprocessor] Honor absolute paths in diagnostics

2019-07-17 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. > So maybe `Driver::IsCLMode()` should take precedence over > `-fdiagnostics-absolute-paths` when using `/showIncludes`? Definitely not. We want builds to be deterministic; this includes them being independent of the build directory. (This matters for distributed compila

[PATCH] D63648: [Preprocessor] Honor absolute paths in diagnostics

2019-07-17 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. The problem is that it is not `cl.exe`'s behavior - it always makes paths absolute: F:\svn\test>cl /c test.cc /showIncludes Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27031.1 for x64 Copyright (C) Microsoft Corporation. All rights reserved. test.cc

[PATCH] D63648: [Preprocessor] Honor absolute paths in diagnostics

2019-07-17 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. >> Those aren't diagnostics, so that's not surprising. > > What would suggest in that case? Add a new `-fpreprocessor-absolute-paths` > option? Or change the name of `-fdiagnostics-absolute-paths` for another name > that applies to both diagnostics and the preprocessor o

[PATCH] D63648: [Preprocessor] Honor absolute paths in diagnostics

2019-07-17 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. Thanks for getting back Hans! In D63648#1589119 , @hans wrote: > Are you saying the diagnostics were not using absolute paths in those cases > and this patch fixes that? Yes. >> , or --show-includes, or -E > > Those aren't dia

[PATCH] D63648: [Preprocessor] Honor absolute paths in diagnostics

2019-07-17 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. I will try to take a look, but can you please expand the patch description a little to make it more clear exactly what you're proposing to change? Sorry for all the questions below, I'm just trying to understand exactly what the issue is. > Previously, -fdiagnostics-absol

[PATCH] D63648: [Preprocessor] Honor absolute paths in diagnostics

2019-07-16 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. Ping! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63648/new/ https://reviews.llvm.org/D63648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D63648: [Preprocessor] Honor absolute paths in diagnostics

2019-06-21 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea created this revision. aganea added reviewers: hans, thakis, rsmith. aganea added a project: clang. Previously, `-fdiagnostics-absolute-paths` did not have an effect in some cases, for example: when using relative include paths, or relative CPP paths, or `--show-includes`, or `-E` or disp