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

Daniel Moody dmoody256 at gmail.com
Mon Apr 11 11:43:52 EDT 2022


I have a potential fix to the ninja tool so that it can decide to use
response files or not. This should allow you to use your own shared
response file.

https://github.com/SCons/scons/pull/4133

On Mon, Apr 11, 2022 at 10:01 AM Mats Wichmann <mats at wichmann.us> wrote:

>
> On 4/11/22 08:57, liruncong2018 via Scons-users wrote:
> > Hi,
> > Even using msys2 does not solve all problems. The 32K limit solves my
> > compilation problems (.cpp -> .o) but not linking (.o -> target) because
> > the link command line has around 137K (about 2500 .o files). So
> > compilers such as gcc/clang/armclang will support "@file".
> > Currently, scons needs to set up Depends when using @file. This
> > dependency suggestion is still directly supported by scons, and users do
> > not need to write dependencies. It should also be supported when ninja
> > is enabled.
> > When LINKCOM uses "TEMPFILE", I get a link failure because armlink.exe
> > checks if --cpu is specified on the command line, so it is not
> > reasonable for "TEMPFILE" to put all options to a temporary file.
>
> 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...
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20220411/c2e8ee6d/attachment-0001.htm>


More information about the Scons-users mailing list