Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions cmake/modules/HandleLLVMOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,9 @@ if( MSVC )
append("/analyze" CMAKE_CXX_FLAGS)
endif ()

# Change release to always build debug information out-of-line, but
# also enable Reference optimization, ie dead function elimination.
# Change release to always build debug information out-of-line and enable
# function-level dead code elimination.
append("/Gy" CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELEASE)
if (NOT CMAKE_MSVC_DEBUG_INFORMATION_FORMAT)
append("/Zi" CMAKE_CXX_FLAGS_RELEASE)
append("/DEBUG /OPT:REF" CMAKE_SHARED_LINKER_FLAGS_RELEASE)
Expand Down Expand Up @@ -609,9 +610,6 @@ endif()
# HLSL Change Ends

# Add flags for add_dead_strip().
# FIXME: With MSVS, consider compiling with /Gy and linking with /OPT:REF?
# But MinSizeRel seems to add that automatically, so maybe disable these
# flags instead if LLVM_NO_DEAD_STRIP is set.
if(NOT CYGWIN AND NOT WIN32)
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND
NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
Expand Down
Loading