[Lldb-commits] [lldb] r252124 - Fix build on Linux.

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 4 18:12:04 PST 2015


Yeah, sure.  But I bet you could figure out something to put in PlatformiOSSimulatorCoreSimulatorSupport.h that would cause this to fail to link except on OS X.  Not that that's likely, but as a general strategy it seems wrong.

Jim

> On Nov 4, 2015, at 6:09 PM, Chaoren Lin <chaorenl at google.com> wrote:
> 
> There's no simulator support outside of Darwin, so none of it should get used anyway.
> 
> On Wed, Nov 4, 2015 at 6:08 PM, Jim Ingham <jingham at apple.com> wrote:
> In this case it's even a little weirder, 'cause we compile a source file that contains a class declaration (since the #if defined is after the #include), but not the methods that aren't inlined.  Then presumably link in the .o file containing whatever was the result of that compilation.  That seems potentially harmful.
> 
> Jim
> 
> 
> > On Nov 4, 2015, at 6:02 PM, Jason Molenda <jmolenda at apple.com> wrote:
> >
> > You're making a valid point.  I was only noting that this is not the first instance where've conditionally compiled mac platform files.
> >
> > J
> >
> >> On Nov 4, 2015, at 6:00 PM, Jim Ingham <jingham at apple.com> wrote:
> >>
> >> Why?
> >>
> >> Jim
> >>
> >>> On Nov 4, 2015, at 5:43 PM, Jason Molenda <jmolenda at apple.com> wrote:
> >>>
> >>> We do the same thing in other MacOSX platform files where they depend on Apple specific libraries.
> >>>
> >>>
> >>>> On Nov 4, 2015, at 5:39 PM, Jim Ingham via lldb-commits <lldb-commits at lists.llvm.org> wrote:
> >>>>
> >>>> Why are we trying to build this at all on Linux?  Seems odd to build an empty file rather than just not build it.
> >>>>
> >>>> Jim
> >>>>
> >>>>> On Nov 4, 2015, at 5:23 PM, Chaoren Lin via lldb-commits <lldb-commits at lists.llvm.org> wrote:
> >>>>>
> >>>>> Author: chaoren
> >>>>> Date: Wed Nov  4 19:23:19 2015
> >>>>> New Revision: 252124
> >>>>>
> >>>>> URL: http://llvm.org/viewvc/llvm-project?rev=252124&view=rev
> >>>>> Log:
> >>>>> Fix build on Linux.
> >>>>>
> >>>>> Modified:
> >>>>> lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
> >>>>>
> >>>>> Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm
> >>>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm?rev=252124&r1=252123&r2=252124&view=diff
> >>>>> ==============================================================================
> >>>>> --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm (original)
> >>>>> +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulatorCoreSimulatorSupport.mm Wed Nov  4 19:23:19 2015
> >>>>> @@ -9,6 +9,8 @@
> >>>>>
> >>>>> #include "PlatformiOSSimulatorCoreSimulatorSupport.h"
> >>>>>
> >>>>> +#if defined (__APPLE__)  // This Plugin uses the Mac-specific source/Host/macosx/cfcpp utilities
> >>>>> +
> >>>>> // C Includes
> >>>>> // C++ Includes
> >>>>> // Other libraries and framework includes
> >>>>> @@ -771,3 +773,5 @@ CoreSimulatorSupport::DeviceSet::GetFanc
> >>>>>
> >>>>> return dev;
> >>>>> }
> >>>>> +
> >>>>> +#endif // __APPLE__
> >>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>> lldb-commits mailing list
> >>>>> lldb-commits at lists.llvm.org
> >>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
> >>>>
> >>>> _______________________________________________
> >>>> lldb-commits mailing list
> >>>> lldb-commits at lists.llvm.org
> >>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
> >>>
> >>
> >
> 
> 



More information about the lldb-commits mailing list