Repository: kudu
Updated Branches:
refs/heads/master 5047f091d -> 9b6034b4e
build: fix ar flags to avoid a warning on newer OSes
726514abfe309b0b88a5d868129f494c379af954 enabled thin linking by
modifying the flags passed to 'ar' to 'cruT'. This caused the following
warning on my Ubuntu 16 box:
ar: `u' modifier ignored since `D' is the default (see `U')
I checked the CMake source and found that the default 'ar' command line
is:
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> qc <TARGET> <LINK_FLAGS> <OBJECTS>")
So, I think it's more appropriate to use 'qcT' instead of 'cruT' ('T' is
the flag which enables the thin libraries). I verified that this still
produces thin libraries and the warnings are gone.
Change-Id: Icef2ba9336196e13cbc43508720874442c3b4460
Reviewed-on: http://gerrit.cloudera.org:8080/9486
Reviewed-by: Adar Dembo <[email protected]>
Tested-by: Kudu Jenkins
Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/11241754
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/11241754
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/11241754
Branch: refs/heads/master
Commit: 11241754b9c5758d8a82fbd16ca53526f4238839
Parents: 5047f09
Author: Todd Lipcon <[email protected]>
Authored: Sun Mar 4 11:33:52 2018 -0800
Committer: Todd Lipcon <[email protected]>
Committed: Mon Mar 5 06:35:03 2018 +0000
----------------------------------------------------------------------
CMakeLists.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kudu/blob/11241754/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a766a9..4503104 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1126,10 +1126,10 @@ set(KUDU_TEST_LINK_LIBS ${KUDU_MIN_TEST_LIBS})
# Use "thin archives" for our static libraries. We only use static libraries
# internal to our own build, so thin ones are just as good and much smaller.
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
- set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cruT <TARGET> <LINK_FLAGS>
<OBJECTS>")
- set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cruT <TARGET> <LINK_FLAGS> <OBJECTS>")
- set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> ruT <TARGET> <LINK_FLAGS>
<OBJECTS>")
- set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> ruT <TARGET> <LINK_FLAGS> <OBJECTS>")
+ set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> qcT <TARGET> <LINK_FLAGS>
<OBJECTS>")
+ set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> qcT <TARGET> <LINK_FLAGS> <OBJECTS>")
+ set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> qT <TARGET> <LINK_FLAGS> <OBJECTS>")
+ set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> qT <TARGET> <LINK_FLAGS> <OBJECTS>")
endif()
############################################################