Uploaded image for project: 'Swift'
  1. Swift
  2. SR-6054

Add driver option "-x <type>", which would treat subsequent input files as having the given type

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Compiler
    • Labels:

      Description

      This is a task for a FIXME left in swift/lib/Driver/Driver.cpp four years ago: "FIXME: add -x support (or equivalent)".

      This is a reference to the Clang option -x, defined here: https://github.com/llvm-mirror/clang/blob/39691fddaf4f5199ecf9960ae3059943d59f659b/include/clang/Driver/Options.td#L2341-L2343

      Currently, the Swift compiler determines the types of its inputs based on file name: files ending in a .sil extension are SIL files, .swift are Swift source files, and an empty or unrecognized extension is assumed to be an object file.

      A -x option would allow users to invoke swiftc -x swift my-swift-source-file, such that my-swift-source-file would be processed as a Swift source file, even though it lacks a .swift extension.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              modocache Brian Ivan Gesiak
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: