[all-commits] [llvm/llvm-project] a26bc4: Fix CMake dependencies on mlir-linalg-ods-yaml-gen...

RoboTux via All-commits all-commits at lists.llvm.org
Mon Oct 21 15:19:38 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a26bc43cdb0b47730e3a6426cea9f69d02697927
      https://github.com/llvm/llvm-project/commit/a26bc43cdb0b47730e3a6426cea9f69d02697927
  Author: Thomas Preud'homme <thomas.preudhomme at arm.com>
  Date:   2024-10-21 (Mon, 21 Oct 2024)

  Changed paths:
    M llvm/cmake/modules/AddLLVM.cmake
    M mlir/include/mlir/Dialect/Linalg/IR/CMakeLists.txt

  Log Message:
  -----------
  Fix CMake dependencies on mlir-linalg-ods-yaml-gen (#112224)

Fix a number of dependencies issue to build mlir-linalg-ods-yaml-gen
host binary which make a cross-build using the Make generator fail.
Namely:

- do not use binary path for the custom target created when
  LLVM_USE_HOST_TOOLS is true;
- use target name instead of name of variable holding the target name
  for add_custom_target and set_target_properties in setup_host_tool();
- remove dependency on target defined in different directory in
  add_linalg_ods_yaml_gen() since add_custom_target DEPENDS can only be
  used on "files and outputs of custom commands created with
  add_custom_command() command calls in the same directory";
- remove unneeded dependency on ${MLIR_LINALG_ODS_YAML_GEN_EXE}, the
  target dependency will ensure the binary will be built.

Note that we keep using ${MLIR_LINALG_ODS_YAML_GEN_EXE} in the COMMAND
rather than use ${MLIR_LINALG_ODS_YAML_GEN_TARGET} because when
LLVM_NATIVE_TOOL_DIR is used the latter is an empty string.

Testing-wise, all three codepaths in get_host_tool_path() were tested
with both GNU Make and Ninja generators:
- cross-compiling with LLVM_NATIVE_TOOL_DIR checks the if path;
- cross-compiling without LLVM_NATIVE_TOOL_DIR checks the elseif path;
- native build without LLVM_NATIVE_TOOL_DIR checks the else path.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list