Skip to content

Comments

use an empty staticlib as an allocator library for cc_common.link#3864

Merged
krasimirgg merged 4 commits intobazelbuild:mainfrom
krasimirgg:alloc-staticlib
Feb 23, 2026
Merged

use an empty staticlib as an allocator library for cc_common.link#3864
krasimirgg merged 4 commits intobazelbuild:mainfrom
krasimirgg:alloc-staticlib

Conversation

@krasimirgg
Copy link
Collaborator

@krasimirgg krasimirgg commented Feb 23, 2026

No functional changes intended.

As suggested on multiple channels, using an empty staticlib is a good effective way to ensure we get the rust allocator shims generated consistently. This is simpler than what we have and also looks like it uniformly supports stable and nightly across versions.

closes #3459

@krasimirgg krasimirgg changed the title [DRAFT] use an empty staticlib as an allocator library for cc_common.link use an empty staticlib as an allocator library for cc_common.link Feb 23, 2026
@krasimirgg krasimirgg marked this pull request as ready for review February 23, 2026 14:55
Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

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

Sounds good to me, thank you!

@krasimirgg krasimirgg added this pull request to the merge queue Feb 23, 2026
Merged via the queue into bazelbuild:main with commit e7e25a9 Feb 23, 2026
3 checks passed
providers = _rust_static_library_impl(ctx)
return providers + [_RustBuiltWithoutProcessWrapperInfo()]

rust_static_library_without_process_wrapper = rule(
Copy link
Contributor

Choose a reason for hiding this comment

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

this will need a change to account for #3790

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.

cc_common_link is broken in rust 1.87.0

3 participants