code: def get_sources_headers_for_target(self, target):
      
      # Get source paths relative to the target base so the exception message with the target and
      # paths makes sense.
      target_relative_sources = target.sources_relative_to_target_base()
      rel_root = target_relative_sources.rel_root
  
      # Unique file names are required because we just dump object files into a single directory, and
      # the compiler will silently just produce a single object file if provided non-unique filenames.
      # TODO: add some shading to file names so we can remove this check.
      # NB: It shouldn't matter if header files have the same name, but this will raise an error in
      # that case as well. We won't need to do any shading of header file names.
      seen_filenames = defaultdict(list)
      for src in target_relative_sources:
        seen_filenames[os.path.basename(src)].append(src)
      duplicate_filename_err_msgs = []
      for fname, source_paths in seen_filenames.items():
        if len(source_paths) > 1:
          duplicate_filename_err_msgs.append("filename: {}, paths: {}".format(fname, source_paths))
      if duplicate_filename_err_msgs:
        raise self.NativeCompileError(
          "Error in target '{}': source files must have a unique filename within a '{}' target. "
          "Conflicting filenames:\n{}"
          .format(target.address.spec, target.alias(), '\n'.join(duplicate_filename_err_msgs)))
  
      return [os.path.join(get_buildroot(), rel_root, src) for src in target_relative_sources]
docs: Return a list of file arguments to provide to the compiler.
  
      NB: result list will contain both header and source files!
  
      :raises: :class:`NativeCompile.NativeCompileError` if there is an error processing the sources.