Skip to content

Build mlir failed in Windows #171

Closed
Closed
@jcwchen

Description

@jcwchen

Here are commands for my mlir build:

git clone --config core.autocrlf=false https://github.com/llvm/llvm-project.git
mkdir llvm-project/build && cd llvm-project/build
cmake -G Ninja ../llvm \
   -DLLVM_ENABLE_PROJECTS=mlir \
   -DLLVM_BUILD_EXAMPLES=ON \
   -DLLVM_TARGETS_TO_BUILD="host" \
   -DCMAKE_BUILD_TYPE=Release \
   -DLLVM_ENABLE_ASSERTIONS=ON \
   -DLLVM_ENABLE_RTTI=ON
cmake --build . --target check-mlir

However, I bumped into some errors while executing the last command. (cmake --build . --target check-mlir)

ex1:
llvm/Support/Mutex.h:29:12: error: 'recursive_mutex' in namespace 'std' does not name a type
ex2:
llvm/lib/Support/CrashRecoveryContext.cpp:89:27: error: 'mutex' is not a member of 'std'
ex3:
llvm/lib/Support/Chrono.cpp:35:17: error: '::localtime_s' has not been declared; did you mean 'localtime'?

It seems like a version issue, but I do not know the proper version. I am using cmake-3.17.0-rc2-win64-x64, ninja v1.10.0, latest MinGW and latest Windows 10.

I saw that there are some updates for fixing Windows issue today. I was wondering that is latest repo works well in Windows? How can I fix my errors?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions