Skip to content

Allow custom C flags in ruby-prism-sys#4169

Merged
kddnewton merged 1 commit into
ruby:mainfrom
magic-akari:ruby-prism-cflags
Jul 14, 2026
Merged

Allow custom C flags in ruby-prism-sys#4169
kddnewton merged 1 commit into
ruby:mainfrom
magic-akari:ruby-prism-cflags

Conversation

@magic-akari

Copy link
Copy Markdown
Contributor

Add RUBY_PRISM_CFLAGS for crate-scoped compiler arguments. Parse the value with shell quoting and apply the resulting arguments to both the vendored C build and bindgen.

Pass existing vendored and WASI arguments to bindgen explicitly through the same argument list instead of mutating BINDGEN_EXTRA_CLANG_ARGS. This allows freestanding targets to provide sysroots, include paths, and Prism configuration macros without affecting unrelated Cargo dependencies.

Add RUBY_PRISM_CFLAGS for crate-scoped compiler arguments. Parse the
value with shell quoting and apply the resulting arguments to both the
vendored C build and bindgen.

Pass existing vendored and WASI arguments to bindgen explicitly through
the same argument list instead of mutating BINDGEN_EXTRA_CLANG_ARGS. This
allows freestanding targets to provide sysroots, include paths, and Prism
configuration macros without affecting unrelated Cargo dependencies.

Closes ruby#4165.
@magic-akari magic-akari marked this pull request as ready for review July 14, 2026 03:40

@kddnewton kddnewton left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

@kddnewton kddnewton merged commit f312bcb into ruby:main Jul 14, 2026
66 checks passed
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.

Allow ruby-prism-sys to use a custom sysroot

2 participants