1
Fork 0

rustc_target: Stop using "string typing" for relocation models

Introduce `enum RelocModel` instead.
This commit is contained in:
Vadim Petrochenkov 2020-04-23 00:46:45 +03:00
parent 019ab732ce
commit fb91e5ed2f
30 changed files with 150 additions and 108 deletions

View file

@ -201,7 +201,9 @@ impl CodegenBackend for LlvmCodegenBackend {
match req {
PrintRequest::RelocationModels => {
println!("Available relocation models:");
for &(name, _) in back::write::RELOC_MODEL_ARGS.iter() {
for name in
&["static", "pic", "dynamic-no-pic", "ropi", "rwpi", "ropi-rwpi", "default"]
{
println!(" {}", name);
}
println!();