Skip to content

Commit

Permalink
RISCVTarget: add lookup for arch&abi specific riscv gccs (TODO: add r…
Browse files Browse the repository at this point in the history
…egex to OPTIONALs?)
  • Loading branch information
PhilippvK committed Nov 21, 2024
1 parent 21f895e commit fab7131
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mlonmcu/target/riscv/riscv.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,28 @@ def reconfigure(self):

@property
def riscv_gcc_prefix(self):
return Path(
ret = Path(
pick_first(
self.config,
[
f"riscv_gcc_{self.arch}_{self.abi}.install_dir",
f"riscv_gcc_{self.arch}.install_dir",
f"riscv_gcc_rv{self.xlen}.install_dir",
"riscv_gcc.install_dir",
],
)
)
# TODO: handle none
return ret

@property
def riscv_gcc_basename(self):
return Path(
pick_first(
self.config,
[
f"riscv_gcc_{self.arch}_{self.abi}.name",
f"riscv_gcc_{self.arch}.name",
f"riscv_gcc_rv{self.xlen}.name",
"riscv_gcc.name",
],
Expand All @@ -117,6 +123,7 @@ def gcc_variant(self):
pick_first(
self.config,
[
f"riscv_gcc_{self.arch}_{self.abi}.variant",
f"riscv_gcc_rv{self.xlen}.variant",
"riscv_gcc.variant",
],
Expand Down

0 comments on commit fab7131

Please sign in to comment.