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

Mats Wichmann mats at wichmann.us
Mon Apr 11 11:01:32 EDT 2022


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...


More information about the Scons-users mailing list