• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JuliaLang / julia / #38182

15 Aug 2025 03:55AM UTC coverage: 77.87% (-0.4%) from 78.28%
#38182

push

local

web-flow
🤖 [master] Bump the SparseArrays stdlib from 30201ab to bb5ecc0 (#59263)

Stdlib: SparseArrays
URL: https://github.com/JuliaSparse/SparseArrays.jl.git
Stdlib branch: main
Julia branch: master
Old commit: 30201ab
New commit: bb5ecc0
Julia version: 1.13.0-DEV
SparseArrays version: 1.13.0
Bump invoked by: @ViralBShah
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
https://github.com/JuliaSparse/SparseArrays.jl/compare/30201abcb...bb5ecc091

```
$ git log --oneline 30201ab..bb5ecc0
bb5ecc0 fast quadratic form for dense matrix, sparse vectors (#640)
34ece87 Extend 3-arg `dot` to generic `HermOrSym` sparse matrices (#643)
095b685 Exclude unintended complex symmetric sparse matrices from 3-arg `dot` (#642)
8049287 Fix signature for 2-arg matrix-matrix `dot` (#641)
cff971d Make cond(::SparseMatrix, 1 / Inf) discoverable from 2-norm error (#629)
```

Co-authored-by: ViralBShah <744411+ViralBShah@users.noreply.github.com>

48274 of 61993 relevant lines covered (77.87%)

9571166.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.24
/base/linking.jl
1
# This file is a part of Julia. License is MIT: https://julialang.org/license
2
module Linking
3

4
import Base: isdebugbuild
5
import Base.Libc: Libdl
6

7
# from LLD_jll
8
const lld_exe = Sys.iswindows() ? "lld.exe" : "lld"
9
const dsymutil_exe = Sys.iswindows() ? "dsymutil.exe" : "dsymutil"
10

11
if Sys.iswindows()
12
    const LIBPATH_env = "PATH"
13
    const LIBPATH_default = ""
14
    const pathsep = ';'
15
elseif Sys.isapple()
16
    const LIBPATH_env = "DYLD_FALLBACK_LIBRARY_PATH"
17
    const LIBPATH_default = "~/lib:/usr/local/lib:/lib:/usr/lib"
18
    const pathsep = ':'
19
else
20
    const LIBPATH_env = "LD_LIBRARY_PATH"
21
    const LIBPATH_default = ""
22
    const pathsep = ':'
23
end
24

25
function adjust_ENV!(env::Dict, PATH::String, LIBPATH::String, adjust_PATH::Bool, adjust_LIBPATH::Bool)
248✔
26
    if adjust_LIBPATH
248✔
27
        LIBPATH_base = get(env, LIBPATH_env, expanduser(LIBPATH_default))
248✔
28
        if !isempty(LIBPATH_base)
248✔
29
            env[LIBPATH_env] = string(LIBPATH, pathsep, LIBPATH_base)
248✔
30
        else
31
            env[LIBPATH_env] = LIBPATH
×
32
        end
33
    end
34
    if adjust_PATH && (LIBPATH_env != "PATH" || !adjust_LIBPATH)
248✔
35
        if !isempty(get(env, "PATH", ""))
494✔
36
            env["PATH"] = string(PATH, pathsep, env["PATH"])
248✔
37
        else
38
            env["PATH"] = PATH
×
39
        end
40
    end
41
    return env
248✔
42
end
43

44
const lld_path = OncePerProcess{String}() do
45
    # Prefer our own bundled lld, but if we don't have one, pick it up off of the PATH
46
    # If this is an in-tree build, `lld` will live in `tools`.  Otherwise, it'll be in `private_libexecdir`
47
    for bundled_lld_path in (joinpath(Sys.BINDIR, Base.PRIVATE_LIBEXECDIR, lld_exe),
25✔
48
                             joinpath(Sys.BINDIR, "..", "tools", lld_exe),
49
                             joinpath(Sys.BINDIR, lld_exe))
50
        if isfile(bundled_lld_path)
50✔
51
            return abspath(bundled_lld_path)
25✔
52
        end
53
    end
25✔
54
    return something(Sys.which(lld_exe), lld_exe)
×
55
end
56

57
const dsymutil_path = OncePerProcess{String}() do
58
    # Same as with lld but for dsymutil
59
    for bundled_dsymutil_path in (joinpath(Sys.BINDIR, Base.PRIVATE_LIBEXECDIR, dsymutil_exe),
25✔
60
                             joinpath(Sys.BINDIR, "..", "tools", dsymutil_exe),
61
                             joinpath(Sys.BINDIR, dsymutil_exe))
62
        if isfile(bundled_dsymutil_path)
50✔
63
            return abspath(bundled_dsymutil_path)
25✔
64
        end
65
    end
25✔
66
    return something(Sys.which(dsymutil_exe), dsymutil_exe)
×
67
end
68

69
PATH() = dirname(lld_path())
248✔
70

71
const LIBPATH = OncePerProcess{String}() do
72
    if Sys.iswindows()
25✔
73
        # On windows, the dynamic libraries (.dll) are in Sys.BINDIR ("usr\\bin")
74
        LIBPATH_list = [abspath(Sys.BINDIR, Base.LIBDIR, "julia"), Sys.BINDIR]
×
75
    else
76
        LIBPATH_list = [abspath(Sys.BINDIR, Base.LIBDIR, "julia"), abspath(Sys.BINDIR, Base.LIBDIR)]
49✔
77
    end
78
    return join(LIBPATH_list, pathsep)
25✔
79
end
80

81
function lld(; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true)
248✔
82
    env = adjust_ENV!(copy(ENV), PATH(), LIBPATH(), adjust_PATH, adjust_LIBPATH)
124✔
83
    return Cmd(Cmd([lld_path()]); env)
124✔
84
end
85

86
function dsymutil(; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true)
253✔
87
    env = adjust_ENV!(copy(ENV), PATH(), LIBPATH(), adjust_PATH, adjust_LIBPATH)
124✔
88
    return Cmd(Cmd([dsymutil_path()]); env)
124✔
89
end
90

91
function ld()
124✔
92
    default_args = ``
124✔
93
    @static if Sys.iswindows()
94
        # LLD supports mingw style linking
95
        flavor = "gnu"
96
        m = Sys.ARCH == :x86_64 ? "i386pep" : "i386pe"
97
        default_args = `-m $m -Bdynamic --enable-auto-image-base --allow-multiple-definition --disable-auto-import --disable-runtime-pseudo-reloc`
98
    elseif Sys.isapple()
99
        flavor = "darwin"
124✔
100
        arch = Sys.ARCH == :aarch64 ? :arm64 : Sys.ARCH
124✔
101
        default_args = `-arch $arch -undefined dynamic_lookup -platform_version macos $(Base.MACOS_PRODUCT_VERSION) $(Base.MACOS_PLATFORM_VERSION)`
124✔
102
    else
103
        flavor = "gnu"
104
    end
105

106
    `$(lld()) -flavor $flavor $default_args`
124✔
107
end
108

109
const WHOLE_ARCHIVE = if Sys.isapple()
110
    "-all_load"
111
else
112
    "--whole-archive"
113
end
114

115
const NO_WHOLE_ARCHIVE = if Sys.isapple()
116
    ""
117
else
118
    "--no-whole-archive"
119
end
120

121
const SHARED = if Sys.isapple()
122
    "-dylib"
123
else
124
    "-shared"
125
end
126

127
libdir() = abspath(Sys.BINDIR, Base.LIBDIR)
124✔
128
private_libdir() = abspath(Sys.BINDIR, Base.PRIVATE_LIBDIR)
124✔
129
if Sys.iswindows()
130
    shlibdir() = Sys.BINDIR
×
131
else
132
    shlibdir() = libdir()
124✔
133
end
134

135
verbose_linking() = something(Base.get_bool_env("JULIA_VERBOSE_LINKING", false), false)
247✔
136

137
function link_image_cmd(path, out)
124✔
138
    PRIVATE_LIBDIR = "-L$(private_libdir())"
124✔
139
    SHLIBDIR = "-L$(shlibdir())"
124✔
140
    LIBS = isdebugbuild() ? ("-ljulia-debug", "-ljulia-internal-debug") :
248✔
141
                        ("-ljulia", "-ljulia-internal")
142
    @static if Sys.iswindows()
143
        LIBS = (LIBS..., "-lopenlibm", "-lgcc_s", "-lgcc", "-lmsvcrt")
144
        if isdebugbuild()
145
            LIBS = (LIBS..., "-lssp")
146
            if isfile(joinpath(private_libdir(), "libmingwex.a"))
147
                # In MinGW 11, the ssp implementation was moved from libssp to
148
                # libmingwex with ssp only being a stub. See #59020.
149
                LIBS = (LIBS..., "-lmingwex", "-lkernel32")
150
            end
151
        end
152
    end
153

154
    V = verbose_linking() ? "--verbose" : ""
247✔
155
    `$(ld()) $V $SHARED -o $out $WHOLE_ARCHIVE $path $NO_WHOLE_ARCHIVE $PRIVATE_LIBDIR $SHLIBDIR $LIBS`
124✔
156
end
157

158
function link_image(path, out, internal_stderr::IO=stderr, internal_stdout::IO=stdout)
2✔
159
    run(link_image_cmd(path, out), Base.DevNull(), internal_stderr, internal_stdout)
262✔
160
end
161

162
end # module Linking
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc