Compilation in different directories not replacing absolute path of source file when using BASEDIR #1370
ribsthakkar
started this conversation in
Support
Replies: 1 comment 4 replies
-
These are not supposed to be hashed as Which ccache version are you using? What is the full command line ( |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am working on a project where I am compiling my project from two different directories
/data/a/buildand/data/b/build.My ccache environment variables for directory
aare:My ccache environment variables for directory
bare the same as above with the exception of base_dir, which is/data/bI am using CMake with the Ninja generator, and I have several include args in my generated compile commands for my targets. And, as expected I correctly see in the ccache-log that the include files are being converted to relative paths with respect to my base_dir var. However, when I run an identical clone of my project in both directories, I don't get any hits. Upon investigating the .ccache-input-text for each of my targets, I see that the last arg (the source file arg) listed under the PREPROCESSOR MODE section is listed with its absolute path. Otherwise, there is no diff between the input-text. See below an example for target p1:
There is a similar diff in the ccache-input-p files with this absolute path being included to the main.c in the very first line. The remaining of the binary is identical.
Below is a snippet of the input-text file from
bbefore the preprocessor output begins confirming the diff above where we seemingly encode the absolute path to the source file:Below is a snippet from the ccache-log file indicating the relative path conversion worked as expected when producing the pre-processor output:
Is there another setting I am missing here?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions