Why am I doing this?
Because we have now switched to the monorepo, we no longer need to have logic to
detect whether or not a project is present. Any project under the llvm project
is guaranteed to be available if you're building llvm.
I hope this is the first change of many that can clean up some of the logic in
build-script-impl. Some simplifications and cleanups that I think can be made
include:
- Adding the option to build swift as a part of the llvm build. (Or even making
this the default behavior)
- Taking advantage of `LLVM_ENABLE_PROJECTS` to simplify some of the logic to
set up clang, clang-tools-extra, and other projects.
- Builds libFoundation.a, libFoundationNetworking.a and
libFoundationXML.a and installs them in usr/lib/swift_static/linux
- Note this does NOT make -static-stdlib work for Foundation at this time.
Teach build-script to build lldb's `install-distribution` target when
installation is required, and make the lipo action invoke lipo when
cross-compiling.
Incidentally this fixes a bash warning about `continue` being invalid
outside of a loop.
Check whether there are any cross compile hosts by looking at the
CROSS_COMPILE_HOSTS array, not at ALL_HOSTS, as these can be different
due to --skip-local-build.
Rename LLDB_ALLOW_STATIC_BINDINGS to LLDB_USE_STATIC_BINDINGS and make
LLDB use the static bindings unconditionally when it's set. The current
variable is opaque because it allows LLDB to use the static bindings,
but only if SWIG is not found. If an incompatible version of swig is
found, it reports a fatal error. This serves no purpose other than to
confuse the user.
The corresponding LLDB patch simplifies things and makes the variable do
what you expect. When enabled, LLDB uses the static bindings. When
disabled, we try to generate them with SWIG.
This patch modifies the build scripts to pass the new variable.
Setup the CMake invocation for the migration to CMake 3.15. This will
allow us to simplify the s-p-m bootstrap and the llbuild build itself
(see apple/llbuild#587).
Swift requires now tablegen to build Options.inc, so build script
has to be taught about picking the host llvm-tablegen instead of
the target llvm-tablegen.
<rdar://problem/55916729>
Pass LLDB_EXTRA_CMAKE_ARGS last so it can override defaults values set
earlier. It also makes sure we only pass LLDB_USE_SYSTEM_DEBUGSERVER
when the corresponding build-script flag is set.
Even though the dotest extra arguments can contain multiple flags, we
shouldn't quote them because they're passed as a list to CMake. This
also fixes the check above which was inspecting the wrong variable.