Skip to content

Commit

Permalink
Fix incremental static builds
Browse files Browse the repository at this point in the history
$? refers to the object files that are newer, so the resulting file
would lack all the older object files.
  • Loading branch information
edolstra committed Jun 22, 2022
1 parent f6cf644 commit 696121f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mk/libraries.mk
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ define build-library
$(1)_PATH := $$(_d)/$$($(1)_NAME).a

$$($(1)_PATH): $$($(1)_OBJS) | $$(_d)/
+$$(trace-ld) $(LD) -Ur -o $$(_d)/$$($(1)_NAME).o $$?
+$$(trace-ld) $(LD) -Ur -o $$(_d)/$$($(1)_NAME).o $$^
$$(trace-ar) $(AR) crs $$@ $$(_d)/$$($(1)_NAME).o

$(1)_LDFLAGS_USE += $$($(1)_PATH) $$($(1)_LDFLAGS)
Expand Down

0 comments on commit 696121f

Please sign in to comment.