Commit 032361a
authored
chore(example): add nvvm library path to LD_LIBRARY_PATH and add back the
When linking `libnvvm.so.4` into `librustc_codegen_nvvm.so` shared
library via the `cust_raw` package, we specified the following
parameters in the `build.rs`:
- cargo::rustc-link-search=native=xxx
- cargo::rustc-link-lib=dylib=nvvm
According to the [Cargo documentation](https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-search),
the path we added to the `rustc-link-search` parameter is not further
populated to the `LD_LIBRARY_PATH` for search by the transitive
dependencies.
> These paths are also added to the dynamic library search path
> environment variable if they are within the OUT_DIR.
The behavior is intended to be limited to the OUT_DIR so the
`libnvvm.so.4`, which lives as a part of the CUDA SDK, is excluded.
Therefore, we must add it to the LD_LIBRARY_PATH manually in our
container build stage.add example in CI (#190)1 parent 295459d commit 032361a
File tree
5 files changed
+15
-3
lines changed- .github/workflows
- container
- rockylinux9-cuda12
- ubuntu22-cuda11
- ubuntu22-cuda12
- ubuntu24-cuda12
5 files changed
+15
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
0 commit comments