codelite icon indicating copy to clipboard operation
codelite copied to clipboard

`llvm-as` is not `.s`/`.S` files assembler

Open llogick opened this issue 2 years ago • 1 comments
trafficstars

By default CodeLite uses llvm-as as an assembler when using the clang compiler, but llvm-as only works with/on .ll files. From the project's website: "It reads a file containing human-readable LLVM assembly language, translates it to LLVM bitcode, and writes the result into a file or to standard output."

> llvm-as --help
OVERVIEW: llvm .ll -> .bc assembler

USAGE: llvm-as [options] <input .llvm file>

PS There are a few stray -I when compiling .s files: https://github.com/eranif/codelite/blob/aa5f270f8fd9dadcc711282323c272cd2e5f8cfc/Plugin/compiler.cpp#L349 https://github.com/eranif/codelite/blob/aa5f270f8fd9dadcc711282323c272cd2e5f8cfc/Plugin/compiler.cpp#L377 which result in the following: /bin/clang -c "/home/workaccount/Work/CLTest/CLTest/test.S" -o ../build-Debug/CLTest/test.S.o -I-I. -I.

llogick avatar Jan 14 '23 04:01 llogick

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs (within 5 days). Thank you for your contributions.

stale[bot] avatar Jun 18 '23 16:06 stale[bot]