Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The "other" fast compiler (tcc) can do this:

https://bellard.org/tcc/tcc-doc.html

> TCC can be invoked from scripts, just as shell scripts. You just need to add #!/usr/local/bin/tcc -run at the start of your C source:

  #!/usr/local/bin/tcc -run
  #include <stdio.h>

  int main() 
  {
    printf("Hello World\n");
    return 0;
  }
And famously, with some patches it can compile the Linux kernel at boot time (in reasonable time):

https://bellard.org/tcc/tccboot.html



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: