[lld] [Support] Better error msg when cache dir can't be created. (PR #69575)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 20 08:01:18 PDT 2023


teresajohnson wrote:

> That's true, the fatal error actually comes from the LTO backend:

Ah ok there, not in the linker. In any case, given the layering here, I think it is harder to have the client distinguish between errors that should be fatal vs not. So let's just leave as is for now with your improved message. Open to suggestions as to how to improve this though.

> I pushed a test, but it's not yet working 100% - I am struggling with this a bit. It seems since we are "dying" of report_fatal_error the normal `not <cmd>` construct is not working, lit still seems to think it has failed.

I think you need "not --crash".

> Lit output
> Another thing that bothered me is that the method of setting the permissions of the directory to make it fail only works on Linux, this this would have to be disabled on Windows and I was not able to find any prior art for how to handle this.

I'm not very familiar with Windows, but I think for these purposes a linux only test is fine.

https://github.com/llvm/llvm-project/pull/69575


More information about the llvm-commits mailing list