Ensure LTO is enabled as a info.json build config option (#22932)

* feature.lto -> build.lto

* keymaps too
This commit is contained in:
Joel Challis 2024-02-01 15:45:58 +00:00 committed by GitHub
parent 79020519b4
commit 3a13c2120a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
23 changed files with 52 additions and 28 deletions

View File

@ -314,8 +314,8 @@
}, },
"features": { "features": {
"$ref": "qmk.definitions.v1#/boolean_array", "$ref": "qmk.definitions.v1#/boolean_array",
"propertyNames": { "$ref": "qmk.definitions.v1#/snake_case" } "propertyNames": { "$ref": "qmk.definitions.v1#/snake_case" },
"not": { "required": [ "lto" ] }
}, },
"indicators": { "indicators": {
"type": "object", "type": "object",

View File

@ -8,9 +8,11 @@
"cols": ["A8" ,"C9" ,"C8" ,"B14","B12","B10","B1" ,"B0" ,"A7" ,"A6" ,"A5" ,"A4" ,"C5" ,"C7" ,"B3" ,"A2" ,"C12","D2" ], "cols": ["A8" ,"C9" ,"C8" ,"B14","B12","B10","B1" ,"B0" ,"A7" ,"A6" ,"A5" ,"A4" ,"C5" ,"C7" ,"B3" ,"A2" ,"C12","D2" ],
"rows": ["A15","A10","C6" ,"C4" ,"A3" ,"A1" ,"C11","C10","B4"] "rows": ["A15","A10","C6" ,"C4" ,"A3" ,"A1" ,"C11","C10","B4"]
}, },
"build": {
"lto": true
},
"features": { "features": {
"bootmagic": true, "bootmagic": true,
"lto": true,
"mousekey": true, "mousekey": true,
"extrakey": true, "extrakey": true,
"console": false, "console": false,

View File

@ -8,9 +8,11 @@
"cols": ["A8" ,"C9" ,"C8" ,"B14","B12","B10","B1" ,"B0" ,"A7" ,"A6" ,"A5" ,"A4" ,"C5" ,"C7" ,"B3" ,"A2" ,"C12","D2" ], "cols": ["A8" ,"C9" ,"C8" ,"B14","B12","B10","B1" ,"B0" ,"A7" ,"A6" ,"A5" ,"A4" ,"C5" ,"C7" ,"B3" ,"A2" ,"C12","D2" ],
"rows": ["A15","A10","C6" ,"C4" ,"A3" ,"A1" ,"C11","C10","B4"] "rows": ["A15","A10","C6" ,"C4" ,"A3" ,"A1" ,"C11","C10","B4"]
}, },
"build": {
"lto": true
},
"features": { "features": {
"bootmagic": true, "bootmagic": true,
"lto": true,
"mousekey": true, "mousekey": true,
"extrakey": true, "extrakey": true,
"console": false, "console": false,

View File

@ -8,9 +8,11 @@
"cols": ["A8" ,"C9" ,"C8" ,"B14","B12","B10","B1" ,"B0" ,"A7" ,"A6" ,"A5" ,"A4" ,"C5" ,"C7" ,"B3" ,"A2" ,"C12","D2" ], "cols": ["A8" ,"C9" ,"C8" ,"B14","B12","B10","B1" ,"B0" ,"A7" ,"A6" ,"A5" ,"A4" ,"C5" ,"C7" ,"B3" ,"A2" ,"C12","D2" ],
"rows": ["A15","A10","C6" ,"C4" ,"A3" ,"A1" ,"C11","C10","B4"] "rows": ["A15","A10","C6" ,"C4" ,"A3" ,"A1" ,"C11","C10","B4"]
}, },
"build": {
"lto": true
},
"features": { "features": {
"bootmagic": true, "bootmagic": true,
"lto": true,
"mousekey": true, "mousekey": true,
"extrakey": true, "extrakey": true,
"console": false, "console": false,

View File

@ -14,7 +14,6 @@
"command": false, "command": false,
"console": true, "console": true,
"extrakey": true, "extrakey": true,
"lto": true,
"midi": false, "midi": false,
"mousekey": true, "mousekey": true,
"nkro": false, "nkro": false,

View File

@ -14,7 +14,6 @@
"features": { "features": {
"bootmagic": true, "bootmagic": true,
"extrakey": true, "extrakey": true,
"lto": true,
"mousekey": true, "mousekey": true,
"nkro": true, "nkro": true,
"oled": true "oled": true

View File

@ -8,6 +8,9 @@
"pid": "0x4D45", "pid": "0x4D45",
"device_version": "0.0.1" "device_version": "0.0.1"
}, },
"build": {
"lto": true
},
"features": { "features": {
"audio": false, "audio": false,
"backlight": true, "backlight": true,
@ -16,7 +19,6 @@
"console": false, "console": false,
"encoder": false, "encoder": false,
"extrakey": true, "extrakey": true,
"lto": true,
"mousekey": false, "mousekey": false,
"nkro": true, "nkro": true,
"rgblight": false "rgblight": false

View File

@ -9,11 +9,13 @@
{"pin_a": "F0", "pin_b": "F1", "resolution": 2} {"pin_a": "F0", "pin_b": "F1", "resolution": 2}
] ]
}, },
"build": {
"lto": true
},
"features": { "features": {
"bootmagic": true, "bootmagic": true,
"encoder": false, "encoder": false,
"extrakey": true, "extrakey": true,
"lto": true,
"mousekey": true, "mousekey": true,
"nkro": true, "nkro": true,
"rgb_matrix": true "rgb_matrix": true

View File

@ -11,7 +11,6 @@
"extrakey": true, "extrakey": true,
"mousekey": true, "mousekey": true,
"nkro": true, "nkro": true,
"lto": true,
"oled": true, "oled": true,
"rgb_matrix": true "rgb_matrix": true
}, },

