[llvm-dev] A libc in LLVM

Shoaib Meenai via llvm-dev llvm-dev at lists.llvm.org
Mon Jul 15 12:32:30 PDT 2019


Note that libc++abi's build also has to use certain tricks to make this possible, e.g. using -D_LIBCPP_DISABLE_EXTERN_TEMPLATE to disable libc++ headers from using extern templates (which would create a dependency on the libc++ dylib).

On 7/15/19, 12:26 PM, "llvm-dev on behalf of Ben Craig via llvm-dev" <llvm-dev-bounces at lists.llvm.org on behalf of llvm-dev at lists.llvm.org> wrote:

    Note that libc++abi (i.e. the thing that implements much of the C++ runtime) is implemented with a subset of C++.  It is possible to use a subset of C++ without pulling in a dynamic runtime.
    
    > -----Original Message-----
    > From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of David
    > Greene via llvm-dev
    > Sent: Monday, July 15, 2019 2:02 PM
    > To: David Jones <dlj at google.com>
    > Cc: Aaron Ballman via llvm-dev <llvm-dev at lists.llvm.org>; Marshall Clow
    > <mclow.lists at gmail.com>
    > Subject: [EXTERNAL] Re: [llvm-dev] A libc in LLVM
    > 
    > David Jones <dlj at google.com> writes:
    > 
    > >  >> * Provide C symbols as specified by the standards, but take
    > > advantage  >> and use C++ language facilities for the core implementation.
    > >
    > >  Does this mean C programs would require a C++ runtime?  If not, how
    > > will  the project ensure that?
    > >
    > > Shooting from the hip: no. Turning off exceptions, RTTI, and static
    > > initializers (i.e., things which require a guard variable) is probably
    > > enough to obviate the need for the runtime.
    > 
    > What about bits of the standard library that are not header-only?  My guess
    > is that the set of those things may be platform-dependent.
    > 
    >                     -David
    > _______________________________________________
    > LLVM Developers mailing list
    > llvm-dev at lists.llvm.org
    > https://urldefense.proofpoint.com/v2/url?u=https-3A__urldefense.com_v3_-5F-5Fhttps-3A__lists.llvm.org_cgi-2D&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=Ke1lvp_nYxamqWDXVf6XOPlU6wiO6gQluKvXDdlscYQ&s=swal6cylw4rFIcfXkz4q1PJ5CDVwQjZh3VtVmOHFclQ&e= 
    > bin/mailman/listinfo/llvm-
    > dev__;!fqWJcnlTkjM!4ub_gnh6OCD9cC5QP1PCRvBBd5QktHyTY8u78311YmZ
    > OnA0Pe8bkXsyPvAai$
    _______________________________________________
    LLVM Developers mailing list
    llvm-dev at lists.llvm.org
    https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Ddev&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=Ke1lvp_nYxamqWDXVf6XOPlU6wiO6gQluKvXDdlscYQ&s=rpi-8-T2uay4CDUBh2qg1ebnTjJjZzdNHW6IjHSgov8&e= 
    



More information about the llvm-dev mailing list