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.

216 linhas
8.0KB

  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. "c_compile_file": {
  170. "description": "Set the command template for compiling C source files",
  171. "$ref": "#/definitions/command_line_flags"
  172. },
  173. "cxx_compile_file": {
  174. "description": "Set the command template for compiling C++ source files",
  175. "$ref": "#/definitions/command_line_flags"
  176. },
  177. "create_archive": {
  178. "description": "Set the command template for generating static library archives",
  179. "$ref": "#/definitions/command_line_flags"
  180. },
  181. "link_executable": {
  182. "description": "Set the command template for linking executable binaries",
  183. "$ref": "#/definitions/command_line_flags"
  184. },
  185. "tty_flags": {
  186. "description": "Set command line flags that will be applied only if stdout is an ANSI-capable terminal",
  187. "$ref": "#/definitions/command_line_flags"
  188. },
  189. "obj_prefix": {
  190. "description": "Set the filename prefix for object files",
  191. "type": "string"
  192. },
  193. "obj_suffix": {
  194. "description": "Set the filename suffix for object files",
  195. "type": "string"
  196. },
  197. "archive_prefix": {
  198. "description": "Set the filename prefix for library archive files",
  199. "type": "string"
  200. },
  201. "archive_suffix": {
  202. "description": "Set the filename suffix for library archive files",
  203. "type": "string"
  204. },
  205. "exe_prefix": {
  206. "description": "Set the filename prefix for executable files",
  207. "type": "string"
  208. },
  209. "exe_suffix": {
  210. "description": "Set the filename suffix for executable files",
  211. "type": "string"
  212. }
  213. }
  214. }
  215. }
  216. }