# HG changeset patch # User John W. Eaton # Date 1604067118 14400 # Node ID 3588be46d1d91e73be6e82727338857ac123a0ad # Parent b19fb3ed330c029408d670a30538dcf2e9a28fec don't use LLVM_BUILD_LLVM_DYLIB or LLVM_LINK_LLVM_DYLIB for Windows builds * llvm.mk: The LLVM_BUILD_LLVM_DYLIB and LLVM_LINK_LLVM_DYLIB options are documented to be unsupported for Windows builds of LLVM. Without these options, the Windows build still creates an LLVM.dll file, but also creates .a files for the components. Update comments. diff -r b19fb3ed330c -r 3588be46d1d9 src/llvm.mk --- a/src/llvm.mk Fri Oct 30 10:06:00 2020 -0400 +++ b/src/llvm.mk Fri Oct 30 10:11:58 2020 -0400 @@ -62,6 +62,12 @@ -DLLVM_CCACHE_BUILD=On endif +## Unsupported for Windows targets? Without these options, the Windows +## build still creates an LLVM.dll file, but also creates .a files for +## the components. +## -DLLVM_BUILD_LLVM_DYLIB=On +## -DLLVM_LINK_LLVM_DYLIB=On + define $(PKG)_BUILD mkdir '$(1)/.build' cd '$(1)/.build' && 'cmake' .. \ @@ -69,8 +75,6 @@ $(CMAKE_CCACHE_FLAGS) \ -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ -DLLVM_BUILD_TOOLS=OFF \ - -DLLVM_BUILD_LLVM_DYLIB=On \ - -DLLVM_LINK_LLVM_DYLIB=On \ -DLLVM_VERSION_SUFFIX= \ $($(PKG)_SYSDEP_CMAKE_OPTIONS) \ -DCROSS_TOOLCHAIN_FLAGS_NATIVE="-DCMAKE_TOOLCHAIN_FILE='$(CMAKE_NATIVE_TOOLCHAIN_FILE)'" \ @@ -100,9 +104,11 @@ # create symlink for shared library so that llvm-config can find it cd '$(3)/$(HOST_BINDIR)' && ln -s LLVM.dll LLVM-$(word 1,$(subst ., ,$($(PKG)_VERSION))).$(word 2,$(subst ., ,$($(PKG)_VERSION))).dll - # install native llvm-config in HOST_BINDIR because it won't find the libs otherwise - # FIXME: Some of the configuration flags are hard coded into llvm-config with a patch. - # If the configuration flags are changed, the patch might have to be adapted. + # install native llvm-config in HOST_BINDIR because it won't + # find the libs otherwise + # FIXME: Some of the configuration flags are hard coded into + # llvm-config with a patch. If the configuration flags are changed, + # the patch might have to be adapted. $(INSTALL) -d '$(HOST_BINDIR)' $(INSTALL) -m755 '$(1)/.build/NATIVE/bin/llvm-config' '$(HOST_BINDIR)/$(MXE_TOOL_PREFIX)llvm-config' endef