summaryrefslogtreecommitdiff
path: root/src/core/program.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/program.cpp')
-rw-r--r--src/core/program.cpp3
1 files changed, 2 insertions, 1 deletions
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);