meson icon indicating copy to clipboard operation
meson copied to clipboard

interpreter: handle ExternalProgram commands in run_command

Open alexandre-janniaux opened this issue 10 months ago • 3 comments

run_command() can take a list of parameters that will describe the command being run, and an ExternalProgram object can be provided here.

When setting up the ExternalProgram from a cross-file as a list, for instance:

    [binaries]
    rustc = ['rustc', '--target=arm-linux-androideabi']

The ExternalProgram.get_path() method will be used to prepare the run_command arguments, but it would return '--target=arm-androideabi' instead of the proper argument.

This commit ensures every part of the command is actually used in this case.

alexandre-janniaux avatar Feb 24 '25 17:02 alexandre-janniaux

I'll check if I can easily do that. Note that the part for the client (full_path() and path() API from the meson user side) is still broken though...

alexandre-janniaux avatar Feb 24 '25 17:02 alexandre-janniaux

You can put a nativefile.ini or crossfile.ini in any test directory and it will automatically be loaded, which is probably helpful for this case.

dcbaker avatar Feb 24 '25 17:02 dcbaker

Done

alexandre-janniaux avatar Feb 24 '25 19:02 alexandre-janniaux

Are the failures linked to my MR ? It feels like something else is breaking the tests.

alexandre-janniaux avatar Feb 26 '25 09:02 alexandre-janniaux