diff options
author | Thomas Voss <thomas.voss@humanwave.nl> | 2024-02-14 12:36:42 +0100 |
---|---|---|
committer | Thomas Voss <thomas.voss@humanwave.nl> | 2024-02-14 12:36:42 +0100 |
commit | ee3eb5ac6c89d10b4a564dedae50216b196bad9c (patch) | |
tree | 8c14f7018da5b64cefec6ba7844168fab838f819 /cbs.h | |
parent | 269d6af510b641c4d848ada8e20325205aa2e7be (diff) |
Fix builds on MacOS
Diffstat (limited to 'cbs.h')
-rw-r--r-- | cbs.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -717,6 +717,7 @@ _rebuild(char *src) { char *bbn, *sbn, *argv0; cmd_t cmd = {0}; + struct strv sv = {0}; /* We assume that the compiled binary and the source file are in the same directory. */ @@ -732,7 +733,9 @@ _rebuild(char *src) if (!foutdated(bbn, sbn)) return; - cmdadd(&cmd, "cc", "-std=c2x"); + env_or_default(&sv, "CC", "cc"); + cmdaddv(&cmd, sv.buf, sv.len); + cmdadd(&cmd, "-std=c2x"); #ifdef CBS_PTHREAD cmdadd(&cmd, "-lpthread"); #endif |