Repository navigation
Commit 95771bc
committed
TEMPORARY: strip ONNX_API from libonnx function.h templates on win
<details><summary>Claude's draft</summary>
With the unvendoring ported to bld.bat, win-64 now configures and
generates code, then fails compiling onnxruntime_graph
(bert_defs.cc, contrib_defs.cc, diffusion_defs.cc):
onnx/defs/function.h(96): error C2491: 'onnx::FunctionBodyHelper::Const':
definition of dllimport function not allowed
libonnx's patch 0007 makes ONNX_API expand to __declspec(dllimport) for
consumers, and function.h puts ONNX_API on nine member function
templates defined in the header. MSVC forbids dllimport on a template
definition (the same reason patch 0008 already dropped it from
RegisterOpSetSchema). Non-template inline members and declaration-only
templates are fine, so only function.h is affected.
The real fix belongs in onnx-feedstock. Until libonnx carries it, strip
ONNX_API from those templates in the host env's copy of the header before
building. Revert this commit once a fixed libonnx is published.
Resume this Claude session:
```
cd /home/mark/git/feedstock
claude --resume 3cf41599-db98-4c6f-a67a-ee7dcacda8b4
```
</details>
Claude-Session: https://claude.ai/code/session_01Jxvsn2W6MfjGKXcabWVHNe1 parent 1eebb5d commit 95771bc
2 files changed
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments