Skip to content

Commit

Permalink
Add LLVM_EXPERIMENTAL_TARGETS and default it to WebAssembly
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
staticfloat committed Sep 24, 2018
1 parent 6354405 commit 6390fbf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deps/llvm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 :=
Expand All @@ -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
Expand Down

0 comments on commit 6390fbf

Please sign in to comment.