You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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