您可以在發佈配置與構建。
$ swift build --help
OVERVIEW: Build sources into binary products
USAGE: swift build [mode] [options]
MODES:
-c, --configuration <value> Build with configuration (debug|release) [default: debug]
--clean [<mode>] Delete artifacts (build|dist) [default: build]
OPTIONS:
-C, --chdir <path> Change working directory before any other operation
--build-path <path> Specify build/cache directory [default: ./.build]
--color <mode> Specify color mode (auto|always|never) [default: auto]
-v, --verbose Increase verbosity of informational output
-Xcc <flag> Pass flag through to all C compiler invocations
-Xlinker <flag> Pass flag through to all linker invocations
-Xswiftc <flag> Pass flag through to all Swift compiler invocations
NOTE: Use `swift package` to perform other functions on packages
其中列出了此選項:
您還可以通過看到該工具的使用。
見包管理器reference以獲取更多信息。
感謝您的信息。之所以能夠通過運行以下命令'迅速構建-Xswiftc -O'通過優化選項 –