Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

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