[llvm] [LLVM][Triple] Drop unknown object types from normalized triples (PR #135571)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 14 12:09:50 PDT 2025


================
@@ -1265,6 +1266,14 @@ std::string Triple::normalize(StringRef Str, CanonicalForm Form) {
     }
   }
 
+  // Environment "unknown-elf" is just "elf".
----------------
shiltian wrote:

which is wrong right? We need to treat the root cause not the symptoms. Even if we take format as part of environment, `aarch64-pc-linux--elf` should also be a valid one, since `-elf` means the environment part is empty, and `elf` is the format part. We should not treat `aarch64-pc-linux--elf` as `aarch64-pc-linux-elf-unknown`. Instead, we should fix it such that it would be treated as `aarch64-pc-linux-unknown-elf` instead of `aarch64-pc-linux-elf`.

https://github.com/llvm/llvm-project/pull/135571


More information about the llvm-commits mailing list