Ver código fonte

Add some sections on running Solang on Windows

Signed-off-by: Sean Young <sean@mess.org>
Sean Young 5 anos atrás
pai
commit
d104f523bf
3 arquivos alterados com 23 adições e 1 exclusões
  1. 1 1
      docs/conf.py
  2. 16 0
      docs/installing.rst
  3. 6 0
      docs/running.rst

+ 1 - 1
docs/conf.py

@@ -53,7 +53,7 @@ html_theme = 'sphinx_rtd_theme'
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
 # so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
+# html_static_path = ['_static']
 
 # See https://github.com/readthedocs/readthedocs.org/issues/2569
 master_doc = 'index'

+ 16 - 0
docs/installing.rst

@@ -185,3 +185,19 @@ And on Windows, assuming *installdir* was ``C:\Users\User\solang-llvm``:
 
 	set PATH=%PATH%;C:\Users\User\solang-llvm\bin
 
+Building LLVM using Windows Containers
+______________________________________
+
+You can build llvm using Windows Containers. This requires `Docker Desktop <https://www.docker.com/products/docker-desktop>`_
+and switch to `windows containers <https://docs.docker.com/docker-for-windows/#switch-between-windows-and-linux-containers>`_.
+Docker on Windows needs Hyper-V. If you are running Windows 10 in a virtual machine, be sure to check
+`this blog post <https://www.mess.org/2020/06/22/Hyper-V-in-KVM/>`_.
+
+The `dockerfile <https://github.com/hyperledger-labs/solang/blob/master/scripts/build-llvm-windows.dockerfile>`_
+is in Solang github repo. Simply run the dockerfile:
+
+.. code-block:: bash
+
+	docker build -f build-llvm-windows.dockerfile .
+
+This will take a few hours. The result will be dockerfile with llvm compressed in ``llvm80.zip`` in the image.

+ 6 - 0
docs/running.rst

@@ -117,6 +117,12 @@ On podman you might need to add ``:Z`` to your volume argument if SELinux is use
 
 	podman container run --rm -it -v .:/sources:Z hyperledgerlabs/solang -o /sources /sources/flipper.sol
 
+On Windows, you need to specify absolute paths:
+
+.. code-block:: bash
+
+	docker run --rm -it -v C:\Users\User:/sources hyperledgerlabs/solang -o /sources /sources/flipper.sol
+
 Using Solang with Substrate
 ---------------------------