幻神 via llvm-dev
2020-Sep-22 13:41 UTC
[llvm-dev] enable target specific MC bankend in clang command line
Hi, Is there anyway to enable both compile and object file generation by using target specific machine code emitter? Usually, i did this by "clang -S -emit-llvm --target xxx a.c -o a.ll" "llc -march=xxx -mcpu=xxx -relocation-model=static -filetype=obj a.ll -o a.o" can single "clang" cmd do this? like "clang xxx a.c -o a.o" now we don't have assembler for our target, so clang driver toolchain doesn't work. we don't implement target specific asmparser, either. Best regrads, Han Li -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200922/73fa8f4e/attachment.html>
陈志伟 via llvm-dev
2020-Sep-29 03:18 UTC
[llvm-dev] enable target specific MC bankend in clang command line
> "clang -S -emit-llvm --target xxx a.c -o a.ll" > "llc -march=xxx -mcpu=xxx -relocation-model=static -filetype=obj a.ll -o a.o”Passing -save-temps to clang will save all intermediate compilation files (a.ii, a.bc, a.s, a.o). llvm-dis a.bc to get the LLVM human-friendly IR.