Repository navigation
Commit 892f9e6
authored
[interop] Ship resource-dir Clang headers for self-contained install (compiler-research#33)
This is the second part of the patch that ships the required runtime
clang headers. With this change, a build/install of cppjit is
self-contained and with the LLVM that is statically linked into
libClangCppInterOp.so, we drop the LLVM dependency on a target
machine. The wheels build PR will exercise this on clean images
without LLVM.
The bundle is produced by the CMake install rules from the LLVM used at build
time, so it stays identical to the headers libClangCppInterOp was compiled against
under every install channel (pip, conda recipes, distro tooling, bare cmake --install)
and for development builds against any provided LLVM_DIR. Only include/ ships,
the JIT reads nothing else from a resource directory. This adds ~0.8 MB to the wheel
(the headers compress well) and 8 MB to the installed package on-disk.
Setups without the bundled headers such as raw build trees, or distributions that
strip vendored copies, fall back to a single Cpp::DetectResourceDir("clang-<major>") probe and bare clang detection at CppInterOp's interpreter creation time.1 parent c8165cb commit 892f9e6
2 files changed
Lines changed: 33 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| |||
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
178 | 191 | | |
179 | 192 | | |
180 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
97 | | - | |
98 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
99 | 109 | | |
100 | 110 | | |
101 | 111 | | |
| |||
109 | 119 | | |
110 | 120 | | |
111 | 121 | | |
112 | | - | |
| 122 | + | |
| 123 | + | |
113 | 124 | | |
114 | 125 | | |
115 | 126 | | |
| |||
119 | 130 | | |
120 | 131 | | |
121 | 132 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
126 | 138 | | |
127 | 139 | | |
128 | 140 | | |
| |||
219 | 231 | | |
220 | 232 | | |
221 | 233 | | |
222 | | - | |
| 234 | + | |
223 | 235 | | |
224 | 236 | | |
225 | 237 | | |
| |||
0 commit comments