Skip to content

DAOS-19906 build: keep libraft.a and tests_main between builds - #86

Merged
liw merged 3 commits into
daos-stack:masterfrom
OrHayat:or/raft-file-targets
Nov 16, 2026
Merged

liw merged 3 commits into
daos-stack:masterfrom
OrHayat:or/raft-file-targets

Conversation

@OrHayat

@OrHayat OrHayat commented Nov 3, 2026 •

Copy link
Copy Markdown

Stop rebuilding raft on every DAOS scons run when nothing changed.

  • static and tests_main in the Makefile now name the files they build, and tests_main compiles each file to its own object, so make skips what is up to date.
  • Replace VPATH with pattern rules: library objects build from src, and test objects build as $(BUILDDIR)/test-*.o.
  • Remove libraft.a before ar recreates it, so a source dropped from OBJECTS can't leave a stale member.
  • src/SConscript marks libraft.a and tests_main Precious, so scons no longer deletes them before running make.
  • Editing raft sources or headers still rebuilds.

@OrHayat
OrHayat requested a review from a team as a code owner November 3, 2026 11:39
The static and tests_main targets now name the files they build and tests_main compiles each file to its own object, so make skips what is up to date, and SConscript marks both Precious so scons no longer deletes them before running make.

Signed-off-by: Or Hayat <or.hayat@volumez.com>
@OrHayat
OrHayat force-pushed the or/raft-file-targets branch from 3a2c7b9 to aa8d42e Compare November 3, 2026 11:44

@liw liw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you, @OrHayat. A couple of naive questions...

Comment thread Makefile Resolved
Comment thread Makefile Resolved
Build test objects under $(BUILDDIR)/test/ with one pattern rule, and remove libraft.a before recreating it.

Signed-off-by: Or Hayat <or.hayat@volumez.com>
Build test objects as $(BUILDDIR)/test-*.o instead of under $(BUILDDIR)/test/.

Signed-off-by: Or Hayat <or.hayat@volumez.com>
@OrHayat
OrHayat requested a review from liw November 8, 2026 12:54
@OrHayat

OrHayat commented Nov 8, 2026

Copy link
Copy Markdown
Author

@liw i have reverted the makefile to the previous implementation like u wanted

@liw
liw merged commit 71ce8f2 into daos-stack:master Nov 16, 2026
2 checks passed
@liw

liw commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

@liw i have reverted the makefile to the previous implementation like u wanted

@OrHayat, thank you. Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants