我注意到swiftc
中有“ -c”选项,该选项有什么作用?
swiftc ... -c ....
是否有关于此的正式文件?我在man
,--help
或在线上都找不到它:(
答案 0 :(得分:2)
-c
是-emit-object
:
$ swiftc --help OVERVIEW: Swift compiler USAGE: swiftc [options] MODES: -dump-ast Parse and type-check input file(s) and dump AST(s) -dump-parse Parse input file(s) and dump AST(s) -dump-scope-maps Parse and type-check input file(s) and dump the scope map(s) -dump-type-info Output YAML dump of fixed-size types from all imported modules -dump-type-refinement-contexts Type-check input file(s) and dump type refinement contexts(s) -emit-assembly Emit assembly file(s) (-S) -emit-bc Emit LLVM BC file(s) -emit-executable Emit a linked executable -emit-imported-modules Emit a list of the imported modules -emit-ir Emit LLVM IR file(s) -emit-library Emit a linked library -emit-object Emit object file(s) (-c) -emit-sibgen Emit serialized AST + raw SIL file(s) -emit-sib Emit serialized AST + canonical SIL file(s) -emit-silgen Emit raw SIL file(s) -emit-sil Emit canonical SIL file(s) -index-file Produce index data for a source file -parse Parse input file(s) -print-ast Parse and type-check input file(s) and pretty print AST(s) -resolve-imports Parse and resolve imports in input file(s) -typecheck Parse and type-check input file(s)