You've already forked linux-packaging-mono
Imported Upstream version 5.14.0.78
Former-commit-id: 3494343bcc9ddb42b36b82dd9ae7b69e85e0229f
This commit is contained in:
parent
74b74abd9f
commit
19234507ba
@@ -1,5 +1,6 @@
|
||||
# Build WebAssembly #
|
||||
Currently, building WebAssembly is only possible on Windows.
|
||||
|
||||
## Build WebAssembly on Windows ##
|
||||
|
||||
1. Install Emscripten by following the instructions [here](https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html).
|
||||
2. Follow the instructions [here](https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#updating-the-sdk) to update Emscripten to the latest version.
|
||||
@@ -7,15 +8,33 @@ Currently, building WebAssembly is only possible on Windows.
|
||||
4. Build the WebAssembly runtime by running ```build.cmd wasm``` from the repo root.
|
||||
5. Run the WebAssembly "Hello World" test by running ```C:\corert\tests\runtest.cmd wasm```.
|
||||
|
||||
To debug compiling WebAssembly:
|
||||
## Build WebAssembly on OSX ##
|
||||
|
||||
1. Install Emscripten by following the instructions [here](https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html).
|
||||
2. Follow the instructions [here](https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#updating-the-sdk) to update Emscripten to the latest version.
|
||||
3. Get CoreRT set up by installing [Prerequisites](prerequisites-for-building.md).
|
||||
4. Build the WebAssembly runtime by running ```./build.sh wasm``` from the repo root.
|
||||
5. Run the WebAssembly "Hello World" test by opening it in [Firefox](https://www.getfirefox.com).
|
||||
|
||||
## Build WebAssembly on Ubuntu 16.04.3 ##
|
||||
|
||||
1. Get CoreRT set up by installing [Prerequisites](prerequisites-for-building.md), except install ```libicu55``` for Ubuntu 16 instead of ```libicu52```.
|
||||
2. Install Emscripten by following the instructions [here](https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html).
|
||||
3. Follow the instructions [here](https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#updating-the-sdk) to update Emscripten to the latest version.
|
||||
4. Build the WebAssembly runtime by running ```./build.sh wasm``` from the repo root.
|
||||
5. Run the WebAssembly "Hello World" test by opening it in [Firefox](https://www.getfirefox.com).
|
||||
|
||||
|
||||
# How to debug the IL->WebAssembly compilation #
|
||||
This is Windows only for now.
|
||||
1. Set the ILCompiler startup command line to ```@C:\corert\tests\src\Simple\HelloWasm\obj\Debug\wasm\native\HelloWasm.ilc.rsp```. That will generate HelloWasm.bc, an LLVM bitcode file.
|
||||
2. To compile that to WebAssembly, run ```emcc HelloWasm.bc -s ALLOW_MEMORY_GROWTH=1 C:\corert\bin\WebAssembly.wasm.Debug\sdk\libPortableRuntime.bc C:\corert\bin\WebAssembly.wasm.Debug\sdk\libbootstrappercpp.bc -s WASM=1 -o HelloWasm.html``` (if emcc isn't on your path, you'll need to launch an Emscripten command prompt to do this). That will generate a .wasm file with your code as well as html and js files to run it.
|
||||
|
||||
To run a WebAssembly application
|
||||
1. Ensure you have Edge 41 or above or [Firefox](https://www.getfirefox.com).
|
||||
# How to run a WebAssembly application #
|
||||
1. Ensure you have Edge 41 (Windows only) or above or [Firefox](https://www.getfirefox.com).
|
||||
2. Open the generated html file in Edge or Firefox and look at the on-screen console for output.
|
||||
|
||||
Useful tips:
|
||||
# Useful tips #
|
||||
* To manually make ILC compile to WebAssembly, add ```--wasm``` to the command line.
|
||||
* Add ```-g3``` to the emcc command line to generate more debuggable output and a .wast file with the text form of the WebAssembly.
|
||||
* Omit ```-s WASM=1``` from the emcc command line to generate asm.js. Browser debuggers currently work better with asm.js and it's often a bit more readable than wast.
|
||||
|
@@ -28,8 +28,9 @@ tests\runtest.sh
|
||||
You should see the below message when you build CoreRT or run the local tests manually, otherwise something is broken.
|
||||
|
||||
```
|
||||
JIT - TOTAL: 7 PASSED: 7
|
||||
JIT - TOTAL: 12 PASSED: 12
|
||||
CPP - TOTAL: 2 PASSED: 2
|
||||
WASM - TOTAL: 1 PASSED: 1
|
||||
```
|
||||
|
||||
## External Tests
|
||||
@@ -55,7 +56,7 @@ tests\runtest.cmd /coreclr Top200|All|KnownGood
|
||||
|
||||
On Linux / macOS:
|
||||
|
||||
**TBD**
|
||||
tests/runtest.sh -coreclr Top200|All|KnownGood
|
||||
|
||||
### Suppress Windows Error Reporting Dialogs
|
||||
It's advisable to use some sort of a dialog killer tool if you see test regressions as many tests fail with pop-ups for Windows Error Reporting. However, the following regedit scripts have also proven to be useful to mask these pop-ups.
|
||||
|
@@ -20,7 +20,7 @@ sudo apt-get update
|
||||
```
|
||||
|
||||
```sh
|
||||
sudo apt-get install cmake clang-3.9 libicu52 libunwind8 uuid-dev
|
||||
sudo apt-get install cmake clang-3.9 libicu52 libunwind8 uuid-dev libcurl4-openssl-dev zlib1g-dev
|
||||
```
|
||||
|
||||
# macOS (10.12+)
|
||||
@@ -28,6 +28,23 @@ sudo apt-get install cmake clang-3.9 libicu52 libunwind8 uuid-dev
|
||||
1. Install [Command Line Tools for XCode 8](https://developer.apple.com/xcode/download/) or higher.
|
||||
2. Install [CMake](https://cmake.org/download/) 3.8.0 or later. Launch `/Applications/CMake.app/Contents/MacOS/CMake` GUI. Goto "OSX App Menu -> Tools -> Install For Command Line Use" and follow the steps.
|
||||
|
||||
# openSUSE Leap 42.3
|
||||
|
||||
First install llvm-3.9. This is a bit cumbersome because the LLVM that comes from the `zypper` feeds is too old.
|
||||
|
||||
```sh
|
||||
wget http://releases.llvm.org/3.9.0/clang+llvm-3.9.0-x86_64-opensuse13.2.tar.xz
|
||||
tar xf clang+llvm-3.9.0-x86_64-opensuse13.2.tar.xz
|
||||
cd clang+llvm-3.9.0-x86_64-opensuse13.2
|
||||
sudo cp -R * /usr/local/
|
||||
```
|
||||
|
||||
Next install the rest of the dependencies:
|
||||
|
||||
```sh
|
||||
sudo zypper install cmake libuuid-devel icu libcurl-devel zlib-devel
|
||||
```
|
||||
|
||||
# Bash on Ubuntu on Windows (Windows 10 Creators Update or later)
|
||||
|
||||
Make sure you run with Ubuntu 16.04 Xenial userland (this is the default after Windows 10 Creators Update, but if you enabled the "Bash on Ubuntu on Windows" feature before the Creators Update, you need to [upgrade manually](https://blogs.msdn.microsoft.com/commandline/2017/04/11/windows-10-creators-update-whats-new-in-bashwsl-windows-console/)). Running `lsb_release -a` will give you the version.
|
||||
|
Reference in New Issue
Block a user