Begin forwarded message:
From: Iain Sandoe <idsandoe@googlemail.com>
Subject: Re: [isocpp-sg15] [isocpp-admin] Swedish mirror committee consideration on the current working draft
Date: 24 September 2025 at 23:08:59 BST
To: sg15@lists.isocpp.org
Cc: Tom Honermann <tom@honermann.net>, sg21@lists.isocpp.org
On 24 Sep 2025, at 22:48, Tom Honermann via SG15 <sg15@lists.isocpp.org> wrote:
On 9/24/25 10:26 AM, Ville Voutilainen via SG15 wrote:
On Wed, 24 Sept 2025 at 17:06, Harald Achitz via SG15
<sg15@lists.isocpp.org> wrote:
Having some interest on the build issue myself, I would be thankful to learn about the following topics:
Will it be easily manageable to tell the linker: hey, give me libfoo with contract assertions enabled, and that is using this special contract handler? And get an error if libfoo in that flavor is not available, but only in others other configuration.
I'm unaware of an implementation that allows you to choose the
contract evaluation semantic at link time. There's been talk about
that,
but no implementation yet. And, as <see below>, you can't have
per-library violation handlers. Except on Windows you might, which
is yet another unanswered question in the face of lack of both
implementation and deployment experience.
or is it only easily manageable when you build the whole source tree including dependencies with profiles / tripplets, or what ever your control file is.
The contract evaluation semantic is chosen at compile-time. Which of
course means it isn't always easily manageable when you don't
(re-)compile every library you use.
Existing implementations select the contract evaluation semantic at compile-time, but the standard does not distinguish between compile-time or run-time selection except in the case of constant evaluation.
I agree that we lack implementation and deployment experience for implementation strategies that delay contract evaluation semantic selection until run-time. I remain quite interested in such strategies, but unfortunately am not available to explore them myself. I expect that current efforts in post-link optimization (PLO) will eventually yield a good solution.
I have a Proof-of-concept for the link-time semantic - including a demonstration that link-time-optimisation can yield good resultsWe will try to make that PoC public as soon as possible.It should also be extensible to run-time (but with understandably different trade-offs).Iain
Tom.
_______________________________________________
SG15 mailing list
SG15@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/sg15