Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Compile with -fshort-chars on Windows
Browse files Browse the repository at this point in the history
HIP requires a short wchar on Windows, and all compilation through Comgr
on Windows now assumes the bitcode is compiled with a short wchar as
well. This is the matching change to ensure this in the device-libs.

Change-Id: Ifcf511bde8a5a198c42cb829af0c5283c11e61ed
  • Loading branch information
slinder1 committed Jan 15, 2020
1 parent c5dd304 commit 8f441a8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions OCL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ set(CLANG_OCL_FLAGS -fcolor-diagnostics -Werror -Wno-error=atomic-alignment -x c
-cl-std=CL2.0 -target "${AMDGPU_TARGET_TRIPLE}" -fvisibility=protected -fomit-frame-pointer
-Xclang -finclude-default-header "${CLANG_OPTIONS_APPEND}")

# For compatibility with the MSVC headers we use a 32-bit wchar. Users linking
# against us must also use a short wchar.
if (WIN32)
set(CLANG_OCL_FLAGS ${CLANG_OCL_FLAGS} -fshort-wchar)
endif()

set (BC_EXT .bc)
set (LIB_SUFFIX ".lib${BC_EXT}")
set (STRIP_SUFFIX ".strip${BC_EXT}")
Expand Down

0 comments on commit 8f441a8

Please sign in to comment.