[all-commits] [llvm/llvm-project] bdb035: [llvm-rc] Don't rewrite the arch in the default tr...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Fri Jun 25 12:59:29 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bdb03557c05942d951e1c9b5d7033613323c3104
      https://github.com/llvm/llvm-project/commit/bdb03557c05942d951e1c9b5d7033613323c3104
  Author: Martin Storsjö <martin at martin.st>
  Date:   2021-06-25 (Fri, 25 Jun 2021)

  Changed paths:
    M llvm/tools/llvm-rc/llvm-rc.cpp

  Log Message:
  -----------
  [llvm-rc] Don't rewrite the arch in the default triple unless necessary

When the default target arch isn't one that is supported as a
windows target, we want to set a suitable architecture (so that
Clang tests that run plain 'llvm-rc' succeed checks for e.g.
"#ifdef _WIN32" even for llvm builds that default to e.g. ppc64).

But if the default target architecture is usable, don't rewrite it.
(Rewriting it, by e.g. "T.setArch(T.getArch())", normalizes the
spelling of the architecture, e.g. changing i686 to i386. Such a
change can make clang unable to find the right sysroot.)

This can't, unfortunately, practically be tested very well because
it is entirely dependent on the default triple of the llvm build.

Differential Revision: https://reviews.llvm.org/D104589




More information about the All-commits mailing list