選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

toolchain-schema.json 7.9KB

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