Skip to content

shared version of libtcc.a (libtcc.so) #6

@plicease

Description

@plicease

I think it would be interesting to do some FFI / tcc integration (see FFI::Raw), unfortunately the libtcc that this Alien module generates is static only. I was able to get a dynamic version of the library thus:

% ar xf .../perl5/auto/share/dist/Alien-TinyCC/lib/libtcc.a
% .../perl5/auto/share/dist/Alien-TinyCC/bin/tcc -shared -o libtcc.so *.o

and then use libtcc.so from a FFI::Raw script.

My experience with Alien::Base has shown that you don't want to use alien built dynamic libraries when creating .so files for XS modules, so perhaps the libtcc.so could be installed in a separate dynamic directory, so that it could be used by FFI but ignored by XS (this is what we do in Alien::Base when the alien_isolate_dynamic option is used).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions