Skip to content

Commit 67e716c

Browse files
committed
Make lite version of Julia
1 parent 5010c13 commit 67e716c

File tree

7 files changed

+207
-177
lines changed

7 files changed

+207
-177
lines changed

Make.inc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ USE_INTEL_JITEVENTS ?= 0
5454
USEICC ?= 0
5555
USEIFC ?= 0
5656

57+
# Set to 1 to build a "lite" version of Julia
58+
BUILD_LITE ?= 0
59+
5760
ifeq ($(USE_MKL), 1)
5861
$(warning "The julia make variable USE_MKL has been renamed to USE_INTEL_MKL")
5962
USE_INTEL_MKL = 1
@@ -91,7 +94,11 @@ JULIA_COMMIT = $(JULIA_VERSION)
9194
endif
9295

9396
# Whether to use GPL libraries or not.
97+
ifeq ($(BUILD_LITE), 1)
98+
USE_GPL_LIBS ?= 0
99+
else
94100
USE_GPL_LIBS ?= 1
101+
endif
95102

96103
# Directories where said libraries get installed to
97104
prefix ?= $(abspath julia-$(JULIA_COMMIT))

base/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ ifeq ($(USE_GPL_LIBS), 1)
5454
@echo "const USE_GPL_LIBS = true" >> $@
5555
else
5656
@echo "const USE_GPL_LIBS = false" >> $@
57+
endif
58+
ifeq ($(BUILD_LITE), 1)
59+
@echo "const BUILD_LITE = true" >> $@
60+
else
61+
@echo "const BUILD_LITE = false" >> $@
5762
endif
5863
@echo "const libfftw_name = \"$(LIBFFTWNAME)\"" >> $@
5964
@echo "const libfftwf_name = \"$(LIBFFTWFNAME)\"" >> $@

base/constants.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,12 @@ const golden = φ
121121
for T in (MathConst, Rational, Integer, Number)
122122
^(::MathConst{:e}, x::T) = exp(x)
123123
end
124-
for T in (Range, BitArray, SparseMatrixCSC, StridedArray, AbstractArray)
124+
for T in (Range, BitArray, StridedArray, AbstractArray)
125125
.^(::MathConst{:e}, x::T) = exp(x)
126126
end
127+
if !BUILD_LITE
128+
.^(::MathConst{:e}, x::SparseMatrixCSC) = exp(x)
129+
end
127130
^(::MathConst{:e}, x::AbstractMatrix) = expm(x)
128131

129132
log(::MathConst{:e}) = 1 # use 1 to correctly promote expressions like log(x)/log(e)

base/deprecated.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,10 @@ end
374374
end
375375

376376
# 8898
377+
if !BUILD_LITE
377378
@deprecate precision(x::DateTime) eps(x)
378379
@deprecate precision(x::Date) eps(x)
380+
end
379381

380382
@deprecate names(t::DataType) fieldnames(t)
381383
@deprecate names(v) fieldnames(v)

0 commit comments

Comments
 (0)