<div dir="ltr">It would. In this case, we would need to add CMake logic to pass the option when running tablegen. I'm not sure how to detect this precise case, though.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 15, 2020 at 12:16 PM Martin Storsjö <<a href="mailto:martin@martin.st">martin@martin.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, 15 Jan 2020, Reid Kleckner via llvm-dev wrote:<br>
<br>
> On Wed, Jan 15, 2020 at 11:14 AM Luke Drummond <<a href="mailto:luke.drummond@codeplay.com" target="_blank">luke.drummond@codeplay.com</a>><br>
> wrote:<br>
>       On Wed Jan 15, 2020 at 6:58 PM, Reid Kleckner wrote:<br>
>       > Does the same limitation exist in VS 2017? I think that's our<br>
>       support<br>
>       > floor<br>
>       > these days:<br>
>       ><a href="https://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-an" rel="noreferrer" target="_blank">https://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-an</a><br>
>       d-standard-library<br>
>       ><br>
>       It appears that all releases including the latest 2019 are<br>
>       affected.<br>
>       ><br>
>       > One *could* make the tablegen behavior conditional on the<br>
>       compiler, and<br>
>       > generate the character arrays for VS, and strings for other<br>
>       compilers.<br>
>       > It<br>
>       > has the potential to create MSVC only issues, but it seems<br>
>       harmless<br>
>       > enough...<br>
>       I can't see any current `#ifdef _MSCV_VER` usage in tablegen but<br>
>       I'm happy to<br>
>       besmirch it for this.<br>
> <br>
> <br>
> I think the cleanest way to do this would be to have a cl::opt to control<br>
> how string tables are emitted, and then control the default with `#if<br>
> defined(_MSC_VER) && !defined(__clang__)`. The !clang check is so I get the<br>
> benefits of this locally with clang-cl. :)<br>
<br>
Would this assume that the compiler compiling tablegen would be the same <br>
as compiling the generated code? I do occasionally cross compile from <br>
linux with MSVC, and in those cases, the tablegen is built as a native <br>
linux binary.<br>
<br>
// Martin<br>
<br>
</blockquote></div>