Skip to content

Adapt xlings 0.4.0#18

Merged
Sunrisepeak merged 28 commits intomainfrom
adapt_xlings_0.4.0
Mar 8, 2026
Merged

Adapt xlings 0.4.0#18
Sunrisepeak merged 28 commits intomainfrom
adapt_xlings_0.4.0

Conversation

@Sunrisepeak
Copy link
Member

No description provided.

Sunrisepeak and others added 28 commits March 6, 2026 19:39
…g_view

- get_home_dir() is runtime (getenv), cannot use in constexpr
- string_view from temporary string would dangle after expression ends
- Add get_xlings_bin() returning std::string, keep get_home_dir in original position
- Update platform.cppm and xlings.cppm to use get_xlings_bin()
Switch Linux CI and release builds to use musl-gcc 15.1 downloaded
directly from xlings-res/musl-gcc releases, matching the approach used
by xlings. Also switch to bundled xmake v3.0.7, ubuntu-24.04, and the
raw githubusercontent Xlings install URL.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The helper binaries (as, cc1, collect2) in the musl-gcc package have a
hardcoded ELF interpreter path (/home/xlings/.xlings_data/lib/ld-musl-x86_64.so.1).
Create the required symlinks so the toolchain can execute on the runner.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Without --sysroot, xmake cannot find musl headers (they live under
$MUSL_SDK/x86_64-linux-musl/, not $MUSL_SDK/), so cmake-based packages
fall back to /usr/include (glibc headers), causing incompatible
bits/wordsize.h errors when compiling with musl-gcc.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Switch Linux static portability strategy from musl-gcc cross-compilation
(incompatible with xmake v3.0.7 package builds) to -static ldflags in
xmake.lua. xmake builds all dependencies (libcurl, ftxui, cmdline) as
static libs by default, so -static produces a fully self-contained binary
using the system gcc toolchain.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
cmake adds -isystem /usr/include which gcc --sysroot remaps to
$SYSROOT/usr/include. Create usr/include and usr/lib symlinks in the
musl sysroot so the remapping resolves to musl headers instead of
falling through to glibc headers.

Pass --sysroot via --cflags/--cxxflags (xmake f has no --sysroot flag)
and also export CFLAGS/CXXFLAGS so cmake package builds inherit it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Install xmake@3.0.7 and gcc@15 through xlings instead of manual
musl-gcc cross-compilation setup. xlings handles toolchain management
and exposes binaries via subos/current/bin.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Sunrisepeak Sunrisepeak merged commit 7f98a94 into main Mar 8, 2026
3 checks passed
@Sunrisepeak Sunrisepeak deleted the adapt_xlings_0.4.0 branch March 8, 2026 00:24
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