Re: [Vala] valac: output symbols without compiling



On Wed, 2012-09-26 at 23:32 +0200, Jonas Kulla wrote:
Hi list!

Valac offers the option '--symbols=FILE', which is very handy in that it
writes all
public C symbols in an easy to parse file.
I'm using it to generate a version script for passing to ld.

However, right now I have to compile my library just to get this symbols
file,
which means I have to compile twice: first for the symbols file,
and the second time with the generated version script.

Is there no way I can tell valac to just "scan the code but don't compile
anything"?

The version script isn't needed at compile time, only at linking time;
so you can use the -c and --symbols options together to compile to .o
files, generate the version script, but skip the linking step. After
that, you can run the ld command separately with the generated version
script and .o files.

(Another option is to use the -C option that tells vala to only compile
to C source code, and run gcc and ld yourself.)

-- 
Calvin Walton <calvin walton kepstin ca>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]