[QBS] How to preserve commas in toolchain profiles
Christian Kandeler
christian.kandeler at digia.com
Wed Oct 22 11:06:43 CEST 2014
On 10/21/2014 11:23 PM, Richard Weickelt wrote:
> Hi,
>
> let's consider the following line of a toolchain profile (exported format)
>
> profiles.atmega.cpp.linkerFlags: -Wl,--gc-sections
>
> -Wl tells g++ (running as linker driver) to pass an additional flag towards
> the linker. When importing a profile with the above line using "qbs config
> --import", each comma is converted into a white space instead. Commas
> usually mark a list of values, but in this case, the comma is important and
> needs to be preserved.
>
> How can I achieve this? When I quote the above flag, qbs will escape all
> quotes during import which leads to an invalid profile, too. As a
> workaround, I edit the imported qbs configuration file manually and add
> surrounding quotes directly. But this works only on linux when using the
> init format for profiles.
When using the command line (or the UI tool) to set values, qbs config
understands JavaScript expressions. Everything that cannot be parsed as
one is taken to be a string. It seems that when these semantics were
introduced, we simply forgot to consider the import/export
functionality. We will provide a fix for this in the next patch release.
Until then, I'm afraid import/export is simply broken; we probably even
lose information on a round trip.
Christian
More information about the Qbs
mailing list