mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 13:38:06 +02:00
clc: find opencl headers from the installed llvm/clang location
A number of people report the headers not being found when running
intel-clc. I've run into the same issue but only on the most recent
Ubuntu version.
Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30711>
(cherry picked from commit 0f6fa4679d)
This commit is contained in:
parent
5daed0f454
commit
db3da0d302
2 changed files with 7 additions and 1 deletions
|
|
@ -5324,7 +5324,7 @@
|
||||||
"description": "clc: find opencl headers from the installed llvm/clang location",
|
"description": "clc: find opencl headers from the installed llvm/clang location",
|
||||||
"nominated": false,
|
"nominated": false,
|
||||||
"nomination_type": 3,
|
"nomination_type": 3,
|
||||||
"resolution": 4,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": null,
|
"because_sha": null,
|
||||||
"notes": null
|
"notes": null
|
||||||
|
|
|
||||||
|
|
@ -906,6 +906,12 @@ clc_compile_to_llvm_module(LLVMContext &llvm_ctx,
|
||||||
c->getHeaderSearchOpts().AddPath(clang_res_path.string(),
|
c->getHeaderSearchOpts().AddPath(clang_res_path.string(),
|
||||||
clang::frontend::Angled,
|
clang::frontend::Angled,
|
||||||
false, false);
|
false, false);
|
||||||
|
|
||||||
|
auto clang_install_res_path =
|
||||||
|
fs::path(LLVM_LIB_DIR) / "clang" / std::to_string(LLVM_VERSION_MAJOR) / "include";
|
||||||
|
c->getHeaderSearchOpts().AddPath(clang_install_res_path.string(),
|
||||||
|
clang::frontend::Angled,
|
||||||
|
false, false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Enable/Disable optional OpenCL C features. Some can be toggled via `OpenCLExtensionsAsWritten`
|
// Enable/Disable optional OpenCL C features. Some can be toggled via `OpenCLExtensionsAsWritten`
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue