Skip to content

Commit 9b2ae77

Browse files
committed
update model files (add new options)
1 parent 6f604d1 commit 9b2ae77

6 files changed

Lines changed: 267 additions & 23 deletions

File tree

lang/any.gcc.verify.json

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,18 @@
122122
"description.zh-cn": "全局选项",
123123
"type": "object",
124124
"properties": {
125+
"output-debug-info": {
126+
"markdownDescription": "Output debug information",
127+
"description.zh-cn": "输出调试信息",
128+
"type": "string",
129+
"default": "disable",
130+
"enum": [
131+
"disable",
132+
"enable",
133+
"dwarf-2",
134+
"dwarf-3"
135+
]
136+
},
125137
"misc-control": {
126138
"markdownDescription": "Global Params",
127139
"description.zh-cn": "编译器全局参数",
@@ -135,6 +147,46 @@
135147
"description.zh-cn": "C/C++ 编译器选项",
136148
"type": "object",
137149
"properties": {
150+
"language-c": {
151+
"markdownDescription": "C Standard",
152+
"description.zh-cn": "C 标准",
153+
"type": "string",
154+
"default": "",
155+
"enum": [
156+
"c89",
157+
"c90",
158+
"c99",
159+
"c11",
160+
"c17",
161+
"c23",
162+
"gnu89",
163+
"gnu90",
164+
"gnu99",
165+
"gnu11",
166+
"gnu17",
167+
"gnu23"
168+
]
169+
},
170+
"language-cpp": {
171+
"markdownDescription": "C++ Standard",
172+
"description.zh-cn": "C++ 标准",
173+
"type": "string",
174+
"default": "",
175+
"enum": [
176+
"c++98",
177+
"gnu++98",
178+
"c++11",
179+
"gnu++11",
180+
"c++14",
181+
"gnu++14",
182+
"c++17",
183+
"gnu++17",
184+
"c++20",
185+
"gnu++20",
186+
"c++23",
187+
"gnu++23"
188+
]
189+
},
138190
"optimization": {
139191
"markdownDescription": "Optimization Level",
140192
"description.zh-cn": "代码优化级别",
@@ -174,6 +226,11 @@
174226
"markdownDescription": "Data Sections (-fdata-sections)",
175227
"type": "boolean"
176228
},
229+
"signed-char": {
230+
"markdownDescription": "Signed Char (-fsigned-char)",
231+
"description.zh-cn": "Signed Char (-fsigned-char)",
232+
"type": "boolean"
233+
},
177234
"no-rtti": {
178235
"markdownDescription": "Not use RTTI (-fno-rtti)",
179236
"description.zh-cn": "禁用运行时类型信息 (-fno-rtti)",
@@ -184,17 +241,32 @@
184241
"description.zh-cn": "禁用异常处理 (-fno-exceptions)",
185242
"type": "boolean"
186243
},
244+
"warnings": {
245+
"markdownDescription": "Warning Level",
246+
"description.zh-cn": "警告等级",
247+
"type": "string",
248+
"default": "all-warnings",
249+
"enum": [
250+
"no-warnings",
251+
"all-warnings"
252+
]
253+
},
254+
"turn-Warning-into-errors": {
255+
"markdownDescription": "Turn warnings into errors",
256+
"description.zh-cn": "将警告转化为错误",
257+
"type": "boolean"
258+
},
187259
"C_FLAGS": {
188260
"markdownDescription": "C Compiler Params",
189261
"description.zh-cn": "C 编译器参数",
190262
"$ref": "#/definitions/FLAGS",
191-
"default": "-c -x c"
263+
"default": ""
192264
},
193265
"CXX_FLAGS": {
194266
"markdownDescription": "C++ Compiler Params",
195267
"description.zh-cn": "C++ 编译器参数",
196268
"$ref": "#/definitions/FLAGS",
197-
"default": "-c -x c++"
269+
"default": ""
198270
}
199271
}
200272
},
@@ -255,6 +327,10 @@
255327
"markdownDescription": "Remove Unused Input Sections (-Wl,--gc-sections)",
256328
"type": "boolean"
257329
},
330+
"print-mem-usage": {
331+
"markdownDescription": "Print Memory Usage For Each Section (-Wl,--print-memory-usage)",
332+
"type": "boolean"
333+
},
258334
"elf-suffix": {
259335
"type": "string",
260336
"size": "small",

lang/arm.gcc.verify.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,14 @@
380380
"markdownDescription": "Not Print Memory Usage (disable: -Wl,--print-memory-usage)",
381381
"type": "boolean"
382382
},
383+
"use-float-printf": {
384+
"markdownDescription": "Enable float-point for printf(...) function (-u _printf_float)",
385+
"type": "boolean"
386+
},
387+
"use-float-scanf": {
388+
"markdownDescription": "Enable float-point for scanf(...) function (-u _scanf_float)",
389+
"type": "boolean"
390+
},
383391
"LD_FLAGS": {
384392
"readable_name": "Other Linker Options",
385393
"readable_name.zh-cn": "链接器附加选项",

res/data/models/any.gcc.model.json

Lines changed: 91 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@
88
"matcher": "\\((?<name>.*?)\\) (?<version>[\\d\\.]+)"
99
},
1010
"global": {
11+
"output-debug-info": {
12+
"type": "selectable",
13+
"command": {
14+
"enable": "-g",
15+
"disable": "",
16+
"dwarf-2": "-g -gdwarf-2",
17+
"dwarf-3": "-g -gdwarf-3",
18+
"false": ""
19+
},
20+
"group": [
21+
"c",
22+
"cpp",
23+
"asm"
24+
]
25+
},
1126
"optimization": {
1227
"type": "selectable",
1328
"command": {
@@ -39,6 +54,17 @@
3954
"linker-g++"
4055
]
4156
},
57+
"signed-char": {
58+
"type": "selectable",
59+
"command": {
60+
"true": "-fsigned-char",
61+
"false": "-funsigned-char"
62+
},
63+
"group": [
64+
"c",
65+
"cpp"
66+
]
67+
},
4268
"no-rtti": {
4369
"type": "selectable",
4470
"command": {
@@ -82,6 +108,29 @@
82108
"cpp"
83109
]
84110
},
111+
"turn-Warning-into-errors": {
112+
"type": "selectable",
113+
"command": {
114+
"true": "-Werror",
115+
"false": ""
116+
},
117+
"group": [
118+
"c",
119+
"cpp"
120+
]
121+
},
122+
"warnings": {
123+
"type": "selectable",
124+
"command": {
125+
"false": "",
126+
"no-warnings": "-w",
127+
"all-warnings": "-Wall"
128+
},
129+
"group": [
130+
"c",
131+
"cpp"
132+
]
133+
},
85134
"misc-control": {
86135
"type": "list",
87136
"command": "",
@@ -127,7 +176,15 @@
127176
"useFile": true,
128177
"body": "@${value}"
129178
},
130-
"$output": "-o ${out} -MMD ${in}"
179+
"$output": "-o ${out} -MMD ${in}",
180+
"$default": [
181+
"-c",
182+
"-xc"
183+
],
184+
"$language-c": {
185+
"type": "value",
186+
"command": "-std="
187+
}
131188
},
132189
"cpp": {
133190
"$path": "bin/${toolPrefix}g++",
@@ -142,7 +199,14 @@
142199
"useFile": true,
143200
"body": "@${value}"
144201
},
145-
"$output": "-o ${out} -MMD ${in}"
202+
"$output": "-o ${out} -MMD ${in}",
203+
"$default": [
204+
"-c"
205+
],
206+
"$language-cpp": {
207+
"type": "value",
208+
"command": "-std="
209+
}
146210
},
147211
"asm": {
148212
"$path": "bin/${toolPrefix}gcc",
@@ -154,6 +218,10 @@
154218
"useFile": true,
155219
"body": "@${value}"
156220
},
221+
"$default": [
222+
"-c",
223+
"-x assembler-with-cpp"
224+
],
157225
"defines": {
158226
"type": "list",
159227
"command": "-D"
@@ -178,6 +246,13 @@
178246
"type": "list",
179247
"command": ""
180248
},
249+
"print-mem-usage": {
250+
"type": "selectable",
251+
"command": {
252+
"true": "-Wl,--print-memory-usage",
253+
"false": ""
254+
}
255+
},
181256
"remove-unused-input-sections": {
182257
"type": "selectable",
183258
"command": {
@@ -217,6 +292,13 @@
217292
"type": "list",
218293
"command": ""
219294
},
295+
"print-mem-usage": {
296+
"type": "selectable",
297+
"command": {
298+
"true": "-Wl,--print-memory-usage",
299+
"false": ""
300+
}
301+
},
220302
"remove-unused-input-sections": {
221303
"type": "selectable",
222304
"command": {
@@ -256,6 +338,13 @@
256338
"type": "list",
257339
"command": ""
258340
},
341+
"print-mem-usage": {
342+
"type": "selectable",
343+
"command": {
344+
"true": "--print-memory-usage",
345+
"false": ""
346+
}
347+
},
259348
"remove-unused-input-sections": {
260349
"type": "selectable",
261350
"command": {

res/data/models/arm.gcc.model.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,20 @@
505505
"false": "-Wl,--print-memory-usage"
506506
}
507507
},
508+
"use-float-printf": {
509+
"type": "selectable",
510+
"command": {
511+
"true": "-u _printf_float",
512+
"false": ""
513+
}
514+
},
515+
"use-float-scanf": {
516+
"type": "selectable",
517+
"command": {
518+
"true": "-u _scanf_float",
519+
"false": ""
520+
}
521+
},
508522
"$outputBin": [
509523
{
510524
"name": "output hex file",

src/EIDEProject.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2538,7 +2538,7 @@ $(OUT_DIR):
25382538
this.registerBuiltinVar('ToolchainRoot', () => toolchainRoot);
25392539

25402540
const curOptions = prjConfig.compileConfigModel.getOptions();
2541-
const newOptions = toolManager.upgradeBuilderOptions(curOptions, this.toolchain);
2541+
const newOptions = toolManager.migrateBuilderOptions(curOptions, this.toolchain);
25422542
if (newOptions) {
25432543
prjConfig.compileConfigModel.setOptions(newOptions, undefined, this.toolchain.name);
25442544
}

0 commit comments

Comments
 (0)