Skip to content

Commit d5da2c4

Browse files
authored
Install mimalloc headers in sysroot (#21699)
1 parent dd8641d commit d5da2c4

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

test/test_other.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14596,3 +14596,14 @@ def test_use_port_errors(self, compiler):
1459614596
stderr = self.expect_fail([compiler, test_file('hello_world.c'), '--use-port=sdl2_image:formats=jpg:formats=png', '-o', 'out.js'])
1459714597
self.assertFalse(os.path.exists('out.js'))
1459814598
self.assertContained('error with `--use-port=sdl2_image:formats=jpg:formats=png` | duplicate option `formats`', stderr)
14599+
14600+
def test_mimalloc_headers(self):
14601+
src = r'''
14602+
#include <mimalloc.h>
14603+
14604+
int main() {
14605+
mi_option_enable(mi_option_verbose);
14606+
return 0;
14607+
}
14608+
'''
14609+
self.do_run(src, emcc_args=['-sMALLOC=mimalloc'])

tools/system_libs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2436,6 +2436,7 @@ def install_system_headers(stamp):
24362436
('lib', 'libc', 'musl', 'include'): '',
24372437
('lib', 'libcxx', 'include'): os.path.join('c++', 'v1'),
24382438
('lib', 'libcxxabi', 'include'): os.path.join('c++', 'v1'),
2439+
('lib', 'mimalloc', 'include'): '',
24392440
}
24402441

24412442
target_include_dir = cache.get_include_dir()

0 commit comments

Comments
 (0)