[Lldb-commits] [lldb] r204459 - Don't build LLDBWrapPython.cpp for mingw.

Abid, Hafiz Hafiz_Abid at mentor.com
Fri Mar 21 08:25:49 PDT 2014

Hi Ed,
Currently, LLDB_DISABLE_PYTHON is only defined in the autoconf system for mingw.
You are right that now we will have to take care of this in 2 places if some other
system comes along that needs this switch.

Problem is that we add the check before including top level Makefile then value of LLDB_DISABLE_PYTHON is still not
in CXXFLAGS and if we do it after the inclusion then all the source related make variables in top level llvm Makefiles
are set and Makefile will not be compiled.

I considered 2 other approaches.
1. Moved the check after including the top level lldb make file. This makes sure that  LLDB_DISABLE_PYTHON 
Is available and then include the top level lldb make file again. This makes sure that 'Source' and other make 
variables are set properly.
2. Always add LLDBWrapPython.cpp but change the rule to build it. For case, when python is disabled, 
just output an empty file.

But the patch I applied seemed the cleanest solution to me. Please let me know you have any other ideas
about handling this problem.  

Also see that LLDB_vers.c have a similar problem in source/Makefile and there we are calling uname to check
for the host os. But as I am doing cross builds on mingw from a Linux host, this was not an option for me.


> -----Original Message-----
> From: carpeddiem at gmail.com [mailto:carpeddiem at gmail.com] On Behalf Of
> Ed Maste
> Sent: 21 March 2014 13:27
> To: Abid, Hafiz
> Cc: lldb-commits at cs.uiuc.edu
> Subject: Re: [Lldb-commits] [lldb] r204459 - Don't build LLDBWrapPython.cpp
> for mingw.
> On 21 March 2014 08:53, Hafiz Abid Qadeer <hafiz_abid at mentor.com>
> wrote:
> > Author: abidh
> > Date: Fri Mar 21 07:53:28 2014
> > New Revision: 204459
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=204459&view=rev
> > Log:
> > Don't build LLDBWrapPython.cpp for mingw.
> > Previous check relied on -DLLDB_DISABLE_PYTHON which was not valid as
> > it is defined in the top level LLDB Makefile which is included after the
> check.
> > If this check is moved after the inclusion of top level Makefile then
> > BUILT_SOURCES is not properly handled. So I am using the scheme
> > present in the Host/Makefile.
> Won't all non-mingw hosts now try to build LLDBWrapPython.cpp, even if
> Python is explicitly disabled via -DLLDB_DISABLE_PYTHON?

More information about the lldb-commits mailing list