Qualcomm: expose PAL headers via header map so QNN runtime builds under Buck#20321
Conversation
…er Buck The PAL support added pal/ sources and headers directly to the qnn `runtime` target and resolved <pal/...> includes 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/...>` fails to compile. Move the PAL sources/headers into a dedicated `pal` library and expose the headers through a header map (dict `exported_headers` + empty `header_namespace`); `runtime` depends on it via `exported_deps`. The short <pal/...> include then resolves the same way the CMake build's `include_directories(runtime/pal/include)` does, without a hardcoded -I. Signed-off-by: Gasoonjia <gasoonjia@icloud.com>
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20321
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 2 Pending, 3 Unrelated FailuresAs of commit 8929a43 with merge base 218cc45 ( NEW FAILURES - The following jobs have failed:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
BROKEN TRUNK - The following jobs failed but was present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
|
Thanks @Gasoonjia for this |
Summary
The PAL support added the
pal/sources and headers directly to the QNNruntimetarget and resolved#include <pal/...>with a hardcoded-Ibackends/qualcomm/runtime/pal/includepreprocessor flag. That-Ipath 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
pallibrary and expose the headers through a header map (a dictexported_headerswith an emptyheader_namespace) instead of an-Iflag.runtimepicks it up viaexported_deps, so dependents that includeQnnImplementation.hresolve<pal/...>too. This mirrors what the CMake build already does withinclude_directories(runtime/pal/include), and does not disturb theruntimetarget's namespaced<executorch/...>exported headers.No functional change — Buck build wiring only.