Skip to content

Commit 9d10a3d

Browse files
committed
Conditionalize LTO
1 parent c676253 commit 9d10a3d

File tree

243 files changed

+534
-413
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

243 files changed

+534
-413
lines changed

devices/ble_hci/common-hal/_bleio/att.c

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#include "shared-bindings/_bleio/Service.h"
4545
#include "shared-bindings/_bleio/UUID.h"
4646
#include "supervisor/shared/tick.h"
47+
#include "supervisor/shared/translate/translate.h"
4748

4849
STATIC uint16_t max_mtu = BT_ATT_DEFAULT_LE_MTU; // 23
4950
STATIC unsigned long timeout = 5000;

extmod/moduasyncio.c

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
#include "shared-bindings/supervisor/__init__.h"
3434
#endif
3535

36+
#include "supervisor/shared/translate/translate.h"
37+
3638
#if MICROPY_PY_UASYNCIO
3739

3840
// Used when task cannot be guaranteed to be non-NULL.

extmod/modubinascii.c

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#include "py/runtime.h"
1212
#include "py/binary.h"
1313

14+
#include "supervisor/shared/translate/translate.h"
15+
1416
static void check_not_unicode(const mp_obj_t arg) {
1517
#if MICROPY_CPYTHON_COMPAT
1618
if (mp_obj_is_str(arg)) {

extmod/moductypes.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "py/objtuple.h"
1212
#include "py/binary.h"
1313

14-
#include "supervisor/shared/translate.h"
14+
#include "supervisor/shared/translate/translate.h"
1515

1616
#if MICROPY_PY_UCTYPES
1717

extmod/moduhashlib.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "py/runtime.h"
1010

11-
#include "supervisor/shared/translate.h"
11+
#include "supervisor/shared/translate/translate.h"
1212

1313
#if MICROPY_PY_UHASHLIB
1414

extmod/moduheapq.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include "py/objlist.h"
77
#include "py/runtime.h"
88

9-
#include "supervisor/shared/translate.h"
9+
#include "supervisor/shared/translate/translate.h"
1010

1111
#if MICROPY_PY_UHEAPQ
1212

extmod/modujson.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "py/runtime.h"
1414
#include "py/stream.h"
1515

16-
#include "supervisor/shared/translate.h"
16+
#include "supervisor/shared/translate/translate.h"
1717

1818
#if MICROPY_PY_UJSON
1919

extmod/modutimeq.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "py/runtime.h"
1111
#include "py/smallint.h"
1212

13-
#include "supervisor/shared/translate.h"
13+
#include "supervisor/shared/translate/translate.h"
1414

1515
#if MICROPY_PY_UTIMEQ
1616

extmod/moduzlib.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "py/stream.h"
1111
#include "py/mperrno.h"
1212

13-
#include "supervisor/shared/translate.h"
13+
#include "supervisor/shared/translate/translate.h"
1414

1515
#if MICROPY_PY_UZLIB
1616

extmod/vfs_fat.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "extmod/vfs_fat.h"
2121
#include "shared/timeutils/timeutils.h"
2222
#include "supervisor/filesystem.h"
23-
#include "supervisor/shared/translate.h"
23+
#include "supervisor/shared/translate/translate.h"
2424

2525
#if FF_MAX_SS == FF_MIN_SS
2626
#define SECSIZE(fs) (FF_MIN_SS)

extmod/vfs_posix_file.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "py/runtime.h"
99
#include "py/stream.h"
1010
#include "extmod/vfs_posix.h"
11-
#include "supervisor/shared/translate.h"
11+
#include "supervisor/shared/translate/translate.h"
1212

1313
#if (defined(MICROPY_VFS_POSIX) && MICROPY_VFS_POSIX) || (defined(MICROPY_VFS_POSIX_FILE) && MICROPY_VFS_POSIX_FILE)
1414

main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
#include "supervisor/shared/status_leds.h"
5959
#include "supervisor/shared/tick.h"
6060
#include "supervisor/shared/traceback.h"
61-
#include "supervisor/shared/translate.h"
61+
#include "supervisor/shared/translate/translate.h"
6262
#include "supervisor/shared/workflow.h"
6363
#include "supervisor/usb.h"
6464
#include "supervisor/workflow.h"

ports/atmel-samd/Makefile

+1-8
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@ $(echo PERIPHERALS_CHIP_FAMILY=$(PERIPHERALS_CHIP_FAMILY))
123123
#Debugging/Optimization
124124
ifeq ($(DEBUG), 1)
125125
CFLAGS += -ggdb3 -Og -Os
126-
# You may want to disable -flto if it interferes with debugging.
127-
CFLAGS += -flto -flto-partition=one
128126
# You may want to enable these flags to make setting breakpoints easier.
129127
# CFLAGS += -fno-inline -fno-ipa-sra
130128
ifeq ($(CHIP_FAMILY), samd21)
@@ -147,11 +145,8 @@ else
147145
CFLAGS += -finline-limit=$(CFLAGS_INLINE_LIMIT)
148146
endif
149147

150-
CFLAGS += -flto
151-
152148
ifeq ($(CIRCUITPY_FULL_BUILD),0)
153149
CFLAGS += --param inline-unit-growth=15 --param max-inline-insns-auto=20
154-
CFLAGS += -flto-partition=one
155150
endif
156151

157152
ifdef CFLAGS_BOARD
@@ -168,8 +163,7 @@ CFLAGS += \
168163
-mcpu=cortex-m0plus \
169164
-msoft-float \
170165
-mfloat-abi=soft \
171-
-DSAMD21 \
172-
-flto-partition=one
166+
-DSAMD21
173167
endif
174168
ifeq ($(CHIP_FAMILY), samd51)
175169
CFLAGS += \
@@ -206,7 +200,6 @@ endif
206200
CFLAGS += -Wno-stringop-overread -Wno-stringop-overflow
207201

208202
LDFLAGS = $(CFLAGS) -nostartfiles -Wl,-nostdlib -Wl,-T,$(GENERATED_LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs
209-
LDFLAGS += -flto=$(shell $(NPROC))
210203
LIBS := -lgcc -lc
211204

212205
# Use toolchain libm if we're not using our own.

ports/atmel-samd/common-hal/_pew/PewPew.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "shared-bindings/digitalio/DigitalInOut.h"
3636
#include "shared-bindings/util.h"
3737
#include "samd/timers.h"
38-
#include "supervisor/shared/translate.h"
38+
#include "supervisor/shared/translate/translate.h"
3939
#include "timer_handler.h"
4040

4141

ports/atmel-samd/common-hal/analogio/AnalogIn.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#include "samd/adc.h"
3838
#include "shared-bindings/analogio/AnalogIn.h"
3939
#include "shared-bindings/microcontroller/Pin.h"
40-
#include "supervisor/shared/translate.h"
40+
#include "supervisor/shared/translate/translate.h"
4141

4242
#include "atmel_start_pins.h"
4343
#include "hal/include/hal_adc_sync.h"

ports/atmel-samd/common-hal/analogio/AnalogOut.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include "shared-bindings/analogio/AnalogOut.h"
3434
#include "shared-bindings/audioio/AudioOut.h"
3535
#include "shared-bindings/microcontroller/Pin.h"
36-
#include "supervisor/shared/translate.h"
36+
#include "supervisor/shared/translate/translate.h"
3737

3838
#include "atmel_start_pins.h"
3939
#include "hal/include/hal_dac_sync.h"

ports/atmel-samd/common-hal/audiobusio/I2SOut.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include "shared-bindings/audiobusio/I2SOut.h"
4141
#include "shared-bindings/audiocore/RawSample.h"
4242
#include "shared-bindings/microcontroller/Pin.h"
43-
#include "supervisor/shared/translate.h"
43+
#include "supervisor/shared/translate/translate.h"
4444

4545
#include "atmel_start_pins.h"
4646
#include "hal/include/hal_gpio.h"

0 commit comments

Comments
 (0)