[Scons-users] Assembly compiler flags

Mats Wichmann mats at wichmann.us
Tue Oct 10 14:15:35 EDT 2023


On 10/10/23 12:04, Keith Snively wrote:

>     A small reproducer would therefore be really helpful...
> 
> 
> Ugh.  When creating an example I came across the following line in the 
> SConstruct that copies the CPPDEFINES to ASFLAGS:
> 
>      for cdef in local_env['CPPDEFINES']:
>          local_env.AppendUnique(ASFLAGS = ['/D' + cdef[0] ])
> 
> The issue is the entries in CPPDEFINES were a tuple, but are now a 
> string (starting in 4.5.0).  Updating this to just append cdef resolves 
> the issue.
> 
> Thanks for the help and sorry for the false start.

Ah, cool! Glad to hear it.

One of the problems with the "old way" was the format of CPPDEFINES 
wasn't guaranteed. Depending on how you'd added things to it, it could 
be a list of strings, or a list of tuples, or a dictionary - and might 
even change over time.  So relying on any particular format was "broken" 
(for some value of that word).  Of course, the docs didn't say that.  I 
did try hard not to break anyone, but...

Hopefully it will be more stable and predictable now.


While I've got your attention, the tool initializer module currently 
does this, unconditionally:

     env['AS']        = 'ml' 


I'm presuming you override that, since 'ml' is only for 32-bit code. 
Has using 'ml64' caused any issues that we might consider in updating 
the tool module?


More information about the Scons-users mailing list