Mercurial > projects > ldc
comparison gen/main.cpp @ 1644:9176437d98be
Add -linkonce-templates for emitting linkonce_odr syms instead of weak_odr.
author | Matti Niemenmaa <matti.niemenmaa+hg@iki.fi> |
---|---|
date | Tue, 09 Mar 2010 23:07:08 +0200 |
parents | 601d3eea4a68 |
children | 1d2d1aa16841 |
comparison
equal
deleted
inserted
replaced
1643:8f121883bce8 | 1644:9176437d98be |
---|---|
34 #include "mtype.h" | 34 #include "mtype.h" |
35 #include "id.h" | 35 #include "id.h" |
36 #include "cond.h" | 36 #include "cond.h" |
37 | 37 |
38 #include "gen/logger.h" | 38 #include "gen/logger.h" |
39 #include "gen/linkage.h" | |
39 #include "gen/linker.h" | 40 #include "gen/linker.h" |
40 #include "gen/irstate.h" | 41 #include "gen/irstate.h" |
41 #include "gen/optimizer.h" | 42 #include "gen/optimizer.h" |
42 #include "gen/toobj.h" | 43 #include "gen/toobj.h" |
43 #include "gen/metadata.h" | 44 #include "gen/metadata.h" |
256 ? OUTPUTFLAGset | 257 ? OUTPUTFLAGset |
257 : OUTPUTFLAGno; | 258 : OUTPUTFLAGno; |
258 global.params.output_bc = opts::output_bc ? OUTPUTFLAGset : OUTPUTFLAGno; | 259 global.params.output_bc = opts::output_bc ? OUTPUTFLAGset : OUTPUTFLAGno; |
259 global.params.output_ll = opts::output_ll ? OUTPUTFLAGset : OUTPUTFLAGno; | 260 global.params.output_ll = opts::output_ll ? OUTPUTFLAGset : OUTPUTFLAGno; |
260 global.params.output_s = opts::output_s ? OUTPUTFLAGset : OUTPUTFLAGno; | 261 global.params.output_s = opts::output_s ? OUTPUTFLAGset : OUTPUTFLAGno; |
262 | |
263 templateLinkage = | |
264 opts::linkonceTemplates ? LLGlobalValue::LinkOnceODRLinkage | |
265 : LLGlobalValue::WeakODRLinkage; | |
261 | 266 |
262 if (global.params.run || !runargs.empty()) { | 267 if (global.params.run || !runargs.empty()) { |
263 // FIXME: how to properly detect the presence of a PositionalEatsArgs | 268 // FIXME: how to properly detect the presence of a PositionalEatsArgs |
264 // option without parameters? We want to emit an error in that case... | 269 // option without parameters? We want to emit an error in that case... |
265 // You'd think getNumOccurrences would do it, but it just returns the | 270 // You'd think getNumOccurrences would do it, but it just returns the |