[lldb-dev] Pre-processor definition confusion

Todd Fiala tfiala at google.com
Fri Sep 12 10:05:02 PDT 2014


What does a cygwin or minwing environment look like?  I would guess cygwin
would have __GLIBC__ defined?  (I'm not sure if we even pretend to build
there, but that's the glibc case that is not Linux that comes to mind).

On Fri, Sep 12, 2014 at 9:59 AM, Zachary Turner <zturner at google.com> wrote:

> The important thing seems to be whether glibc implies linux, not the other
> way around.  If glibc implies linux, then
>
> #if defined(__linux__) || defined(__GLIBC__)
>
> can be reduced to
>
> #if defined(__linux__)
>
> The issue is that all of our CMake decisions are based on OS platform.  If
> I want to conditionally compile an entire file based on one of these
> conditions, I need to translate it into something that fits well into the
> CMake build.
>
> On Thu, Sep 11, 2014 at 9:01 PM, Reid Kleckner <rnk at google.com> wrote:
>
>> On Thu, Sep 11, 2014 at 7:07 PM, Zachary Turner <zturner at google.com>
>> wrote:
>>
>>> Thanks.  In some places we check __GLIBC__ explicitly.  I guess what I'm
>>> wondering is: is there some reason this isn't equivalent to some
>>> combination of OS define checks?
>>>
>>
>> You can use alternative libcs on Linux, like musl:
>> http://www.musl-libc.org/
>>
>> Android, for example, uses a Linux kernel with the Bionic libc
>> implementation, so it's complicated. =/
>>
>
>
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>
>


-- 
Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140912/dfa4eebd/attachment.html>


More information about the lldb-dev mailing list