在没有内存映射 IO 的情况下构建提升
Building boost without memory-mapped IO
我正在尝试为没有 mmap
/munmap
(带有 devkitPro 工具链的 Nintendo Switch)的平台构建 boost 1.71。构建失败,因为没有 <sys/mman.h>
文件。
如何配置 boost 以禁用内存映射 IO?我检查了boost/config/user.hpp
,但那里似乎没有相关选项。
对于Header-Only使用:
确保
BOOST_CONTEXT_USE_MAP_STACK
未 定义
避免包含 context/posix/protected_fixedsize_stack.hpp
。 (header守卫BOOST_CONTEXT_PROTECTED_FIXEDSIZE_H
)
避免包含 coroutine/posix/protected_stack_allocator.hpp
。 (header守卫BOOST_COROUTINES_PROTECTED_STACK_ALLOCATOR_H
)
BOOST_SPIRIT_FILEITERATOR_POSIX
未 如果您使用 Spirit Classic
不要使用 Boost Interprocess 共享 memory/mapped 文件。 interprocess/anonymous_shared_memory.hpp
、interprocess/shared_memory_object.hpp
、interprocess/mapped_region.hpp
)
There seems to potentially be a way to (de)configure some of the for BOost Interprocess but I don't know what sets defined(BOOST_INTERPROCESS_POSIX_SHARED_MEMORY_OBJECTS)
and it looks like it doesn't cover all uses anyways
图书馆编译
该列表将包括以上所有内容以及任何可传递地依赖于它们的内容。
This could be a lot, but I haven't traced them. So maybe you are in luck for the libraries you are after
虽然可以调整以下直接依赖项:
- Boost 容器中嵌入的 dlmalloc 实现的副本已配置为
LACKS_SYS_MMAN_H
,所以没有问题
- 显然
iostreams/src/mapped_file.cpp
是个问题,所以你不能构建Iostreams库(干脆把它排除掉)。如果你需要休息,你可以follow their guide to include specific source files for specific parts of the library implementation
我正在尝试为没有 mmap
/munmap
(带有 devkitPro 工具链的 Nintendo Switch)的平台构建 boost 1.71。构建失败,因为没有 <sys/mman.h>
文件。
如何配置 boost 以禁用内存映射 IO?我检查了boost/config/user.hpp
,但那里似乎没有相关选项。
对于Header-Only使用:
确保
BOOST_CONTEXT_USE_MAP_STACK
未 定义避免包含
context/posix/protected_fixedsize_stack.hpp
。 (header守卫BOOST_CONTEXT_PROTECTED_FIXEDSIZE_H
)避免包含
coroutine/posix/protected_stack_allocator.hpp
。 (header守卫BOOST_COROUTINES_PROTECTED_STACK_ALLOCATOR_H
)BOOST_SPIRIT_FILEITERATOR_POSIX
未 如果您使用 Spirit Classic不要使用 Boost Interprocess 共享 memory/mapped 文件。
interprocess/anonymous_shared_memory.hpp
、interprocess/shared_memory_object.hpp
、interprocess/mapped_region.hpp
)There seems to potentially be a way to (de)configure some of the for BOost Interprocess but I don't know what sets
defined(BOOST_INTERPROCESS_POSIX_SHARED_MEMORY_OBJECTS)
and it looks like it doesn't cover all uses anyways
图书馆编译
该列表将包括以上所有内容以及任何可传递地依赖于它们的内容。
This could be a lot, but I haven't traced them. So maybe you are in luck for the libraries you are after
虽然可以调整以下直接依赖项:
- Boost 容器中嵌入的 dlmalloc 实现的副本已配置为
LACKS_SYS_MMAN_H
,所以没有问题 - 显然
iostreams/src/mapped_file.cpp
是个问题,所以你不能构建Iostreams库(干脆把它排除掉)。如果你需要休息,你可以follow their guide to include specific source files for specific parts of the library implementation