Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

409
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda