From nobody Mon Dec 08 01:51:05 2025 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dPlM64M7gz6Jh30 for ; Mon, 08 Dec 2025 01:51:14 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dPlM60hC7z3NV6 for ; Mon, 08 Dec 2025 01:51:14 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-b79f8f7ea43so692950966b.2 for ; Sun, 07 Dec 2025 17:51:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765158668; x=1765763468; darn=freebsd.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:date:from:from:to:cc:subject:date :message-id:reply-to; bh=BU5naiNu734PHIRIf0/CeeXZ4gbOcGfPGUoWZjjCShk=; b=bwMhPrUJgJnEM0utrn8865Tq2uRlXJ1xqEYG4zlcn2ED0wGXQkRKPpODIfKqpYC6Wb KAjet75cqrH8YaXe9x8n/LnYE8yj73osWs4Ias1AsCC4SJZe3fH+QgmjXNgnf0pTgycp ravvtPKFUxZa+TwKKdfXSUU8cknW/wIkToS2PDd0pLivGQCw7PkXi+7WUz0UOzMf7sg4 p5Y83WdlAXPhl6JvkewtdhYR1/mJ5broh1H/mWQRokjXkpC5YR2XGmE8WuREo4x2cSKe 99HJ+SQee1Oqxu1idmazMyOrcVbTAalaR1CWFfs08NN+W3bAmk+z0rUfpF5tviyYauy2 r8XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765158668; x=1765763468; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:date:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=BU5naiNu734PHIRIf0/CeeXZ4gbOcGfPGUoWZjjCShk=; b=SYtOyTG5x1qpL2w+G8sSMi8RTLDJWGUrUgX/ZD2EnPoOiBS4WM80iEHZNGT2dZyERb M7QUtLTPzAEtmuqBlZUm2KMOAHaR8ZLmwgnxFbbwcOglj0ajzfPr6Hrm7B4OUa4QFXyA hcOghAKF2jgqETbDMO3JHrZWa4r45GhZBsJ3FCno6g9GEtRMXxMoZj1lzVSlZRaacsUA 3y5vBsJ1HC1lww3dYl3GTwJP20bn3IyKRud27GaBPY+5Pgi8Fpfy1b+8pb9nNg0UZ9ss 0qmhwHIci5jkI/ys7okfzuO9uZ2v0hXlj9EcAMhU5oq/c78nwscPpdExpwFkN1olZMEy E9GQ== X-Forwarded-Encrypted: i=1; AJvYcCX/V4M5pco7GjzEXcQ6I7dTwdOh3yoe6YPW4tUYweOcd3sGWsoMhA94a0PkcMBHrgZZPh6eoQEThrBQa1+XYVE=@freebsd.org X-Gm-Message-State: AOJu0YxRjCAaaDXbsbhiAeBWyakSLDNVYXwaBzUj0VqI+11pulA5bE+w SB5VqzsV9CdYvvLnwdtX0DfnVKX3JnKtIi8wOOt14GT+Vu9A8dfxViUQfiMdGiT4 X-Gm-Gg: ASbGncvfJekSMkpZqx65nH3loV7Q2c9pvi3JoJYfIzKgTOEeC1lpmCVIF6Jt5Vdch1R 4s+zqylnSdE+B2Ot2ZlL5b4tSTSz7lOPE6kFAMSq+z4MLIO5d3Y06MT6LVJiS/kfMTo3g+CPqtZ Z/7A2Se7nuozvkdz4DNZYjBhiQqyOFDLo85jvA9sAcF79vupsFWl4bU9ZXHPyR51DIKyZQm640N 047bDcRAuZaSsUCSh3kk5Qs0WuAl8GUwugyatBf0BD2Y+SbbIZ/ltxQnJHQgLvSFdCVWrF1EoBj QcSyQ5hiN/z1j0icb5kU+CEffdlfJH2w+eRqiwX2GBdyr232FZHxxPan79Vt+PFXuvaDdKL02oA Fzz2zwPaP5X78oMSIRg0zrps+zPgOAcwaYxQ5EQl9q2nkrxDqCXGe1Hj9gTJITyT29SYq970oV4 bbV/e4QVcQ0ZtyqA== X-Google-Smtp-Source: AGHT+IEgqMHR2nmJyTenffMstkkzeeRMgMDWdvs0brNloaEA3lmELhw0IigYsAjYWQcQoNkawnoZfQ== X-Received: by 2002:a17:907:7e85:b0:b76:bcf5:a388 with SMTP id a640c23a62f3a-b7a247fc041mr681247566b.50.1765158667438; Sun, 07 Dec 2025 17:51:07 -0800 (PST) Received: from rimwks.local ([2001:470:1f1b:4dc:f489:3de4:6515:f056]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b79f4975c56sm950566466b.33.2025.12.07.17.51.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Dec 2025 17:51:06 -0800 (PST) From: Rozhuk Ivan X-Google-Original-From: Rozhuk Ivan Date: Mon, 8 Dec 2025 03:51:05 +0200 To: Konstantin Belousov Cc: Mateusz Guzik , Warner Losh , Mark Millard , FreeBSD Current , FreeBSD-STABLE Mailing List , brooks@FreeBSD.org Subject: Re: performance regressions in 15.0 Message-ID: <20251208035105.2313075d@rimwks.local> In-Reply-To: References: <18FB2858-5CBB-4B7A-8089-224A58C6A160@yahoo.com> X-Mailer: Claws Mail 4.3.1 (GTK 3.24.51; amd64-portbld-freebsd14.3) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dPlM60hC7z3NV6 On Mon, 8 Dec 2025 02:15:33 +0200 Konstantin Belousov wrote: > Next, the change of llvm components to dynamically link with the llvm > libs is how upstream does it. Not to mention, that this way to use > clang+lld saves both disk space (not very important) and memory (much > more important). It waste time and energy = money waster, "multiply CO2 production". And there is nothing good to user to pay this price. I have: # pkg version -vI | grep llvm libclc-llvm15-15.0.7 = up-to-date with index llvm15-15.0.7_10 = up-to-date with index llvm17-17.0.6_8 = up-to-date with index llvm18-18.1.8_2 = up-to-date with index llvm19-19.1.7_1 = up-to-date with index there is no any crappy libprivateclang.so/libprivatellvm.so shared libs: # ldd /usr/local/llvm19/bin/clang-19 /usr/local/llvm19/bin/clang-19: libthr.so.3 => /lib/libthr.so.3 (0x801063000) libclang-cpp.so.19.1 => /usr/local/llvm19/bin/../lib/libclang-cpp.so.19.1 (0x801200000) libLLVM.so.19.1 => /usr/local/llvm19/bin/../lib/libLLVM.so.19.1 (0x805c00000) libc++.so.1 => /lib/libc++.so.1 (0x801092000) libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x80119b000) libm.so.5 => /lib/libm.so.5 (0x8011bd000) libc.so.7 => /lib/libc.so.7 (0x80d663000) librt.so.1 => /lib/librt.so.1 (0x805bcb000) libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x805bd4000) libz.so.6 => /lib/libz.so.6 (0x805bda000) libzstd.so.1 => /usr/local/lib/libzstd.so.1 (0x80d963000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x80da38000) libelf.so.2 => /lib/libelf.so.2 (0x80da59000) [vdso] (0x7ffffffff000) But # ls /usr/bin/cc -r-xr-xr-x 6 root wheel 82M Oct 19 18:10:39 2025 /usr/bin/cc* # ls /usr/local/llvm19/bin/clang-19 -rwxr-xr-x 2 root wheel 125K Aug 18 06:43:31 2025 /usr/local/llvm19/bin/clang-19* So it dynamic linked.... .... And we found in port: CMAKE_ARGS= -DLLVM_BUILD_LLVM_DYLIB=ON CMAKE_ARGS+= -DLLVM_LINK_LLVM_DYLIB=ON (exist from first llvm6 372b8a151352984140f74c342a62eae2236b2c2c and copy-pasted to all next llvm~s by brooks@FreeBSD.org) According to: https://llvm.org/docs/CMake.html ============================================================================================= BUILD_SHARED_LIBS is only recommended for use by LLVM developers. If you want to build LLVM as a shared library, you should use the LLVM_BUILD_LLVM_DYLIB option. ============================================================================================= So upstream DOES NOT RECOMMEND to build shared libs to users!!! Why FBSD use shared libs for LLVM in ports and now in base!??? @brooks - why do you do that? > The implied load on rtld is something that could be handled: there is > definitely no need to have such huge surface of exported symbols on > both libllvm and esp. libclang. Perhaps by default the internal > libraries can use protected symbols, normally C++ do not rely on > interposing. But such 'fixes' must occur at upstream. > > So far all the clang toolchain changes were aligning it with what the > llvm project does. > No, upstream does not recommend to use shared libs to llvm users.