Skip to content

Commit

Permalink
Merge pull request #2119 from long-pham/pr_useAllCPUCores
Browse files Browse the repository at this point in the history
Utilizing all available CPU cores in the software make cmd
  • Loading branch information
enjoy-digital authored Nov 12, 2024
2 parents e9e0140 + d8e168a commit 0f45ea2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions litex/soc/integration/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,16 +317,16 @@ def _prepare_rom_software(self):

def _generate_rom_software(self, compile_bios=True):
# Compile all software packages.
for name, src_dir in self.software_packages:

cpu_count = os.cpu_count()
for name, src_dir in self.software_packages:
# Skip BIOS compilation when disabled.
if name == "bios" and not compile_bios:
continue
# Compile software package.
dst_dir = os.path.join(self.software_dir, name)
makefile = os.path.join(src_dir, "Makefile")
if self.compile_software:
subprocess.check_call(["make", "-C", dst_dir, "-f", makefile])
subprocess.check_call(["make", f"-j{cpu_count}", "-C", dst_dir, "-f", makefile])

def _initialize_rom_software(self):
# Get BIOS data from compiled BIOS binary.
Expand Down

0 comments on commit 0f45ea2

Please sign in to comment.