Skip to content

build driver #60

@coderkalyan

Description

@coderkalyan

After codegen to LLVM IR, there's a few other steps that need to be taken to actually create an executable:

  1. Run LLVM's codegen backend to convert the IR to target assembly (llc)
  2. Assemble the target code into an object file (as or gcc -c)
  3. Compile the c driver into an object file (gcc -c)
  4. Link the target object file and driver into an executable (ld or gcc)

Steps 3 and 4 can be combined into a single gcc command. Anyway, ideally this would all be done in software, but it's a fair amount of boilerplate code to call LLVM's build pipeline that I'm not focusing on while I'm working on the frontend. For now, it would be best to create a makefile and some documentation that can build any given femto source file, assemble it, and link it with a driver.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions