Re: bug with AddOption?
Gabe Black <[email protected]>
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <CABEwwBEd2OkmR+A5ie+P3VJJJvgJ6Ew=CNQtVerjhvYWbisBoQ@mail.gmail.com> |
There seems to also be another problem here as well, although this one might be a usage error on my part. It looks like if you use the --linker option, you also have to use it in --linker=gold form, and can't use it as two arguments, ie --linker gold. I think both *should* work, so this might be another symptom of the first problem. Gabe On Thu, Apr 28, 2022 at 1:24 PM Gabe Black <[email protected]> wrote: > 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 > _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users