View File

@ -9,7 +9,6 @@
"command": false, "command": false,
"console": false, "console": false,
"extrakey": true, "extrakey": true,
"lto": true,
"mousekey": true, "mousekey": true,
"nkro": true, "nkro": true,
"rgb_matrix": true "rgb_matrix": true

View File

@ -4,13 +4,15 @@
"maintainer": "lalalademaxiya1", "maintainer": "lalalademaxiya1",
"bootloader": "atmel-dfu", "bootloader": "atmel-dfu",
"diode_direction": "ROW2COL", "diode_direction": "ROW2COL",
"build": {
"lto": true
},
"features": { "features": {
"bootmagic": true, "bootmagic": true,
"command": false, "command": false,
"console": false, "console": false,
"dip_switch": true, "dip_switch": true,
"extrakey": true, "extrakey": true,
"lto": true,
"mousekey": true, "mousekey": true,
"nkro": true, "nkro": true,
"rgb_matrix": true "rgb_matrix": true

View File

@ -4,9 +4,11 @@
"maintainer": "Gondolindrim", "maintainer": "Gondolindrim",
"bootloader": "stm32-dfu", "bootloader": "stm32-dfu",
"diode_direction": "COL2ROW", "diode_direction": "COL2ROW",
"build": {
"lto": true
},
"features": { "features": {
"extrakey": true, "extrakey": true,
"lto": true,
"mousekey": true, "mousekey": true,
"nkro": true, "nkro": true,
"rgblight": true "rgblight": true

View File

@ -4,12 +4,14 @@
"maintainer": "Gondolindrim", "maintainer": "Gondolindrim",
"bootloader": "stm32-dfu", "bootloader": "stm32-dfu",
"diode_direction": "COL2ROW", "diode_direction": "COL2ROW",
"build": {
"lto": true
},
"features": { "features": {
"bootmagic": true, "bootmagic": true,
"command": false, "command": false,
"console": false, "console": false,
"extrakey": true, "extrakey": true,
"lto": true,
"mousekey": true, "mousekey": true,
"nkro": true, "nkro": true,
"rgblight": true "rgblight": true

View File

@ -3,14 +3,16 @@
"keyboard_name": "Dash 75", "keyboard_name": "Dash 75",
"maintainer": "vinorodrigues", "maintainer": "vinorodrigues",
"bootloader": "atmel-dfu", "bootloader": "atmel-dfu",
"build": {
"lto": true
},
"features": { "features": {
"bootmagic": true, "bootmagic": true,
"command": false, "command": false,
"console": false, "console": false,
"extrakey": true, "extrakey": true,
"mousekey": true, "mousekey": true,
"nkro": false, "nkro": false
"lto": true
}, },
"diode_direction": "COL2ROW", "diode_direction": "COL2ROW",
"matrix_pins": { "matrix_pins": {

View File

@ -7,8 +7,7 @@
"author": "vinorodrigues", "author": "vinorodrigues",
"config": { "config": {
"features": { "features": {
"via": true, "via": true
"lto": true
} }
}, },
"layers": [ "layers": [

View File

@ -23,8 +23,7 @@
"mousekey": true, "mousekey": true,
"nkro": true, "nkro": true,
"encoder": true, "encoder": true,
"rgblight": true, "rgblight": true
"lto": true
}, },
"build": { "build": {
"lto": true "lto": true

View File

@ -4,6 +4,9 @@
"maintainer": "Sleepdealr", "maintainer": "Sleepdealr",
"bootloader": "atmel-dfu", "bootloader": "atmel-dfu",
"diode_direction": "COL2ROW", "diode_direction": "COL2ROW",
"build": {
"lto": true
},
"features": { "features": {
"bootmagic": true, "bootmagic": true,
"command": false, "command": false,
@ -11,7 +14,6 @@
"extrakey": true, "extrakey": true,
"mousekey": true, "mousekey": true,
"nkro": true, "nkro": true,
"lto": true,
"encoder": true "encoder": true
}, },
"matrix_pins": { "matrix_pins": {

View File

@ -10,7 +10,6 @@
"features": { "features": {
"audio": true, "audio": true,
"extrakey": true, "extrakey": true,
"lto": true,
"oled": true, "oled": true,
"rgb_matrix": true "rgb_matrix": true
}, },

View File

@ -8,6 +8,9 @@
"pid": "0x1676", "pid": "0x1676",
"device_version": "0.0.1" "device_version": "0.0.1"
}, },
"build": {
"lto": true
},
"features": { "features": {
"audio": false, "audio": false,
"backlight": false, "backlight": false,
@ -16,7 +19,6 @@
"console": false, "console": false,
"encoder": false, "encoder": false,
"extrakey": true, "extrakey": true,
"lto": true,
"mousekey": true, "mousekey": true,
"nkro": true, "nkro": true,
"rgblight": true "rgblight": true

View File

@ -8,6 +8,9 @@
"pid": "0x1675", "pid": "0x1675",
"device_version": "0.0.1" "device_version": "0.0.1"
}, },
"build": {
"lto": true
},
"features": { "features": {
"audio": false, "audio": false,
"backlight": true, "backlight": true,
@ -16,7 +19,6 @@
"console": false, "console": false,
"encoder": false, "encoder": false,
"extrakey": true, "extrakey": true,
"lto": true,
"mousekey": true, "mousekey": true,
"nkro": true, "nkro": true,
"rgblight": true "rgblight": true

View File

@ -29,14 +29,16 @@
"led_flush_limit": 32, "led_flush_limit": 32,
"sleep": true "sleep": true
}, },
"build": {
"lto": true
},
"features": { "features": {
"bootmagic": true, "bootmagic": true,
"command": false, "command": false,
"console": false, "console": false,
"extrakey": true, "extrakey": true,
"mousekey": true, "mousekey": true,
"nkro": true, "nkro": true
"lto": true
}, },
"diode_direction": "ROW2COL", "diode_direction": "ROW2COL",
"matrix_pins": { "matrix_pins": {

View File

@ -9,10 +9,12 @@
["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"] ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"]
], ],
"config": { "config": {
"features": { "build": {
"via": true,
"lto": true "lto": true
}, },
"features": {
"via": true
},
"dynamic_keymap": { "dynamic_keymap": {
"layer_count": 4 "layer_count": 4
} }

View File

@ -233,6 +233,9 @@ def _extract_features(info_data, rules):
key = '_'.join(key.split('_')[:-1]).lower() key = '_'.join(key.split('_')[:-1]).lower()
value = True if value.lower() in true_values else False if value.lower() in false_values else value value = True if value.lower() in true_values else False if value.lower() in false_values else value
if key in ['lto']:
continue
if 'config_h_features' not in info_data: if 'config_h_features' not in info_data:
info_data['config_h_features'] = {} info_data['config_h_features'] = {}