forked from OSchip/llvm-project
Fix the Windows build after r273599
That patch made all LLVM projects build with -DUNICODE. However, this doesn't work for the OpenMP runtime. But just overriding the flag with -UUNICODE breaks compiling ittnotify_static.c, which for some reason needs to be compiled with -DUNICIODE. Note that compiling ittnotify.h with -DUNICODE does not work though. This seems like a mess. This commit fixes it for now, but it would be great if someone who works on the OpenMP runtime could fix it properly. llvm-svn: 273898
This commit is contained in:
parent
c6ada53be5
commit
8065c51875
|
@ -21,6 +21,8 @@ function(libomp_get_definitions_flags cppflags)
|
|||
libomp_append(cppflags_local "-D _USRDLL")
|
||||
libomp_append(cppflags_local "-D _ITERATOR_DEBUG_LEVEL=0" IF_TRUE DEBUG_BUILD)
|
||||
libomp_append(cppflags_local "-D _DEBUG" IF_TRUE DEBUG_BUILD)
|
||||
libomp_append(cppflags_local "-UUNICODE")
|
||||
libomp_append(cppflags_local "-U_UNICODE")
|
||||
else()
|
||||
libomp_append(cppflags_local "-D _GNU_SOURCE")
|
||||
libomp_append(cppflags_local "-D _REENTRANT")
|
||||
|
|
|
@ -192,7 +192,7 @@ if(WIN32)
|
|||
libomp_append(LIBOMP_MASM_DEFINITIONS "-DOMPT_SUPPORT" IF_TRUE_1_0 LIBOMP_OMPT_SUPPORT)
|
||||
libomp_list_to_string("${LIBOMP_MASM_DEFINITIONS}" LIBOMP_MASM_DEFINITIONS)
|
||||
set_property(SOURCE z_Windows_NT-586_asm.asm APPEND_STRING PROPERTY COMPILE_FLAGS " ${LIBOMP_MASM_DEFINITIONS}")
|
||||
set_source_files_properties(thirdparty/ittnotify/ittnotify_static.c PROPERTIES COMPILE_DEFINITIONS "UNICODE")
|
||||
#set_source_files_properties(thirdparty/ittnotify/ittnotify_static.c PROPERTIES COMPILE_DEFINITIONS "UNICODE")
|
||||
|
||||
# Create Windows import library
|
||||
# the import library is "re-linked" to include kmp_import.c which prevents
|
||||
|
|
|
@ -8,6 +8,11 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#if ITT_PLATFORM==ITT_PLATFORM_WIN
|
||||
#define UNICODE
|
||||
#define _UNICODE
|
||||
#endif
|
||||
|
||||
#include "kmp_config.h"
|
||||
#include "ittnotify_config.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue