Skip to content

Commit 2ab3eda

Browse files
authored
Merge pull request #4070 from theotherjimmy/optionally-add-regions
Elide adding regions to profile when empty
2 parents 517982c + 8b3f08e commit 2ab3eda

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/build_api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ def add_regions_to_profile(profile, config, toolchain_class):
283283
config - the configuration object that owns the region
284284
toolchain_class - the class of the toolchain being used
285285
"""
286+
if not profile:
287+
return
286288
regions = list(config.regions)
287289
for region in regions:
288290
for define in [(region.name.upper() + "_ADDR", region.start),

0 commit comments

Comments
 (0)