[PATCH] D77165: libclc: Use temporary files rather than a pipe

Daniel Stone via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 6 14:43:27 PDT 2020


daniels added a comment.

In D77165#1960389 <https://reviews.llvm.org/D77165#1960389>, @jvesely wrote:

> It looks like this is a ninja issue. ninja uses `sh -c` to invoke build rule commands on *nix, but calls `CreateProcess` directly on windows [0].
>  [0] suggests prefixing the command with `cmd /c`, but it doesn't say why that's not the default.
>  maybe talking to ninja devs might indicate what the preferred way would be.
>
> should we cleanup the .temp file here? does ninja clean leave it behind?


I have no idea. I tried to look for a way to declare to CMake that a file was just a temporary artifact and should be deleted, but I couldn't find anything, We could clean it up, but then we'd need to come up with a cross-platform way to remove files (rm vs. rem etc)? If you have any suggestions, I'm all ears.

> otherwise, I'm OK with this patch with an updated commit message to point to [0] as the real source of the problem.

Thanks, I've updated the commit message now.

> have you tried using `nmake Makefiles`?

To be honest, I haven't. We already use MSVC builds for most things (preferentially when using CMake), plus Ninja for others, and I'd rather not add NMake as a third build system just to work around this issue.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77165





More information about the llvm-commits mailing list