incubator-lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <>
Subject Input to ./charmonize
Date Sun, 15 Oct 2006 18:01:27 GMT

I think the best way to communicate a string representing compiler  
flags is to have the native build script write a file and have the  
charmonize app read it.  Right now usage for charmonize looks like this:

     ./charmonize --outpath=OUTPATH [--cc=COMPILER]

An input file is more extensible, though:

     ./charmonize INFILE

I'm thinking something XML-ish for the input format.  This isn't part  
of the Charmonizer library, it's specific to our build scripts, and  
only people who write bindings are going to have to deal with it.

      <charm_ccflags>-g -pipe -fno-common -DPERL_DARWIN -no-cpp- 
precomp -fno-strict-aliasing -I/usr/local/include</charm_ccflags>

That's cake to parse from C and human-readable.  Prepending 'charm_'  
to each tag name makes the delimiters robust.

Will there ever be a situation where we'd need to make the compiler  
flags anything other than a fixed string?  There might be for other  
potential uses of Charmonizer down the road, but for Lucy, I think  
the fixed string suffices.

Each of these vars would be a char* in Charmonizer/Core, with a  
public setter in Charmonizer/Main:

      /* this is in charmonize.c */
      compiler = extract_delimited(infile_contents, "charm_compiler");

Marvin Humphrey
Rectangular Research

View raw message