简体   繁体   中英

llc: Too many positional arguments specified (error generating assembly from llvm-ir)

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?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM