Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta: Use response file for linking shared libraries in GN build #25571

Merged
merged 1 commit into from
Dec 22, 2024

Conversation

nico
Copy link
Contributor

@nico nico commented Dec 22, 2024

Linking liblagom-web.so produces a ~132K long command line. Ninja passes the whole command line as a single arg to sh -c <arg>, and the limit for single arguments (MAX_ARG_STRLEN) on Linux is PAGE_SIZE * 32 == 128K.

A response file passes the list of files in a file on disk, which lets us sidestep this problem. Ninja writes response files before invoking commands, and deletes them after (unless -d keeprsp is passed to ninja, then it keeps them on disk).

Linking liblagom-web.so produces a ~132K long command line. Ninja
passes the whole command line as a single arg to `sh -c <arg>`,
and the limit for single arguments (`MAX_ARG_STRLEN`) on Linux
is `PAGE_SIZE * 32` == 128K.

A response file passes the list of files in a file on disk, which
lets us sidestep this problem. Ninja writes response files before
invoking commands, and deletes them after (unless `-d keeprsp` is
passed to ninja, then it keeps them on disk).
@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Dec 22, 2024
@nico nico merged commit 25365e2 into SerenityOS:master Dec 22, 2024
12 checks passed
@nico nico deleted the gn-rsp branch December 22, 2024 01:50
@github-actions github-actions bot removed the 👀 pr-needs-review PR needs review from a maintainer or community member label Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant