Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

403
Views
clang -Xclang -cc1 -O3 mips.c -emit-llvm , clang error: -emit-llvm cannot be used when linking

I want to use the clang front-end to convert mips.c to mips.ll which is a llvm IR.

So I use the command: clang -cc1 O3 mips.c -emit-llvm. A fatal error occurs: 'stdio.h'(which is included in mips.c) file not found.

Then I change the command as following: clang -Xclang -cc1 O3 mips.c -emit-llvm. Another error occurs: -emit-llvm cannot be used when linking

How can I solve the problem?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

As written in the error message, you can only compile when emitting LLVM IR, not link.

Either add -c for the bitcode or -S for the readable form to your command line:

clang -Xclang -cc1 -O3 mips.c -emit-llvm -S
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!