[libcxx-commits] [clang] [libcxx] [lld] [llvm] Triple::normalize: Set OS for 3-component triple with none as middle (PR #89638)
Sander de Smalen via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 23 01:36:13 PDT 2024
================
@@ -1149,6 +1149,13 @@ std::string Triple::normalize(StringRef Str) {
}
}
+ // For 3-component triples, the middle component is used to set Vendor;
+ // while if it is "none", we'd prefer to set OS.
+ // This is for some baremetal cases, such as "arm-none-elf".
+ if (Found[0] && !Found[1] && !Found[2] && Found[3] &&
+ Components[1].equals("none") && Components[2].empty())
+ std::swap(Components[1], Components[2]);
----------------
sdesmalen-arm wrote:
This change, along with the change in libcxx/utils/ci/run-buildbot, look like the only functional changes in this patch. Is it worth committing the non-functional changes (i.e. most of the tests) in a separate NFC patch?
https://github.com/llvm/llvm-project/pull/89638
More information about the libcxx-commits
mailing list