File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1231,6 +1231,18 @@ def update_mpconfigport():
1231
1231
write_file (MPCONFIGPORT_PATH , data )
1232
1232
1233
1233
1234
+ def update_mkrules ():
1235
+ mkrules_path = 'lib/micropython/py/mkrules.cmake'
1236
+ with open (mkrules_path , 'rb' ) as f :
1237
+ data = f .read ().decode ('utf-8' )
1238
+
1239
+ if 'REMOVE_DUPLICATES' not in data :
1240
+ data = data .replace ('add_custom_command(' , 'list(REMOVE_DUPLICATES MICROPY_CPP_FLAGS)\n \n add_custom_command(' , 1 )
1241
+
1242
+ with open (mkrules_path , 'wb' ) as f :
1243
+ f .write (data .encode ('utf-8' ))
1244
+
1245
+
1234
1246
def update_main ():
1235
1247
# data = read_file('esp32', MAIN_PATH)
1236
1248
@@ -1429,6 +1441,7 @@ def compile(*args): # NOQA
1429
1441
update_panic_handler ()
1430
1442
update_mpconfigboard ()
1431
1443
update_mpconfigport ()
1444
+ update_mkrules ()
1432
1445
1433
1446
copy_micropy_updates ('esp32' )
1434
1447
You can’t perform that action at this time.
0 commit comments