API 文件 | SwiftCompile |
---|
將 Swift 原始碼檔案編譯成物件檔案。
屬性 | 描述 |
compilerArgs | 額外 提供給編譯器的引數。 |
debuggable | 編譯器應產生可偵錯的程式碼嗎? |
macros | 應為編譯器定義的巨集。 |
moduleFile | 要寫入 Swift 模組檔案的位置。 |
moduleName | 要產生的模組名稱。 |
modules | 編譯原始碼所需的模組。 |
objectFileDir | 將產生物件檔案的目錄。 |
optimized | 編譯器應產生最佳化程式碼嗎? |
source | 要編譯的原始碼檔案。 |
sourceCompatibility | 用於編譯原始碼檔案的 Swift 語言層級。 |
targetPlatform | 要編譯的目標平台。 |
toolChain | 用於編譯的工具鏈。 |
ListProperty
<String
>
compilerArgs
ListProperty
<String
>額外 提供給編譯器的引數。
RegularFileProperty
moduleFile
要寫入 Swift 模組檔案的位置。
ConfigurableFileCollection
modules
(唯讀)
編譯原始碼所需的模組。
DirectoryProperty
objectFileDir
將產生物件檔案的目錄。
ConfigurableFileCollection
source
(唯讀)
要編譯的原始碼檔案。
Property
<SwiftVersion
>
sourceCompatibility
Property
<SwiftVersion
>用於編譯原始碼檔案的 Swift 語言層級。
Property
<NativePlatform
>
targetPlatform
Property
<NativePlatform
>要編譯的目標平台。
Property
<NativeToolChain
>
toolChain
Property
<NativeToolChain
>用於編譯的工具鏈。