text: load("@fbcode_macros//build_defs/lib:cpp_common.bzl", "cpp_common")
  load("@fbsource//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
  
  def cpp_binary(
          name,
          arch_compiler_flags = None,  # {}
          arch_preprocessor_flags = None,  # {}
          auto_headers = None,
          compiler_flags = (),
          compiler_specific_flags = None,  # {}
          deps = (),
          external_deps = (),
          global_symbols = (),
          header_namespace = None,
          headers = None,
          known_warnings = (),  # True or list
          lex_args = (),
          linker_flags = (),
          modules = None,
          nodefaultlibs = False,
          nvcc_flags = (),
          precompiled_header = None,
          preprocessor_flags = (),
          shared_system_deps = None,
          srcs = (),
          supports_coverage = None,
          system_include_paths = None,
          visibility = None,
          yacc_args = (),
          additional_coverage_targets = (),
          autodeps_keep = None,  # Ignore; used only by autodeps tooling.
          tags = (),
          allocator = None,
          dlls = None,  # {}
          versions = None,
          dlopen_enabled = None,
          dont_link_prerequisites = None,
          enable_lto = False,
          hs_profile = None,
          split_symbols = None,
          os_deps = None,
          os_linker_flags = None):
      attrs = cpp_common.convert_cpp(
          name,
          cpp_rule_type = "cpp_binary",
          buck_rule_type = "cxx_binary",
          is_library = False,
          is_buck_binary = True,
          is_test = False,
          is_deployable = True,
          arch_compiler_flags = arch_compiler_flags or {},
          arch_preprocessor_flags = arch_preprocessor_flags or {},
          auto_headers = auto_headers,
          compiler_flags = compiler_flags,
          compiler_specific_flags = compiler_specific_flags or {},
          deps = deps,
          external_deps = external_deps,
          global_symbols = global_symbols,
          header_namespace = header_namespace,
          headers = headers,
          known_warnings = known_warnings,  # True or list
          lex_args = lex_args,
          linker_flags = linker_flags,
          modules = modules,
          nodefaultlibs = nodefaultlibs,
          nvcc_flags = nvcc_flags,
          precompiled_header = precompiled_header,
          preprocessor_flags = preprocessor_flags,
          shared_system_deps = shared_system_deps,
          srcs = srcs,
          supports_coverage = supports_coverage,
          system_include_paths = system_include_paths,
          visibility = visibility,
          yacc_args = yacc_args,
          additional_coverage_targets = additional_coverage_targets,
          autodeps_keep = autodeps_keep,  # Ignore; used only by autodeps tooling.
          tags = tags,
          allocator = allocator,
          dlls = dlls or {},
          versions = versions,
          dlopen_enabled = dlopen_enabled,
          dont_link_prerequisites = dont_link_prerequisites,
          enable_lto = enable_lto,
          hs_profile = None,
          split_symbols = split_symbols,
          os_deps = os_deps,
          os_linker_flags = os_linker_flags,
      )
  
      fb_native.cxx_binary(**attrs)
  