FreeBSD Bugzilla – Attachment 230756 Details for
Bug 260976
devel/ispc: added support for LLVM 13
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
added support for LLVM 13
ispc.diff (text/plain), 2.99 KB, created by
Vladimir Druzenko
on 2022-01-06 13:53:45 UTC
(
hide
)
Description:
added support for LLVM 13
Filename:
MIME Type:
Creator:
Vladimir Druzenko
Created:
2022-01-06 13:53:45 UTC
Size:
2.99 KB
patch
obsolete
>diff -ur devel/ispc.orig/Makefile devel/ispc/Makefile >--- devel/ispc.orig/Makefile >+++ devel/ispc/Makefile >@@ -23,11 +23,6 @@ > USE_GITHUB= yes > SHEBANG_FILES= *.py > >-#LLVM_VERSION= -devel # fails with 12: call to non-static member function without an object argument: llvm::DebugLoc::get >- # Release notes https://github.com/ispc/ispc/blob/master/docs/ReleaseNotes.txt list compatible LLVM versions, but they assume that extra patches are applied to LLVM >- # LLVM build script: https://github.com/ispc/ispc/blob/master/scripts/build.sh >-LLVM_VERSION= 11 # it fails with -devel (13.0.d20210308), with 12.0.0.r2 it also fails, using 11 that it succeeds with >- > CONFIGURE_ENV= PATH=${LOCALBASE}/llvm${LLVM_VERSION}/bin:${PATH} > CMAKE_OFF= ISPC_NO_DUMPS ISPC_INCLUDE_EXAMPLES > >@@ -58,6 +53,14 @@ > lib/libispcrt.so.1 \ > lib/libispcrt.so.${PORTVERSION} \ > lib/libispcrt_static.a >+ >+.include <bsd.port.options.mk> >+ >+.if ${LLVM_DEFAULT:M[7891]0} >+LLVM_VERSION= 13 >+.else >+LLVM_VERSION= ${LLVM_DEFAULT} >+.endif > > do-test: # some tests fail: https://github.com/ispc/ispc/issues/1868 > @cd ${WRKSRC} && ISPC_HOME=${BUILD_WRKSRC}/bin ./run_tests.py >diff -ur devel/ispc.orig/files/patch-src_module.cpp devel/ispc/files/patch-src_module.cpp >--- devel/ispc.orig/files/patch-src_module.cpp >+++ devel/ispc/files/patch-src_module.cpp >@@ -18,3 +18,17 @@ > Opts.setSPIRVAllowUnknownIntrinsics({"llvm.genx"}); > #else > llvm::cl::opt<bool> SPIRVAllowUnknownIntrinsics( >+@@ -1314,7 +1314,12 @@ bool Module::writeObjectFileOrAssembly(llvm::TargetMachine *targetMachine, llvm::Module *module, OutputType outputType, >+ llvm::CodeGenFileType fileType = (outputType == Object) ? llvm::CGFT_ObjectFile : llvm::CGFT_AssemblyFile; >+ bool binary = (fileType == llvm::CGFT_ObjectFile); >+ >+- llvm::sys::fs::OpenFlags flags = binary ? llvm::sys::fs::F_None : llvm::sys::fs::F_Text; >++ llvm::sys::fs::OpenFlags flags = binary ? >++#if ISPC_LLVM_VERSION >= ISPC_LLVM_13_0 >++ llvm::sys::fs::OF_None : llvm::sys::fs::OF_Text; >++#else >++ llvm::sys::fs::F_None : llvm::sys::fs::F_Text; >++#endif >+ >+ std::error_code error; >+ >diff -ur devel/ispc.orig/files/patch-src_opt.cpp devel/ispc/files/patch-src_opt.cpp >--- devel/ispc.orig/files/patch-src_opt.cpp >+++ devel/ispc/files/patch-src_opt.cpp >@@ -62,3 +62,18 @@ > return true; > } > >+@@ -4687,7 +4687,13 @@ void DebugPassFile::run(llvm::Module &module, bool init) >+ std::error_code EC; >+ char fname[100]; >+ snprintf(fname, sizeof(fname), "%s_%d_%s.ll", init ? "init" : "ir", pnum, sanitize(std::string(pname)).c_str()); >+- llvm::raw_fd_ostream OS(fname, EC, llvm::sys::fs::F_None); >++ llvm::raw_fd_ostream OS(fname, EC, >++#if ISPC_LLVM_VERSION >= ISPC_LLVM_13_0 >++ llvm::sys::fs::OF_None >++#else >++ llvm::sys::fs::F_None >++#endif >++ ); >+ Assert(!EC && "IR dump file creation failed!"); >+ module.print(OS, 0); >+ }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
vvd
:
maintainer-approval?
Actions:
View
|
Diff
Attachments on
bug 260976
: 230756