Skip to content

Feature/configurable arch baseline - #125

Open
pplupo wants to merge 2 commits into
Euro-Office:mainfrom
pplupo:feature/configurable-arch-baseline
Open

Feature/configurable arch baseline#125
pplupo wants to merge 2 commits into
Euro-Office:mainfrom
pplupo:feature/configurable-arch-baseline

Conversation

@pplupo

@pplupo pplupo commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Makes the target x86-64 microarchitecture baseline for Linux builds configurable, instead of hardcoding it. Adds vcpkg overlay triplets (x64-linux-v2 default, x64-linux-baseline for plain x86-64) and threads ARCH_TRIPLET/ARCH_MARCH_FLAGS through the Docker bake config and build.sh.

Why

Raising the official baseline to x86-64-v2 (SSE4.2/POPCNT) gives Qt and other vcpkg-built dependencies access to SIMD-optimized code paths instead of falling back to unoptimized generic code — but it drops support for older CPUs that predate v2. Rather than the team maintaining a second, permanently-tracked toolchain to support that hardware, this exposes the microarchitecture as a build-time parameter so anyone who needs a legacy build can produce one themselves from the same sources, without affecting the default build path.

Changes

  • core: adds triplets/x64-linux-v2.cmake (default) and triplets/x64-linux-baseline.cmake vcpkg overlay triplets; wires ARCH_TRIPLET/ARCH_MARCH_FLAGS build args into the core cmake invocation in .docker/core.bake.Dockerfile.
  • desktop-apps: same args threaded through .docker/desktop-apps.bake.Dockerfile's vcpkg/cmake invocation, since Qt is built there via the vcpkg manifest.
  • Superproject: declares ARCH_TRIPLET (default x64-linux-v2) and ARCH_MARCH_FLAGS (default -march=x86-64-v2) in build/docker-bake.hcl and build/linux/docker-bake.hcl, and exposes them as overridable environment variables in build/linux/build.sh.

Usage

Default behavior is unchanged. To produce a baseline x86-64 build:

```sh
ARCH_TRIPLET=x64-linux-baseline ARCH_MARCH_FLAGS=-march=x86-64 ./build.sh
```

Scope / non-goals

  • No change to official release builds, CI, or support — those stay on x86-64-v2.
  • Doesn't provide a one-flag "legacy build" experience end-to-end; someone building baseline still owns their own build/distribution.

#125
Euro-Office/desktop-apps#35
Euro-Office/DesktopEditors#61

pplupo added 2 commits July 22, 2026 17:56
Add x64-linux-v2 (default) and x64-linux-baseline overlay triplets and
thread ARCH_TRIPLET/ARCH_MARCH_FLAGS build args through the core cmake
invocation, so downstream builders can compile against plain x86-64
without the team maintaining a second officially-supported toolchain.

Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
Both custom overlay triplets omitted this setting, which vcpkg's own
community x64-linux triplet always includes. Without it vcpkg defaults
to assuming a Windows target and tries to detect a Visual Studio
Developer Prompt toolchain, which fails outright on a Linux host:
'Use of Visual Studio's Developer Prompt is unsupported on non-Windows
hosts.' Only surfaced now since this is the first build to actually
exercise these triplets end-to-end.

Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
@pplupo
pplupo force-pushed the feature/configurable-arch-baseline branch from 06659fd to acaf3a2 Compare July 22, 2026 21:56
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.

1 participant