Closed deadly-platypus closed 3 years ago
Hey @deadly-platypus, I have a fix on devel
branch for this problem. Could you try it out?
The fix cares about the -Xclang
specifically, but if you are using any other Clang specific flag, that might be missing. Let me know if your build needs other flag support.
It works for what we need, thanks!
Closing it, the fix will be released as 3.0.14
.
Describe the bug When building with Clang, if you want to run a custom LLVM pass,
-Xclang -load -Xclang path/to/LLVM/pass.so
must be added to the Clang invocation. Bear seems to miss the-load
flag when building the Linux kernelTo Reproduce Steps to reproduce the behavior:
LLVMHello.so
make ARCH=arm64 CC=clang HOSTCC=clang CROSS_COMPILE=aarch64-linux-gnu- LLVM=1 O=build KBUILD_CFLAGS="-Xclang -load -Xclang /path/to/LLVMHello.so" defconfig
bear -- make ARCH=arm64 CC=clang HOSTCC=clang CROSS_COMPILE=aarch64-linux-gnu- LLVM=1 O=build KBUILD_CFLAGS="-Xclang -load -Xclang /path/to/LLVMHello.so" -i
Expected behavior
compile_commands.json
contains build arguments-Xclang
,-load
,-Xclang
,/path/to/LLVMHello.so
Actual behavior
compile_commands.json
contains build arguments-Xclang
,-Xclang
,/path/to/LLVMHello.so
Environment:
Additional context