mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Add a thread-model knob for lowering atomics on baremetal & single threaded systems
http://reviews.llvm.org/D4984 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216182 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -54,6 +54,16 @@ RelocModel("relocation-model",
|
||||
"Relocatable external references, non-relocatable code"),
|
||||
clEnumValEnd));
|
||||
|
||||
cl::opt<ThreadModel::Model>
|
||||
TMModel("thread-model",
|
||||
cl::desc("Choose threading model"),
|
||||
cl::init(ThreadModel::POSIX),
|
||||
cl::values(clEnumValN(ThreadModel::POSIX, "posix",
|
||||
"POSIX thread model"),
|
||||
clEnumValN(ThreadModel::Single, "single",
|
||||
"Single thread model"),
|
||||
clEnumValEnd));
|
||||
|
||||
cl::opt<llvm::CodeModel::Model>
|
||||
CMModel("code-model",
|
||||
cl::desc("Choose code model"),
|
||||
@ -245,6 +255,8 @@ static inline TargetOptions InitTargetOptionsFromCodeGenFlags() {
|
||||
Options.MCOptions = InitMCTargetOptionsFromFlags();
|
||||
Options.JTType = JTableType;
|
||||
|
||||
Options.ThreadModel = TMModel;
|
||||
|
||||
return Options;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user