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

liruncong2018 via Scons-users <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <[email protected]>
Hi
I tested "https://github.com/SCons/scons/pull/4133", after enabling ningja, except for the link failure, .c/.cpp/.S are successfully compiled into .o, the total time is 6:48 .&nbsp;
This time is much greater than the previous time of 3:45 when ninja was not enabled and the option file was shared using @file.
After using TEMPFILE instead of @file, the compilation time is basically doubled whether ninja is enabled or not.&nbsp;
The TEMPFILE function should be improved to use shared files to prevent the creation of a large number of temporary files.


------------------ 原始邮件 ------------------
发件人:                                                                                                                        "SCons users mailing list"                                                                                    <[email protected]&gt;;
发送时间:&nbsp;2022年4月11日(星期一) 晚上11:43
收件人:&nbsp;"SCons users mailing list"<[email protected]&gt;;

主题:&nbsp;Re: [Scons-users] 回复: 回复: 回复: 回复: Ninja compilation fails after using include path file instead of "-I" option



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 <[email protected]&gt; wrote:


 On 4/11/22 08:57, liruncong2018 via Scons-users wrote:
 &gt; Hi,
 &gt; Even using msys2 does not solve all problems. The 32K limit solves my
 &gt; compilation problems (.cpp -&gt; .o) but not linking (.o -&gt; target) because
 &gt; the link command line has around 137K (about 2500 .o files). So
 &gt; compilers such as gcc/clang/armclang will support "@file".
 &gt; Currently, scons needs to set up Depends when using @file. This
 &gt; dependency suggestion is still directly supported by scons, and users do
 &gt; not need to write dependencies. It should also be supported when ninja
 &gt; is enabled.
 &gt; When LINKCOM uses "TEMPFILE", I get a link failure because armlink.exe
 &gt; checks if --cpu is specified on the command line, so it is not
 &gt; 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:
 
 &gt; For ninja it currently looks like this:
 &gt; 
 &gt; env["LINKCOM"] = '${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET.windows
 &gt; $_LIBDIRFLAGS $_LIBFLAGS $_PDB $SOURCES.windows", "$LINKCOMSTR")}'
 &gt; 
 &gt; env["SHLINKCOM"] = '${TEMPFILE("$SHLINK $SHLINKFLAGS $_SHLINK_TARGETS
 &gt; $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_SHLINK_SOURCES", "$SHLINKCOMSTR")}'
 &gt; 
 &gt; So I'm curious if moving $LINK $LINKFLAGS to the left of ${TEMPFILE
 &gt; would help...
 _______________________________________________
 Scons-users mailing list
 [email protected]
 https://pairlist4.pair.net/mailman/listinfo/scons-users

_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.