@samitouri / QOSamiQemu / commits / 0e349532ea

target/hexagon: use cmd_array() instead of get_id()

get_id() returns the compiler's short name not a program. Passing it directly as the command for the idef-parser preprocessing custom_target happened to work for native gcc/clang builds but breaks under cross compilers such as emcc or any ccache-wrapped compiler. Link: https://lore.kernel.org/qemu-devel/CAJSP0QWzQEgoYMCgZX+9jCvrV6O3RqnA+df1DpT2R6MZvVXiNg@mail.gmail.com/ Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>

Brian Cain committed Jun 22, 2026 at 15:27 UTC 0e349532eaba57552248af42b9294bd72e97dcf8
1 file changed +2 -2
target/hexagon/meson.build
+2 -2
@@ -270,13 +270,13 @@ if idef_parser_enabled and 'hexagon-linux-user' in target_dirs
270 command: [python, files('gen_idef_parser_funcs.py'), semantics_generated, '@OUTPUT@'],
271 )
272
273 - compiler = meson.get_compiler('c').get_id()
273 + compiler = meson.get_compiler('c').cmd_array()
274 preprocessed_idef_parser_input_generated = custom_target(
275 'idef_parser_input.preprocessed.h.inc',
276 output: 'idef_parser_input.preprocessed.h.inc',
277 input: idef_parser_input_generated,
278 depend_files: [idef_parser_dir / 'macros.h.inc'],
279 - command: [compiler, '-x', 'c', '-E', '-I', idef_parser_dir, '-o', '@OUTPUT@', '@INPUT@'],
279 + command: compiler + ['-x', 'c', '-E', '-I', idef_parser_dir, '-o', '@OUTPUT@', '@INPUT@'],
280 )
281
282 flex = generator(