Add -linkonce-templates for emitting linkonce_odr syms instead of weak_odr.

This commit is contained in:
Matti Niemenmaa
2010-03-09 23:07:08 +02:00
parent b38845e88e
commit 68daadf53c
6 changed files with 24 additions and 10 deletions

View File

@@ -36,6 +36,7 @@
#include "cond.h"
#include "gen/logger.h"
#include "gen/linkage.h"
#include "gen/linker.h"
#include "gen/irstate.h"
#include "gen/optimizer.h"
@@ -259,6 +260,10 @@ int main(int argc, char** argv)
global.params.output_ll = opts::output_ll ? OUTPUTFLAGset : OUTPUTFLAGno;
global.params.output_s = opts::output_s ? OUTPUTFLAGset : OUTPUTFLAGno;
templateLinkage =
opts::linkonceTemplates ? LLGlobalValue::LinkOnceODRLinkage
: LLGlobalValue::WeakODRLinkage;
if (global.params.run || !runargs.empty()) {
// FIXME: how to properly detect the presence of a PositionalEatsArgs
// option without parameters? We want to emit an error in that case...