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

[SOL] Disable BTF codegen #38

Merged

Conversation

riptl
Copy link

@riptl riptl commented Apr 28, 2022

Closes #37

if (MAI->doesSupportDebugInformation() && !M.debug_compile_units().empty()) {
// Unsupported for Solana: https://github.com/solana-labs/llvm-project/issues/37
if (MAI->doesSupportDebugInformation() && !M.debug_compile_units().empty() &&
TM.getTargetTriple().getVendor() != Triple::VendorType::Solana) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Checking for VendorType::Solana isn't enough I think. We need to disable BTF also when compiling rust code with --target=bpfel-unknown-unknown - which is what cargo build-bpf uses today - which corresponds to triple=bpfel-unknown-unknown target-features=solana.

See https://github.com/solana-labs/llvm-project/blob/05f07462070dd7f135a1d435149c32f7e343fd47/llvm/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp#L28

@riptl riptl force-pushed the solana-disable-btf branch from 368f930 to 252cfac Compare May 19, 2022 21:54
@riptl riptl marked this pull request as ready for review May 19, 2022 23:41
@riptl riptl force-pushed the solana-disable-btf branch from 252cfac to 06bf33e Compare May 19, 2022 23:44
@dmakarov dmakarov merged commit b1a4ab9 into anza-xyz:solana-rustc/13.0-2021-09-30 May 20, 2022
@riptl riptl deleted the solana-disable-btf branch May 21, 2022 19:22
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.

llvm::BTFDebug crashes on some data types
3 participants