|
1 | 1 | import Base.BinaryPlatforms: detect_libstdcxx_version, detect_cxxstring_abi
|
2 | 2 | using ObjectFile
|
3 |
| -using Binutils_jll: Binutils_jll |
4 | 3 |
|
5 | 4 | csl_warning(lib) = @lock AUDITOR_LOGGING_LOCK @warn(
|
6 | 5 | """
|
@@ -172,24 +171,15 @@ function cppfilt(symbol_names::Vector, platform::AbstractPlatform; strip_undersc
|
172 | 171 | seekstart(input)
|
173 | 172 |
|
174 | 173 | output = IOBuffer()
|
175 |
| - cmd = if Binutils_jll.is_available() |
176 |
| - ignorestatus(Binutils_jll.cxxfilt()) |
177 |
| - else |
178 |
| - Cmd(`/opt/bin/$(triplet(platform))/c++filt`; ignorestatus=true) |
179 |
| - end |
180 |
| - if strip_underscore |
181 |
| - cmd = `$(cmd) --strip-underscore` |
182 |
| - end |
183 |
| - |
184 |
| - if Binutils_jll.is_available() |
185 |
| - run(pipeline(cmd; stdin=input, stdout=output)) |
186 |
| - else |
187 |
| - mktempdir() do dir |
188 |
| - # No need to acquire a sandbox lock here because we use a (hopefully) |
189 |
| - # different temporary directory for each run. |
190 |
| - ur = preferred_runner()(dir; cwd="/workspace/", platform=platform) |
191 |
| - run_interactive(ur, cmd; stdin=input, stdout=output) |
| 174 | + mktempdir() do dir |
| 175 | + # No need to acquire a sandbox lock here because we use a (hopefully) |
| 176 | + # different temporary directory for each run. |
| 177 | + ur = preferred_runner()(dir; cwd="/workspace/", platform=platform) |
| 178 | + cmd = Cmd(`/opt/bin/$(triplet(ur.platform))/c++filt`; ignorestatus=true) |
| 179 | + if strip_underscore |
| 180 | + cmd = `$(cmd) --strip-underscore` |
192 | 181 | end
|
| 182 | + run_interactive(ur, cmd; stdin=input, stdout=output) |
193 | 183 | end
|
194 | 184 |
|
195 | 185 | return filter!(s -> !isempty(s), split(String(take!(output)), "\n"))
|
|
0 commit comments