您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

219 行
8.2KB

  1. {
  2. "type": "object",
  3. "description": "DDS Toolchain Description File",
  4. "additionalProperties": false,
  5. "patternProperties": {
  6. "^\\$": {}
  7. },
  8. "$schema": "https://json-schema.org/draft/2019-09/schema",
  9. "definitions": {
  10. "command_line_flags": {
  11. "anyOf": [
  12. {
  13. "type": "string",
  14. "description": "Shell-style string of command-line arguments"
  15. },
  16. {
  17. "type": "array",
  18. "description": "An array of command-line arguments. Will be passed verbatim.",
  19. "items": {
  20. "type": "string",
  21. "description": "A single command-line argument. Will be passed verbatim."
  22. }
  23. }
  24. ]
  25. }
  26. },
  27. "properties": {
  28. "compiler_id": {
  29. "type": "string",
  30. "description": "The general compiler identification. This is one of a fixed set of values that DDS will use to infer most toolchain attributes.",
  31. "enum": [
  32. "msvc",
  33. "gnu",
  34. "clang"
  35. ]
  36. },
  37. "c_compiler": {
  38. "type": "string",
  39. "description": "Executable name or filepath for a C compiler",
  40. "examples": [
  41. "gcc",
  42. "clang-9",
  43. "cl.exe"
  44. ]
  45. },
  46. "cxx_compiler": {
  47. "type": "string",
  48. "description": "Executable name or filepath for a C++ compiler",
  49. "examples": [
  50. "g++",
  51. "clang++-9",
  52. "cl.exe"
  53. ]
  54. },
  55. "flags": {
  56. "description": "Pass additional compile flags, regardless of the source language",
  57. "$ref": "#/definitions/command_line_flags"
  58. },
  59. "c_flags": {
  60. "description": "Pass additional flags to the C compiler.",
  61. "$ref": "#/definitions/command_line_flags"
  62. },
  63. "cxx_flags": {
  64. "description": "Pass additional flags to the C++ compiler.",
  65. "$ref": "#/definitions/command_line_flags"
  66. },
  67. "c_version": {
  68. "description": "The C language version",
  69. "type": "string",
  70. "enum": [
  71. "c89",
  72. "c99",
  73. "c11",
  74. "c18"
  75. ]
  76. },
  77. "cxx_version": {
  78. "description": "The C++ language version",
  79. "type": "string",
  80. "enum": [
  81. "c++98",
  82. "c++03",
  83. "c++11",
  84. "c++14",
  85. "c++17",
  86. "c++20"
  87. ]
  88. },
  89. "warning_flags": {
  90. "description": "Set the flags that will be passed to the compiler to enable/disable warnings",
  91. "$ref": "#/definitions/command_line_flags"
  92. },
  93. "link_flags": {
  94. "description": "Pass additional flags to the compiler when it is linking runtime binaries (executables)",
  95. "$ref": "#/definitions/command_line_flags"
  96. },
  97. "compiler_launcher": {
  98. "description": "Set a command-line prefix that will be prepended to all compiler invocations",
  99. "$ref": "#/definitions/command_line_flags"
  100. },
  101. "debug": {
  102. "description": "Tweak the generation of debug information",
  103. "default": true,
  104. "oneOf": [
  105. {
  106. "type": "string",
  107. "enum": [
  108. "embedded",
  109. "split"
  110. ]
  111. },
  112. {
  113. "type": "boolean"
  114. }
  115. ]
  116. },
  117. "optimize": {
  118. "description": "Optimize generated code",
  119. "type": "boolean",
  120. "default": true
  121. },
  122. "runtime": {
  123. "description": "Select the runtime/stdlib modes",
  124. "type": "object",
  125. "additionalProperties": false,
  126. "properties": {
  127. "static": {
  128. "type": "boolean",
  129. "description": "If `true`, enable static stdlib/runtime linking"
  130. },
  131. "debug": {
  132. "type": "boolean",
  133. "description": "If 'true', enable debug for the stdlib/runtime"
  134. }
  135. }
  136. },
  137. "advanced": {
  138. "type": "object",
  139. "additionalProperties": false,
  140. "description": "Advanced toolchain options. All of these options will be inferred from `compiler_id` by default. Handle with care.",
  141. "properties": {
  142. "deps_mode": {
  143. "type": "string",
  144. "description": "Dependency tracking mode.",
  145. "enum": [
  146. "msvc",
  147. "gnu",
  148. "none"
  149. ]
  150. },
  151. "include_template": {
  152. "description": "Set the include-directory flags template",
  153. "$ref": "#/definitions/command_line_flags"
  154. },
  155. "external_include_template": {
  156. "description": "Set the external include-directory flags template",
  157. "$ref": "#/definitions/command_line_flags"
  158. },
  159. "define_template": {
  160. "description": "Set the preprocessor-definition flags template",
  161. "$ref": "#/definitions/command_line_flags"
  162. },
  163. "base_warning_flags": {
  164. "description": "Set the base warning flags for the toolchain. These are always prepended to `warning_flags`.",
  165. "$ref": "#/definitions/command_line_flags"
  166. },
  167. "base_compile_flags": {
  168. "description": "Set the base compile flags for the toolchain. These are always prepended to `flags`.",
  169. "$ref": "#/definitions/command_line_flags"
  170. },
  171. "c_compile_file": {
  172. "description": "Set the command template for compiling C source files",
  173. "$ref": "#/definitions/command_line_flags"
  174. },
  175. "cxx_compile_file": {
  176. "description": "Set the command template for compiling C++ source files",
  177. "$ref": "#/definitions/command_line_flags"
  178. },
  179. "create_archive": {
  180. "description": "Set the command template for generating static library archives",
  181. "$ref": "#/definitions/command_line_flags"
  182. },
  183. "link_executable": {
  184. "description": "Set the command template for linking executable binaries",
  185. "$ref": "#/definitions/command_line_flags"
  186. },
  187. "tty_flags": {
  188. "description": "Set command line flags that will be applied only if stdout is an ANSI-capable terminal",
  189. "$ref": "#/definitions/command_line_flags"
  190. },
  191. "obj_prefix": {
  192. "description": "Set the filename prefix for object files",
  193. "type": "string"
  194. },
  195. "obj_suffix": {
  196. "description": "Set the filename suffix for object files",
  197. "type": "string"
  198. },
  199. "archive_prefix": {
  200. "description": "Set the filename prefix for library archive files",
  201. "type": "string"
  202. },
  203. "archive_suffix": {
  204. "description": "Set the filename suffix for library archive files",
  205. "type": "string"
  206. },
  207. "exe_prefix": {
  208. "description": "Set the filename prefix for executable files",
  209. "type": "string"
  210. },
  211. "exe_suffix": {
  212. "description": "Set the filename suffix for executable files",
  213. "type": "string"
  214. }
  215. }
  216. }
  217. }
  218. }