Fix the issue with passing the "vars" parameters from the configuration moulin YAML file to the build.ninja context.
The 'vars' parameter of the Zephyr builder is placed into the bash -c "... cmd ..." context. It requires an additional level of escaping to be added to the 'vars' parameter.
But that is not enough. The 'vars' parameter is passed to the 'west build' call. West, in turn, passes those 'vars' parameter to CMake.
On the CMake level, Zephyr splits all incoming CMake parameters into 2 parts:
Those, which start with the "CONFIG_" prefix
All the others
The first group of parameters is stored in the KConfig file. When users pass a string to Kconfig through CMake, they are expected to pass it so that quotes are correct seen from Kconfig, that is:
cmake -DCONFIG_A_STRING=\"foo bar\"
In this case, to obtain the required level of escaping:
the first group of parameters should be additionally escaped twice on the moulin level
the second group of parameters should be additionally escaped once on the moulin level
As a result of this patch, the user can specify the 'vars' on the yaml level in the following way:
Fix the issue with passing the "vars" parameters from the configuration moulin YAML file to the build.ninja context.
The 'vars' parameter of the Zephyr builder is placed into the bash -c "... cmd ..." context. It requires an additional level of escaping to be added to the 'vars' parameter.
But that is not enough. The 'vars' parameter is passed to the 'west build' call. West, in turn, passes those 'vars' parameter to CMake.
On the CMake level, Zephyr splits all incoming CMake parameters into 2 parts:
The first group of parameters is stored in the KConfig file. When users pass a string to Kconfig through CMake, they are expected to pass it so that quotes are correct seen from Kconfig, that is:
In this case, to obtain the required level of escaping:
As a result of this patch, the user can specify the 'vars' on the yaml level in the following way: