halide/Halide — pull request #571 by pjaaskel (2014-12-02 14:38:42+00:00)
Title: Use the shared library for LLVM, if defined

with 'make USE_LLVM_SHARED_LIB=1'.

Using a shared library avoids a problem with LLVM's command
line parameters when loading an OpenCL implementation (at
least pocl) that also links in LLVM. Otherwise we get
assertion crashes like this:

... /llvm-3.5-svn/include/llvm/Support/CommandLine.h:682:
void llvm::cl::parser::addLiteralOption(const char *,
const DT &, const char *) [DataType = llvm::ScheduleDAGInstrs
*(*)(llvm::MachineSchedContext *), DT = llvm::ScheduleDAGInstrs
*(*)(llvm::MachineSchedContext *)]: Assertion findOption(Name) ==
Values.size() && "Option already exists!"' failed.
Aborted (core dumped)

Attempt 3. Sorry!