diff options
author | Gil Pitney <gil.pitney@linaro.org> | 2015-01-28 03:21:31 +0000 |
---|---|---|
committer | Gil Pitney <gil.pitney@linaro.org> | 2015-01-28 03:21:31 +0000 |
commit | 1fa92da24decc0eff0d6b6a7e92b25d9cc3b62be (patch) | |
tree | 10830c269b52742b04146750ee3b47dfd2814b3a | |
parent | 7a364fc46f329a51989f5c7380456178f7d992e6 (diff) |
LLVM 3.6: Set ThreadModel to posix
Without explicitly setting the ThreadModel, clang asserts.
This is new behaviour with LLVM 3.6.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
-rw-r--r-- | src/core/compiler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/compiler.cpp b/src/core/compiler.cpp index 47aeb9a..c090bd7 100644 --- a/src/core/compiler.cpp +++ b/src/core/compiler.cpp @@ -46,7 +46,7 @@ #include <clang/CodeGen/CodeGenAction.h> #include <llvm/ADT/SmallVector.h> #include <llvm/Support/Host.h> -#include <llvm/Support/MemoryBuffer.h> // ASW +#include <llvm/Support/MemoryBuffer.h> #include <llvm/IR/Module.h> #include <llvm/IR/LLVMContext.h> #include <sys/stat.h> @@ -85,6 +85,7 @@ int Compiler::compile(const std::string &options, codegen_opts.setDebugInfo(clang::CodeGenOptions::NoDebugInfo); codegen_opts.AsmVerbose = true; codegen_opts.CodeModel = "default"; + codegen_opts.ThreadModel = "posix"; // level 3 is too much for the pocl transformations. codegen_opts.OptimizationLevel = 2; |