mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-07 03:38:31 +00:00
Fix Landlock Make so it can read pattern rule vars
It turned out that specifying all SRCS and INCS as dependencies on the pattern rules for all headers, caused `make` memory usage to skyrocket from 40mb ot 160mb. This change also reduces the build graph another 4%.
This commit is contained in:
parent
62ca1b0902
commit
ead3fc2b31
53 changed files with 105 additions and 93 deletions
12
third_party/make/job.c
vendored
12
third_party/make/job.c
vendored
|
@ -1773,7 +1773,11 @@ child_execute_job (struct childbase *child, int good_stdin, char **argv)
|
|||
(STRING_SIZE_TUPLE(".UNSANDBOXED"))) &&
|
||||
(!c || !Vartoi (lookup_variable_in_set
|
||||
(STRING_SIZE_TUPLE(".UNSANDBOXED"),
|
||||
c->file->variables->set))));
|
||||
c->file->variables->set))) &&
|
||||
(!c || !c->file->pat_variables ||
|
||||
!Vartoi (lookup_variable_in_set
|
||||
(STRING_SIZE_TUPLE(".UNSANDBOXED"),
|
||||
c->file->pat_variables->set))));
|
||||
|
||||
/* resolve command into executable path */
|
||||
if (!g_strict || !sandboxed)
|
||||
|
@ -1919,6 +1923,12 @@ child_execute_job (struct childbase *child, int good_stdin, char **argv)
|
|||
(lookup_variable_in_set
|
||||
(STRING_SIZE_TUPLE (".UNVEIL"),
|
||||
c->file->variables->set)));
|
||||
if (c->file->pat_variables)
|
||||
RETURN_ON_ERROR
|
||||
(UnveilVariable
|
||||
(lookup_variable_in_set
|
||||
(STRING_SIZE_TUPLE (".UNVEIL"),
|
||||
c->file->pat_variables->set)));
|
||||
|
||||
/* commit sandbox */
|
||||
RETURN_ON_ERROR (Unveil (0, 0));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue