[SR-6054] Add driver option "-x <type>", which would treat subsequent input files as having the given type #48611
Labels
compiler
The Swift compiler in itself
legacy driver
Area → compiler: the integrated C++ legacy driver. Succeeded by the swift-driver project
new feature
Additional Detail from JIRA
md5: 7fb46907f4a7e10469ae758d94248687
Issue 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-L2343Currently, 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 invokeswiftc -x swift my-swift-source-file
, such thatmy-swift-source-file
would be processed as a Swift source file, even though it lacks a.swift
extension.The text was updated successfully, but these errors were encountered: