Conversation
runtime/layout/runtime-rs 原为 Linux-only,macOS 必挂: - runtime/CMakeLists:link kvspace m pthread + GNU ld 专属 --export-dynamic/--disable-new-dtags - layout/build.rs、runtime-rs/build.rs:--disable-new-dtags、$ORIGIN、 硬编码 /usr/lib/kvspace 改法: - 引入 KVSPACE_LIB_DIR(CMake cache 变量 / 构建环境变量),默认 /usr/lib/kvspace,macOS CI 传 /usr/local/lib/kvspace(/usr 受 SIP 保护) - 平台条件化:macOS 去掉 m/pthread、去掉 --disable-new-dtags、 $ORIGIN → @loader_path - Linux 默认行为不变 新增 ci-macos.yml:源码构建 kvspace → layout/runtime/runtime-rs 编译通过。 Closes #321 Co-Authored-By: Claude Code <noreply@anthropic.com>
program_invocation_short_name 是 glibc 专有,macOS/BSD 无。改用 getprogname();#if __APPLE__ 分支,Linux 路径不变。 Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更
让 kvlang 能在 macOS 构建(配合 6 仓 macOS CI 任务)。
原状(Linux-only,macOS 必挂)
runtime/CMakeLists.txt:link kvspace m pthread(macOS 无 libm/libpthread,都在 libSystem);LINK_FLAGS=-Wl,--export-dynamic -Wl,--disable-new-dtags(ld64 不认--disable-new-dtags);/usr/lib/kvspace硬编码layout/build.rs、runtime-rs/build.rs:-Wl,--disable-new-dtags、-Wl,-rpath,$ORIGIN(macOS 应为@loader_path)、路径硬编码改法
KVSPACE_LIB_DIR(CMake cache 变量 + 构建环境变量),默认/usr/lib/kvspace→ macOS CI 传/usr/local/lib/kvspace(/usr受 SIP 保护)m/pthread、去掉--disable-new-dtags、$ORIGIN→@loader_pathCI
新增
ci-macos.yml:macos-latest上源码构建 kvspace(装/usr/local)→layout/runtime/runtime-rs编译通过。本地已回归验证:Linux 上 runtime/layout/runtime-rs 三件全部构建成功。
Closes #321
🤖 Generated with Claude Code