[macruby-changes] [4436] MacRuby/trunk/vm.cpp
source_changes at macosforge.org
source_changes at macosforge.org
Thu Aug 19 21:07:10 PDT 2010
Revision: 4436
http://trac.macosforge.org/projects/ruby/changeset/4436
Author: lsansonetti at apple.com
Date: 2010-08-19 21:07:07 -0700 (Thu, 19 Aug 2010)
Log Message:
-----------
AOT: mark all VM primitives as static to avoid symbol collision when linking with other AOT compiled files
Modified Paths:
--------------
MacRuby/trunk/vm.cpp
Modified: MacRuby/trunk/vm.cpp
===================================================================
--- MacRuby/trunk/vm.cpp 2010-08-20 03:12:13 UTC (rev 4435)
+++ MacRuby/trunk/vm.cpp 2010-08-20 04:07:07 UTC (rev 4436)
@@ -3902,6 +3902,17 @@
}
}
+ // Mark all VM primitives as static, to avoid symbol collision when
+ // linking with other AOT compiled files.
+ llvm::Module::FunctionListType &funcs =
+ RoxorCompiler::module->getFunctionList();
+ for (llvm::Module::FunctionListType::iterator i = funcs.begin();
+ i != funcs.end(); ++i) {
+ if (i->getName().startswith("vm_")) {
+ i->setLinkage(GlobalValue::InternalLinkage);
+ }
+ }
+
// Compile the program as IR.
RoxorCompiler::shared->set_fname(RSTRING_PTR(rb_progname));
Function *f = RoxorCompiler::shared->compile_main_function(node, NULL);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100819/48fce0f4/attachment.html>
More information about the macruby-changes
mailing list