Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 33 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ jobs:
rust_toolchain: x86_64-unknown-linux-gnu
rust_targets: x86_64-unknown-linux-gnu
platformid: linux-x64
shell: bash

- os: Linux
image: ubuntu-latest
lldb_triple: aarch64-linux-gnu
rust_toolchain: x86_64-unknown-linux-gnu
rust_targets: aarch64-unknown-linux-gnu
platformid: linux-arm64
shell: bash
cross: true

- os: Linux
Expand All @@ -59,6 +61,7 @@ jobs:
rust_toolchain: x86_64-unknown-linux-gnu
rust_targets: armv7-unknown-linux-gnueabihf
platformid: linux-armhf
shell: bash
cross: true

- os: MacOS
Expand All @@ -67,24 +70,43 @@ jobs:
rust_toolchain: x86_64-apple-darwin
rust_targets: x86_64-apple-darwin
platformid: darwin-x64
shell: bash

- os: MacOS
image: macos-15
lldb_triple: aarch64-apple-darwin
rust_toolchain: aarch64-apple-darwin
rust_targets: aarch64-apple-darwin
platformid: darwin-arm64
shell: bash

- os: Windows
image: windows-latest
lldb_triple: x86_64-windows-msvc
rust_toolchain: x86_64-pc-windows-gnu
rust_toolchain: x86_64-pc-windows-msvc
rust_targets: x86_64-pc-windows-msvc
platformid: win32-x64
vctools: x86.x64
vcvars: vcvars64
shell: cmd

- os: Windows
image: windows-11-vs2026-arm
lldb_triple: aarch64-windows-msvc
rust_toolchain: aarch64-pc-windows-msvc
rust_targets: aarch64-pc-windows-msvc
platformid: win32-arm64
vctools: arm64
vcvars: vcvarsarm64
shell: cmd

name: ${{ matrix.os }} ${{ matrix.platformid }}
runs-on: ${{ matrix.image }}

defaults:
run:
shell: ${{ matrix.shell }}

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -134,20 +156,27 @@ jobs:

- name: Setup (Windows)
if: ${{ matrix.os == 'Windows' }}
shell: cmd
run: |
for /f "usebackq delims=" %%i in (`vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -find VC\Auxiliary\Build\vcvars64.bat`) do call "%%i"
for /f "usebackq delims=" %%i in (`vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.${{ matrix.vctools }} -find VC\Auxiliary\Build\${{ matrix.vcvars }}.bat`) do call "%%i"
set >> %GITHUB_ENV%

- name: Download LLDB
shell: bash
run: |
# This should go away once https://github.com/vadimcn/lldb-build/pull/3 lands
if [[ "${{ matrix.platformid }}" == "win32-arm64" ]]; then
LLDB_REPO_OWNER=saschanaz
else
LLDB_REPO_OWNER=vadimcn
fi
export GH_TOKEN=${{ secrets.LLDB_BUILD_TOKEN }}
gh release download ${{ env.lldb_release }} \
--repo vadimcn/lldb-build \
--repo $LLDB_REPO_OWNER/lldb-build \
--pattern "lldb--${{ matrix.lldb_triple }}.zip" \
--dir $RUNNER_TEMP

