Introduce cosmocc flags -mdbg -mtiny -moptlinux

The cosmocc.zip toolchain will now include four builds of the libcosmo.a
runtime libraries. You can pass the -mdbg flag if you want to debug your
cosmopolitan runtime. You can pass the -moptlinux flag if you don't want
windows code lurking in your binary. See tool/cosmocc/README.md for more
details on how these flags may be used and their important implications.
This commit is contained in:
Justine Tunney 2024-07-26 05:10:25 -07:00
parent 59692b0882
commit 642e9cb91a
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
22 changed files with 404 additions and 56 deletions

View file

@ -516,7 +516,11 @@ void AddArg(char *actual) {
}
static int GetBaseCpuFreqMhz(void) {
#ifdef __x86_64__
return KCPUIDS(16H, EAX) & 0x7fff;
#else
return 0;
#endif
}
void PlanResource(int resource, struct rlimit rlim) {