osmith has uploaded this change for review.
gen_makefile: remove sync commands
Running sync is not necessary while building, and it slows down builds
in jenkins noticeably.
Neels wrote me in 2024 that this was supposed to clearly differentiate
the timestamps of the make targets, to avoid doing unnecessary rebuilds
if a build for one project starts before another one finishes.
However sync doesn't change timestamps, it only synchronizes cached
writes to persistent storage. We also don't build programs or libraries
in parallel, we only build one at a time (with multiple parallel jobs).
Therefore it should be safe to remove this. Revert of 7bd5c31c ("sync
before touching .make.* files").
Change-Id: I5f1d78957ea1c1d76da2abeeb2106b6917ab6eb8
---
M gen_makefile.py
1 file changed, 0 insertions(+), 15 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/97/43497/1
diff --git a/gen_makefile.py b/gen_makefile.py
index e890b7c..203c7f5 100755
--- a/gen_makefile.py
+++ b/gen_makefile.py
@@ -332,7 +332,6 @@
fi
{update_src_copy_cmd}
- sync
touch $@
'''
@@ -346,7 +345,6 @@
{update_src_copy_cmd}
-rm -f {src_proj_copy}/.version
cd {src_proj_copy}; autoreconf -fi
- sync
touch $@
'''
elif buildsystem in ["meson", "erlang", "python", "cmake"]:
@@ -370,7 +368,6 @@
cd {build_proj}; {cflags}{build_to_src}/configure \\
--prefix {shlex.quote(args.install_prefix)} \\
{configure_opts}
- sync
touch $@
'''
elif buildsystem == "meson":
@@ -382,7 +379,6 @@
mkdir -p {build_proj}
cd {build_proj}; {cflags}meson setup {build_to_src} . \\
--prefix {shlex.quote(args.install_prefix)}
- sync
touch $@
'''
elif buildsystem == "cmake":
@@ -394,7 +390,6 @@
mkdir -p {build_proj}
cd {build_proj}; cmake -S {build_to_src} -B . \\
-DCMAKE_INSTALL_PREFIX={shlex.quote(args.install_prefix)}
- sync
touch $@
'''
elif buildsystem in ["erlang", "python"]:
@@ -415,7 +410,6 @@
@echo "\\n\\n\\n===== $@\\n"
{update_src_copy_cmd}
$(MAKE) -C {build_proj} -j {args.jobs} {check}
- sync
touch $@
'''
elif buildsystem == "meson":
@@ -428,7 +422,6 @@
@echo "\\n\\n\\n===== $@\\n"
meson compile -C {build_proj} -j {args.jobs}
{test_line}
- sync
touch $@
'''
elif buildsystem == "erlang":
@@ -439,7 +432,6 @@
export REBAR_BASE_DIR="$$PWD/{build_proj}" && \\
mkdir -p "$$REBAR_BASE_DIR" && \\
$(MAKE) -C {src_proj} build {check}
- sync
touch $@
'''
elif buildsystem == "python":
@@ -452,7 +444,6 @@
--no-isolation \
{src_proj} \
--outdir {build_proj}
- sync
touch $@
'''
elif buildsystem == "cmake":
@@ -464,7 +455,6 @@
@echo "\\n\\n\\n===== $@\\n"
cmake --build {shlex.quote(build_proj)} -j {args.jobs}
{test_cmd}
- sync
touch $@
'''
else:
@@ -481,7 +471,6 @@
@echo "\\n\\n\\n===== $@\\n"
{sudo_make_install}$(MAKE) -C {build_proj} install
{no_ldconfig}{sudo_ldconfig}ldconfig
- sync
touch $@
'''
elif buildsystem == "meson":
@@ -490,7 +479,6 @@
@echo "\\n\\n\\n===== $@\\n"
{sudo_make_install}ninja -C {build_proj} install
{no_ldconfig}{sudo_ldconfig}ldconfig
- sync
touch $@
'''
elif buildsystem == "erlang":
@@ -512,7 +500,6 @@
install -v -Dm755 "$$i" -t {shlex.quote(args.install_prefix)}/bin/; \\
done; \\
fi
- sync
touch $@
'''
elif buildsystem == "python":
@@ -520,7 +507,6 @@
.make.{proj}.install: .make.venv .make.{proj}.build
@echo "\\n\\n\\n===== $@\\n"
{gen_venv_activate()} && pip install {shlex.quote(build_proj)}/*.whl --force-reinstall
- sync
touch $@
'''
elif buildsystem == "cmake":
@@ -528,7 +514,6 @@
.make.{proj}.install: .make.{proj}.build
@echo "\\n\\n\\n===== $@\\n"
cmake --install {shlex.quote(build_proj)}
- sync
touch $@
'''
else:
To view, visit change 43497. To unsubscribe, or for help writing mail filters, visit settings.