3187bff41ab4 — Leonard Ritter 13 days ago
* updated LLVM/clang dependency to 10.0.0
3 files changed, 31 insertions(+), 55 deletions(-)

M doc/intro.rst
M genie.lua
M src/c_import.cpp
M doc/intro.rst +4 -4
@@ 20,7 20,7 @@ Scopes only supports the `mingw64` toolc
 
 * Install `MSYS2 <http://msys2.github.io>`_ and
   `install <https://github.com/valtron/llvm-stuff/wiki/Build-LLVM-with-MSYS2>`_
-  clang, LLVM 9.0.x, cmake and make for ``x86_64``. The packages are named
+  clang, LLVM 10.0.x, cmake and make for ``x86_64``. The packages are named
   ``mingw64/mingw-w64-x86_64-llvm``, ``mingw64/mingw-w64-x86_64-clang``,
   ``mingw64/mingw-w64-x86_64-cmake``  and ``make``.
 * Nice to have: ``mingw-w64-x86_64-gdb``

          
@@ 46,14 46,14 @@ Scopes only supports the `mingw64` toolc
   hardware threads to use.
 * There should now be a ``scopes.exe`` executable in the `bin` folder.
 * For the clang bridge to work properly, copy
-  `clang/lib/clang/9.0.x/include` to `scopes-repo/lib/clang/include`.
+  `clang/lib/clang/10.0.x/include` to `scopes-repo/lib/clang/include`.
 * For a fresh rebuild, just remove the ``build`` directory before running
   ``make`` again.
 
 Building Scopes on Linux
 ^^^^^^^^^^^^^^^^^^^^^^^^
 
-* You need build-essentials, clang, libclang and LLVM 9.0.x installed -
+* You need build-essentials, clang, libclang and LLVM 10.0.x installed -
   preferably locally:
 * Put ``llvm-config`` in your ``$PATH``.
 * Alternatively, provide your own clang distribution and symlink it to

          
@@ 86,7 86,7 @@ Building Scopes on Linux
 Building Scopes on macOS
 ^^^^^^^^^^^^^^^^^^^^^^^^
 
-* Scopes builds on macOS Mojave (10.14) using LLVM 9.0.
+* Scopes builds on macOS Mojave (10.14) using LLVM 10.0.
 * You'll need the following packages from `brew <https://brew.sh/>`_: `llvm`
   and `cmake`. Scopes' build system respects ``brew``'s standard installation
   paths.

          
M genie.lua +25 -49
@@ 86,9 86,26 @@ local LLVM_LDFLAGS = pkg_config(LLVM_CON
 local LLVM_CXXFLAGS = pkg_config(LLVM_CONFIG .. " --cxxflags")
 local LLVM_LIBS = pkg_config(LLVM_CONFIG .. " --link-static --libs orcjit"
     .. " engine passes option objcarcopts coverage support lto coroutines"
-    .. " webassembly")
+    .. " webassembly frontendopenmp")
 local LLVM_INCLUDEDIR = pkg_config(LLVM_CONFIG .. " --includedir")
 
+local CLANG_DEPS = {
+    "-lclangCodeGen",
+    "-lclangFrontend",
+    "-lclangDriver",
+    "-lclangSerialization",
+    "-lclangParse",
+    "-lclangSema",
+    "-lclangAnalysis",
+    "-lclangEdit",
+    "-lclangASTMatchers",
+    "-lclangAST",
+    "-lclangLex",
+    "-lclangBasic",
+    "-lPolly",
+    "-lPollyISL",
+}
+
 if not os.is("windows") then
     premake.gcc.cxx = CLANG_CXX
     premake.gcc.cc = CLANG_CC

          
@@ 229,7 246,7 @@ project "scopesrt"
         }
 
         buildoptions_cpp {
-            "-std=c++11",
+            "-std=c++14",
             "-fno-rtti",
             "-fno-exceptions",
             "-ferror-limit=1",

          
@@ 282,20 299,7 @@ project "scopesrt"
             THISDIR .. "/SPIRV-Tools/build/source/libSPIRV-Tools.a"
         }
         linkoptions(LLVM_LDFLAGS)
-        linkoptions {
-            "-lclangCodeGen",
-            "-lclangFrontend",
-            "-lclangDriver",
-            "-lclangSerialization",
-            "-lclangParse",
-            "-lclangSema",
-            "-lclangAnalysis",
-            "-lclangEdit",
-            "-lclangASTMatchers",
-            "-lclangAST",
-            "-lclangLex",
-            "-lclangBasic"
-        }
+        linkoptions(CLANG_DEPS)
         --linkoptions { "-Wl,--whole-archive" }
         linkoptions(LLVM_LIBS)
         --linkoptions { "-Wl,--no-whole-archive" }

          
@@ 374,20 378,7 @@ project "scopesrt"
             THISDIR .. "/SPIRV-Tools/build/source/libSPIRV-Tools.a"
         }
         linkoptions(LLVM_LDFLAGS)
-        linkoptions {
-            "-lclangCodeGen",
-            "-lclangFrontend",
-            "-lclangDriver",
-            "-lclangSerialization",
-            "-lclangParse",
-            "-lclangSema",
-            "-lclangAnalysis",
-            "-lclangEdit",
-            "-lclangASTMatchers",
-            "-lclangAST",
-            "-lclangLex",
-            "-lclangBasic"
-        }
+        linkoptions(CLANG_DEPS)
         linkoptions(LLVM_LIBS)
 
         if os.is("windows") then

          
@@ 413,7 404,7 @@ project "scopesrt"
         }
 
         buildoptions_cpp {
-            "-std=c++11",
+            "-std=c++14",
             "-fno-rtti",
             "-fno-exceptions",
             "-ferror-limit=1",

          
@@ 446,22 437,7 @@ project "scopesrt"
         }
 
         linkoptions(LLVM_LDFLAGS)
-
-        linkoptions {
-            "-lclangFrontend",
-            "-lclangDriver",
-            "-lclangSerialization",
-            "-lclangCodeGen",
-            "-lclangParse",
-            "-lclangSema",
-            "-lclangAnalysis",
-            "-lclangEdit",
-            "-lclangASTMatchers",
-            "-lclangAST",
-            "-lclangLex",
-            "-lclangBasic"
-        }
-
+        linkoptions(CLANG_DEPS)
         linkoptions(LLVM_LIBS)
 
         postbuildcommands {

          
@@ 501,7 477,7 @@ project "scopes"
         }
 
         buildoptions_cpp {
-            "-std=c++11",
+            "-std=c++14",
             "-fno-rtti",
             "-fno-exceptions",
             "-ferror-limit=1",

          
@@ 601,7 577,7 @@ project "scopes"
         defines { "SCOPES_MACOS" }
 
         buildoptions_cpp {
-            "-std=c++11",
+            "-std=c++14",
             "-fno-rtti",
             "-fno-exceptions",
             "-ferror-limit=1",

          
M src/c_import.cpp +2 -2
@@ 831,8 831,8 @@ std::unique_ptr<clang::ASTConsumer> Emit
 
     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;