summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/compiler.cpp3
-rw-r--r--src/core/program.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/core/compiler.cpp b/src/core/compiler.cpp
index a987162..f264bc6 100644
--- a/src/core/compiler.cpp
+++ b/src/core/compiler.cpp
@@ -97,7 +97,7 @@ bool Compiler::compile(const std::string &options,
// Set header search options
header_opts.Verbose = false;
header_opts.UseBuiltinIncludes = false;
- header_opts.UseStandardIncludes = false;
+ header_opts.UseStandardSystemIncludes = false;
header_opts.UseStandardCXXIncludes = false;
// Set preprocessor options
@@ -106,6 +106,7 @@ bool Compiler::compile(const std::string &options,
// Set lang options
lang_opts.NoBuiltin = true;
lang_opts.OpenCL = true;
+ lang_opts.CPlusPlus = false;
// Set target options
target_opts.Triple = llvm::sys::getHostTriple();
diff --git a/src/core/program.cpp b/src/core/program.cpp
index 85d19e9..860fa62 100644
--- a/src/core/program.cpp
+++ b/src/core/program.cpp
@@ -381,7 +381,8 @@ cl_int Program::build(const char *options,
// Link
if (!stdlib ||
- llvm::Linker::LinkModules(dep.linked_module, stdlib, &errMsg))
+ llvm::Linker::LinkModules(dep.linked_module, stdlib,
+ llvm::Linker::DestroySource, &errMsg))
{
dep.compiler->appendLog("link error: ");
dep.compiler->appendLog(errMsg);