Skip to content

[wip] Apply all remaining LLVM_ABI annotations to build, tests, tools and benchmarks - #189946

Closed
mcbarton wants to merge 1 commit into
llvm:mainfrom
mcbarton:main_new
Closed

mcbarton wants to merge 1 commit into
llvm:mainfrom
mcbarton:main_new

Conversation

@mcbarton

@mcbarton mcbarton commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Towards #109483 , and does the first 2 of plan laid out #188587 (comment)

The purpose of this is to add all the remaining LLVM_ABI annotations such that all llvm tools, tests and benchmarks can be built using the LLVM shared library on Windows. As of putting in this PR all unit tests can build, but 3 tests fail. I'm unsure what to with these tests. Putting in this PR as it stands allows people to review the ci, and suggest how to proceed with dealing with the failed tests. I could skip 2 of them by having LLVM_ENABLE_PLUGINS=OFF for now. It is only set to ON in the workflow for now as one of the purposes of #109483 is to enable plugin support on Windows. That would still leave one failing test.

I'm aware this PR hits a large number of files, and can broken up into smaller PRs, once everyone is happy with the changes.

cc @nikic

@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown

⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.
Please turn off Keep my email addresses private setting in your account.
See LLVM Developer Policy and LLVM Discourse for more information.

Comment on lines +18 to +20
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
path: ${{ github.workspace }}/llvm

Check notice

Code scanning / zizmor

credential persistence through GitHub Actions artifacts Note

credential persistence through GitHub Actions artifacts
-DLLVM_BUILD_LLVM_DYLIB_VIS=On `
-DLLVM_LINK_LLVM_DYLIB=On `
-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
Error-On-Failure { cmake --build build --config RelWithDebInfo --parallel ${{ env.ncpus }} }

Check notice

Code scanning / zizmor

code injection via template expansion Note

code injection via template expansion
-DLLVM_BUILD_LLVM_DYLIB_VIS=On `
-DLLVM_LINK_LLVM_DYLIB=On `
-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
Error-On-Failure { cmake --build build --config RelWithDebInfo --parallel ${{ env.ncpus }} }

Check notice

Code scanning / zizmor

code injection via template expansion Note

code injection via template expansion
-DLLVM_LINK_LLVM_DYLIB=On `
-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
Error-On-Failure { cmake --build build --config RelWithDebInfo --parallel ${{ env.ncpus }} }
Error-On-Failure { cmake --build build --target check-llvm-unit --config RelWithDebInfo --parallel ${{ env.ncpus }} }

Check notice

Code scanning / zizmor

code injection via template expansion Note

code injection via template expansion
-DLLVM_BUILD_LLVM_DYLIB_VIS=On `
-DLLVM_LINK_LLVM_DYLIB=On `
-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
Error-On-Failure { cmake --build build --config RelWithDebInfo --parallel ${{ env.ncpus }} }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just realised I can remove the --parallel ${{ env.ncpus }} . It is there due to an earlier version of this ci where I defined the number of cpu cores. I will remove once I have review comments for elsewhere

Comment on lines +35 to +46
function Error-On-Failure {
param (
[Parameter(Mandatory)]
[ScriptBlock]$Command
)

& $Command

if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The purpose of this is to act in the same way as set -e on Linux. I didn't know the equivalent on Windows, since I am not primarily a Windows developer. This was created by ChatGPT for me a long time ago.

@nikic nikic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is not at all what I am looking for. And I'm growing tired of reiterating this, so please see the discussion on #109483 for details. The tl;dr is that all ABI annotations need to be present, not just whatever is necessary for your pet use case. And the ids workflow is necessary to enforce that going forward, not just a Windows dylib build.

There should be no use of LLVM_ABI_FOR_TEST in exported headers.

@mcbarton mcbarton closed this Apr 1, 2026
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.

3 participants