ExpressionParser: only force link MCJIT when needed

This was added to support FreeBSD.  The inclusion of this header increases the
size of `lldb-server` due to MCJIT being forcefully preserved.  Conditionalise
the inclusion to shared builds of LLVM which will allow for MCJIT to be stripped
if unnecessary when performing static linking of tools.  This shaves off ~28% of
the binary size for lldb-server when linked with gold using
`-ffunction-sections` and `-fdata-sections`.

llvm-svn: 359944
This commit is contained in:
Saleem Abdulrasool
2019-05-03 23:19:27 +00:00
parent 3dcb892d2d
commit 5a36558c5b
2 changed files with 5 additions and 5 deletions

View File

@@ -114,6 +114,11 @@
#include "llvm/Support/TargetSelect.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wglobal-constructors"
#include "llvm/ExecutionEngine/MCJIT.h"
#pragma clang diagnostic pop
#include <string>
using namespace lldb_private;