Boost logo

Boost :

From: Boris Kolpackov (boris_at_[hidden])
Date: 2024-04-09 13:58:34


Andrey Semashev via Boost <boost_at_[hidden]> writes:
 
> Many of the things you mentioned above have no effect on the AST.

They may have no effect on some hypothetical AST that was designed
especially to facilitate BMI portability, but they have effect on
the ASTs that are actually used in GCC/Clang/MSVC.

But the conceptually intractable problem here (as others have
mentioned) is that many of these options have corresponding
compiler-defined macros which means code may be #ifdef'ed in/out
depending on these macros. Even if you decide to ignore such
directives somehow (which already sounds nuts), there is no
guarantee that such conditional code is actually compilable
with/without the option in question.

I think if you want BMI portability, the most sensible approach
is to have fat BMIs where you compile the same interface with
a set of option combinations, merge the resulting BMIs into one
fat file, and then tell your users that they can only use one of
the supported combinations (or compile a custom BMI from source).
I don't believe anything in the current approach prevents us from
exploring this in the future. It just makes sense to first chew
what we have bitten off so far.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk