phosek added a comment.

In D75890#1915493 <https://reviews.llvm.org/D75890#1915493>, @thakis wrote:

> `__FILE__` only expands to an absolute path if you pass an absolute path to 
> clang (ctrl-f "__FILE__" on 
> http://blog.llvm.org/2019/11/deterministic-builds-with-clang-and-lld.html).


Yes, but unfortunately that's what CMake does by default (that is using 
absolute paths) so we have to deal with that somehow since CMake is still the 
official build system.

> It feels like this is working around a deficiency in the compiler. Maybe 
> fixing whatever's going wrong in the compiler might be better? (There's also 
> -ffile-file-prefix map, but using that makes your _commandline_ depend on the 
> name of the build dir, and (in clang) `__FILE_NAME__ `.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75890/new/

https://reviews.llvm.org/D75890



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to