Skip to content

Commit dfb76de

Browse files
committed
Fix SPIRV-LLVM-Translator header file path in out-of-tree build (intel#650)
Changes: * Upgrade Ubuntu version to 24.04 * Switch legacy 'apt-key add -' to /etc/apt/keyrings/llvm.gpg * Prepend SPIRV-LLVM-Translator header file path with LLVMSPIRVLib Resolves intel#646 (cherry picked from commit a9c93e8) (cherry picked from commit ec4a45b)
1 parent 90f1143 commit dfb76de

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

options.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ Copyright (c) Intel Corporation (2009-2017).
2727
#include "llvm/Option/ArgList.h"
2828
#include "llvm/Option/Option.h"
2929
#include "clang/Basic/OpenCLOptions.h"
30+
31+
#ifdef USE_PREBUILT_LLVM
32+
#include "LLVMSPIRVLib/LLVMSPIRVOpts.h"
33+
#else // USE_PREBUILT_LLVM
3034
#include "LLVMSPIRVOpts.h"
35+
#endif // USE_PREBUILT_LLVM
3136

3237
#include <list>
3338

options_compile.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ static int parseSPVExtOption(
7272
#define _STRINGIFY(X) #X
7373
#define STRINGIFY(X) _STRINGIFY(X)
7474
#define EXT(X) ExtensionNamesMap[STRINGIFY(X)] = SPIRV::ExtensionID::X;
75+
#ifdef USE_PREBUILT_LLVM
76+
#include "LLVMSPIRVLib/LLVMSPIRVExtensions.inc"
77+
#else // USE_PREBUILT_LLVM
7578
#include "LLVMSPIRVExtensions.inc"
79+
#endif // USE_PREBUILT_LLVM
7680
#undef EXT
7781
#undef STRINGIFY
7882
#undef _STRINGIFY

0 commit comments

Comments
 (0)