lldb: add rule to generate LLDBWrapLua.cpp

Building lldb's lua/python bindings requires swig, but we do not want to
include it in the FreeBSD base system (as a build tool) because it has
non-trivial dependencies.  As a workaround, add a make rule to generate
LLDBWrapLua.cpp, and we will commit the generated file.

Requires the swig30 package.

Reviewed by:	brooks
Discussed with:	dim
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D24265
This commit is contained in:
Ed Maste 2020-04-03 15:52:44 +00:00
parent 317111316d
commit f0d060f91b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=359599

View File

@ -679,4 +679,17 @@ CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}
INTERNALLIB=
# Building lldb's bindings requires swig, but we do not want to include it in
# the FreeBSD base system (as a build tool) because it has non-trivial
# dependencies. As a workaround we commit the generated file. Requires the
# swig30 package.
#
# After importing an updated llvm/lldb into FreeBSD run `make run-swig` in
# this directory to generate generate LLDBWrapLua.cpp, and commit the result.
.PHONY: run-swig
run-swig:
swig3.0 -I${LLDB_SRCS}/include \
-c++ -features autodoc -lua -w503 \
-o ${.CURDIR}/LLDBWrapLua.cpp ${LLDB_SRCS}/bindings/lua.swig
.include <bsd.lib.mk>