From d63de355fe62e36f597a9c3180f5a920896ec1f7 Mon Sep 17 00:00:00 2001 From: Vladislav Sytchenko Date: Wed, 5 May 2021 12:26:00 -0400 Subject: [PATCH] SWDEV-273235 - Allow explicitly disabling LF support Currently LiquidFlash cannot be supported from Github Enterprise, hence we need to be able to build with out it. Allow this by setting -DWITH_LIQUID_FLASH=0. Change-Id: I975e8ee16b7ba033e3eb95fe40955d8c1d4779b7 [ROCm/clr commit: 7034e749e3c34bd9a56c17d40a12b6b58e725fee] --- projects/clr/rocclr/platform/context.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/projects/clr/rocclr/platform/context.cpp b/projects/clr/rocclr/platform/context.cpp index d322f95980..01d7206d62 100644 --- a/projects/clr/rocclr/platform/context.cpp +++ b/projects/clr/rocclr/platform/context.cpp @@ -34,14 +34,13 @@ #include "CL/cl_dx9_media_sharing.h" #endif //_WIN32 +#ifndef WITH_LIQUID_FLASH #if (!defined(BUILD_HSA_TARGET) && defined(WITH_HSA_DEVICE) && \ defined(WITH_AMDGPU_PRO)) || defined(_WIN32) #define WITH_LIQUID_FLASH 1 -#endif - -#ifdef WITH_LIQUID_FLASH #include "lf.h" #endif +#endif namespace amd { @@ -98,7 +97,7 @@ Context::~Context() { glenv_ = NULL; } -#ifdef WITH_LIQUID_FLASH +#if WITH_LIQUID_FLASH lfTerminate(); #endif } @@ -275,7 +274,7 @@ int Context::create(const intptr_t* properties) { } } -#ifdef WITH_LIQUID_FLASH +#if WITH_LIQUID_FLASH lfInit(); #endif