llvm: fix broken llvm-config-native for canExecute

Since a0b4b85bfa ("llvm: Avoid cross compiling if the build platform
can execute host binaries"), the flags to get a working
llvm-config-native are not used when the build platform can execute
host binaries, resulting in a broken llvm-config-native, and therefore
a broken mesa, but since build can execute host, we don't need a
separate llvm-config-native at all — we can just use the normal
llvm-config.

Fixes: a0b4b85bfa ("llvm: Avoid cross compiling if the build platform can execute host binaries")
This commit is contained in:
Alyssa Ross 2024-07-06 10:02:14 +02:00
parent 14b378d7b0
commit 29934c9408

View File

@ -417,9 +417,11 @@ stdenv.mkDerivation (rec {
+ optionalString (stdenv.isDarwin && enableSharedLibraries) ''
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
''
+ optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+ optionalString (stdenv.buildPlatform != stdenv.hostPlatform) (if stdenv.buildPlatform.canExecute stdenv.hostPlatform then ''
ln -s $dev/bin/llvm-config $dev/bin/llvm-config-native
'' else ''
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
'';
'');
inherit doCheck;