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

Jan Vesely via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 3 12:26:16 PDT 2020


jvesely added a comment.

In D77165#1959901 <https://reviews.llvm.org/D77165#1959901>, @daniels wrote:

> In D77165#1959786 <https://reviews.llvm.org/D77165#1959786>, @daniels wrote:
>
> > In D77165#1959565 <https://reviews.llvm.org/D77165#1959565>, @jvesely wrote:
> >
> > > What was the generator target you used?
> >
> >
> > I'm using Ninja [...]
>
>
> As noted in D17762 <https://reviews.llvm.org/D17762>, we have to use Ninja rather than the VS backend, as the 'standard' way to add new languages for compile in CMake doesn't work with the VS backend. CMake's VS backend has a hardcoded-in-C++-code list of acceptable source languages; when you try to produce a static library with sources in an unknown-to-CMake-VS-backend language, the target ends up completely empty with no actions to produce the output, because the CMake backend doesn't know how.


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?
otherwise, I'm OK with this patch with an updated commit message to point to [0] as the real source of the problem.

have you tried using `nmake Makefiles`?

[0] https://ninja-build.org/manual.html#ref_rule_command


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