serenity icon indicating copy to clipboard operation
serenity copied to clipboard

wrong compiler launcher when CMAKE_X_COMPILER_PATH specified on the command line contains a non-absolute path

Open pobrn opened this issue 2 years ago • 1 comments

Run the following:

cmake -G Ninja -S Ladybird -B build -D CMAKE_CXX_COMPILER_LAUNCHER=ccache

then observe that build/build.ninja contains

LAUNCHER = <cwd of cmake at configure time>/ccache

I would expect LAUNCHER to be just ccache or an absolute path looked up from PATH. I am not sure why it transforms the path, I imagine it is done in Meta/CMake/setup_ccache.cmake somewhere.

pobrn avatar Feb 18 '24 19:02 pobrn

This is because of this commmit https://github.com/SerenityOS/serenity/commit/483c18437b1e9c8bd2903726ba782c732eee440d. According to the commit description, not doing this makes distributed compiler setups like icecc confused when ccache is passed as -DCMAKE_C_COMPILER=ccache.

ADKaster avatar Feb 18 '24 21:02 ADKaster