Skip to content

feat: Support compile neug.dll on Windows - #786

Open
lnfjpt wants to merge 19 commits into
alibaba:mainfrom
lnfjpt:mmap
Open

feat: Support compile neug.dll on Windows#786
lnfjpt wants to merge 19 commits into
alibaba:mainfrom
lnfjpt:mmap

Conversation

@lnfjpt

@lnfjpt lnfjpt commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Fixes #744, #769

@lnfjpt lnfjpt added the skip-check:tests Bypass test requirement for fix PRs label Jul 28, 2026
@lnfjpt lnfjpt linked an issue Jul 29, 2026 that may be closed by this pull request
@lnfjpt lnfjpt changed the title feat: Support compile neug.dll on Windows (WIP) feat: Support compile neug.dll on Windows Jul 30, 2026
@lnfjpt lnfjpt changed the title feat: Support compile neug.dll on Windows feat: Support compile neug.dll on Windows (WIP) Jul 30, 2026
#include <string>
#include <unordered_map>
#include <vector>
#include "neug/utils/api.h"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个文件存在吗,没找到

#include <cstdint>

// Windows headers may define NONE as a macro; undefine it.
#ifdef NONE

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about rename our NONE? rather than override windows header?

@zhanglei1949
zhanglei1949 requested a review from shirly121 July 30, 2026 02:49
@@ -61,12 +65,16 @@ namespace neug {
/// Util functions.

inline void blockSignal(int sig) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个函数应该可以去掉,没看见有调用

Comment thread src/CMakeLists.txt
# It must be PUBLIC, otherwise there will be performance differences.
target_link_libraries(neug PUBLIC mimalloc)
if(WIN32)
target_link_libraries(neug PUBLIC mimalloc-static)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为啥一定要是static

#include <errno.h>
#include <stdint.h>
#ifndef _WIN32
#include <unistd.h>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个头文件是否可以去掉呢

@lnfjpt lnfjpt changed the title feat: Support compile neug.dll on Windows (WIP) feat: Support compile neug.dll on Windows Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-check:tests Bypass test requirement for fix PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adapting NeuG's PYTHON_BIND for Windows Adapt POSIX mmap implementation for Windows

3 participants