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/tools/build_rules/select.bzl b/tools/build_rules/select.bzl
index 7e6501c..45ba612 100644
--- a/tools/build_rules/select.bzl
+++ b/tools/build_rules/select.bzl
@@ -3,6 +3,11 @@
 # quickly find issues where something new isn't handled.
 # It will also make adding ORs when it makes sense easy to do nicely.
 
+# TODO(james): Decide what to do about webassembly/emscripten CPU and
+# compiler configurations. Bazel does not seem to handle the fact that a select
+# statement may not logically need to be evaluated for certain configurations
+# (e.g., most targets can't be build for --cpu=web, so handling "web" in the
+# cpu_select should notionally be unnecessary).
 all_cpus = [
     "amd64",
     "roborio",
@@ -47,6 +52,7 @@
     '@//tools:cpu_armhf': values['armhf'],
     '@//tools:cpu_cortex_m4f': values['cortex-m'],
     '@//tools:cpu_cortex_m4f_k22': values['cortex-m'],
+    '@//tools:cpu_web': None,
   })
 
 """A select wrapper for address space sizes.
@@ -67,6 +73,7 @@
     '@//tools:cpu_armhf': values['32'],
     '@//tools:cpu_cortex_m4f': values['32'],
     '@//tools:cpu_cortex_m4f_k22': values['32'],
+    '@//tools:cpu_web': None,
   })
 
 """A select wrapper for compilers.
@@ -85,4 +92,5 @@
   return select({
     '@//tools:compiler_gcc': values['gcc'],
     '@//tools:compiler_clang': values['clang'],
+    '@//tools:compiler_emscripten': None,
   })