[Buildroot] [PATCH v4 03/11] package/llvm: enable AMDGPU
Valentin Korenblit
valentin.korenblit at smile.fr
Fri Mar 30 20:33:49 UTC 2018
Hello all,
On 30/03/2018 21:06, Thomas Petazzoni wrote:
> Hello,
>
> On Fri, 30 Mar 2018 20:08:28 +0200, Arnout Vandecappelle wrote:
>
>> Or maybe
>>
>> LLVM_TARGETS_TO_BUILD = $(HOST_LLVM_TARGET_ARCH)
>>
>> ifeq ($(BR2_PACKAGE_LLVM_AMDGPU),y)
>> LLVM_TARGETS_TO_BUILD += AMDGPU
>> endif
>>
>> LLVM_CONF_OPTS = -DLLVM_TARGETS_TO_BUILD=$(subst
>> $(space),;,$(LLVM_TARGETS_TO_BUILD))
>>
>>
>> Or is that too much GNUmake black magic?
I've just tested your suggestions, but finally we also need to build amdgpu target for host. The reason is that
llvm-config (host version installed in STAGING) will output only x86 when executing llvm-config --targets-built.
This is because it stores information related to the build where it comes from.
This fails when Mesa looks for amdgpu backend:
llvm_add_target() {
new_llvm_target=$1
driver_name=$2
if $LLVM_CONFIG --targets-built | grep -iqw $new_llvm_target ; then
llvm_add_component $new_llvm_target $driver_name
else
AC_MSG_ERROR([LLVM target '$new_llvm_target' not enabled in your LLVM build. Required by $driver_name.])
fi
}
> No, that's good.
>
> Thomas
Best regards,
Valentin
More information about the buildroot
mailing list