mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 05:33:23 +00:00
67 lines
2.2 KiB
Diff
67 lines
2.2 KiB
Diff
diff --git a/meson.build b/meson.build
|
|
index 172c64a7c70..05961e56926 100644
|
|
--- a/meson.build
|
|
+++ b/meson.build
|
|
@@ -1900,7 +1900,7 @@ endif
|
|
|
|
dep_clang = null_dep
|
|
if with_clc
|
|
- llvm_libdir = dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir')
|
|
+ llvm_libdir = get_option('clang-libdir')
|
|
|
|
dep_clang = cpp.find_library('clang-cpp', dirs : llvm_libdir, required : false)
|
|
|
|
diff --git a/meson_options.txt b/meson_options.txt
|
|
index 6f307018815..ab84eb1006c 100644
|
|
--- a/meson_options.txt
|
|
+++ b/meson_options.txt
|
|
@@ -18,6 +18,12 @@
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
# SOFTWARE.
|
|
|
|
+option(
|
|
+ 'clang-libdir',
|
|
+ type : 'string',
|
|
+ value : '',
|
|
+ description : 'Locations to search for clang libraries.'
|
|
+)
|
|
option(
|
|
'platforms',
|
|
type : 'array',
|
|
diff --git a/src/gallium/targets/opencl/meson.build b/src/gallium/targets/opencl/meson.build
|
|
index db3586bd7fb..4d914206d21 100644
|
|
--- a/src/gallium/targets/opencl/meson.build
|
|
+++ b/src/gallium/targets/opencl/meson.build
|
|
@@ -39,7 +39,8 @@ if dep_llvm.version().version_compare('>=10.0.0')
|
|
polly_isl_dep = cpp.find_library('PollyISL', dirs : llvm_libdir, required : false)
|
|
endif
|
|
|
|
-dep_clang = cpp.find_library('clang-cpp', dirs : llvm_libdir, required : false)
|
|
+clang_libdir = get_option('clang-libdir')
|
|
+dep_clang = cpp.find_library('clang-cpp', dirs : clang_libdir, required : false)
|
|
|
|
# meson will return clang-cpp from system dirs if it's not found in llvm_libdir
|
|
linker_rpath_arg = '-Wl,--rpath=@0@'.format(llvm_libdir)
|
|
@@ -123,7 +124,7 @@ if with_opencl_icd
|
|
configuration : _config,
|
|
input : 'mesa.icd.in',
|
|
output : 'mesa.icd',
|
|
- install : true,
|
|
+ install : false,
|
|
install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'),
|
|
)
|
|
|
|
diff --git a/src/gallium/targets/rusticl/meson.build b/src/gallium/targets/rusticl/meson.build
|
|
index a968dee52db..69475cf3133 100644
|
|
--- a/src/gallium/targets/rusticl/meson.build
|
|
+++ b/src/gallium/targets/rusticl/meson.build
|
|
@@ -58,7 +58,7 @@ configure_file(
|
|
configuration : _config,
|
|
input : 'rusticl.icd.in',
|
|
output : 'rusticl.icd',
|
|
- install : true,
|
|
+ install : false,
|
|
install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'),
|
|
)
|
|
|