Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contrib/juliac/juliac-buildscript.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Core.Compiler._verify_trim_world_age[] = Base.get_world_counter()

# Initialize some things not usually initialized when output is requested
Sys.__init__()
Base.reinit_stdio()
Base.init_depot_path()
Base.init_load_path()
Base.init_active_project()
Expand Down
19 changes: 19 additions & 0 deletions contrib/juliac/juliac-trim-base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,23 @@ end
end
end
show_type_name(io::IO, tn::Core.TypeName) = print(io, tn.name)
# this function is not `--trim`-compatible if it resolves to a Varargs{...} specialization
# and since it only has 1-argument methods this happens too often by default (just 2-3 args)
setfield!(typeof(throw_eachindex_mismatch_indices).name, :max_args, Int32(5), :monotonic)
end
@eval Base.Sys begin
__init_build() = nothing # VersionNumber parsing is not supported yet
end
# Used for LinearAlgebre ldiv with SVD
for s in [:searchsortedfirst, :searchsortedlast, :searchsorted]
@eval Base.Sort begin
# identical to existing Base def. but specializes on `lt` / `by`
$s(v::AbstractVector, x, o::Ordering) = $s(v,x,firstindex(v),lastindex(v),o)
$s(v::AbstractVector, x;
lt::T=isless, by::F=identity, rev::Union{Bool,Nothing}=nothing, order::Ordering=Forward) where {T,F} =
$s(v,x,ord(lt,by,rev,order))
end
end
@eval Base.GMP begin
function __init__() # VersionNumber parsing is not supported yet
try
Expand Down Expand Up @@ -109,3 +122,9 @@ end
end
end
end

@eval Base.CoreLogging begin
# Disable logging (TypedCallable is required to support the existing dynamic
# logger interface, but it's not implemented yet)
@inline current_logger_for_env(std_level::LogLevel, group, _module) = nothing
end