[PATCH] D130273: [clang][Driver] Handle SPARC -mcpu=native etc.

Rainer Orth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 21 07:30:50 PDT 2022


ro created this revision.
ro added reviewers: MaskRay, glaubitz, jrtc27.
ro added a project: clang.
Herald added subscribers: StephenFan, fedor.sergeev, jyknight.
Herald added a project: All.
ro requested review of this revision.

To make use of SPARC support in `getHostCPUName` as implemented by D130272 <https://reviews.llvm.org/D130272>, this patch uses it to handle `-mcpu=native` and `-mtune=native`.

Tested on `sparcv9-sun-solaris2.11` and checking that those options are passed on as `-target-cpu` resp. `-tune-cpu` as expected.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130273

Files:
  clang/lib/Driver/ToolChains/Arch/Sparc.cpp
  clang/lib/Driver/ToolChains/Arch/Sparc.h
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Driver/ToolChains/CommonArgs.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130273.446495.patch
Type: text/x-patch
Size: 3726 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220721/cbf217af/attachment.bin>


More information about the cfe-commits mailing list