correctly order weakening step to avoid race

Previously we allowed test programs to be linked at the same time as
weakening is performed, rewriting the .a archives. So lets be more
explicit. We weaken after all-am (which "runs" everything including
libraries and programs), but before all target.
This commit is contained in:
Aliaksey Kandratsenka 2023-06-27 01:20:01 -04:00
parent a39073886a
commit cf28e03567
1 changed files with 3 additions and 2 deletions

View File

@ -1390,10 +1390,11 @@ endif WITH_HEAP_PROFILER_OR_CHECKER
# Do the weakening on some exported libtcmalloc symbols.
install-exec-local: all-local
all-local: $(LIBS_TO_WEAKEN)
run-weaken: all-am
for la in $(LIBS_TO_WEAKEN); do lib=".libs/`basename $$la .la`.a"; [ ! -f "$$lib" ] || $(WEAKEN) "$$lib"; done
install-exec-local: run-weaken
all: run-weaken
# This should always include $(TESTS), but may also include other
# binaries that you compile but don't want automatically installed.