KhronosGroup / KhronosGroup/OpenCL-ICD-Loader
Broken static builds on Windows
- Dominant language
- C
- Stars
- 304
- Forks
- 171
- Avg merge
- 11h 30m
- Merged PRs (30d)
- 1
Description
As previously discussed with some of the vendors, static builds on Windows haven't been working for some time. There's a lengthy disclaimer on why one wouldn't want to do this, but DLL handling is tedious enough that in controlled/development environments one may get away with it.
Some of the changes around ICD loading on Windows (summoning @jenatali) neatly reorganized things to headers/sources, but without the overhead of creating export headers and decorating functions when building a static library, one symbol ends up missing and the loader will not link. (Symbol export happens on a case-by-case basis based on usage. With multiple TUs, the compiler may not see the use of a symbol rendering it absent from the object file of the TU.)
Once the CI/CD changes make it into the repo, #226, I'd propose adding [this](https://github.com/StreamHPC/OpenCL-ICD-Loader/commit/c0aa73191b38d761574835d641291eb699f152c6) commit on top as a hotfix. It turns the Windows-specific parts of the loader into header-only, bringing function definitions closer to the location of use. This allows omission of generating an export header.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the CI/CD changes in #226 and the Windows-specific loader headers and sources described in the issue. Compare the proposed commit c0aa73191b38d761574835d641291eb699f152c6, then verify that a Windows static build links successfully without a missing loader symbol.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100