microsoft/clc: Add -fgnu89-inline to clang args

Without this, inline functions don't have their body emitted in the
resulting LLVM IR, meaning the kernel will fail to link.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9085>
This commit is contained in:
Jesse Natalie 2021-02-16 10:13:51 -08:00 committed by Marge Bot
parent 1ef04f56c1
commit c1b8629b2c
1 changed files with 2 additions and 0 deletions

View File

@ -596,6 +596,8 @@ clc_to_spirv(const struct clc_compile_args *args,
"-fno-builtin-memset",
// LLVM's optimizations can produce code that the translator can't translate
"-O0",
// Ensure inline functions are actually emitted
"-fgnu89-inline"
};
// We assume there's appropriate defines for __OPENCL_VERSION__ and __IMAGE_SUPPORT__
// being provided by the caller here.