Skip to content

Commit

Permalink
libclc: Pass -cl-no-stdinc to compiler and assembler
Browse files Browse the repository at this point in the history
libclc uses clang CLC preprocessor on .ll files, llvm/clang-13 started
including clc declarations by default (clang
cf3ef15a6ec5e5b45c6c54e8fbe3769255e815ce),
thus corrupting any .ll assembly files that are used by libclc.
Inclusion of the default declarations can be turned off using a
cmdline switch but that remains to be implemented in the libclc build
system. manually adding '-cl-no-stdinc' should work as a workaround.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
  • Loading branch information
kraj committed Jun 8, 2021
1 parent 79dc9a0 commit d692c03
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions recipes-devtools/clang/libclc_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ EXTRA_OECMAKE += " \
-DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \
-Dclc_comp_in:FILEPATH=${OECMAKE_SOURCEPATH}/cmake/CMakeCLCCompiler.cmake.in \
-Dll_comp_in:FILEPATH=${OECMAKE_SOURCEPATH}/cmake/CMakeLLAsmCompiler.cmake.in \
-DCMAKE_LLAsm_FLAGS=-cl-no-stdinc -DCMAKE_CLC_FLAGS=-cl-no-stdinc \
"

do_configure_prepend () {
Expand Down

0 comments on commit d692c03

Please sign in to comment.