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

cmake: Disable PartitionAlloc on ARM #446

Closed
wants to merge 1 commit into from

Conversation

ayrtonm
Copy link
Contributor

@ayrtonm ayrtonm commented Oct 14, 2024

PartitionAlloc needs to be built with -ffixed-x18 on ARM to avoid clobbering x18. However linking it in also pulls in libstdc++ which can also clobber x18 so this commit just disables PartitionAlloc on ARM for now. It shouldn't be too hard to build LLVM's libc++ with -ffixed-x18 since that's what Android uses so we should probably just do that when we want to re-enable PA.

PartitionAlloc needs to be built with -ffixed-x18 on ARM to avoid clobbering
x18. However linking it in also pulls in libstdc++ which can also clobber x18 so
this commit just disables PartitionAlloc on ARM for now. It shouldn't be too
hard to build LLVM's libc++ with -ffixed-x18 since that's what Android uses so
we should probably just do that when we want to re-enable PA.
@fw-immunant
Copy link
Contributor

Is libstdc++ being linked causing problems even in tests that don't do heap allocation? If not, I would rather we kept PartitionAlloc in the build and just ignored test failures of heap tests until we have our own build of libc++. We have ARM-specific changes to PartitionAlloc that I would prefer to keep building in CI.

@ayrtonm
Copy link
Contributor Author

ayrtonm commented Oct 14, 2024

No I haven't hit runtime bugs due to this, it was to preempt potential bugs from calling into it. Though libstdc++.so also defines some unmangled symbols so I don't think we can say with certainty that not allocating will not call into libstdc++.so. If you want to keep building PA we could add ninja partition-alloc to CI instead.

@ayrtonm ayrtonm closed this Oct 21, 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.

2 participants