[llvm] [LLVM][Triple] Drop unknown object types from normalized triples (PR #135571)
Usman Nadeem via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 14 12:02:33 PDT 2025
================
@@ -1265,6 +1266,14 @@ std::string Triple::normalize(StringRef Str, CanonicalForm Form) {
}
}
+ // Environment "unknown-elf" is just "elf".
----------------
UsmanNadeem wrote:
`parseEnvironment("elf")` will also yield `UnknownEnvironment` though.
Before this patch the following command
`clang -### --target=aarch64-pc-linux--elf` or `clang -### --target=aarch64-pc-linux--elf` gives an error due to bug in version parsing but the resultant triple is:
`Target: aarch64-pc-linux-elf-unknown` which seems wrong.
After this patch we get:
`Target: aarch64-pc-linux-elf`
https://github.com/llvm/llvm-project/pull/135571
More information about the llvm-commits
mailing list