[Scons-users] Need to reduce the compiler command line
Bill Deegan
bill at baddogconsulting.com
Mon Nov 4 12:10:35 EST 2013
Pico is correct (At least the default behavior).
Which linker are you using?
Platform, tool versions also helpful.
-Bill
On Mon, Nov 4, 2013 at 1:18 AM, Pico Geyer <picogeyer at gmail.com> wrote:
>
> On 02 Nov 2013 10:17 AM, "Gouru, SrinivasReddy CCS" <
> Srinivas.Gouru at fs.utc.com> wrote:
> >
> > Hi
> Hi Srinivas
> Some responses and questions inline.
>
> >
> >
> >
> > I am using scons as my build Tool.
> >
> > While am Link a variant directory I am getting an error like “Specified
> path is too long”.
> >
> > In that directory I need Link 308 files to make a Library. I found that
> while linking all 308 files with full path names, the command line path is
> exceeding the limits.
> >
> >
> >
> > To link the Directory am using a command:
> >
> > ARCOM = "$AR $ARFLAGS -output=$TARGET $SOURCES"
> >
> >
> >
> > $SOURCES taking all the source file names along with the path.
> >
> >
> >
> > How to overcome this problem?
> >
> >
> >
> > I compiled the variant directory by command line by giving the only
> object files names as sources. But for that we need to PUSH the directory
> to variant directory.
> >
> >
> >
> > I have 2 questions.
> >
> > 1) How to replace $SOURCES to give only .obj files names to ARCOM.
> >
> > 2) How scons compile the code. i.e while compiling the variant
> directory, Does it move to the variant directory and compiles or it
> compiles from the current directory only.
> >
> > Why am asking the above question is if we give only .obj names to ARCOM.
> While compiling the variant directory we need to be in variant directory
> only.
>
> The way I understand it, is that SCons by default runs all build commands
> from the root directory (the directory containing your SConstruct file).
> So that's probably why SCons is using absolute paths.
>
> Am I correct in assuming that you're on Windows?
> If so I'd suggest you see this page:
> http://www.scons.org/wiki/LongCmdLinesOnWin32
>
> I had a case where even the above solution did not help (Trying to link
> thousands of object files). In which case I had to resort to building many
> smaller library files and then linking them all together at the end which
> resulted in a pretty short command line. Perhaps something for you to
> consider?
> I think scons has options to build commands from an alternate directory,
> though I've never played with it too much.
> Perhaps someone else will chime in.
>
> Regards,
> Pico
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20131104/c9e6029f/attachment.htm
More information about the Scons-users
mailing list