From ed21273e4d8a2ed907e2a9cdb80cb1eb315be5e1 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Sat, 1 Feb 2020 18:15:07 +0200 Subject: [PATCH] AVR build: fix dependencies --- tests/site_scons/platforms/avr/avr.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/site_scons/platforms/avr/avr.py b/tests/site_scons/platforms/avr/avr.py index 87608f4c..dbf7627c 100644 --- a/tests/site_scons/platforms/avr/avr.py +++ b/tests/site_scons/platforms/avr/avr.py @@ -15,10 +15,12 @@ def set_avr_platform(env): '__ASSERT_USE_STDERR': 1, 'MAX_REALLOC_SIZE': '4096', 'FUZZTEST_BUFSIZE': 2048}) env.Append(LINKFLAGS = "-mmcu=atmega1284") - env.Append(LINKFLAGS = "build/avr_io.o -Wl,-Map,avr.map") - avr_io = env.Object("build/avr_io.o", "site_scons/platforms/avr/avr_io.c") - - # These fake defines just ensure that the needed platform files get built. - env.Depends("build/common/pb_common.o", runner) - env.Depends("build/common/pb_common.o", avr_io) + env.Append(LINKFLAGS = "-Wl,-Map,build/avr.map") + + # Build library for communicating with test runner + avr_io = env.Library("build/avr_io.o", "site_scons/platforms/avr/avr_io.c") + env.Append(LIBS = avr_io) + # This fake define just ensures that the test runner gets build also + env.Depends(avr_io, runner) +