Commit 5d4c9817 by Nicolas Capens Committed by Nicolas Capens

Fix /DEBUG:FASTLINK usage

It was being set as a C++ compile flag, while it's an MSVC linker flag. The /D was interpreted as a macro definition, which caused an IntelliSense error. Also fix the set_linker_flag CMake macro to correctly append the build configuration. Bug: b/147735529 Change-Id: I0e4473a07c224b64ad0aeb54390bced087eea3d8 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/46088Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com>
parent 2d6b37bb
......@@ -320,7 +320,7 @@ endmacro()
macro(set_linker_flag FLAG)
if(${ARGC} GREATER 1)
set(CMAKE_EXE_LINKER_FLAGS ${ARGV1} "${CMAKE_EXE_LINKER_FLAGS ${ARGV1}} ${FLAG}")
set(CMAKE_EXE_LINKER_FLAGS_${ARGV1} "${CMAKE_EXE_LINKER_FLAGS_${ARGV1}} ${FLAG}")
else()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FLAG}")
endif()
......@@ -333,8 +333,8 @@ if(MSVC)
add_definitions(-D_SBCS) # Single Byte Character Set (ASCII)
add_definitions(-D_ENABLE_EXTENDED_ALIGNED_STORAGE) # Disable MSVC warnings about std::aligned_storage being broken before VS 2017 15.8
set_cpp_flag("/DEBUG:FASTLINK" DEBUG)
set_cpp_flag("/DEBUG:FASTLINK" RELWITHDEBINFO)
set_linker_flag("/DEBUG:FASTLINK" DEBUG)
set_linker_flag("/DEBUG:FASTLINK" RELWITHDEBINFO)
# Disable specific warnings
# TODO: Not all of these should be disabled, but for now, we want a warning-free msvc build. Remove these one by one
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment