code: def set_cc_opt_flags(environ_cp):
      """Set up architecture-dependent optimization flags.
  
      Also append CC optimization flags to bazel.rc..
  
      Args:
        environ_cp: copy of the os.environ.
      """
      if is_ppc64le():
          # gcc on ppc64le does not support -march, use mcpu instead
          default_cc_opt_flags = "-mcpu=native"
      elif is_windows():
          default_cc_opt_flags = "/arch:AVX"
      else:
          # On all other platforms, no longer use `-march=native` as this can result
          # in instructions that are too modern being generated. Users that want
          # maximum performance should compile TF in their environment and can pass
          # `-march=native` there.
          # See https://github.com/tensorflow/tensorflow/issues/45744 and duplicates
          default_cc_opt_flags = "-Wno-sign-compare"
      question = (
          "Please specify optimization flags to use during compilation when"
          ' bazel option "--config=opt" is specified [Default is %s]: '
      ) % default_cc_opt_flags
      cc_opt_flags = get_from_env_or_user_or_default(
          environ_cp, "CC_OPT_FLAGS", question, default_cc_opt_flags
      )
      for opt in cc_opt_flags.split():
          write_to_bazelrc("build:opt --copt=%s" % opt)
          write_to_bazelrc("build:opt --host_copt=%s" % opt)
  
imports: import argparse
  import os
  import pathlib
  import platform
  import re
  import subprocess
  import sys
label_desc: Use image node_id 19 for calling a global function with example usage: set_cc_opt_flags(environ_cp) without return types