Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

## [Unreleased]

### Fixed

- **compat.mimalloc:ok 映像不再链接 `-lpthread`、`-lrt`,Linux 不再链接 `-latomic`。** ok 映像(`<arch>-openkal`)原先读 `linux`
块,链接时找不到这两个归档;新增 `openkal` 块,不列链接参数。`-latomic` 上游只在找到时才链接,mimalloc 的原子操作在本索引
构建的各架构上都是无锁的,LLVM 工具链在图中 C 库之上没有这个归档。

### Added

- **compat.mimalloc 3.6.1。** 与 3.4.5 并存;同一份源文件列表同时写出两个版本的目录布局(3.6.1 分为 `alloc/`、`arena/`、
Expand Down
19 changes: 15 additions & 4 deletions pkgs/c/compat.mimalloc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,22 @@ package = {
targets = { ["mimalloc"] = { kind = "lib" } },
deps = {},
linux = {
-- CMakeLists.txt:618-626 -- pthread for thread state, rt for
-- clock_gettime/shm, atomic for the 64-bit atomics on targets
-- where libatomic is not folded into libgcc.
ldflags = { "-lpthread", "-lrt", "-latomic" },
-- CMakeLists.txt (3.6.1: 886-898) -- pthread for thread state, rt
-- for clock_gettime/shm.
--
-- NOT `-latomic`, which upstream links only where it finds the
-- library ("detected automatically"): mimalloc's atomics are
-- lock-free on every architecture this index builds for, and a
-- toolchain without the archive (the LLVM one, above a C library
-- of the graph) failed the link on its name alone.
ldflags = { "-lpthread", "-lrt" },
},
-- AN OK IMAGE (openkal SPEC 12) NAMES NOTHING AT ITS LINK. Its C library
-- supplies threads and clocks, and an image imports `kal_*` alone; an
-- ok target otherwise reads the `linux` block, whose `-lpthread` and
-- `-lrt` name archives an image's link does not have. The key is
-- written out: a block with no key is read as no block.
openkal = { ldflags = {} },
macosx = {
ldflags = { "-lpthread" },
},
Expand Down
Loading