Skip to content

USE_LLVM_SHLIB := 0 not statically linking llvm on Linux, julia 1.2.0-rc2 #32665

Closed
@Orbots

Description

@Orbots

CentOS 6 with gcc 6.4.0 building from:
https://github.com/JuliaLang/julia/archive/v1.2.0-rc2.zip

I had to employ this patch to get LLVM statically linked into libjulia.so and avoid a dependency on libLLVM-6.0.so

--- src/Makefile	2019-07-08 12:42:16.000000000 -0700
+++ src/Makefile	2019-07-23 15:49:49.556932000 -0700
@@ -96,7 +96,7 @@
 #       https://github.com/JuliaLang/julia/issues/29981
 else
 ifneq ($$(USE_LLVM_SHLIB),1)
-LLVMLINK += $$(shell $$(LLVM_CONFIG_HOST) --ldflags) $$(shell $$(LLVM_CONFIG_HOST) --libs $$(LLVM_LIBS)) $$(shell $$(LLVM_CONFIG_HOST) --ldflags) $$(shell $$(LLVM_CONFIG_HOST) --system-libs 2> /dev/null)
+LLVMLINK += $$(shell $$(LLVM_CONFIG_HOST) --ldflags --libs --link-static --system-libs) 
 else
 LLVMLINK += $$(shell $$(LLVM_CONFIG_HOST) --ldflags) -lLLVM
 endif
endef

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions