File tree Expand file tree Collapse file tree 5 files changed +13
-11
lines changed
legacy_config_generator/evergreen_config_lib Expand file tree Collapse file tree 5 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ functions:
139139 set -o errexit
140140 # Build libmongoc with CMake and compile a program that links
141141 # dynamically to it, using variables from pkg-config.exe.
142+ "PATH="/cygdrive/c/ProgramData/chocolatey/lib/winlibs/tools/mingw64/bin:${PATH:-}" # mingw-w64 GCC
142143 cmd.exe /c .\\.evergreen\\scripts\\link-sample-program-mingw.cmd
143144 link sample program MSVC bson :
144145 - command : shell.exec
@@ -165,6 +166,7 @@ functions:
165166 set -o errexit
166167 # Build libmongoc with CMake and compile a program that links
167168 # dynamically to it, using variables from pkg-config.exe.
169+ "PATH="/cygdrive/c/ProgramData/chocolatey/lib/winlibs/tools/mingw64/bin:${PATH:-}" # mingw-w64 GCC
168170 cmd.exe /c .\\.evergreen\\scripts\\link-sample-program-mingw-bson.cmd
169171 update codecov.io :
170172 - command : shell.exec
Original file line number Diff line number Diff line change 157157 r"""
158158 # Build libmongoc with CMake and compile a program that links
159159 # dynamically to it, using variables from pkg-config.exe.
160+ "PATH="/cygdrive/c/ProgramData/chocolatey/lib/winlibs/tools/mingw64/bin:${PATH:-}" # mingw-w64 GCC
160161 cmd.exe /c .\\.evergreen\\scripts\\link-sample-program-mingw.cmd
161162 """ ,
162163 )
185186 r"""
186187 # Build libmongoc with CMake and compile a program that links
187188 # dynamically to it, using variables from pkg-config.exe.
189+ "PATH="/cygdrive/c/ProgramData/chocolatey/lib/winlibs/tools/mingw64/bin:${PATH:-}" # mingw-w64 GCC
188190 cmd.exe /c .\\.evergreen\\scripts\\link-sample-program-mingw-bson.cmd
189191 """ ,
190192 )
Original file line number Diff line number Diff line change @@ -84,21 +84,19 @@ build_dir="cmake-build"
8484find_ccache_and_export_vars " $( pwd) " || true
8585
8686if [[ " ${CC} " =~ ' gcc' ]]; then
87+ PATH=" /cygdrive/c/ProgramData/chocolatey/lib/winlibs/tools/mingw64/bin:${PATH:- } " # mingw-w64 GCC
88+
8789 export CMAKE_GENERATOR=" Ninja"
8890
8991 # MinGW has trouble compiling src/cpp-check.cpp without some assistance.
9092 configure_flags_append " -DCMAKE_CXX_STANDARD=11"
9193
92- cmake \
93- -S . \
94- -B " ${build_dir:? } " \
95- -G " Ninja" \
96- " ${configure_flags[@]} " \
97- " ${extra_configure_flags[@]} "
94+ # mingw-w64 doesn't like lld (hangs indefinitely?).
95+ configure_flags_append " -DMONGO_USE_LLD=OFF"
96+
97+ cmake " ${configure_flags[@]} " " ${extra_configure_flags[@]} " -B " ${build_dir:? } "
9898
99- cmake --build " ${build_dir:? } "
100- cmake --build " ${build_dir:? } " --target mongo_c_driver_tests
101- cmake --build " ${build_dir:? } " --target mongo_c_driver_examples
99+ cmake --build " ${build_dir:? } " --target all mongo_c_driver_tests mongo_c_driver_examples
102100else
103101 # MSBuild task-based parallelism (VS 2019 16.3 and newer).
104102 export UseMultiToolTask=true
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ set version=1.31.0
2525cd %BUILD_DIR% || goto :error
2626
2727rem Build libmongoc, with flags that the downstream R driver mongolite uses
28- uvx cmake -G " Ninja" DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DCMAKE_C_FLAGS=" -pedantic" -DCMAKE_PREFIX_PATH=%INSTALL_DIR% \lib\cmake -DENABLE_STATIC=ON .. || goto :error
28+ uvx cmake -G " Ninja" -DMONGO_USE_LLD=OFF - DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DCMAKE_C_FLAGS=" -pedantic" -DCMAKE_PREFIX_PATH=%INSTALL_DIR% \lib\cmake -DENABLE_STATIC=ON .. || goto :error
2929uvx cmake --build . --parallel || goto :error
3030uvx cmake --build . --target install || goto :error
3131
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ set major=1
2525cd %BUILD_DIR% || goto :error
2626
2727rem Build libmongoc, with flags that the downstream R driver mongolite uses
28- uvx cmake -G " Ninja" -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DCMAKE_C_FLAGS=" -pedantic" -DCMAKE_PREFIX_PATH=%INSTALL_DIR% \lib\cmake %CMAKE_FLAGS% .. || goto :error
28+ uvx cmake -G " Ninja" -DMONGO_USE_LLD=OFF - DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DCMAKE_C_FLAGS=" -pedantic" -DCMAKE_PREFIX_PATH=%INSTALL_DIR% \lib\cmake %CMAKE_FLAGS% .. || goto :error
2929uvx cmake --build . --parallel || goto :error
3030uvx cmake --build . --target install || goto :error
3131
You can’t perform that action at this time.
0 commit comments