- name: Configure
shell: bash
run: |
mkdir -p build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
Expand Down
17 changes: 14 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -274,20 +274,27 @@ if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/debuggee
)
else()
if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64")
set(ToolchainTripleGnu x86_64-windows-gnu)
set(ToolchainTripleMsvc x86_64-windows-msvc)
elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ARM64")
set(ToolchainTripleGnu aarch64-windows-gnullvm)
set(ToolchainTripleMsvc aarch64-windows-msvc)
endif()
# On Windows we want to check both GNU DWARF and MSVC PDB debug info kinds.
message("Configuring debuggee")
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/debuggee)
execute_process(
COMMAND ${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR}/debuggee -G${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/toolchain-x86_64-windows-gnu.cmake
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/toolchain-${ToolchainTripleGnu}.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/debuggee
COMMAND_ERROR_IS_FATAL ANY
)
message("Configuring debuggee-msvc")
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/debuggee-msvc)
execute_process(
COMMAND ${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR}/debuggee -G${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/toolchain-x86_64-windows-msvc.cmake
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/cmake/toolchain-${ToolchainTripleMsvc}.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/debuggee-msvc
COMMAND_ERROR_IS_FATAL ANY
)
Expand All @@ -308,7 +315,11 @@ set(MochaTest ${NPM} run mocha --
)

if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(TestTriples x86_64-pc-windows-gnu x86_64-pc-windows-msvc)
if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64")
set(TestTriples x86_64-pc-windows-gnu x86_64-pc-windows-msvc)
elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ARM64")
set(TestTriples aarch64-pc-windows-gnullvm aarch64-pc-windows-msvc)
endif()
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(TestTriples x86_64-apple-darwin)
else()
Expand Down
16 changes: 13 additions & 3 deletions adapter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,17 @@ include(ExternalProject)
add_subdirectory(scripts)

if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
find_file(MSDIA msdia140.dll PATHS "${CMAKE_SOURCE_DIR}" "$ENV{VSINSTALLDIR}/DIA SDK/bin/amd64" NO_DEFAULT_PATH)
if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64")
set(_DIA_ARCH amd64)
set(_DIA_HEADER_ARCH x64)
elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ARM64")
set(_DIA_ARCH arm64)
set(_DIA_HEADER_ARCH ARM64)
else()
message(FATAL_ERROR "Unsupported processor: ${CMAKE_SYSTEM_PROCESSOR}")
endif()

find_file(MSDIA msdia140.dll PATHS "${CMAKE_SOURCE_DIR}" "$ENV{VSINSTALLDIR}/DIA SDK/bin/${_DIA_ARCH}" NO_DEFAULT_PATH)
if (NOT MSDIA) # Search again with default paths
find_file(MSDIA msdia140.dll)
endif()
Expand All @@ -12,11 +22,11 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
message(FATAL_ERROR "msdia140.dll not found")
else()
execute_process(COMMAND dumpbin "/headers" "${MSDIA}" OUTPUT_VARIABLE OUTPUT)
if (OUTPUT MATCHES ".*machine \\(x64\\).*")
if (OUTPUT MATCHES ".*machine \\(${_DIA_HEADER_ARCH}\\).*")
message ("Found MSDIA at ${MSDIA}")
add_copy_file(DIAFiles "${MSDIA}" ${CMAKE_CURRENT_BINARY_DIR}/msdia140.dll)
else()
message(FATAL_ERROR "Found MSDIA at ${MSDIA}, but it isn't an x64 binary.")
message(FATAL_ERROR "Found MSDIA at ${MSDIA}, but it isn't an ${_DIA_ARCH} binary.")
endif()
endif()
endif()
Expand Down
3 changes: 3 additions & 0 deletions cmake/toolchain-aarch64-windows-gnullvm.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set(LLVM_TRIPLE aarch64-pc-windows-gnullvm)
set(CMAKE_C_COMPILER clang)
set(CMAKE_CXX_COMPILER clang++)
3 changes: 3 additions & 0 deletions cmake/toolchain-aarch64-windows-msvc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set(LLVM_TRIPLE aarch64-pc-windows-msvc)
set(CMAKE_C_COMPILER cl)
set(CMAKE_CXX_COMPILER cl)
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,8 @@
"darwin-x64": "codelldb-darwin-x64.vsix",
"darwin-arm64": "codelldb-darwin-arm64.vsix",
"win32-x64": "codelldb-win32-x64.vsix",
"win32-ia32": "codelldb-win32-x64.vsix"
"win32-ia32": "codelldb-win32-x64.vsix",
"win32-arm64": "codelldb-win32-arm64.vsix"
}
}
}
Expand Down