Skip to content

Commit 4d45fc2

Browse files
committed
Fix SPIRV-LLVM-Translator header file path in out-of-tree build (intel#650)
Prepend SPIRV-LLVM-Translator header file path with LLVMSPIRVLib Resolves intel#646 (cherry picked from commit ec4a45b)
1 parent f294a8a commit 4d45fc2

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

options.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ Copyright (c) Intel Corporation (2009-2017).
2929
#include "llvm/Option/ArgList.h"
3030
#include "llvm/Option/Option.h"
3131

32+
#ifdef USE_PREBUILT_LLVM
33+
#include "LLVMSPIRVLib/LLVMSPIRVOpts.h"
34+
#else // USE_PREBUILT_LLVM
35+
#include "LLVMSPIRVOpts.h"
36+
#endif // USE_PREBUILT_LLVM
37+
3238
#include <list>
3339

3440
enum COMPILE_OPT_ID {

options_compile.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ static int parseSPVExtOption(
6969
#define _STRINGIFY(X) #X
7070
#define STRINGIFY(X) _STRINGIFY(X)
7171
#define EXT(X) ExtensionNamesMap[STRINGIFY(X)] = SPIRV::ExtensionID::X;
72+
#ifdef USE_PREBUILT_LLVM
73+
#include "LLVMSPIRVLib/LLVMSPIRVExtensions.inc"
74+
#else // USE_PREBUILT_LLVM
7275
#include "LLVMSPIRVExtensions.inc"
76+
#endif // USE_PREBUILT_LLVM
7377
#undef EXT
7478
#undef STRINGIFY
7579
#undef _STRINGIFY

0 commit comments

Comments
 (0)