[all-commits] [llvm/llvm-project] a6d509: [Support] Better error msg when cache dir can't be...

Tobias Hieta via All-commits all-commits at lists.llvm.org
Wed Oct 25 23:31:46 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a6d509fadbf7565baf336c2e25d1798fd40e59c9
      https://github.com/llvm/llvm-project/commit/a6d509fadbf7565baf336c2e25d1798fd40e59c9
  Author: Tobias Hieta <tobias at hieta.se>
  Date:   2023-10-26 (Thu, 26 Oct 2023)

  Changed paths:
    A lld/test/COFF/lto-cache-errors.ll
    M llvm/lib/Support/Caching.cpp

  Log Message:
  -----------
  [Support] Better error msg when cache dir can't be created. (#69575)

On windows if you passed /lldltocache:D:\tmp to lld and you didn't have
D: mounted it fail to create the cache dir D:\tmp, but the error message
is pretty hard to understand:

```
c:\code\llvm\llvm-project\out\debug>bin\lld-link.exe /lldltocache:D:\tmp
hello.obj
LLVM ERROR: no such file or directory

PLEASE submit a bug report to
https://github.com/llvm/llvm-project/issues/ and include the crash
backtrace.
Exception Code: 0xC000001D
```

Which lead one of our users to report this as a crash. I have just added
a bit better message so it now says:

```
c:\code\llvm\llvm-project\out\debug>bin\lld-link.exe /lldltocache:D:\tmp
hello.obj
LLVM ERROR: Can't create cache directory: D:\tmp

PLEASE submit a bug report to
https://github.com/llvm/llvm-project/issues/ and include the crash
backtrace.
```

I am not sure this is a fatal error because it's not something that
really should be reported as a bug to LLVM. But at least this gives a
bit more visibility on what to change.




More information about the All-commits mailing list