[PATCH] D107898: [CMake] Fix recompile all .inc files with LLVM_OPTIMIZED_TABLEGEN in Visual Studio.

Daniil Fukalov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 20 03:03:36 PDT 2021


dfukalov added a comment.

In D107898#2956403 <https://reviews.llvm.org/D107898#2956403>, @smeenai wrote:

> This is breaking our cross-compilation from Linux to Windows. It doesn't seem like the CMake Linux platform files (at least on 3.20.3) define these variables explicitly (I guess they're just relying on them being implicitly empty), so we still see `.exe` as our `CMAKE_EXECUTABLE_SUFFIX`, which breaks running tblgen.
>
> Not sure what the best solution is for that.

Can you please provide cmake config parameters (and possible toolchain description) to reproduce the issue?

In D107898#2956809 <https://reviews.llvm.org/D107898#2956809>, @beanz wrote:

> We should be able to unset them in the function scope, which should do the right thing.

Do you mean something like

  if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
     set(output_path ${output_path}${LLVM_HOST_EXECUTABLE_SUFFIX})
  endif()

in `function(build_native_tool target output_path_var)`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107898



More information about the llvm-commits mailing list