Hello Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/10267
to look at the new patch set (#5).
Change subject: IMPALA-6974: Use CMAKE_POSITION_INDEPENDENT_CODE in backend
......................................................................
IMPALA-6974: Use CMAKE_POSITION_INDEPENDENT_CODE in backend
Compilation of individual c++ files are only slightly
different between static and shared compilation. First,
CMake adds -D${LIBRARY_NAME}_EXPORTS to each compilation.
Second, CMake sets CMAKE_POSITION_INDEPENDENT_CODE, which
adds an -fPIC/-fPIE flag automatically. The extra define
is not used by our code, so preprocessing results in
identical code. However, we currently add a global -fPIC
to all compilation whether static or shared. This
introduces a second -fPIC flag on shared where static
only has one. This prevents a hit in ccache, even after
preprocessing.
Switching a global -fPIC to CMAKE_POSITION_INDEPENDENT_CODE
eliminates the difference between shared and static
compilation (apart from the added define). This allows
a ccache hit after preprocessing.
There is a slight difference in some of the compile
commands. CMAKE_POSITION_INDEPENDENT_CODE will add
an -fPIC or a -fPIE depending on whether the C++ file
is going to be an executable. For example,
daemon-main.cc gets -fPIE whereas hdfs-scan-node.cc
gets -fPIC. Previously, everything had an -fPIC.
This saves about an hour on all-build-options-ub1604
due to a higher ccache hit rate.
Before:
cache hit (direct) 1523
cache hit (preprocessed) 61
cache miss 12690
After:
cache hit (direct) 1513
cache hit (preprocessed) 5575
cache miss 7186
Change-Id: Id37bb5afa6a9b7909bb4efe1390a67f7d1469544
---
M be/CMakeLists.txt
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/67/10267/5
--
To view, visit http://gerrit.cloudera.org:8080/10267
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id37bb5afa6a9b7909bb4efe1390a67f7d1469544
Gerrit-Change-Number: 10267
Gerrit-PatchSet: 5
Gerrit-Owner: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>