[llvm-bugs] [Bug 49293] New: Clang ignores -march when targeting armv7-apple-darwin

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 19 18:25:30 PST 2021


            Bug ID: 49293
           Summary: Clang ignores -march when targeting armv7-apple-darwin
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: orivej at gmx.fr
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

This is a low priority bug since it affects only old hardware targets,
but since it exists in the codebase and I've stumbled upon it I'll
report it.

When running "clang --target=armv7-apple-darwin14 -march=armv8.2-a+dotprod"
MachO::TranslateArgs is called with BoundArch "armv7" and appends
"-march=armv7a" to the list of the command line args:
Then clang -cc1 uses it, silently ignoring the custom -march.

The same issue was encountered in
and worker around in https://github.com/google/XNNPACK/pull/692/files
by adding -mcpu to the command line. (In my case the workaround would
be "-mcpu=cyclone+dotprod".)

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210220/aebd6f68/attachment.html>

More information about the llvm-bugs mailing list