[QBS] How to preserve commas in toolchain profiles

Richard Weickelt richard at weickelt.de
Tue Oct 21 23:23:38 CEST 2014


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.

Any thoughts?

Thanks
Richard



More information about the Qbs mailing list