No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

222 líneas
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. "gnu99",
  76. "gnu18"
  77. ]
  78. },
  79. "cxx_version": {
  80. "description": "The C++ language version",
  81. "type": "string",
  82. "enum": [
  83. "c++98",
  84. "c++03",
  85. "c++11",
  86. "c++14",
  87. "c++17",
  88. "c++20",
  89. "gnu++20"
  90. ]
  91. },
  92. "warning_flags": {
  93. "description": "Set the flags that will be passed to the compiler to enable/disable warnings",
  94. "$ref": "#/definitions/command_line_flags"
  95. },
  96. "link_flags": {
  97. "description": "Pass additional flags to the compiler when it is linking runtime binaries (executables)",
  98. "$ref": "#/definitions/command_line_flags"
  99. },
  100. "compiler_launcher": {
  101. "description": "Set a command-line prefix that will be prepended to all compiler invocations",
  102. "$ref": "#/definitions/command_line_flags"
  103. },
  104. "debug": {
  105. "description": "Tweak the generation of debug information",
  106. "default": true,
  107. "oneOf": [
  108. {
  109. "type": "string",
  110. "enum": [
  111. "embedded",
  112. "split"
  113. ]
  114. },
  115. {
  116. "type": "boolean"
  117. }
  118. ]
  119. },
  120. "optimize": {
  121. "description": "Optimize generated code",
  122. "type": "boolean",
  123. "default": true
  124. },
  125. "runtime": {
  126. "description": "Select the runtime/stdlib modes",
  127. "type": "object",
  128. "additionalProperties": false,
  129. "properties": {
  130. "static": {
  131. "type": "boolean",
  132. "description": "If `true`, enable static stdlib/runtime linking"
  133. },
  134. "debug": {
  135. "type": "boolean",
  136. "description": "If 'true', enable debug for the stdlib/runtime"
  137. }
  138. }
  139. },
  140. "advanced": {
  141. "type": "object",
  142. "additionalProperties": false,
  143. "description": "Advanced toolchain options. All of these options will be inferred from `compiler_id` by default. Handle with care.",
  144. "properties": {
  145. "deps_mode": {
  146. "type": "string",
  147. "description": "Dependency tracking mode.",
  148. "enum": [
  149. "msvc",
  150. "gnu",
  151. "none"
  152. ]
  153. },
  154. "include_template": {
  155. "description": "Set the include-directory flags template",
  156. "$ref": "#/definitions/command_line_flags"
  157. },
  158. "external_include_template": {
  159. "description": "Set the external include-directory flags template",
  160. "$ref": "#/definitions/command_line_flags"
  161. },
  162. "define_template": {
  163. "description": "Set the preprocessor-definition flags template",
  164. "$ref": "#/definitions/command_line_flags"
  165. },
  166. "base_warning_flags": {
  167. "description": "Set the base warning flags for the toolchain. These are always prepended to `warning_flags`.",
  168. "$ref": "#/definitions/command_line_flags"
  169. },
  170. "base_compile_flags": {
  171. "description": "Set the base compile flags for the toolchain. These are always prepended to `flags`.",
  172. "$ref": "#/definitions/command_line_flags"
  173. },
  174. "c_compile_file": {
  175. "description": "Set the command template for compiling C source files",
  176. "$ref": "#/definitions/command_line_flags"
  177. },
  178. "cxx_compile_file": {
  179. "description": "Set the command template for compiling C++ source files",
  180. "$ref": "#/definitions/command_line_flags"
  181. },
  182. "create_archive": {
  183. "description": "Set the command template for generating static library archives",
  184. "$ref": "#/definitions/command_line_flags"
  185. },
  186. "link_executable": {
  187. "description": "Set the command template for linking executable binaries",
  188. "$ref": "#/definitions/command_line_flags"
  189. },
  190. "tty_flags": {
  191. "description": "Set command line flags that will be applied only if stdout is an ANSI-capable terminal",
  192. "$ref": "#/definitions/command_line_flags"
  193. },
  194. "obj_prefix": {
  195. "description": "Set the filename prefix for object files",
  196. "type": "string"
  197. },
  198. "obj_suffix": {
  199. "description": "Set the filename suffix for object files",
  200. "type": "string"
  201. },
  202. "archive_prefix": {
  203. "description": "Set the filename prefix for library archive files",
  204. "type": "string"
  205. },
  206. "archive_suffix": {
  207. "description": "Set the filename suffix for library archive files",
  208. "type": "string"
  209. },
  210. "exe_prefix": {
  211. "description": "Set the filename prefix for executable files",
  212. "type": "string"
  213. },
  214. "exe_suffix": {
  215. "description": "Set the filename suffix for executable files",
  216. "type": "string"
  217. }
  218. }
  219. }
  220. }
  221. }