mirror of
https://github.com/janet-lang/janet
synced 2024-12-26 08:20:27 +00:00
Update cook to take headers for natives.
This should help incremental building.
This commit is contained in:
parent
5689ef1af1
commit
82edc19137
@ -248,7 +248,8 @@
|
|||||||
(def cc (opt opts :compiler COMPILER))
|
(def cc (opt opts :compiler COMPILER))
|
||||||
(def cflags (getcflags opts))
|
(def cflags (getcflags opts))
|
||||||
(def defines (interpose " " (make-defines (opt opts :defines {}))))
|
(def defines (interpose " " (make-defines (opt opts :defines {}))))
|
||||||
(rule dest [src]
|
(def headers (or (opts :headers) []))
|
||||||
|
(rule dest [src ;headers]
|
||||||
(print "compiling " dest "...")
|
(print "compiling " dest "...")
|
||||||
(if is-win
|
(if is-win
|
||||||
(shell cc ;defines "/c" ;cflags (string "/Fo" dest) src)
|
(shell cc ;defines "/c" ;cflags (string "/Fo" dest) src)
|
||||||
|
@ -262,8 +262,12 @@ uint64_t janet_getflags(const Janet *argv, int32_t n, const char *flags) {
|
|||||||
for (int32_t i = 0; i < flen; i++) {
|
for (int32_t i = 0; i < flen; i++) {
|
||||||
if (((uint8_t) flags[i]) == keyw[j]) {
|
if (((uint8_t) flags[i]) == keyw[j]) {
|
||||||
ret |= 1ULL << i;
|
ret |= 1ULL << i;
|
||||||
|
goto found;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
janet_panicf("unexpected flag %c, expected one of \"%s\"", (char) keyw[j], flags);
|
||||||
|
found:
|
||||||
|
;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user