Skip to content

build: Unify bindings and glue code flags with cc-rs#734

Open
jschwe wants to merge 8 commits into
servo:mainfrom
jschwe:build-rs-cc-rs-unification2
Open

build: Unify bindings and glue code flags with cc-rs#734
jschwe wants to merge 8 commits into
servo:mainfrom
jschwe:build-rs-cc-rs-unification2

Conversation

@jschwe
Copy link
Copy Markdown
Member

@jschwe jschwe commented Apr 19, 2026

Follow-up to #732.

Refactor cc_flags to get_common_cc, which returns a cc builder. Any bindgen specific flags are moved to build_bindings.
Removed the explicit O0 override, this will be configured by cc-rs based on opt-level (for the glue code, and ignored by bindgen).

Testing: Describe how this pull request is tested or why it doesn't require tests
Servo PR: Link to a companion pull request in the Servo repository. Remove this line if there is no companion PR.

jschwe added 7 commits April 18, 2026 21:05
CLANGFLAGS was only applied to bindgen.
cc-rs is not documented to use it, and SM also doesn't reference it.
In servo I also couldn't see us setting this variable.
This is a preperation for unifying our common build flags
across cc-rs, SM build and bindgen.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Use the cc-rs builder to unify the bindings and glue flags.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
- use cc-rs for include path
- remove manual CXXFLAGS parsing

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
@jschwe jschwe force-pushed the build-rs-cc-rs-unification2 branch from dde2c63 to 84ba7a9 Compare April 20, 2026 04:12
and a bit of refactoring for target.include_paths

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
@jschwe jschwe force-pushed the build-rs-cc-rs-unification2 branch from bfda141 to bc88745 Compare April 20, 2026 06:43
@jschwe jschwe marked this pull request as ready for review April 21, 2026 14:26
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