Improve cosmocc / cosmoc++ toolchain scripts

- Get out of the red zone
- Generate --ftrace nops unless -Os is passed
- Intercept -o path to generate .com / .com.dbg appropriately
This commit is contained in:
Justine Tunney 2023-06-08 14:29:22 -07:00
parent 25678db2a0
commit 22f81a8d50
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
9 changed files with 207 additions and 127 deletions

View file

@ -83,11 +83,6 @@ const char *FindDebugBinary(void) {
if (IsMyDebugBinary(buf)) {
res = buf;
}
} else if (n + 8 < ARRAYLEN(buf)) {
mempcpy(mempcpy(buf, p, n), ".com.dbg", 9);
if (IsMyDebugBinary(buf)) {
res = buf;
}
}
if (!res) {
res = getenv("COMDBG");