Skip to content

Commit

Permalink
mlif: add extend_attrs cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Aug 19, 2024
1 parent f67dba3 commit 293366b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mlonmcu/platform/mlif/mlif.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class MlifPlatform(CompilePlatform, TargetPlatform):
# llvm specific (TODO: move to toolchain components)
"fuse_ld": None,
"global_isel": False,
"extend_attrs": False,
}

REQUIRED = {"mlif.src_dir"}
Expand Down Expand Up @@ -275,6 +276,11 @@ def global_isel(self):
value = self.config["global_isel"]
return str2bool(value) if not isinstance(value, (bool, int)) else value

@property
def extend_attrs(self):
value = self.config["extend_attrs"]
return str2bool(value) if not isinstance(value, (bool, int)) else value

@property
def strip_strings(self):
value = self.config["strip_strings"]
Expand Down Expand Up @@ -325,6 +331,8 @@ def get_definitions(self):
definitions["FUSE_LD"] = self.fuse_ld
if self.global_isel is not None:
definitions["GLOBAL_ISEL"] = self.global_isel
if self.extend_attrs is not None:
definitions["EXTEND_ATTRS"] = self.extend_attrs
if self.strip_strings is not None:
definitions["STRIP_STRINGS"] = self.strip_strings
if self.unroll_loops is not None:
Expand Down

0 comments on commit 293366b

Please sign in to comment.