diff options
author | Thomas Preud'homme <thomas.preudhomme@arm.com> | 2024-10-14 09:44:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-14 09:44:44 +0100 |
commit | d6827f68ad9110ae0c9992de7b2e2eec0f23be14 (patch) | |
tree | 41a5e3546a912a662782a4f4f7996c831b47dc45 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 7fc3491c045bf6acb9c904a5da95bbac66ad487f (diff) | |
download | llvm-d6827f68ad9110ae0c9992de7b2e2eec0f23be14.zip llvm-d6827f68ad9110ae0c9992de7b2e2eec0f23be14.tar.gz llvm-d6827f68ad9110ae0c9992de7b2e2eec0f23be14.tar.bz2 |
Fix CMake dependencies on mlir-linalg-ods-yaml-gen (#111973)
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.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions