Skip to content

[windows][lldb] fix incorrect LLVM_HOST_TRIPLE when cross-compiling #83061

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

charles-zablit
Copy link
Contributor

When building the toolchain on an X86_64 machine targeting ARM64, which the bots do, LLVM_HOST_TRIPLE will be set to x86_64-unknown-windows-msvc instead of aarch64-pc-windows-msvc.

This causes the following crashes related to LLDB not inferring the debugging platform correctly (when cross-compiling, i.e with the bots't builds)

  • The swift REPL does not work on ARM64.
  • LLDB crashes when immediately when hitting a breakpoint.
  • LLDB crashes when interrupting a program.
  • lldb-dap crashes when stepping.

This patch fixes the issue by passing the correct LLVM_HOST_TRIPLE when building.

@charles-zablit charles-zablit requested a review from compnerd as a code owner July 15, 2025 15:25
@charles-zablit
Copy link
Contributor Author

@swift-ci please test

@charles-zablit charles-zablit self-assigned this Jul 15, 2025
@charles-zablit charles-zablit added Windows Platform: Windows lldb labels Jul 15, 2025
Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

Nice catch!

@charles-zablit charles-zablit enabled auto-merge July 15, 2025 15:43
@charles-zablit
Copy link
Contributor Author

@swift-ci please test macOS

@charles-zablit
Copy link
Contributor Author

@swift-ci please test linux

@charles-zablit
Copy link
Contributor Author

@swift-ci please test macOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lldb Windows Platform: Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants