Commit 9a2ff4b
committed
rules: cuda, hip and sycl gain the flag pass-through ascendc already had
`mcpp.tools.island::force_include_flags` returns the flags that make a
compiler read the generated boundary header before the island's first line,
and three of the four device rules had no way to deliver them. Measured on
`examples/09-heterogeneous/cuda`: the island is compiled by nvcc, or by
clang in CUDA mode, on a command line the rule assembles -- a driver mcpp
did not invoke, which inherits nothing from `mcpp::cflag` or
`mcpp::cxxflag`.
The project-wide channels are not merely too wide for the job, they are
wrong for it. `cxxflag` forces the header into every C++ translation unit,
including the seam `src/app.cppm`, and a module interface unit must begin
with `export module` -- declarations ahead of that line are ill-formed.
`mcpp.rules.ascendc` already had `options::flags`, appended last. The other
three now carry the same field with the same position and the same
pass-through-unexamined contract, because one rule with it and three
without is the shape where a project's build program works for one backend
and not the next -- which is what a seam exists to prevent.
Verified end to end on this host: the cuda example's island compiles with
`-include .../app.kernels.h` on its own command line, and the artifact runs
on an RTX 4080.1 parent bf81b35 commit 9a2ff4b
3 files changed
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
100 | 111 | | |
101 | 112 | | |
102 | 113 | | |
| |||
728 | 739 | | |
729 | 740 | | |
730 | 741 | | |
| 742 | + | |
731 | 743 | | |
732 | 744 | | |
733 | 745 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
72 | 83 | | |
73 | 84 | | |
74 | 85 | | |
| |||
420 | 431 | | |
421 | 432 | | |
422 | 433 | | |
| 434 | + | |
423 | 435 | | |
424 | 436 | | |
425 | 437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
101 | 112 | | |
102 | 113 | | |
103 | 114 | | |
| |||
483 | 494 | | |
484 | 495 | | |
485 | 496 | | |
| 497 | + | |
486 | 498 | | |
487 | 499 | | |
488 | 500 | | |
| |||
0 commit comments