Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makefiles/arch/riscv.inc.mk: speed up toolchain detection #19791

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

maribu
Copy link
Member

@maribu maribu commented Jul 3, 2023

Contribution description

  • Use a sane (a.k.a. simply expanded) variable for the $(TARGET_ARCH) instead of an insane (a.k.a. recursive expended) variable - The toolchain detection will now happen only once, rather than each and every time $(TARGET_ARCH) is referenced
  • Use a single call to which rather than one per possible target triple

Fixes #19788

Testing procedure

unset TARGET_ARCH
unset TARGET_ARCH_RISCV
make BOARD=hifive1b -C examples/default clean

should no be faster than in master

Issues/PRs references

Fixes #19788

@github-actions github-actions bot added Area: build system Area: Build system Platform: RISC-V Platform: This PR/issue effects RISC-V-based platforms labels Jul 3, 2023
@maribu maribu force-pushed the makefiles/arch/riscv.inc.mk-speed-up branch from 3cbeb25 to 4b2d25b Compare July 3, 2023 13:30
@maribu maribu added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jul 3, 2023
makefiles/arch/riscv.inc.mk Outdated Show resolved Hide resolved
- Use a sane (a.k.a. simply expanded) variable for the `$(TARGET_ARCH)`
  instead of an insane (a.k.a. recursive expended) variable
    - The toolchain detection will now happen only once, rather than
      each and every time `$(TARGET_ARCH)` is referenced
- Use a single call to `which` rather than one per possible target
  triple

Fixes RIOT-OS#19788
@maribu maribu force-pushed the makefiles/arch/riscv.inc.mk-speed-up branch from f1a0389 to 55e2233 Compare July 3, 2023 13:57
@riot-ci
Copy link

riot-ci commented Jul 3, 2023

Murdock results

✔️ PASSED

55e2233 makefiles/arch/riscv.inc.mk: speed up toolchain detection

Success Failures Total Runtime
6931 0 6931 10m:05s

Artifacts

@benpicco
Copy link
Contributor

benpicco commented Jul 6, 2023

bors merge

Copy link
Member

@nmeum nmeum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that this fixes #19788 for me.

Excellent work @maribu! 🥳

@bors
Copy link
Contributor

bors bot commented Jul 6, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit e487ac5 into RIOT-OS:master Jul 6, 2023
@benpicco benpicco added this to the Release 2023.07 milestone Aug 2, 2023
@maribu maribu deleted the makefiles/arch/riscv.inc.mk-speed-up branch December 5, 2023 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: RISC-V Platform: This PR/issue effects RISC-V-based platforms Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RISC-V toolchain detection delays all makefile targets by several seconds
4 participants