code: def _construct_options(options_bootstrapper, build_configuration):
      
      # Now that plugins and backends are loaded, we can gather the known scopes.
  
      # Gather the optionables that are not scoped to any other.  All known scopes are reachable
      # via these optionables' known_scope_infos() methods.
      top_level_optionables = (
        {GlobalOptionsRegistrar} |
        GlobalSubsystems.get() |
        build_configuration.optionables() |
        set(Goal.get_optionables())
      )
  
      # Now that we have the known scopes we can get the full options. `get_full_options` will
      # sort and de-duplicate these for us.
      known_scope_infos = [si
                           for optionable in top_level_optionables
                           for si in optionable.known_scope_infos()]
      return options_bootstrapper.get_full_options(known_scope_infos)
docs: Parse and register options.
  
      :returns: An Options object representing the full set of runtime options.