Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 2.13.0
-
None
-
ghx-label-6
Description
In be/CMakeLists.txt, we add an -fPIC flag unconditionally:
# allow linking of static libs into dynamic lib
add_definitions(-fPIC)
When building in static mode, every command will have an -fPIC flag. However, when building in shared mode, CMake adds -fPIC (or -fPIE) automatically, so every command will have -fPIC plus another -fPIC added by CMake. These extra flags prevent ccache from sharing entries between static and shared builds even after preprocessing.