diff --git a/compiler-rt/lib/profile/CMakeLists.txt b/compiler-rt/lib/profile/CMakeLists.txt --- a/compiler-rt/lib/profile/CMakeLists.txt +++ b/compiler-rt/lib/profile/CMakeLists.txt @@ -114,6 +114,9 @@ append_list_if(COMPILER_RT_HAS_NOSTDINCXX_FLAG -nostdinc++ EXTRA_FLAGS) # XRay uses C++ standard library headers. string(REGEX REPLACE "-stdlib=[a-zA-Z+]*" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) +# The Windows specific code uses a #pragma comment(linker, ...) which requires +# -fms-extensions on MinGW targets. +append_list_if(MINGW -fms-extensions EXTRA_FLAGS) # This appears to be a C-only warning banning the use of locals in aggregate # initializers. All other compilers accept this, though.