You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2020/08/18 22:11:57 UTC

[qpid-proton] branch master updated: PROTON-2265: Ensure that clang builds work: - Align proton CI build with dispatch CI build - Install llvm linking bits for focal to make clang work with lto

This is an automated email from the ASF dual-hosted git repository.

astitcher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/master by this push:
     new 78b6bfb  PROTON-2265: Ensure that clang builds work: - Align proton CI build with dispatch CI build - Install llvm linking bits for focal to make clang work with lto
78b6bfb is described below

commit 78b6bfb4602b8c4ff5ed0f07a59263cd844512ef
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Tue Aug 18 16:24:05 2020 -0400

    PROTON-2265: Ensure that clang builds work:
    - Align proton CI build with dispatch CI build
    - Install llvm linking bits for focal to make clang work with lto
---
 .travis.yml            |  6 +++---
 c/CMakeLists.txt       | 12 +++++++-----
 c/tests/CMakeLists.txt |  3 ++-
 3 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index f75c493..80555a8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -33,7 +33,7 @@ jobs:
     - OPENSSL_ia32cap='0x00000000'
     # c-threaderciser test hangs on older clang
     - QPID_PROTON_CMAKE_ARGS='-DENABLE_LINKTIME_OPTIMIZATION=OFF'
-    - QPID_PROTON_CTEST_ARGS="--exclude-regex 'c-threaderciser'"
+    - QPID_PROTON_CTEST_ARGS='--exclude-regex c-threaderciser'
   - name: static libs
     os: linux
     dist: focal
@@ -68,12 +68,12 @@ jobs:
     os: linux
     dist: focal
     before_install:
-    - sudo apt-get install -y clang-10
+    - sudo apt-get install -y clang-10 llvm-10-dev
     env:
     - CC=clang-10
     - CXX=clang++-10
     - PYTHON=python3
-    - QPID_PROTON_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DENABLE_LINKTIME_OPTIMIZATION=OFF -DENABLE_TOX_TEST=OFF'
+    - QPID_PROTON_CMAKE_ARGS='-DRUNTIME_CHECK=asan -DENABLE_TOX_TEST=OFF'
     # otherwise, on Travis ldd gives `libclang_rt.asan-x86_64.so => not found` and binaries don't work
     - LD_LIBRARY_PATH=/usr/lib/llvm-10/lib/clang/10.0.0/lib/linux/
   - name: gcc tsan
diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt
index b0c3937..17d9423 100644
--- a/c/CMakeLists.txt
+++ b/c/CMakeLists.txt
@@ -397,7 +397,8 @@ add_library (qpid-proton-core-objects OBJECT ${qpid-proton-core-src})
 add_dependencies (qpid-proton-core-objects generated_c_files)
 set_target_properties(qpid-proton-core-objects PROPERTIES
   POSITION_INDEPENDENT_CODE ON
-  COMPILE_FLAGS "${LTO}")
+  COMPILE_FLAGS "${LTO}"
+  LINK_FLAGS "${CATCH_UNDEFINED} ${LINK_LTO}")
 target_compile_definitions(qpid-proton-core-objects PRIVATE qpid_proton_core_EXPORTS)
 
 # Can't use target_link_libraries() because cmake 2.8.12 doesn't allow object libraries as the first param
@@ -411,7 +412,8 @@ add_library (qpid-proton-platform-io-objects OBJECT ${qpid-proton-platform-io})
 set_target_properties(qpid-proton-platform-io-objects PROPERTIES
   POSITION_INDEPENDENT_CODE ON
   C_EXTENSIONS ON
-  COMPILE_FLAGS "${LTO}")
+  COMPILE_FLAGS "${LTO}"
+  LINK_FLAGS "${CATCH_UNDEFINED} ${LINK_LTO}")
 target_compile_definitions(qpid-proton-platform-io-objects PRIVATE qpid_proton_EXPORTS)
 
 target_compile_definitions(qpid-proton-platform-io-objects PRIVATE $<TARGET_PROPERTY:qpid-proton,COMPILE_DEFINITIONS>)
@@ -425,8 +427,7 @@ set_target_properties (qpid-proton-core
   VERSION   "${PN_LIB_CORE_VERSION}"
   SOVERSION "${PN_LIB_CORE_MAJOR_VERSION}"
   COMPILE_FLAGS "${LTO}"
-  LINK_FLAGS "${CATCH_UNDEFINED} ${LINK_LTO}"
-)
+  LINK_FLAGS "${CATCH_UNDEFINED} ${LINK_LTO}")
 
 if (BUILD_STATIC_LIBS)
   add_library (qpid-proton-core-static STATIC ${qpid-proton-core-src})
@@ -443,7 +444,8 @@ if (qpid-proton-proactor)
   add_library (qpid-proton-proactor-objects OBJECT ${qpid-proton-proactor})
   set_target_properties(qpid-proton-proactor-objects PROPERTIES
     POSITION_INDEPENDENT_CODE ON
-  COMPILE_FLAGS "${LTO}")
+    COMPILE_FLAGS "${LTO}"
+    LINK_FLAGS "${CATCH_UNDEFINED} ${LINK_LTO}")
   target_compile_definitions(qpid-proton-proactor-objects PRIVATE qpid_proton_proactor_EXPORTS)
 
   # Can't use target_link_libraries() because cmake 2.8.12 doesn't allow object libraries as the first param
diff --git a/c/tests/CMakeLists.txt b/c/tests/CMakeLists.txt
index 812b0f4..70cc5dc 100644
--- a/c/tests/CMakeLists.txt
+++ b/c/tests/CMakeLists.txt
@@ -44,7 +44,8 @@ if (CMAKE_CXX_COMPILER)
   macro(add_c_test exe)
     add_executable(${exe} $<TARGET_OBJECTS:test_main> pn_test.cpp ${ARGN})
     set_target_properties(${exe} PROPERTIES
-      COMPILE_FLAGS "${CXX_STANDARD} ${CMAKE_CXX_FLAGS} ${CXX_WARNING_FLAGS}")
+      COMPILE_FLAGS "${CXX_STANDARD} ${CMAKE_CXX_FLAGS} ${CXX_WARNING_FLAGS} ${LTO}"
+      LINK_FLAGS "${CATCH_UNDEFINED} ${LINK_LTO}")
     pn_add_test(
       EXECUTABLE
       NAME ${exe}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org