Add web assembly compiler

This does the bare minimum to get the emscripten web assembly compiler
into our code base. There's still some things that'll need to be
improved, but this makes it possible to compile C++ code to web assembly
and run it on a web-page.

Incomplete list of TODOs:
-Improve handling of cached files.
-Figure out exactly how we deploy the webpages to the roborio.
-Figure out what, if anything, needs to be done to import WebGL.
-Actually use WebAssembly somewhere.
-Get a better idea of how the wrapper scripts for the WebAssembly work.

Change-Id: I91db4019395d6488f17f37769032da60fe519f4e
diff --git a/debian/emscripten_toolchain.patch b/debian/emscripten_toolchain.patch
new file mode 100644
index 0000000..8a659d1
--- /dev/null
+++ b/debian/emscripten_toolchain.patch
@@ -0,0 +1,33 @@
+--- emcc.py
++++ emcc.py
+@@ -206,6 +206,9 @@ class EmccOptions(object):
+     # Defaults to using the native EOL on each platform (\r\n on Windows, \n on
+     # Linux & MacOS)
+     self.output_eol = os.linesep
++    # Whether we will expand the full path of any input files to remove any
++    # symlinks.
++    self.expand_symlinks = True
+
+
+ def use_source_map(options):
+@@ -859,7 +862,9 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR P
+                     '-current_version', '-I', '-L', '-include-pch'):
+           continue # ignore this gcc-style argument
+
+-      if os.path.islink(arg) and get_file_suffix(os.path.realpath(arg)) in SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + ASSEMBLY_ENDINGS + HEADER_ENDINGS:
++      if (options.expand_symlinks
++          and os.path.islink(arg)
++          and get_file_suffix(os.path.realpath(arg)) in SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + ASSEMBLY_ENDINGS + HEADER_ENDINGS):
+         arg = os.path.realpath(arg)
+
+       if not arg.startswith('-'):
+@@ -2516,6 +2521,8 @@ def parse_args(newargs):
+       settings_changes.append('SIMD=1')
+     elif newargs[i] == '-mno-simd128':
+       settings_changes.append('SIMD=0')
++    elif newargs[i] == '-no-canonical-prefixes':
++      options.expand_symlinks = False
+
+   if should_exit:
+     sys.exit(0)
+