mesa: Use the llvm-config of spec['llvm'] for '+llvm' (#27235)
Fix builds on hosts where /usr/bin/llvm-config-* is found and provides an incompatible version: Ensure that the llvm-config of spec['llvm'] is used.
This commit is contained in:
parent
8c7fdadeba
commit
ada598668b
1 changed files with 10 additions and 0 deletions
|
@ -169,6 +169,16 @@ def meson_args(self):
|
||||||
args.append(opt_enable(num_frontends > 1, 'shared-glapi'))
|
args.append(opt_enable(num_frontends > 1, 'shared-glapi'))
|
||||||
|
|
||||||
if '+llvm' in spec:
|
if '+llvm' in spec:
|
||||||
|
# Fix builds on hosts where /usr/bin/llvm-config-* is found and provides an
|
||||||
|
# incompatible version. Ensure that the llvm-config of spec['llvm'] is used.
|
||||||
|
args.append('--native-file')
|
||||||
|
args.append('meson-native-config.ini')
|
||||||
|
mkdirp(self.build_directory)
|
||||||
|
with working_dir(self.build_directory):
|
||||||
|
with open('meson-native-config.ini', 'w') as native_config:
|
||||||
|
llvm_config = spec['llvm'].prefix.bin + '/llvm-config'
|
||||||
|
native_config.write('[binaries]\n')
|
||||||
|
native_config.write("llvm-config = '{0}'\n".format(llvm_config))
|
||||||
args.append('-Dllvm=enabled')
|
args.append('-Dllvm=enabled')
|
||||||
args.append(opt_enable(
|
args.append(opt_enable(
|
||||||
'+link_dylib' in spec['llvm'], 'shared-llvm'))
|
'+link_dylib' in spec['llvm'], 'shared-llvm'))
|
||||||
|
|
Loading…
Reference in a new issue