Re: [PATCH v2 50/50] target/hexagon: Use helper-to-tcg

Alessandro Di Federico via qemu development <[email protected]> Tue, 4 Aug 2026 14:08:29 +0200
Newsgroups gmane.comp.emulators.qemu
Message-ID <20260804140829.4a8c082d@spawn>
On Thu, 30 Jul 2026 05:10:24 +0200
Anton Johansson via qemu development <[email protected]> wrote:

> +    ll = custom_target('to-ll',
> +        input: helper_to_tcg_input_files,
> +        output:'helper-to-tcg-input.ll',
> +        depends: [helper_funcs_generated, helper_protos_generated, libqemuutil],
> +        command: helper_to_tcg_get_llvm_ir_cmd + ['-o', '@OUTPUT@', '@INPUT@', '--target-path', 'target/hexagon']
> +    )

Currently we're not tracking dependencies correctly.

For instance, if you change `target/hexagon/macros.h` and run `ninja
target/hexagon/helper-to-tcg-input.ll`, the target is not rebuilt.

This can be fixed in `get-llvm-ir.py` by passing `-MD -MF output.ll.d`
to clang, merging all the `.d` files you get into a single one and then
passing it as `depfile:` in the `custom_target` invocation.

We should also depend on

    meson.current_build_dir() / 'compile_commands.json'

-- 
Alessandro Di Federico
rev.ng Labs