Skip to content

Commit dde78b5

Browse files
samkevichfacebook-github-bot
authored andcommitted
fix missing mimalloc in shim
Summary: X-link: facebook/buck2#962 `mimalloc` was added as a dependency to buck2 in D73602674. But wasn't added to the shim, so OSS build fails. Reviewed By: IanChilds Differential Revision: D75002030 fbshipit-source-id: e026b9778c391495d9e1fc7c69b2f407bc8b243d
1 parent d33a781 commit dde78b5

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

shim/third-party/rust/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ lalrpop = { version = "0.19.7", artifact = "bin", features = ["pico-args"] }
119119
lalrpop-util = "0.19.7"
120120
libc = "0.2.158"
121121
libfuzzer-sys = "0.4"
122+
libmimalloc-sys = "0.1.42"
122123
linked-hash-map = { version = "0.5", features = ["serde_impl"] }
123124
linkme = { version = "0.3.17", features = ["used_linker"] }
124125
log = "0.4"
@@ -132,6 +133,7 @@ md-5 = "0.10"
132133
memchr = "2.4.1"
133134
memmap2 = "0.5.0"
134135
memoffset = "0.6.4"
136+
mimalloc = { version = "0.1.46", default-features = false }
135137
multimap = "0.8.2"
136138
nix = { version = "0.29.0", features = ["dir", "event", "hostname", "inotify", "ioctl", "mman", "mount", "net", "poll", "ptrace", "reboot", "resource", "sched", "signal", "term", "time", "user", "zerocopy"] }
137139
nom = "7.1.3"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
buildscript.run = false
2+
3+
[[cxx_library]]
4+
name = "libmimalloc"
5+
add_dep = true
6+
srcs = [
7+
"c_src/mimalloc/src/alloc.c",
8+
"c_src/mimalloc/src/alloc-aligned.c",
9+
"c_src/mimalloc/src/alloc-posix.c",
10+
"c_src/mimalloc/src/arena.c",
11+
"c_src/mimalloc/src/bitmap.c",
12+
"c_src/mimalloc/src/heap.c",
13+
"c_src/mimalloc/src/init.c",
14+
"c_src/mimalloc/src/libc.c",
15+
"c_src/mimalloc/src/options.c",
16+
"c_src/mimalloc/src/os.c",
17+
"c_src/mimalloc/src/page.c",
18+
"c_src/mimalloc/src/prim/prim.c",
19+
"c_src/mimalloc/src/random.c",
20+
"c_src/mimalloc/src/segment-map.c",
21+
"c_src/mimalloc/src/segment.c",
22+
"c_src/mimalloc/src/stats.c",
23+
]
24+
headers = [
25+
"c_src/mimalloc/include/**/*.h",
26+
"c_src/mimalloc/src/alloc-override.c",
27+
"c_src/mimalloc/src/arena-abandon.c",
28+
"c_src/mimalloc/src/bitmap.h",
29+
"c_src/mimalloc/src/free.c",
30+
"c_src/mimalloc/src/page-queue.c",
31+
"c_src/mimalloc/src/prim/**/*.c",
32+
]
33+
exported_headers = []
34+
include_paths = ["c_src/mimalloc/include"]

0 commit comments

Comments
 (0)