Skip to content

Commit 45a21e6

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 83c6524 commit 45a21e6

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
@@ -67,7 +67,11 @@ static int parseSPVExtOption(
6767
#define _STRINGIFY(X) #X
6868
#define STRINGIFY(X) _STRINGIFY(X)
6969
#define EXT(X) ExtensionNamesMap[STRINGIFY(X)] = SPIRV::ExtensionID::X;
70+
#ifdef USE_PREBUILT_LLVM
71+
#include "LLVMSPIRVLib/LLVMSPIRVExtensions.inc"
72+
#else // USE_PREBUILT_LLVM
7073
#include "LLVMSPIRVExtensions.inc"
74+
#endif // USE_PREBUILT_LLVM
7175
#undef EXT
7276
#undef STRINGIFY
7377
#undef _STRINGIFY

0 commit comments

Comments
 (0)