@@ -197,8 +197,17 @@ HOST_LLVM_CONF_OPTS += \
# We need to activate LLVM_INCLUDE_TOOLS, otherwise it does not generate
# libLLVM.so
LLVM_CONF_OPTS += \
- -DLLVM_INCLUDE_TOOLS=ON \
+ -DLLVM_INCLUDE_TOOLS=ON
+
+# The llvm-symbolizer binary is used by the Compiler-RT Fuzzer
+# and AddressSanitizer tools for stack traces.
+ifeq ($(BR2_PACKAGE_COMPILER_RT),y)
+LLVM_CONF_OPTS += \
+ -DLLVM_BUILD_TOOLS=ON
+else
+LLVM_CONF_OPTS += \
-DLLVM_BUILD_TOOLS=OFF
+endif
# Compiler-rt not in the source tree.
# llvm runtime libraries are not in the source tree.