I am getting an error with llc
for llvm, which I just installed on my Mac with HomeBrew.
$ llc –o malloc.s malloc.ll
llc: Too many positional arguments specified!
Can specify at most 1 positional arguments: See: llc --help
I have generated a malloc.ll file like this:
$ clang -emit-llvm -S malloc.c -o malloc.ll
How do I set this up to emit assembly?
CodePudding user response:
The llc --help
output says to use -o=<filename>
, not two separate args like -o
and filename
.
So when parsing its command line, it sees two options that don't start with -
: malloc.s
and malloc.ll
, and complains about the situation. Presumably they're rolling their own command line handling instead of using getopt, or they intentionally don't want to support the style where the following arg is consumed by an arg like -o
.