[Scons-users] 回复: 回复: 回复: 回复: Ninja compilation fails after using include path file instead of "-I" option

Mats Wichmann mats at wichmann.us
Mon Apr 11 13:55:28 EDT 2022


On 4/11/22 09:01, Mats Wichmann wrote:

> Right... thus my suggestion - well, let's call it "musing" rather than
> "suggestion" because this might not work at all:
> 
>> For ninja it currently looks like this:
>>
>> env["LINKCOM"] = '${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET.windows
>> $_LIBDIRFLAGS $_LIBFLAGS $_PDB $SOURCES.windows", "$LINKCOMSTR")}'
>>
>> env["SHLINKCOM"] = '${TEMPFILE("$SHLINK $SHLINKFLAGS $_SHLINK_TARGETS
>> $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_SHLINK_SOURCES", "$SHLINKCOMSTR")}'
>>
>> So I'm curious if moving $LINK $LINKFLAGS to the left of ${TEMPFILE
>> would help...

and indeed this won't work, because the TempFileMunge class does "magic"
- it specially pulls out the first word from inclusion in the munged
commandline, assuming it's the command itself - which of course it is,
but that would mean the ordering would be messed up if you did something
at the point the call to this is set up.

Never mind (unless it's reworked)



More information about the Scons-users mailing list