summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-10-17 10:07:44 -0700
committerDylan Baker <dylan@pnwbakers.com>2019-10-18 13:02:58 -0700
commit41b3eb08d9feac97ac1be1802093ad4cc4c6ecaf (patch)
tree90a950addcc1f616f0d62a06cdba47808aa8dc68 /docs
parent821cf6942a390f5f64d8a2cff9933b24c84f7dc1 (diff)
downloadmesa-41b3eb08d9feac97ac1be1802093ad4cc4c6ecaf.tar.gz
docs: update meson docs for windows
Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/install.html12
-rw-r--r--docs/meson.html85
2 files changed, 97 insertions, 0 deletions
diff --git a/docs/install.html b/docs/install.html
index 83c5ebfb115..ec186fb84af 100644
--- a/docs/install.html
+++ b/docs/install.html
@@ -133,6 +133,18 @@ Please read the <a href="meson.html">detailed meson instructions</a>
for more information
</p>
+<p>On windows you can also use the visual studio backend</p>
+<pre>
+ meson builddir --backend=vs
+ cd builddir
+ msbuild mesa.sln /m
+</pre>
+
+<p>
+Please read the <a href="meson.html">detailed meson instructions</a>
+for more information
+</p>
+
<h2 id="scons">3. Building with SCons (Windows/Linux)</h2>
diff --git a/docs/meson.html b/docs/meson.html
index 013ed325684..7a5d14bdf38 100644
--- a/docs/meson.html
+++ b/docs/meson.html
@@ -282,6 +282,20 @@ dependency interface.
</p></dd>
<dd><p>
+As of meson 0.51.0 meson can use cmake to find llvm (the cmake finder
+was added in meson 0.49.0, but LLVM cannot be found until 0.51) Due to the
+way LLVM implements its cmake finder it will only find static libraries, it
+will never find libllvm.so.
+
+There is also a <pre>-Dcmake_module_path</pre> option in this meson version,
+which points to the root of an alternative installation (the prefix). For
+example:
+<pre>
+ meson builddir -Dcmake_module_path=/home/user/mycmake/prefix
+</pre>
+</p></dd>
+
+<dd><p>
As of meson 0.49.0 meson also has the concept of a
<a href="https://mesonbuild.com/Native-environments.html">"native file"</a>,
these files provide information about the native build environment (as opposed
@@ -325,8 +339,11 @@ should be used. It uses the same format as the native file above:
[binaries]
...
llvm-config = '/usr/lib/llvm-config-32'
+ cmake = '/usr/bin/cmake-for-my-arch'
</pre>
+<p>Obviously, only cmake or llvm-config is required.</p>
+
<p>Then configure meson:</p>
<pre>
meson builddir/ --cross-file cross-llvm.ini
@@ -335,6 +352,74 @@ should be used. It uses the same format as the native file above:
See the <a href="#cross-compilation">Cross Compilation</a> section for more information.
</dd>
+<dd><p>On windows (and in other cases), using llvm-config or cmake may be
+either undesirable or impossible. Meson's solution for this is a
+<a href="https://mesonbuild.com/Wrap-dependency-system-manual.html">wrap</a>, in
+this case a "binary wrap". Follow the steps below:</p>
+<ul>
+ <li>Install the binaries and headers into the <code>$mesa_src/subprojects/llvm</code></li>
+ <li>Add a meson build.build file to that directory (more on that later)</li>
+</ul>
+
+<p>The wrap file must define the following:</p>
+<ul>
+ <li><code>dep_llvm</code>: a <code>declare_dependency()</code> object with include_directories, dependencies, and version set)</li>
+</ul>
+
+<p>It may also define:</p>
+<ul>
+ <li><code>irbuilder_h</code>: a <code>files()</code> object pointing to llvm/IR/IRBuilder.h (this is requred for SWR)</li>
+ <li><code>has_rtti</code>: a <code>bool</code> that declares whether LLVM was built with RTTI. Defaults to true</li>
+</ul>
+
+<p>such a meson.build file might look like:</p>
+<pre>
+project('llvm', ['cpp'])
+
+cpp = meson.get_compiler('cpp')
+
+_deps = []
+_search = join_paths(meson.current_source_dir(), 'lib')
+foreach d : ['libLLVMCodeGen', 'libLLVMScalarOpts', 'libLLVMAnalysis',
+ 'libLLVMTransformUtils', 'libLLVMCore', 'libLLVMX86CodeGen',
+ 'libLLVMSelectionDAG', 'libLLVMipo', 'libLLVMAsmPrinter',
+ 'libLLVMInstCombine', 'libLLVMInstrumentation', 'libLLVMMC',
+ 'libLLVMGlobalISel', 'libLLVMObjectYAML', 'libLLVMDebugInfoPDB',
+ 'libLLVMVectorize', 'libLLVMPasses', 'libLLVMSupport',
+ 'libLLVMLTO', 'libLLVMObject', 'libLLVMDebugInfoCodeView',
+ 'libLLVMDebugInfoDWARF', 'libLLVMOrcJIT', 'libLLVMProfileData',
+ 'libLLVMObjCARCOpts', 'libLLVMBitReader', 'libLLVMCoroutines',
+ 'libLLVMBitWriter', 'libLLVMRuntimeDyld', 'libLLVMMIRParser',
+ 'libLLVMX86Desc', 'libLLVMAsmParser', 'libLLVMTableGen',
+ 'libLLVMFuzzMutate', 'libLLVMLinker', 'libLLVMMCParser',
+ 'libLLVMExecutionEngine', 'libLLVMCoverage', 'libLLVMInterpreter',
+ 'libLLVMTarget', 'libLLVMX86AsmParser', 'libLLVMSymbolize',
+ 'libLLVMDebugInfoMSF', 'libLLVMMCJIT', 'libLLVMXRay',
+ 'libLLVMX86AsmPrinter', 'libLLVMX86Disassembler',
+ 'libLLVMMCDisassembler', 'libLLVMOption', 'libLLVMIRReader',
+ 'libLLVMLibDriver', 'libLLVMDlltoolDriver', 'libLLVMDemangle',
+ 'libLLVMBinaryFormat', 'libLLVMLineEditor',
+ 'libLLVMWindowsManifest', 'libLLVMX86Info', 'libLLVMX86Utils']
+ _deps += cpp.find_library(d, dirs : _search)
+endforeach
+
+dep_llvm = declare_dependency(
+ include_directories : include_directories('include'),
+ dependencies : _deps,
+ version : '6.0.0',
+)
+
+has_rtti = false
+irbuilder_h = files('include/llvm/IR/IRBuilder.h')
+</pre>
+
+<p>It is very important that version is defined and is accurate, if it is not,
+workarounds for the wrong version of LLVM might be used resulting in build
+failures.</p>
+
+</dd>
+</dl>
+
<dt><code>PKG_CONFIG_PATH</code></dt>
<dd><p>The
<code>pkg-config</code> utility is a hard requirement for configuring and