Thanks for the helpful reply. So, what I'm currently using CIL for in my
tool is to preprocess the source file under analysis to make it easier to
analyze -- or at least, that's the hope. As part of this, I would like to
give the user an option to specify what files he/she would like to merge
with another file, and then merge all of these files into one file that can
be used for analysis. If possible, I would like to prevent having to link
the final output file, since the final output file may not have a main
method, and may thus not be executable.
I'm interfacing with Cilly through Python. This is the command that I am
"cilly --merge --extrafiles=tmp foo.c -o foo.out"
where "tmp" is the file that contains the names of the files to be merged
with "foo.c". Currently, it links the file that is produced as a result of
the merge. Adding the "-c" flag (and removing "-o foo.out") prevents Cilly
from linking, but for some reason, Cilly stops and only produces the *.i
file, so I'm not sure what exactly I'm doing wrong.
There's nothing necessarily wrong with setting environment variables. I
suppose that I could use Python to execute a shell command that will
temporarily set the environment variable on the user's computer, but from a
convenience and cleanliness perspective, it might be easier if this could
be avoided somehow.
Thanks for any and all help!
On 21 September 2012 02:12, Oliver Schwahn <
> I was wondering if there was a command-line option that can be passed to
>> the merger that mimics setting this environment variable.
>> No, there is no such command line option that i am aware of. But...
> The compilation and linking control is implemented in cilly (Perl script)
> which mimics the gcc interface. So every combination of gcc flags that does
> what you want should also work with cilly. However, it may be that you use
> wrong cilly command line options. Maybe you could give an example of how
> exactly you invoke cilly and what the desired outcome of the invocation is?
> Do you want cilly to compile and link the input program or do you just want
> to produce a merged source file?
> By the way, what prevents you from setting the environment variables?