Skip to content

Fix parallel and cross-architecture builds - #21

Draft
jason-rl wants to merge 4 commits into
mainfrom
jason/fix-parallel-multiarch-builds
Draft

Fix parallel and cross-architecture builds#21
jason-rl wants to merge 4 commits into
mainfrom
jason/fix-parallel-multiarch-builds

Conversation

@jason-rl

@jason-rl jason-rl commented Aug 25, 2026

Copy link
Copy Markdown

What this PR does / why we need it:

Allows OverlayBD to build with maximum top-level parallelism without dependency-order races or multiplicative nested parallelism. It also supports and validates Linux x86_64-to-arm64 and arm64-to-x86_64 cross-compilation with target-isolated toolchains.

This carries the relevant fixes from containerd/overlaybd#369, declares generated dependency outputs and consumers explicitly, preserves caller ISA flags, and keeps compatibility patches in the OverlayBD source build rather than downstream Dockerfiles.

Validation completed:

  • Full Unix Makefiles build at --parallel $(nproc)
  • Native arm64 build and install
  • arm64 host to x86-64-v3 full cross-build
  • Bundled DML build with GCC 13
  • actionlint and git diff --check

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):

N/A

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test? Yes; cross-build and optional-dependency CI coverage is included.
  • Does this change require a documentation update? No documentation update is required.
  • Does this introduce breaking changes that would require an announcement or bumping the major version? No breaking change is introduced.
  • Do all new files have an appropriate license header? Yes; license headers are retained where applicable, while workflow and configuration files do not require one.

chewi and others added 3 commits August 25, 2026 14:07
There is no need to check the architecture twice. Also check for arm64
(MacOS) wherever we check for aarch64 (Linux).

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Packagers may specify a target system up front, which should be
respected. The CRC extensions are not strictly necessary as there is a
software fallback.

Otherwise, use -mcpu=native if it works (it won't when cross-compiling)
or -mcpu=generic+crc.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Declare generated libraries and headers as real build outputs, connect imported targets to their producers, and serialize only nested dependency builds to avoid multiplicative oversubscription. Preserve caller ISA flags and make bundled dependencies safely reconfigure when their recipes change.

Build zstd through its CMake target and carry the Photon and DML compatibility patches in OverlayBD rather than image build scripts.
@jason-rl
jason-rl force-pushed the jason/fix-parallel-multiarch-builds branch from 000556a to d09c5d1 Compare August 25, 2026 23:06
Provide target-isolated GNU toolchains for x86_64 and arm64, pin host and target packages, and exercise both cross directions with Unix Makefiles at full outer parallelism.

Also validate bundled curl, DML, and ISA-L configurations independently.
@jason-rl
jason-rl force-pushed the jason/fix-parallel-multiarch-builds branch from d09c5d1 to 109bb64 Compare August 25, 2026 23:25
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