package/clang: link libclang against libLLVM.so
authorValentin Korenblit <valentin.korenblit@smile.fr>
Fri, 11 May 2018 11:47:52 +0000 (13:47 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Fri, 11 May 2018 21:22:01 +0000 (23:22 +0200)
libclang.so is statically linking against all LLVM static libraries
instead of linking dynamically against libLLVM.so.

This patch fixes this problem by setting LLVM_LINK_LLVM_DYLIB to ON.

Signed-off-by: Valentin Korenblit <valentin.korenblit@smile.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/clang/clang.mk

index 8d86c5edda9d2147844db490b696bb13bbcd6b19..14d6441c9a28a54f06cd5353d80cdc3af33c9b87 100644 (file)
@@ -85,5 +85,9 @@ define HOST_CLANG_INSTALL_CLANG_TBLGEN
 endef
 HOST_CLANG_POST_INSTALL_HOOKS = HOST_CLANG_INSTALL_CLANG_TBLGEN
 
+# This option must be enabled to link libclang dynamically against libLLVM.so
+HOST_CLANG_CONF_OPTS += -DLLVM_LINK_LLVM_DYLIB=ON
+CLANG_CONF_OPTS += -DLLVM_LINK_LLVM_DYLIB=ON
+
 $(eval $(cmake-package))
 $(eval $(host-cmake-package))