[PATCH] D150537: [Clang][LoongArch] Pass the -mabi and -target-abi options to as and cc1as respectively
Lu Weining via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun May 14 22:56:07 PDT 2023
SixWeining created this revision.
SixWeining added reviewers: xen0n, xry111, MaskRay, hev, wangleiat.
Herald added a project: All.
SixWeining requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This change is necessary to set correct EFlags according to the
options (-m*-float and -mabi=) passed to clang when input is assembly.
Note: `-mabi=` is not documented by `as`.
$ as --version
GNU assembler (GNU Binutils) 2.40.50.20230316
...
$ as --target-help
LARCH options:
But we can see gcc invokes `as` and passes the `-mabi=` option when compiling C or assembly.
$ gcc -c a.c -v 2>&1 -msoft-float | grep "as -v"
as -v -mabi=lp64s -o a.o /tmp/ccFrxzZi.s
$ gcc -c a.s -v 2>&1 -msoft-float | grep "as -v"
as -v -mabi=lp64s -o a.o a.s
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D150537
Files:
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/Clang.h
clang/lib/Driver/ToolChains/Gnu.cpp
clang/test/Driver/loongarch-as.s
clang/test/Driver/loongarch-ias.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150537.522048.patch
Type: text/x-patch
Size: 4756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230515/72170678/attachment.bin>
More information about the cfe-commits
mailing list