From 6390fbf9dde49b31b7269fcd160a73d514473c88 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Mon, 24 Sep 2018 15:50:13 +0300 Subject: [PATCH] Add `LLVM_EXPERIMENTAL_TARGETS` and default it to `WebAssembly` This provides feature-parity between Julia-built LLVM and BinaryBuilder-built LLVM, allowing us to vendor dylibs (such as `libclang`) to users through BinaryProvider without causing segfaults within Julia due to mismatched features. While the `WebAssembly` backend changes enough within the built LLVM to make it so that we cannot simply take `libclang` from a build that has WASM support and use it within the offcial Julia library, it appears that it does not change the codepaths that Julia itself uses enough to cause any issues (at least in the testing that we have done). In LLVM 8, the WASM backend is expected to be promoted out of experimental. --- deps/llvm.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deps/llvm.mk b/deps/llvm.mk index e2913f5a13249..b69425a0e82df 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -52,6 +52,7 @@ endif # LLVM_VER != svn # Figure out which targets to build LLVM_TARGETS := host;NVPTX;AMDGPU +LLVM_EXPERIMENTAL_TARGETS := WebAssembly LLVM_CFLAGS := LLVM_CXXFLAGS := @@ -64,7 +65,7 @@ LLVM_CFLAGS += $(CFLAGS) LLVM_CXXFLAGS += $(CXXFLAGS) LLVM_CPPFLAGS += $(CPPFLAGS) LLVM_LDFLAGS += $(LDFLAGS) -LLVM_CMAKE += -DLLVM_TARGETS_TO_BUILD:STRING="$(LLVM_TARGETS)" -DCMAKE_BUILD_TYPE="$(LLVM_CMAKE_BUILDTYPE)" +LLVM_CMAKE += -DLLVM_TARGETS_TO_BUILD:STRING="$(LLVM_TARGETS)" -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="$(LLVM_EXPERIMENTAL_TARGETS)" -DCMAKE_BUILD_TYPE="$(LLVM_CMAKE_BUILDTYPE)" LLVM_CMAKE += -DLLVM_ENABLE_ZLIB=OFF -DLLVM_ENABLE_LIBXML2=OFF ifeq ($(USE_POLLY_ACC),1) LLVM_CMAKE += -DPOLLY_ENABLE_GPGPU_CODEGEN=ON