[all-commits] [llvm/llvm-project] bf3714: [clang][Driver] Handle SPARC -mcpu=native etc.
rorth via All-commits
all-commits at lists.llvm.org
Fri Jul 29 00:27:59 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bf3714884ae4b4a0301bc6af78e8b4deff12558b
https://github.com/llvm/llvm-project/commit/bf3714884ae4b4a0301bc6af78e8b4deff12558b
Author: Rainer Orth <ro at gcc.gnu.org>
Date: 2022-07-29 (Fri, 29 Jul 2022)
Changed paths:
M clang/lib/Driver/ToolChains/Arch/Sparc.cpp
M clang/lib/Driver/ToolChains/Arch/Sparc.h
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/lib/Driver/ToolChains/CommonArgs.cpp
A clang/test/Driver/sparc-march.c
A clang/test/Driver/sparc-mcpu.c
A clang/test/Driver/sparc-mtune.c
Log Message:
-----------
[clang][Driver] Handle SPARC -mcpu=native etc.
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`. To match GCC, this patch rejects
`-march` instead of silently treating it as a no-op.
Tested on `sparcv9-sun-solaris2.11` and checking that those options are
passed on as `-target-cpu` resp. `-tune-cpu` as expected.
Differential Revision: https://reviews.llvm.org/D130273
More information about the All-commits
mailing list