title: What is the proper way to optionally compile a library with a build flag (to place in `target_compatible_with`)?
body: <p>Suppose I have a library implementation that I only want to compile when the user specifies it at build time.</p>
  <p>Should I use the <code>features</code> flag?</p>
  <p>If so, how could I use the features flag to constrain compilation like you can with <code>target_compatible_with</code> in <code>cc_library</code>, <code>cc_test</code>, and <code>cc_binary</code>?</p>
  <p>If not, what is the best way to constrain this? Adjusting the <code>platforms</code> flag disturbs default platform detection.</p>