diff --git a/CMakeLists.txt b/CMakeLists.txt index 7cb52916f0..ca9cce11e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -209,6 +209,11 @@ if(NOT IGC__IGC_TARGETS) add_subdirectory("${IGC_DIR}" "${IGDRCL_BUILD_DIR}/igc" EXCLUDE_FROM_ALL) endif() +if(WIN32) + set(IGC_LIBRARY_NAME "igc${NEO_BITS}") + set(FCL_LIBRARY_NAME "igdfcl${NEO_BITS}") +endif() + set(IGDRCL__IGC_TARGETS "${IGC__IGC_TARGETS}") foreach(TARGET_tmp ${IGDRCL__IGC_TARGETS}) list(APPEND IGDRCL__IGC_INCLUDE_DIR $) @@ -248,7 +253,7 @@ endif() set(UMKM_SHAREDDATA_INCLUDE_PATHS $) -set(GMM_LIB_FILENAME "igdgmm${NEO_BITS}${CMAKE_SHARED_LIBRARY_SUFFIX}") +set(GMM_LIBRARY_NAME "igdgmm${NEO_BITS}") macro(copy_gmm_dll_for target) if(WIN32 AND NOT USE_STATIC_GMM) @@ -282,6 +287,11 @@ else() message(STATUS "Instrumentation library name: ${INSTRUMENTATION_LIB_NAME}") endif() +set(SLD_LIBRARY_NAME "igfxdbgxchg") +if(NEO_BITS STREQUAL "64") + set(SLD_LIBRARY_NAME "${SLD_LIBRARY_NAME}${NEO_BITS}") +endif() + add_subdirectory(third_party/gtest) add_definitions(-DGMM_OCL) @@ -551,6 +561,5 @@ endif(EXISTS ${IGDRCL_SOURCE_DIR}/../internal) include(package.cmake) configure_file(config.h.in ${IGDRCL_BUILD_DIR}/config.h) -configure_file(compiler.config.h.in ${IGDRCL_BUILD_DIR}/compiler.config.h) configure_file(driver_version.h.in ${IGDRCL_BUILD_DIR}/driver_version.h) # Put Driver version into define configure_file(lib_names.h.in ${IGDRCL_BUILD_DIR}/lib_names.h) diff --git a/config.h.in b/config.h.in index 1dfa6edac6..d51505cc91 100644 --- a/config.h.in +++ b/config.h.in @@ -31,5 +31,6 @@ static const bool clCacheEnabled = false; #endif #cmakedefine CL_CACHE_LOCATION "${CL_CACHE_LOCATION}" +#cmakedefine NEO_ARCH "${NEO_ARCH}" #endif /* CONFIG_H */ diff --git a/lib_names.h.in b/lib_names.h.in index a267c03d98..a2a68cf850 100644 --- a/lib_names.h.in +++ b/lib_names.h.in @@ -20,9 +20,9 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef LIB_NAMES_H -#define LIB_NAMES_H +#pragma once -#cmakedefine GMM_LIB_FILENAME "${GMM_LIB_FILENAME}" - -#endif /* LIB_NAMES_H */ +#cmakedefine FCL_LIBRARY_NAME "${CMAKE_SHARED_LIBRARY_PREFIX}${FCL_LIBRARY_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" +#cmakedefine GMM_LIBRARY_NAME "${CMAKE_SHARED_LIBRARY_PREFIX}${GMM_LIBRARY_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" +#cmakedefine IGC_LIBRARY_NAME "${CMAKE_SHARED_LIBRARY_PREFIX}${IGC_LIBRARY_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" +#cmakedefine SLD_LIBRARY_NAME "${CMAKE_SHARED_LIBRARY_PREFIX}${SLD_LIBRARY_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" diff --git a/runtime/dll/linux/options.cpp b/runtime/dll/linux/options.cpp index 699f08c3f4..dc78f11ff1 100644 --- a/runtime/dll/linux/options.cpp +++ b/runtime/dll/linux/options.cpp @@ -20,7 +20,7 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#include "compiler.config.h" +#include "lib_names.h" #include "runtime/os_interface/os_library.h" namespace Os { diff --git a/runtime/dll/windows/options.cpp b/runtime/dll/windows/options.cpp index d6acd02387..135282faa8 100644 --- a/runtime/dll/windows/options.cpp +++ b/runtime/dll/windows/options.cpp @@ -22,14 +22,9 @@ #include "lib_names.h" namespace Os { -#if defined(_WIN64) -const char *frontEndDllName = "igdfcl64.dll"; -const char *igcDllName = "igc64.dll"; -#else -const char *frontEndDllName = "igdfcl32.dll"; -const char *igcDllName = "igc32.dll"; -#endif +const char *frontEndDllName = FCL_LIBRARY_NAME; +const char *igcDllName = IGC_LIBRARY_NAME; const char *gdiDllName = "gdi32.dll"; -const char *gmmDllName = GMM_LIB_FILENAME; +const char *gmmDllName = GMM_LIBRARY_NAME; } // namespace Os diff --git a/runtime/os_interface/linux/CMakeLists.txt b/runtime/os_interface/linux/CMakeLists.txt index ae730909b5..ddb098029c 100644 --- a/runtime/os_interface/linux/CMakeLists.txt +++ b/runtime/os_interface/linux/CMakeLists.txt @@ -58,7 +58,6 @@ set(RUNTIME_SRCS_OS_INTERFACE_LINUX ${CMAKE_CURRENT_SOURCE_DIR}/performance_counters_linux.cpp ${CMAKE_CURRENT_SOURCE_DIR}/performance_counters_linux.h ${CMAKE_CURRENT_SOURCE_DIR}/print.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/source_level_debugger_linux.cpp ) if(UNIX) diff --git a/runtime/os_interface/linux/source_level_debugger_linux.cpp b/runtime/os_interface/linux/source_level_debugger_linux.cpp deleted file mode 100644 index a0bbf9d15a..0000000000 --- a/runtime/os_interface/linux/source_level_debugger_linux.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2018, Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "runtime/source_level_debugger/source_level_debugger.h" - -const char *OCLRT::SourceLevelDebugger::dllName = "libigfxdbgxchg64.so"; diff --git a/runtime/os_interface/windows/CMakeLists.txt b/runtime/os_interface/windows/CMakeLists.txt index 8bcbb019de..7a6b1f352f 100644 --- a/runtime/os_interface/windows/CMakeLists.txt +++ b/runtime/os_interface/windows/CMakeLists.txt @@ -63,7 +63,6 @@ set(RUNTIME_SRCS_OS_INTERFACE_WINDOWS ${CMAKE_CURRENT_SOURCE_DIR}/performance_counters_win.h ${CMAKE_CURRENT_SOURCE_DIR}/print.cpp ${CMAKE_CURRENT_SOURCE_DIR}/registry_reader.h - ${CMAKE_CURRENT_SOURCE_DIR}/source_level_debugger_windows.cpp ${CMAKE_CURRENT_SOURCE_DIR}/sys_calls.h ${CMAKE_CURRENT_SOURCE_DIR}/thk_wrapper.h ${CMAKE_CURRENT_SOURCE_DIR}/wddm_32bit_memory.cpp diff --git a/runtime/os_interface/windows/source_level_debugger_windows.cpp b/runtime/os_interface/windows/source_level_debugger_windows.cpp deleted file mode 100644 index eaacb74b91..0000000000 --- a/runtime/os_interface/windows/source_level_debugger_windows.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2018, Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "runtime/source_level_debugger/source_level_debugger.h" - -#if defined(_WIN64) -const char *OCLRT::SourceLevelDebugger::dllName = "igfxdbgxchg64.dll"; -#else -const char *OCLRT::SourceLevelDebugger::dllName = "igfxdbgxchg.dll"; -#endif diff --git a/runtime/source_level_debugger/source_level_debugger.cpp b/runtime/source_level_debugger/source_level_debugger.cpp index b113761483..1357847d16 100644 --- a/runtime/source_level_debugger/source_level_debugger.cpp +++ b/runtime/source_level_debugger/source_level_debugger.cpp @@ -26,6 +26,7 @@ #include "runtime/program/kernel_info.h" #include "runtime/source_level_debugger/source_level_debugger.h" #include "runtime/os_interface/os_interface.h" +#include "lib_names.h" namespace OCLRT { const char *SourceLevelDebugger::notifyNewDeviceSymbol = "notifyNewDevice"; @@ -35,6 +36,7 @@ const char *SourceLevelDebugger::notifyKernelDebugDataSymbol = "notifyKernelDebu const char *SourceLevelDebugger::initSymbol = "init"; const char *SourceLevelDebugger::isDebuggerActiveSymbol = "isDebuggerActive"; const char *SourceLevelDebugger::notifyDeviceDestructionSymbol = "notifyDeviceDestruction"; +const char *SourceLevelDebugger::dllName = SLD_LIBRARY_NAME; class SourceLevelDebugger::SourceLevelDebuggerInterface { public: diff --git a/unit_tests/helpers/test_files.cpp b/unit_tests/helpers/test_files.cpp index c390be1bfa..08e748fd8e 100644 --- a/unit_tests/helpers/test_files.cpp +++ b/unit_tests/helpers/test_files.cpp @@ -21,12 +21,9 @@ */ #include "test_files.h" +#include "config.h" -#if defined(__LP64__) || (_WIN64) -std::string testFiles("test_files/x64/"); -#else -std::string testFiles("test_files/x86/"); -#endif +std::string testFiles("test_files/" NEO_ARCH "/"); std::string clFiles("test_files/"); std::string binaryNameSuffix(""); diff --git a/unit_tests/main.cpp b/unit_tests/main.cpp index 89f418c2e6..17b47dd178 100644 --- a/unit_tests/main.cpp +++ b/unit_tests/main.cpp @@ -409,7 +409,7 @@ int main(int argc, char **argv) { #else SetUnhandledExceptionFilter(&UltExceptionFilter); if (!useMockGmm) { - Os::gmmDllName = GMM_LIB_FILENAME; + Os::gmmDllName = GMM_LIBRARY_NAME; } #endif initializeTestHelpers();