diff options
author | Allen Winter <allen.winter@kdab.com> | 2019-05-05 13:01:49 -0400 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2019-05-05 13:02:45 -0400 |
commit | 9d6b43375a949d313c0abd99248c30d94d3b4016 (patch) | |
tree | 8595452cb58a14f6370971de56645b5dce39fd94 | |
parent | 6d621d7eb14d46d56233abe6735a0b5bc372882d (diff) | |
download | libical-git-9d6b43375a949d313c0abd99248c30d94d3b4016.tar.gz |
Revert LTO commits:
"CMakeLists.txt - add developer option for enabling LTO builds"
This reverts commit d301105bab79b136974c4ea0a8df9fa818fae4e4.
Revert "scripts/buildtests.sh - LTO build checking"
This reverts commit 0c5f95c54cba7a64871a548ae2eb9bfbf0ba3a23.
-rw-r--r-- | CMakeLists.txt | 77 | ||||
-rwxr-xr-x | scripts/buildtests.sh | 3 |
2 files changed, 22 insertions, 58 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a8590fc0..d3a4c1da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,10 +33,6 @@ # Default=false (build shared and static libs) # Takes precedence over STATIC_ONLY # -# -DENABLE_LTO_BUILD=[true|false] -# Build a link-time optimized version (requires gcc or clang) -# Default=false (do not build a link time optimized version) -# # -DGOBJECT_INTROSPECTION=[true|false] # Set to build GObject introspection "typelib" files # Requires GObject Introspection development package v0.6.7 or higher @@ -482,32 +478,6 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments") endif() -######################################################## - -option(WITH_CXX_BINDINGS "Build the C++ bindings." True) -if(WITH_CXX_BINDINGS) - enable_language(CXX) - if(CMAKE_CXX_COMPILER) - add_definitions(-DWITH_CXX_BINDINGS) - else() - message(STATUS - "Warning: Building the C++ bindings is not possible since a C++ compiler could not be found. " - "Turning-off C++ bindings" - ) - set(WITH_CXX_BINDINGS False) - endif() -endif() -add_feature_info( - "Option WITH_CXX_BINDINGS" - WITH_CXX_BINDINGS - "build the C++ bindings. Requires a C++ compiler" -) - -#some test programs need to know if we are using 32-bit time -if(SIZEOF_TIME_T EQUAL 4) - set(USE_32BIT_TIME_T TRUE) -endif() - ################ Developer Options ##################### option(ABI_DUMPER "Build for abi-dumper." False) if(ABI_DUMPER) @@ -570,34 +540,31 @@ if(THREAD_SANITIZER) endif() endif() -option(ENABLE_LTO_BUILD "Build a link-time optimized version." False) -if(ENABLE_LTO_BUILD) - if(CMAKE_COMPILER_IS_GNUCC) - include(CheckCCompilerFlag) - check_c_compiler_flag(-flto HAVE_CC_COMPILER_LTO) - if(HAVE_CC_COMPILER_LTO) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wlto-type-mismatch -flto -fuse-linker-plugin") - set(CMAKE_AR "gcc-ar") - set(CMAKE_RANLIB "gcc-ranlib") - else() - message(FATAL_ERROR - "Your C compiler ${CMAKE_C_COMPILER_ID} does not support the LTO building.") - endif() - if(WITH_CXX_BINDINGS AND CMAKE_COMPILER_IS_GNUCXX) - include(CheckCXXCompilerFlag) - check_cxx_compiler_flag(-flto HAVE_CXX_COMPILER_LTO) - if(HAVE_CXX_COMPILER_LTO) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wlto-type-mismatch -flto -fuse-linker-plugin") - else() - message(FATAL_ERROR - "Your C++ compiler ${CMAKE_CXX_COMPILER_ID} does not support LTO building.") - endif() - endif() +######################################################## + +option(WITH_CXX_BINDINGS "Build the C++ bindings." True) +if(WITH_CXX_BINDINGS) + enable_language(CXX) + if(CMAKE_CXX_COMPILER) + add_definitions(-DWITH_CXX_BINDINGS) else() - message(FATAL_ERROR - "Build link-time optimization using a non-GCC compiler is currently not supported.") + message(STATUS + "Warning: Building the C++ bindings is not possible since a C++ compiler could not be found. " + "Turning-off C++ bindings" + ) + set(WITH_CXX_BINDINGS False) endif() endif() +add_feature_info( + "Option WITH_CXX_BINDINGS" + WITH_CXX_BINDINGS + "build the C++ bindings. Requires a C++ compiler" +) + +#some test programs need to know if we are using 32-bit time +if(SIZEOF_TIME_T EQUAL 4) + set(USE_32BIT_TIME_T TRUE) +endif() ################# build subdirs ######################## diff --git a/scripts/buildtests.sh b/scripts/buildtests.sh index d003972b..0bbc2d49 100755 --- a/scripts/buildtests.sh +++ b/scripts/buildtests.sh @@ -477,7 +477,6 @@ BDIR="" CMAKEOPTS="-DCMAKE_BUILD_TYPE=Debug -DGOBJECT_INTROSPECTION=False -DICAL_GLIB=False -DICAL_BUILD_DOCS=False" UUCCMAKEOPTS="$CMAKEOPTS -DCMAKE_DISABLE_FIND_PACKAGE_ICU=True" TZCMAKEOPTS="$CMAKEOPTS -DUSE_BUILTIN_TZDATA=True" -LTOCMAKEOPTS="$CMAKEOPTS -DENABLE_LTO_BUILD=True" #Static code checkers KRAZY @@ -494,7 +493,6 @@ CLANGTIDY test2builtin "$TZCMAKEOPTS" GCC_BUILD test1 "" GCC_BUILD test2 "$CMAKEOPTS" GCC_BUILD test3 "$UUCCMAKEOPTS" -GCC_BUILD test4 "$LTOCMAKEOPTS" if (test "`uname -s`" = "Linux") then echo "Temporarily disable cross-compile tests" @@ -508,7 +506,6 @@ GCC_BUILD test2builtin "$TZCMAKEOPTS" CLANG_BUILD test1 "" CLANG_BUILD test2 "$CMAKEOPTS" CLANG_BUILD test3 "$UUCCMAKEOPTS" -#CLANG_BUILD test4 "$LTOCMAKEOPTS" if (test "`uname -s`" = "Linux") then echo "Temporarily disable cross-compile tests" |