Skip to content

Commit

Permalink
llvm: Expose tiny code model to users
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed May 20, 2020
1 parent 8858a43 commit c7813ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/doc/rustc/src/codegen-options/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ specification.

Supported values for this option are:

<!-- - `tiny` - Tiny code model. -->
- `tiny` - Tiny code model.
- `small` - Small code model. This is the default model for majority of supported targets.
- `kernel` - Kernel code model.
- `medium` - Medium code model.
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_codegen_llvm/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ impl CodegenBackend for LlvmCodegenBackend {
}
PrintRequest::CodeModels => {
println!("Available code models:");
for name in &["small", "kernel", "medium", "large"] {
for name in &["tiny", "small", "kernel", "medium", "large"] {
println!(" {}", name);
}
println!();
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_target/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ impl FromStr for CodeModel {

fn from_str(s: &str) -> Result<CodeModel, ()> {
Ok(match s {
// "tiny" => CodeModel::Tiny, // Not exposed to users right now.
"tiny" => CodeModel::Tiny,
"small" => CodeModel::Small,
"kernel" => CodeModel::Kernel,
"medium" => CodeModel::Medium,
Expand Down

0 comments on commit c7813ff

Please sign in to comment.