[Top][All Lists]

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

Re: [Tinycc-devel] Two compilers at once

From: Giovanni Mascellani
Subject: Re: [Tinycc-devel] Two compilers at once
Date: Sat, 25 May 2019 09:30:15 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1


Il 25/05/19 06:24, Christian Jullien ha scritto:
> Because Karl uses C++11, it may be /theoretically/ possible for him to
> load two different tcc instances having different C++ namespaces and
> compiled in two distinct translation units.

If you don't mind some quite dirty hacking (and if you mind it you
shouldn't probably use tcc), I also believe that you can have two
instances in the same address space by using the first one to compile
another one (or many others) and relocating them to different addresses.
Then each of them is a completely independent compiler with independent
state. Of course this means that you need tcc's source code at runtime.
Otherwise there is the old trick of just opening a pipe, forking and
then sending back the result.

Have fun, Giovanni.
Giovanni Mascellani <address@hidden>
Postdoc researcher - Université Libre de Bruxelles

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]