Skip to content

Add MSVC support for Windows port#68

Open
peterboncz wants to merge 28 commits intodevfrom
windows-port
Open

Add MSVC support for Windows port#68
peterboncz wants to merge 28 commits intodevfrom
windows-port

Conversation

@peterboncz
Copy link
Copy Markdown

Enable FastLanes to compile with both Clang (Linux/MacOS) and MSVC (Windows).

in detail:

  • New compiler.hpp portability header centralizing compiler-specific macros (vectorize pragmas, __builtin_clz/ctz, diagnostic push/pop)
  • CMakeLists.txt: accept MSVC alongside Clang, with appropriate flag mappings
  • Replace ~700 #pragma clang loop vectorize(enable) with FLS_PRAGMA_VECTORIZE
  • Replace #pragma GCC/clang diagnostic with portable FLS_DIAG_* macros
  • Add Windows implementation for memory_usage.cpp (GetProcessMemoryInfo)
  • Add MSVC compat shims to fsst12.h (matching existing fsst.h pattern)
  • Guard Clang-only -Wno-macro-redefined flags in 8 subdirectory CMakeLists.txt
  • Add /bigobj, /MP, /Zc:__cplusplus flags for MSVC builds
  • Split interpreter.cpp into encoding/decoding files to reduce MSVC compile time
  • Fix C++20 structured binding in range-for (unsupported by MSVC)

(This is a first step towards vcpkg packaging, which will make including FastLanes
in a project easier. We need Windows not only because it is such a modern and nice
OS, but also because it is a native platform for DuckDB and we want to use the
future vcpkg version in the a DuckDB extension for FastLanes.)

=================================

Enable FastLanes to compile with both Clang (Linux/MacOS) and MSVC (Windows).

(This is a first step towards vcpkg packaging, which will make including FastLanes
 in a project easier. We need Windows not only because it is such a modern and nice
 OS, but also because it is a native platform for DuckDB and we want to use the
 future vcpkg version in the a DuckDB extension for FastLanes.)

in detail:
- New compiler.hpp portability header centralizing compiler-specific macros
  (vectorize pragmas, __builtin_clz/ctz, diagnostic push/pop)
- CMakeLists.txt: accept MSVC alongside Clang, with appropriate flag mappings
- Replace ~700 #pragma clang loop vectorize(enable) with FLS_PRAGMA_VECTORIZE
- Replace #pragma GCC/clang diagnostic with portable FLS_DIAG_* macros
- Add Windows implementation for memory_usage.cpp (GetProcessMemoryInfo)
- Add MSVC compat shims to fsst12.h (matching existing fsst.h pattern)
- Guard Clang-only -Wno-macro-redefined flags in 8 subdirectory CMakeLists.txt
- Add /bigobj, /MP, /Zc:__cplusplus flags for MSVC builds
- Split interpreter.cpp into encoding/decoding files to reduce MSVC compile time
- Fix C++20 structured binding in range-for (unsupported by MSVC)
…msvc++ compile time passable for windows CI)

make format
- add newer macos 26, deprecate 13
- remove debug/true builds as they are slow and flaky
- add windows-arm as a platform
- add mvsc test and example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant