All custom ops use similar flags and options in their respective BUILD. For example, #539 had to apply the same change to all custom ops. To ease the maintenance of these modules, the common logic should be factorized in a single Bazel macro.
See for example tf_custom_op_library in TensorFlow core.