use relative cache dir, put cache into vpath for clean separation

The zig cache dir used to be specified as an absolute path because of an
issue with build processes for local subdependencies changing the
current working directory incorrectly, this has since been fixed.
Additionally %{builddir} is a new construct that is not available under
EPEL, %{_builddir}/%{?buildsubdir} was considered however there is no
need for an absolute path at this time.

The generated objects should never match on different architectures due
to how the cache system is designed however there this may cause
confusion while debugging so its been put under %{_vpath_builddir}.
Specifying a direct cache name would be possible however I think
_vpath_builddir has become pretty well known to maintainers and would
best be suited for this.
This commit is contained in:
Jan200101 2026-01-04 17:22:54 +01:00
commit b9abbed4a8
No known key found for this signature in database
GPG key ID: 5B71B1D78B882E05
2 changed files with 2 additions and 2 deletions

View file

@ -2,7 +2,7 @@
%zig %{_bindir}/zig
%_zig_cache_dir %{builddir}/zig-cache
%_zig_cache_dir %{_vpath_builddir}/zig-cache
%_zig_package_dir %{_zig_cache_dir}/p
# expected features for each arch when targeting baseline

View file

@ -21,7 +21,7 @@
%bcond macro %{without bootstrap}
%bcond test 1
%global zig_cache_dir %{builddir}/zig-cache
%global zig_cache_dir %{_vpath_builddir}/zig-cache
%global zig_build_options %{shrink: \
--verbose \