Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.6.3
-
None
Description
When building the deps for QtPdf coming from Chromium, by default the build system will use the relative path to sysroot (which is inside NDK). Like this:
--sysroot=../../../../../../../../../../r25b/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot
The relative path might even go down to the root of the fs depending on where the sources are located and where the NDK is located.
This will be the cause for a ccache miss for builds where the source base path is in directories of different depth.
Setting the path to absolute will permit one to increase the ccache hits.
Note that without these changes, there were ~ 1000 ccache misses to build only QtPdf (I didn't try building the whole webengine) when the sources are located in a different depth.
Below is a suggested patch. Unfortunately it patches a file in the chromium build tree, and I don't know if you apply patches there, or if there is another way to achieve the same.
--- a/qtwebengine/src/3rdparty/chromium/build/config/posix/BUILD.gn +++ b/qtwebengine/src/3rdparty/chromium/build/config/posix/BUILD.gn @@ -27,7 +27,7 @@ if (!is_apple && sysroot != "" && current_os != "zos") { # Pass the sysroot to all C compiler variants, the assembler, and linker. - sysroot_flags = [ "--sysroot=" + rebase_path(sysroot, root_build_dir) ] + sysroot_flags = [ "--sysroot=" + sysroot ] if (is_linux || is_chromeos) { # This is here so that all files get recompiled after a sysroot roll and # when turning the sysroot on or off. (defines are passed via the command