summaryrefslogtreecommitdiffstats
path: root/openmp
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2016-06-28 19:25:13 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2016-06-28 19:25:13 +0000
commitcceebeef1781b9b41e6d9a48f0bdfe37580f4840 (patch)
tree864d214056346d65776018f994073058632fa00c /openmp
parent5db97acfa29fd276862af3c67b004cd36008d338 (diff)
downloadbcm5719-llvm-cceebeef1781b9b41e6d9a48f0bdfe37580f4840.tar.gz
bcm5719-llvm-cceebeef1781b9b41e6d9a48f0bdfe37580f4840.zip
Revert r273898's UNICODE quick fix in favor of CMake's remove_definitions()
UNICODE and _UNICODE defintions were added in the LLVM CMake build system. While on Unices, the UNICODE/_UNICODE macros don't cause problems, on Windows only ittnotify_static.c should be compiled using -DUNICODE. We are still looking at a proper fix, but this change sets the build back to exactly what it was doing before. Also, a comment and TODO were added in the src/CMakeLists.txt file to help explain. llvm-svn: 274052
Diffstat (limited to 'openmp')
-rw-r--r--openmp/runtime/cmake/LibompDefinitions.cmake2
-rw-r--r--openmp/runtime/src/CMakeLists.txt7
-rw-r--r--openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c5
3 files changed, 6 insertions, 8 deletions
diff --git a/openmp/runtime/cmake/LibompDefinitions.cmake b/openmp/runtime/cmake/LibompDefinitions.cmake
index c3e3427a61d..c4cfbb94141 100644
--- a/openmp/runtime/cmake/LibompDefinitions.cmake
+++ b/openmp/runtime/cmake/LibompDefinitions.cmake
@@ -21,8 +21,6 @@ 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")
diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt
index 57d7c2f15f6..777434da447 100644
--- a/openmp/runtime/src/CMakeLists.txt
+++ b/openmp/runtime/src/CMakeLists.txt
@@ -31,6 +31,11 @@ add_custom_command(
)
# Set the -D definitions for all sources
+# UNICODE and _UNICODE are set in LLVM's CMake system. They affect the
+# ittnotify code and should only be set when compiling ittnotify_static.c
+# on Windows (done below).
+# TODO: Fix the UNICODE usage in ittnotify code for Windows.
+remove_definitions(-DUNICODE -D_UNICODE)
libomp_get_definitions_flags(LIBOMP_CONFIGURED_DEFINITIONS_FLAGS)
add_definitions(${LIBOMP_CONFIGURED_DEFINITIONS_FLAGS})
@@ -192,7 +197,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
diff --git a/openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c b/openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c
index f84512d2126..5f365730eac 100644
--- a/openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c
+++ b/openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c
@@ -8,11 +8,6 @@
//
//===----------------------------------------------------------------------===//
-#if ITT_PLATFORM==ITT_PLATFORM_WIN
-#define UNICODE
-#define _UNICODE
-#endif
-
#include "kmp_config.h"
#include "ittnotify_config.h"
OpenPOWER on IntegriCloud