Skip to content

Commit 4dd62ae

Browse files
committed
Add libjulia 1.6-dev
1 parent c20477e commit 4dd62ae

File tree

6 files changed

+148
-8
lines changed

6 files changed

+148
-8
lines changed

L/libjulia/common.jl

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,26 @@
33
using BinaryBuilder, Pkg.Types
44

55
# Collection of sources required to build Julia
6-
function build_julia(version)
6+
function build_julia(version; gitref = nothing)
77
name = "libjulia"
88

99
checksums = Dict(
1010
v"1.3.1" => "3d9037d281fb41ad67b443f42d8a8e400b016068d142d6fafce1952253ae93db",
1111
v"1.4.2" => "76a94e06e68fb99822e0876a37c2ed3873e9061e895ab826fd8c9fc7e2f52795",
1212
v"1.5.1" => "1f138205772eb1e565f1d7ccd6f237be8a4d18713a3466e3b8d3a6aad6483fd9",
1313
)
14-
sources = [
15-
ArchiveSource("https://github.com/JuliaLang/julia/releases/download/v$(version)/julia-$(version).tar.gz", checksums[version]),
16-
DirectorySource("./bundled"),
17-
]
14+
15+
if isnothing(gitref)
16+
sources = [
17+
ArchiveSource("https://github.com/JuliaLang/julia/releases/download/v$(version)/julia-$(version).tar.gz", checksums[version]),
18+
DirectorySource("./bundled"),
19+
]
20+
else
21+
sources = [
22+
GitSource("https://github.com/JuliaLang/julia.git", gitref),
23+
DirectorySource("./bundled"),
24+
]
25+
end
1826

1927
# Bash recipe for building across all platforms
2028
script = raw"""
@@ -77,8 +85,10 @@ function build_julia(version)
7785
LLVMLINK="-L${prefix}/lib -lLLVM-6.0"
7886
elif [[ "${version}" == 1.4.* ]]; then
7987
LLVMLINK="-L${prefix}/lib -lLLVM-8jl"
80-
else
88+
elif [[ "${version}" == 1.5.* ]]; then
8189
LLVMLINK="-L${prefix}/lib -lLLVM-9jl"
90+
else
91+
LLVMLINK="-L${prefix}/lib -lLLVM-11jl"
8292
fi
8393
fi
8494
@@ -167,7 +177,12 @@ function build_julia(version)
167177
rm -rf /workspace/srcdir/julia-1.5.1/deps/checksums/lapack-3.9.0.tgz
168178
169179
# compile libjulia but don't try to build a sysimage
170-
make USE_CROSS_FLISP=1 NO_GIT=1 LDFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" -j${nproc} VERBOSE=1 julia-ui-release
180+
if [[ "${version}" == 1.[0-5].* ]]; then
181+
MAKE_TARGET=julia-ui-release
182+
else
183+
MAKE_TARGET=julia-cli-release
184+
fi
185+
make USE_CROSS_FLISP=1 NO_GIT=1 LDFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" -j${nproc} VERBOSE=1 ${MAKE_TARGET}
171186
172187
# 'manually' install libraries and headers
173188
mkdir -p ${libdir}
@@ -246,7 +261,7 @@ function build_julia(version)
246261
push!(dependencies, Dependency(PackageSpec(name="LibGit2_jll", version=v"0.28.2")))
247262
elseif version.major == 1 && version.minor == 6
248263
push!(dependencies, Dependency(PackageSpec(name="OpenBLAS_jll", version=v"0.3.10")))
249-
push!(dependencies, Dependency(PackageSpec(name="libLLVM_jll", version=v"9.0.1")))
264+
push!(dependencies, Dependency(PackageSpec(name="LLVM_full_jll", version=v"11.0.0")))
250265
push!(dependencies, Dependency(PackageSpec(name="LibGit2_jll", version=v"1.0.1")))
251266
end
252267

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include("../common.jl")
2+
build_julia(v"1.6-dev"; gitref = "d474c98667db0bf4832e4eeb7beb0e8cfc8b7481")
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
From 30c32040d81ba909242b6e5786772efa94e8120f Mon Sep 17 00:00:00 2001
2+
From: Valentin Churavy <[email protected]>
3+
Date: Wed, 23 Sep 2020 16:48:49 -0400
4+
Subject: [PATCH] Allow flips to be built against system UTF8PROC
5+
6+
---
7+
src/flisp/Makefile | 12 ++++++++++--
8+
1 file changed, 10 insertions(+), 2 deletions(-)
9+
10+
diff --git a/src/flisp/Makefile b/src/flisp/Makefile
11+
index 2158e2a5b2..42c4e11ed4 100644
12+
--- a/src/flisp/Makefile
13+
+++ b/src/flisp/Makefile
14+
@@ -32,13 +32,21 @@ OBJS := $(SRCS:%.c=$(BUILDDIR)/%.o)
15+
DOBJS := $(SRCS:%.c=$(BUILDDIR)/%.dbg.obj)
16+
LLT_release := $(LLT_BUILDDIR)/libsupport.a
17+
LLT_debug := $(LLT_BUILDDIR)/libsupport-debug.a
18+
-LIBFILES_release := $(LLT_release) $(LIBUV) $(LIBUTF8PROC)
19+
-LIBFILES_debug := $(LLT_debug) $(LIBUV) $(LIBUTF8PROC)
20+
+LIBFILES_release := $(LLT_release) $(LIBUV)
21+
+LIBFILES_debug := $(LLT_debug) $(LIBUV)
22+
LIBS :=
23+
ifneq ($(OS),WINNT)
24+
LIBS += -lpthread
25+
endif
26+
27+
+ifeq ($(USE_SYSTEM_UTF8PROC),0)
28+
+LIBFILES_release += $(LIBUTF8PROC)
29+
+LIBFILES_debug += $(LIBUTF8PROC)
30+
+else
31+
+LIBS += $(LIBUTF8PROC)
32+
+endif
33+
+
34+
+
35+
FLAGS := -I$(LLTSRCDIR) $(JCFLAGS) $(HFILEDIRS:%=-I%) \
36+
-I$(LIBUV_INC) -I$(UTF8PROC_INC) -I$(build_includedir) $(LIBDIRS:%=-L%) \
37+
-DLIBRARY_EXPORTS -DUTF8PROC_EXPORTS
38+
--
39+
2.28.0
40+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 85eb6fe1d4dc2d98974c5d3e78b735e887b7b439 Mon Sep 17 00:00:00 2001
2+
From: Valentin Churavy <[email protected]>
3+
Date: Wed, 23 Sep 2020 16:59:34 -0400
4+
Subject: [PATCH] Use universal LIBUV_INC instead of build_includedir
5+
6+
---
7+
base/Makefile | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/base/Makefile b/base/Makefile
11+
index efcf835de7..13bb3ee53d 100644
12+
--- a/base/Makefile
13+
+++ b/base/Makefile
14+
@@ -42,7 +42,7 @@ $(BUILDDIR)/errno_h.jl:
15+
$(BUILDDIR)/file_constants.jl: $(SRCDIR)/../src/file_constants.h
16+
@$(call PRINT_PERL, $(CPP_STDOUT) -DJULIA $< | perl -nle 'print "$$1 0o$$2" if /^(\s*const\s+[A-z_]+\s+=)\s+(0[0-9]*)\s*$$/; print "$$1" if /^\s*(const\s+[A-z_]+\s+=\s+([1-9]|0x)[0-9A-z]*)\s*$$/' > $@)
17+
18+
-$(BUILDDIR)/uv_constants.jl: $(SRCDIR)/../src/uv_constants.h $(build_includedir)/uv/errno.h
19+
+$(BUILDDIR)/uv_constants.jl: $(SRCDIR)/../src/uv_constants.h $(LIBUV_INC)/uv/errno.h
20+
@$(call PRINT_PERL, $(CPP_STDOUT) "-I$(LIBUV_INC)" -DJULIA $< | tail -n 16 > $@)
21+
22+
$(BUILDDIR)/build_h.jl.phony:
23+
--
24+
2.28.0
25+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
From 242ff9a084fe790ac589c55045efc1d5c5f95f4b Mon Sep 17 00:00:00 2001
2+
From: Valentin Churavy <[email protected]>
3+
Date: Wed, 23 Sep 2020 18:28:01 -0400
4+
Subject: [PATCH] stage flisp.boot into host
5+
6+
---
7+
src/flisp/Makefile | 6 +++++-
8+
1 file changed, 5 insertions(+), 1 deletion(-)
9+
10+
diff --git a/src/flisp/Makefile b/src/flisp/Makefile
11+
index 42c4e11ed4..50566a0258 100644
12+
--- a/src/flisp/Makefile
13+
+++ b/src/flisp/Makefile
14+
@@ -115,9 +115,13 @@ $(BUILDDIR)/host/Makefile:
15+
@echo 'BUILDING_HOST_TOOLS=1' >> $@
16+
@echo 'include $(SRCDIR)/Makefile' >> $@
17+
18+
-$(BUILDDIR)/host/$(EXENAME): $(BUILDDIR)/host/Makefile
19+
+$(BUILDDIR)/host/$(EXENAME): $(BUILDDIR)/host/Makefile | ${BUILDDIR}/host/flisp.boot
20+
make -C $(BUILDDIR)/host $(EXENAME)
21+
22+
+
23+
+$(BUILDDIR)/host/flisp.boot: $(SRCDIR)/flisp.boot | $(BUILDDIR)/host/Makefile
24+
+ cp $< $@
25+
+
26+
ifneq ($(BUILDDIR),.)
27+
ifneq ($(BUILDDIR),$(SRCDIR))
28+
$(BUILDDIR)/flisp.boot: $(SRCDIR)/flisp.boot | $(BUILDDIR)
29+
--
30+
2.28.0
31+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From 956cf8fa2f07f43ffb0a91bd23741e83838f9e7a Mon Sep 17 00:00:00 2001
2+
From: Valentin Churavy <[email protected]>
3+
Date: Thu, 24 Sep 2020 09:41:49 -0400
4+
Subject: [PATCH] use BUILD_EXE for flisp
5+
6+
---
7+
src/Makefile | 4 ++--
8+
1 file changed, 2 insertions(+), 2 deletions(-)
9+
10+
diff --git a/src/Makefile b/src/Makefile
11+
index 578677b3e1..2852b0ac86 100644
12+
--- a/src/Makefile
13+
+++ b/src/Makefile
14+
@@ -139,8 +139,8 @@ FLISPDIR := $(BUILDDIR)/flisp/host
15+
else
16+
FLISPDIR := $(BUILDDIR)/flisp
17+
endif
18+
-FLISP_EXECUTABLE_debug := $(FLISPDIR)/flisp-debug$(EXE)
19+
-FLISP_EXECUTABLE_release := $(FLISPDIR)/flisp$(EXE)
20+
+FLISP_EXECUTABLE_debug := $(FLISPDIR)/flisp-debug$(BUILD_EXE)
21+
+FLISP_EXECUTABLE_release := $(FLISPDIR)/flisp$(BUILD_EXE)
22+
ifeq ($(OS),WINNT)
23+
FLISP_EXECUTABLE := $(FLISP_EXECUTABLE_release)
24+
else
25+
--
26+
2.28.0
27+

0 commit comments

Comments
 (0)