[Scons-users] bug with AddOption?

Gabe Black gabe.black at gmail.com
Thu Apr 28 16:24:49 EDT 2022


Hi, we have a legacy option, --gold-linker, which takes no parameter, and a
new option, --linker, which takes one option that may be "gold" or several
other values. We set up both options using AddOption and give them both the
same "dest", using the "store_const" action with const="gold" for
--gold-linker.

This *mostly* works, except it looks like SCons conflates the format of the
two options, and *sort of* expects --gold-linker to have an option value
after it, even though it's a "store_const". I say *sort of* since it
doesn't look like --gold-linker actually consumes the value after it, it
will just complain if the value after it is another option.

I think SCons is either not realizing that this type of flag should not
have a value after it, or is getting confused because these two differently
formatted options store to the same place. Minimally this behavior is
confusing.

Gabe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20220428/27ac10cf/attachment.htm>


More information about the Scons-users mailing list