-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Restore host and nonhost toolchain features (reversing #7407) #13315
Description
Description of the problem / feature request:
Currently it is necessary to pass --incompatible_dont_enable_host_nonhost_crosstool_features=false to get host and nonhost features back in the C++ toolchain.
In #7407 these were suggested to be removed because there may not be a separate host and target platform or toolchain. That is true, but features in C++ toolchains control much more than just which platform is used or which toolchain is used. There are features that make sense to enable in the host build but not in the target build even when the platforms are identical.
Some easy examples are the LLVM sanitizers. These are debugging aids but can come with high runtime overhead. It is often undesirable to subject host tools to these overheads, and instead they should only be enabled for target builds.
Another example is disabling debug information in host builds: #13308
Not sure anything else is needed here, but if there are questions about how this might be used, please let me know.