1
Fork 0

Remove unused OutputType::ThinLinkBitcode

This commit is contained in:
DianQK 2025-02-06 22:01:08 +08:00
parent da50297a6e
commit a897cc0351
No known key found for this signature in database
3 changed files with 2 additions and 16 deletions

View file

@ -210,7 +210,7 @@ fn produce_final_output_artifacts(
// to get rid of it. // to get rid of it.
for output_type in crate_output.outputs.keys() { for output_type in crate_output.outputs.keys() {
match *output_type { match *output_type {
OutputType::Bitcode | OutputType::ThinLinkBitcode | OutputType::ThinBitcode => { OutputType::Bitcode | OutputType::ThinLinkBitcode => {
// Cranelift doesn't have bitcode // Cranelift doesn't have bitcode
// user_wants_bitcode = true; // user_wants_bitcode = true;
// // Copy to .bc, but always keep the .0.bc. There is a later // // Copy to .bc, but always keep the .0.bc. There is a later

View file

@ -630,9 +630,6 @@ fn produce_final_output_artifacts(
// them for making an rlib. // them for making an rlib.
copy_if_one_unit(OutputType::Bitcode, true); copy_if_one_unit(OutputType::Bitcode, true);
} }
OutputType::ThinBitcode => {
copy_if_one_unit(OutputType::ThinBitcode, true);
}
OutputType::ThinLinkBitcode => { OutputType::ThinLinkBitcode => {
copy_if_one_unit(OutputType::ThinLinkBitcode, false); copy_if_one_unit(OutputType::ThinLinkBitcode, false);
} }

View file

@ -544,9 +544,6 @@ pub enum OutputType {
Bitcode, Bitcode,
/// This is the summary or index data part of the ThinLTO bitcode. /// This is the summary or index data part of the ThinLTO bitcode.
ThinLinkBitcode, ThinLinkBitcode,
/// This is ThinLTO's pre-link bitcode, primarily used for embedding bitcode in object files.
/// This can also be used for FatLTO.
ThinBitcode,
Assembly, Assembly,
LlvmAssembly, LlvmAssembly,
Mir, Mir,
@ -577,7 +574,6 @@ impl OutputType {
OutputType::Exe | OutputType::DepInfo | OutputType::Metadata => true, OutputType::Exe | OutputType::DepInfo | OutputType::Metadata => true,
OutputType::Bitcode OutputType::Bitcode
| OutputType::ThinLinkBitcode | OutputType::ThinLinkBitcode
| OutputType::ThinBitcode
| OutputType::Assembly | OutputType::Assembly
| OutputType::LlvmAssembly | OutputType::LlvmAssembly
| OutputType::Mir | OutputType::Mir
@ -589,7 +585,6 @@ impl OutputType {
match *self { match *self {
OutputType::Bitcode => "llvm-bc", OutputType::Bitcode => "llvm-bc",
OutputType::ThinLinkBitcode => "thin-link-bitcode", OutputType::ThinLinkBitcode => "thin-link-bitcode",
OutputType::ThinBitcode => "thin-llvm-bc",
OutputType::Assembly => "asm", OutputType::Assembly => "asm",
OutputType::LlvmAssembly => "llvm-ir", OutputType::LlvmAssembly => "llvm-ir",
OutputType::Mir => "mir", OutputType::Mir => "mir",
@ -607,7 +602,6 @@ impl OutputType {
"mir" => OutputType::Mir, "mir" => OutputType::Mir,
"llvm-bc" => OutputType::Bitcode, "llvm-bc" => OutputType::Bitcode,
"thin-link-bitcode" => OutputType::ThinLinkBitcode, "thin-link-bitcode" => OutputType::ThinLinkBitcode,
"thin-llvm-bc" => OutputType::ThinBitcode,
"obj" => OutputType::Object, "obj" => OutputType::Object,
"metadata" => OutputType::Metadata, "metadata" => OutputType::Metadata,
"link" => OutputType::Exe, "link" => OutputType::Exe,
@ -618,10 +612,9 @@ impl OutputType {
fn shorthands_display() -> String { fn shorthands_display() -> String {
format!( format!(
"`{}`, `{}`, `{}`, `{}`, `{}`, `{}`, `{}`, `{}`, `{}`, `{}`", "`{}`, `{}`, `{}`, `{}`, `{}`, `{}`, `{}`, `{}`, `{}`",
OutputType::Bitcode.shorthand(), OutputType::Bitcode.shorthand(),
OutputType::ThinLinkBitcode.shorthand(), OutputType::ThinLinkBitcode.shorthand(),
OutputType::ThinBitcode.shorthand(),
OutputType::Assembly.shorthand(), OutputType::Assembly.shorthand(),
OutputType::LlvmAssembly.shorthand(), OutputType::LlvmAssembly.shorthand(),
OutputType::Mir.shorthand(), OutputType::Mir.shorthand(),
@ -636,7 +629,6 @@ impl OutputType {
match *self { match *self {
OutputType::Bitcode => "bc", OutputType::Bitcode => "bc",
OutputType::ThinLinkBitcode => "indexing.o", OutputType::ThinLinkBitcode => "indexing.o",
OutputType::ThinBitcode => "thin.bc",
OutputType::Assembly => "s", OutputType::Assembly => "s",
OutputType::LlvmAssembly => "ll", OutputType::LlvmAssembly => "ll",
OutputType::Mir => "mir", OutputType::Mir => "mir",
@ -655,7 +647,6 @@ impl OutputType {
| OutputType::DepInfo => true, | OutputType::DepInfo => true,
OutputType::Bitcode OutputType::Bitcode
| OutputType::ThinLinkBitcode | OutputType::ThinLinkBitcode
| OutputType::ThinBitcode
| OutputType::Object | OutputType::Object
| OutputType::Metadata | OutputType::Metadata
| OutputType::Exe => false, | OutputType::Exe => false,
@ -743,7 +734,6 @@ impl OutputTypes {
self.0.keys().any(|k| match *k { self.0.keys().any(|k| match *k {
OutputType::Bitcode OutputType::Bitcode
| OutputType::ThinLinkBitcode | OutputType::ThinLinkBitcode
| OutputType::ThinBitcode
| OutputType::Assembly | OutputType::Assembly
| OutputType::LlvmAssembly | OutputType::LlvmAssembly
| OutputType::Mir | OutputType::Mir
@ -758,7 +748,6 @@ impl OutputTypes {
self.0.keys().any(|k| match *k { self.0.keys().any(|k| match *k {
OutputType::Bitcode OutputType::Bitcode
| OutputType::ThinLinkBitcode | OutputType::ThinLinkBitcode
| OutputType::ThinBitcode
| OutputType::Assembly | OutputType::Assembly
| OutputType::LlvmAssembly | OutputType::LlvmAssembly
| OutputType::Mir | OutputType::Mir