Commit ed6e2e2
authored
Qualcomm: expose PAL headers via header map so QNN runtime builds under Buck (pytorch#20321)
## Summary
The PAL support added the `pal/` sources and headers directly to the QNN
`runtime` target and resolved `#include <pal/...>` with a hardcoded
`-Ibackends/qualcomm/runtime/pal/include` preprocessor flag. That `-I`
path is resolved relative to the Buck project root, so it does not
resolve correctly across build roots and `#include
<pal/DynamicLoading.h>` / `<pal/Path.h>` fail to compile when building
the QNN runtime under Buck.
## Fix
Move the PAL sources and headers into a dedicated `pal` library and
expose the headers through a **header map** (a dict `exported_headers`
with an empty `header_namespace`) instead of an `-I` flag. `runtime`
picks it up via `exported_deps`, so dependents that include
`QnnImplementation.h` resolve `<pal/...>` too. This mirrors what the
CMake build already does with
`include_directories(runtime/pal/include)`, and does not disturb the
`runtime` target's namespaced `<executorch/...>` exported headers.
No functional change — Buck build wiring only.
Signed-off-by: Gasoonjia <gasoonjia@icloud.com>1 parent e2bc39b commit ed6e2e2
1 file changed
Lines changed: 24 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
38 | 61 | | |
39 | 62 | | |
40 | 63 | | |
| |||
43 | 66 | | |
44 | 67 | | |
45 | 68 | | |
46 | | - | |
47 | | - | |
48 | 69 | | |
49 | 70 | | |
50 | 71 | | |
| |||
60 | 81 | | |
61 | 82 | | |
62 | 83 | | |
63 | | - | |
64 | | - | |
65 | 84 | | |
66 | 85 | | |
67 | 86 | | |
| |||
70 | 89 | | |
71 | 90 | | |
72 | 91 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | 92 | | |
77 | 93 | | |
78 | 94 | | |
| |||
91 | 107 | | |
92 | 108 | | |
93 | 109 | | |
| 110 | + | |
94 | 111 | | |
95 | 112 | | |
96 | 113 | | |
| |||
0 commit comments