summarylogtreecommitdiffstats
path: root/platform.patch
diff options
context:
space:
mode:
authors-ol2020-05-12 16:04:26 +0200
committers-ol2020-05-12 16:05:22 +0200
commit1208c17518b02b5f35676a4f0cc031d5aa8f2523 (patch)
tree639f20f171c40378093096875cc573e6aa6e5ea5 /platform.patch
parent4c13c0c27a2b59c9b89e374fb2e17c98d1c26b0b (diff)
downloadaur-1208c17518b02b5f35676a4f0cc031d5aa8f2523.tar.gz
update to ebedc1a48c95
Diffstat (limited to 'platform.patch')
-rw-r--r--platform.patch151
1 files changed, 151 insertions, 0 deletions
diff --git a/platform.patch b/platform.patch
new file mode 100644
index 000000000000..fca28faea4f9
--- /dev/null
+++ b/platform.patch
@@ -0,0 +1,151 @@
+diff -r e99ac8ce1ce7 genie.lua
+--- a/genie.lua Sat May 09 22:42:09 2020 +0200
++++ b/genie.lua Tue May 12 16:01:56 2020 +0200
+@@ -88,6 +88,10 @@
+ .. " engine passes option objcarcopts coverage support lto coroutines"
+ .. " webassembly")
+ local LLVM_INCLUDEDIR = pkg_config(LLVM_CONFIG .. " --includedir")
++local CLANG_INCLUDEDIR = pkg_config(LLVM_CONFIG .. " --prefix")[1]
++ .. "/lib/clang/"
++ .. pkg_config(LLVM_CONFIG .. " --version")[1]
++ .. "/include"
+
+ if not os.is("windows") then
+ premake.gcc.cxx = CLANG_CXX
+@@ -204,7 +208,6 @@
+ includedirs {
+ "external/linenoise-ng/include",
+ "external",
+- "SPIRV-Tools/include",
+ "include",
+ "."
+ }
+@@ -218,6 +221,7 @@
+ targetdir "bin"
+ defines {
+ "SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS",
++ "CLANG_INCLUDE_DIR=\"" .. CLANG_INCLUDEDIR .. "\"",
+ "SCOPESRT_IMPL"
+ }
+
+@@ -229,7 +233,7 @@
+ }
+
+ buildoptions_cpp {
+- "-std=c++11",
++ "-std=c++14",
+ "-fno-rtti",
+ "-fno-exceptions",
+ "-ferror-limit=1",
+@@ -278,23 +282,12 @@
+ --"-Wl,--export-dynamic",
+ --"-rdynamic",
+
+- THISDIR .. "/SPIRV-Tools/build/source/opt/libSPIRV-Tools-opt.a",
+- THISDIR .. "/SPIRV-Tools/build/source/libSPIRV-Tools.a"
++ "-lSPIRV-Tools-opt",
++ "-lSPIRV-Tools"
+ }
+ linkoptions(LLVM_LDFLAGS)
+ linkoptions {
+- "-lclangCodeGen",
+- "-lclangFrontend",
+- "-lclangDriver",
+- "-lclangSerialization",
+- "-lclangParse",
+- "-lclangSema",
+- "-lclangAnalysis",
+- "-lclangEdit",
+- "-lclangASTMatchers",
+- "-lclangAST",
+- "-lclangLex",
+- "-lclangBasic"
++ "-lclang-cpp"
+ }
+ --linkoptions { "-Wl,--whole-archive" }
+ linkoptions(LLVM_LIBS)
+@@ -370,23 +363,12 @@
+ "-Wl,--stack,8388608"
+ }
+ linkoptions {
+- THISDIR .. "/SPIRV-Tools/build/source/opt/libSPIRV-Tools-opt.a",
+- THISDIR .. "/SPIRV-Tools/build/source/libSPIRV-Tools.a"
++ "-lSPIRV-Tools-opt",
++ "-lSPIRV-Tools"
+ }
+ linkoptions(LLVM_LDFLAGS)
+ linkoptions {
+- "-lclangCodeGen",
+- "-lclangFrontend",
+- "-lclangDriver",
+- "-lclangSerialization",
+- "-lclangParse",
+- "-lclangSema",
+- "-lclangAnalysis",
+- "-lclangEdit",
+- "-lclangASTMatchers",
+- "-lclangAST",
+- "-lclangLex",
+- "-lclangBasic"
++ "-lclang-cpp"
+ }
+ linkoptions(LLVM_LIBS)
+
+@@ -441,25 +423,14 @@
+ }
+
+ linkoptions {
+- THISDIR .. "/SPIRV-Tools/build/source/opt/libSPIRV-Tools-opt.a",
+- THISDIR .. "/SPIRV-Tools/build/source/libSPIRV-Tools.a"
++ "-lSPIRV-Tools-opt",
++ "-lSPIRV-Tools"
+ }
+
+ linkoptions(LLVM_LDFLAGS)
+
+ linkoptions {
+- "-lclangFrontend",
+- "-lclangDriver",
+- "-lclangSerialization",
+- "-lclangCodeGen",
+- "-lclangParse",
+- "-lclangSema",
+- "-lclangAnalysis",
+- "-lclangEdit",
+- "-lclangASTMatchers",
+- "-lclangAST",
+- "-lclangLex",
+- "-lclangBasic"
++ "-lclang-cpp"
+ }
+
+ linkoptions(LLVM_LIBS)
+diff -r e99ac8ce1ce7 src/boot.cpp
+--- a/src/boot.cpp Sat May 09 22:42:09 2020 +0200
++++ b/src/boot.cpp Tue May 12 16:01:56 2020 +0200
+@@ -227,7 +227,11 @@
+ char *path_copy = strdup(scopes_compiler_path);
+ scopes_compiler_dir = format("%s/..", dirname(path_copy))->data;
+ free(path_copy);
++#ifdef CLANG_INCLUDE_DIR
++ scopes_clang_include_dir = CLANG_INCLUDE_DIR;
++#else
+ scopes_clang_include_dir = format("%s/lib/clang/include", scopes_compiler_dir)->data;
++#endif
+ scopes_include_dir = format("%s/include", scopes_compiler_dir)->data;
+ }
+
+diff -r e99ac8ce1ce7 src/c_import.cpp
+--- a/src/c_import.cpp Sat May 09 22:42:09 2020 +0200
++++ b/src/c_import.cpp Tue May 12 16:01:56 2020 +0200
+@@ -831,8 +831,8 @@
+
+ std::vector< std::unique_ptr<clang::ASTConsumer> > consumers;
+ consumers.push_back(clang::EmitLLVMOnlyAction::CreateASTConsumer(CI, InFile));
+- consumers.push_back(llvm::make_unique<CodeGenProxy>(*this));
+- return llvm::make_unique<clang::MultiplexConsumer>(std::move(consumers));
++ consumers.push_back(std::make_unique<CodeGenProxy>(*this));
++ return std::make_unique<clang::MultiplexConsumer>(std::move(consumers));
+ }
+
+ static std::vector<LLVMModuleRef> llvm_c_modules;