Add -femulated-tls flag to select the emulated TLS model.

This will be used for old targets like Android that do not
support ELF TLS models.

Differential Revision: http://reviews.llvm.org/D10524

llvm-svn: 243441
This commit is contained in:
Chih-Hung Hsieh
2015-07-28 16:27:56 +00:00
parent 9938310ab3
commit 2c656c9417
8 changed files with 39 additions and 0 deletions

View File

@@ -593,6 +593,9 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
}
}
Opts.EmulatedTLS =
Args.hasFlag(OPT_femulated_tls, OPT_fno_emulated_tls, false);
if (Arg *A = Args.getLastArg(OPT_ftlsmodel_EQ)) {
StringRef Name = A->getValue();
unsigned Model = llvm::StringSwitch<unsigned>(Name)