[Issue 3274] dmd fails to emit code for templates into object file if several files are compiled at once

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 7 12:02:54 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=3274



--- Comment #4 from Martin Nowak <code at dawg.eu> 2013-04-07 12:02:53 PDT ---
One idea to reduce the cost of copying is partial linking.
AFAIU that would allow us to generate a single temporary object containing the
template/TypeInfo instantiation and link it into every object file that
references it.

ld -r -o combined1.o template.o module1.o
mv combined1.o module1.o
ld -r -o combined2.o template.o module2.o
mv combined2.o module2.o

http://sourceware.org/binutils/docs-2.23.1/ld/Options.html#index-partial-link-88

Though I'm not sure how portable this or an equivalent dmd backend
functionality would be.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list