Skip to content

Commit fb5a9dc

Browse files
committed
fix libc++ abi issue
1 parent 7f98a94 commit fb5a9dc

2 files changed

Lines changed: 1 addition & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ jobs:
7878
7979
- name: Build with xmake
8080
run: |
81-
export LLVM_PREFIX=$HOME/.xlings/data/xpkgs/xim-x-llvm/20.1.7
82-
ls -al $LLVM_PREFIX
83-
xmake f -m release --toolchain=llvm --sdk=$LLVM_PREFIX -vv -y
81+
xmake f -m release --toolchain=llvm -vv -y
8482
xmake -j$(nproc)
8583
8684
- name: Verify d2x --version

xmake.lua

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@ target("d2x")
2020
-- platform specific settings
2121
if is_plat("macosx") then
2222
set_toolchains("llvm")
23-
local llvm_prefix = os.getenv("LLVM_PREFIX")
24-
if llvm_prefix then -- if LLVM_PREFIX is set, we assume it's a recent version of LLVM that provides its own libc++ with C++23 support
25-
-- 静态链接 LLVM 自带的 libc++,避免依赖系统 libc++.dylib 中缺失的 C++23 符号
26-
-- (std::println 等 C++23 特性需要 macOS 15+ 的 libc++,静态链接后可在 macOS 11+ 运行)
27-
add_ldflags("-nostdlib++", {force = true})
28-
add_ldflags(llvm_prefix .. "/lib/libc++.a", {force = true})
29-
add_ldflags(llvm_prefix .. "/lib/libc++abi.a", {force = true})
30-
end
3123
elseif is_plat("linux") then
3224
add_ldflags("-static", {force = true})
3325
end

0 commit comments

Comments
 (0)