Open
Description
This is with cmake 3.31.4
I observed that if I build llama.cpp from the command line:
mkdir build
cd build
cmake.exe ../ -DCMAKE_BUILD_TYPE=Release -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_SERVER=OFF
cmake.exe --build . -j 32 --config Release
the compiler flags comes out to:
CMAKE_CXX_FLAGS:STRING=/DWIN32 /D_WINDOWS /W3 /GR /EHsc
CMAKE_CXX_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /DNDEBUG
CMAKE_C_FLAGS:STRING=/DWIN32 /D_WINDOWS /W3
CMAKE_C_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /DNDEBUG
by contrast, llama-cpp-rs's build script which uses this crate ends up generating:
CMAKE_CXX_FLAGS:STRING= -nologo -MD -Brepro
CMAKE_CXX_FLAGS_RELEASE:STRING= -nologo -MD -Brepro
CMAKE_C_FLAGS:STRING= -nologo -MD -Brepro
CMAKE_C_FLAGS_RELEASE:STRING= -nologo -MD -Brepro
when building the dev Cargo profile which seems wrong - optimizations shouldn't disappear from the Release CMake profile just because we're building under dev. The flags revert to the correct settings when built under release.
Filed upstream ticket to track it in both repos utilityai/llama-cpp-rs#649 but I suspect the fault has to lie with this crate since the build.rs isn't doing anything that would explain a change in this behavior.
Metadata
Metadata
Assignees
Labels
No labels