Skip to content

Commit 133704b

Browse files
authored
v.pref: improve musl detection; fixes __atomic_thread_fence for all musl nixes (fix #26449) (#26460)
1 parent 4b01fda commit 133704b

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

‎vlib/v/pref/pref.v‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -273,13 +273,8 @@ pub fn parse_args(known_external_commands []string, args []string) (&Preferences
273273
fn detect_musl(mut res Preferences) {
274274
res.is_glibc = true
275275
res.is_musl = false
276-
if os.exists('/etc/alpine-release') {
277-
res.is_musl = true
278-
res.is_glibc = false
279-
return
280-
}
281-
my_libs := os.walk_ext('/proc/self/map_files/', '').map(os.real_path(it))
282-
if my_libs.any(it.contains('musl')) {
276+
musl := os.execute('ldd --version').output.contains('musl')
277+
if musl {
283278
res.is_musl = true
284279
res.is_glibc = false
285280
}

0 commit comments

Comments
 (0)