build: CMake project fixes for MS Visual C++ compiler#11397
build: CMake project fixes for MS Visual C++ compiler#11397mabrarov wants to merge 8 commits intofluent:masterfrom
Conversation
📝 WalkthroughWalkthroughAdds FLB_EXTRA_CMAKE_CXX_FLAGS and FLB_EXTRA_CMAKE_CXX_LINK_FLAGS for delayed C++ flag/linker-flag extension, moves MSVC runtime and /utf-8 handling into a per-config delayed workflow, switches Windows builder to Ninja, and updates developer guide build examples and Windows Dockerfile. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer/CI
participant Docker as Windows Dockerfile (builder)
participant Ninja as Ninja
participant CMake as CMake
participant MSVC as MSVC toolchain
participant Linker as Linker
Dev->>Docker: start Windows build
Docker->>Ninja: install & use Ninja generator
Ninja->>CMake: configure (reads FLB_EXTRA_CMAKE_CXX_* vars)
CMake->>MSVC: apply per-config flags (/utf-8, runtime via delayed vars)
MSVC->>Linker: compile & link objects
Linker->>Dev: produce final binary
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
0f21046 to
36badb0
Compare
36badb0 to
ae52f35
Compare
ae52f35 to
6e2e864
Compare
ba306f3 to
d1a2f04
Compare
|
Hi dear maintainers, I appreciate if you can find time to review this PR, because it is essential for development of Fluent Bit on / for Windows (e.g. debugging). Thank you. |
Signed-off-by: Marat Abrarov <abrarov@gmail.com>
Signed-off-by: Marat Abrarov <abrarov@gmail.com>
Signed-off-by: Marat Abrarov <abrarov@gmail.com>
Signed-off-by: Marat Abrarov <abrarov@gmail.com>
Signed-off-by: Marat Abrarov <abrarov@gmail.com>
Signed-off-by: Marat Abrarov <abrarov@gmail.com>
Signed-off-by: Marat Abrarov <abrarov@gmail.com>
Signed-off-by: Marat Abrarov <abrarov@gmail.com>
d1a2f04 to
e2b8783
Compare
Summary
Note: multi-config CMake Generators (like "Visual Studio" ones) can still have issues due to Fluent Bit CMake project doesn't honor and doesn't support the build type(s) specified when CMake generates native build system project - e.g.
CMAKE_BUILD_TYPEpassed through command line andCMAKE_CONFIGURATION_TYPES. Support of multi-config CMake Generators can require usage of CMake generator expressions everywhere build-config specific compiler / linker options are added / modified, can require revisiting of the way linked libraries are specified, e.g. they should not use-loption with hard-coded name of static library file, because the name of library file can depend on build configuration on Windows - e.g. libcrypto.lib forReleaseandRelWithDebInfobuilds with/MTcompiler option (static release MS C/C++ runtime) vs libcryptod.lib forDebugbuild with/MTdcompiler option (static debug MS C/C++ runtime).Testing
Before we can approve your change; please submit the following in a comment:
TEST_PRESET=valgrind SKIP_TESTS='flb-rt-out_td flb-it-network' ./run_code_analysis.shok-package-testlabel to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.
Summary by CodeRabbit
Build & Infrastructure
Documentation