3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-07 09:55:19 +00:00

cmake: Allow saving clang's optimization records.

This gives some insight into what the compiler has decided to do
or not do.
This commit is contained in:
Bruce Mitchener 2018-11-30 19:52:57 +07:00
parent 57318bab5b
commit fbc33b20c8

View file

@ -425,6 +425,15 @@ list(APPEND Z3_DEPENDENT_LIBS ${CMAKE_THREAD_LIBS_INIT})
################################################################################ ################################################################################
include(${CMAKE_SOURCE_DIR}/cmake/compiler_warnings.cmake) include(${CMAKE_SOURCE_DIR}/cmake/compiler_warnings.cmake)
################################################################################
# Save Clang optimization records
################################################################################
option(SAVE_CLANG_OPTIMIZATION_RECORDS "Enable saving Clang optimization records." OFF)
if (SAVE_CLANG_OPTIMIZATION_RECORDS)
z3_add_cxx_flag("-fsave-optimization-record" REQUIRED)
endif()
################################################################################ ################################################################################
# If using Ninja, force color output for Clang (and gcc, disabled to check build). # If using Ninja, force color output for Clang (and gcc, disabled to check build).
################################################################################ ################################################################################