logoalt Hacker News

thechaolast Tuesday at 8:24 PM0 repliesview on HN

For C/++ just use "#!". When TCC first came out, we used this exact technique for "C scripting". It requires a dirty SO methodology (you can't really control linking well).

For larger projects (the exe), the shebang points to a C build file, which when compiled, knows the root path; that C build script then looks for a manifest, builds, links, and fork()s. A good a/m timestamp library with direct ccache support can spin up as fast as a script even on big projects.

Again, this is all a bad idea bc it's hard to control your environment.

I guess we were doing all this in the mid 2000s? When did TCC come out?