From 3829d6ab767e19051041843a345cf0eb4f3d23e0 Mon Sep 17 00:00:00 2001 From: "Elovikov, Andrei" Date: Tue, 2 Aug 2022 09:55:15 -0700 Subject: [PATCH] [SYCL] Finally fix iostream_proxy.hpp --- sycl/include/sycl/detail/iostream_proxy.hpp | 5 +++-- sycl/test/regression/fsycl-host-compiler-win.cpp | 4 ---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sycl/include/sycl/detail/iostream_proxy.hpp b/sycl/include/sycl/detail/iostream_proxy.hpp index 27e2234bf4248..4ac0bba5cc209 100644 --- a/sycl/include/sycl/detail/iostream_proxy.hpp +++ b/sycl/include/sycl/detail/iostream_proxy.hpp @@ -3,11 +3,12 @@ #include namespace std { -#ifdef _WIN32 +#if defined(_MT) && defined(_DLL) #define __SYCL_EXTERN_STREAM_ATTRS __declspec(dllimport) #else #define __SYCL_EXTERN_STREAM_ATTRS -#endif // _WIN32 +#endif // defined(_MT) && defined(_DLL) + /// Linked to standard input extern __SYCL_EXTERN_STREAM_ATTRS istream cin; /// Linked to standard output diff --git a/sycl/test/regression/fsycl-host-compiler-win.cpp b/sycl/test/regression/fsycl-host-compiler-win.cpp index 65f4dd52f9a38..ac9be4a92dc67 100644 --- a/sycl/test/regression/fsycl-host-compiler-win.cpp +++ b/sycl/test/regression/fsycl-host-compiler-win.cpp @@ -14,10 +14,6 @@ #include -// FIXME: Modify so that it would require -// proper libs via "#pragma comment(lib, ...)". -#include - #ifndef DEFINE_CHECK #error predefined macro not set #endif // DEFINE_CHECK