Upgrade to bazel 0.19.0-rc5

Sandbox java as well!

Change-Id: If46914a08ea05b3ae915727b6e89ec45c703645b
diff --git a/tools/bazel b/tools/bazel
index fe2a296..6f5230c 100755
--- a/tools/bazel
+++ b/tools/bazel
@@ -24,8 +24,7 @@
   exec "${BAZEL_OVERRIDE}" "$@"
 fi
 
-readonly VERSION="201807071512+aa7e972"
-#bazel_201807071512+aa7e972.xz
+readonly VERSION="0.19.0rc4-201810201638+ac88041"
 
 readonly DOWNLOAD_DIR="$(dirname "${BASH_SOURCE[0]}")/../bazel-downloads"
 # Directory to unpack bazel into.  This must change whenever bazel changes.
diff --git a/tools/bazel.rc b/tools/bazel.rc
deleted file mode 100644
index 1dee9b5..0000000
--- a/tools/bazel.rc
+++ /dev/null
@@ -1,68 +0,0 @@
-# Use our CROSSTOOL.
-build --crosstool_top=//tools/cpp:toolchain
-# Don't switch HOST compilers.
-build --host_crosstool_top=//tools/cpp:toolchain
-
-# Always include debug information in the non-.stripped binaries.
-build --strip=never
-
-# Use the malloc we want.
-build --custom_malloc=//tools/cpp:malloc
-
-# Use our hermetic Python runtime.
-build --python_top=//tools/python:runtime
-
-build:asan --copt -fsanitize=address
-build:asan --linkopt -fsanitize=address --linkopt -ldl
-build:asan --platform_suffix=-asan
-build:asan --test_env ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.6
-build:asan --test_env ASAN_OPTIONS=detect_leaks=1:check_initialization_order=1:strict_init_order=1:detect_stack_use_after_return=1:detect_odr_violation=2:allow_user_segv_handler=1
-build:asan --copt -fsanitize-blacklist=tools/cpp/asan-blacklist
-build:asan --define have_asan=true
-
-build:tsan --copt -fsanitize=thread --copt -DAOS_SANITIZER_thread
-build:tsan --linkopt -fsanitize=thread
-build:tsan --platform_suffix=-tsan
-build:tsan --test_env TSAN_OPTIONS=external_symbolizer_path=/usr/bin/llvm-symbolizer-3.6:detect_deadlocks=1:second_deadlock_stack=1
-build:tsan --define have_tsan=true
-
-build:isan --copt -fsanitize=integer
-build:isan --linkopt -fsanitize=integer
-build:isan --platform_suffix=-isan
-build:isan --test_env LLVM_SYMBOLIZER=/usr/bin/llvm-symbolizer-3.6
-build:isan --define have_isan=true
-
-build:ubsan --copt -fsanitize=undefined --copt -fno-sanitize-recover
-# Bad alignment is just slow on x86 and traps on ARM, so we'll find
-# it other ways, and some x86 code does it on purpose.
-build:ubsan --copt -fno-sanitize=alignment
-build:ubsan --linkopt -fsanitize=undefined
-# TOOD(Brian): Remove this once Clang adds it itself like it should.
-build:ubsan --linkopt /usr/lib/llvm-3.6/lib/clang/3.6.2/lib/linux/libclang_rt.ubsan_cxx-x86_64.a
-build:ubsan --platform_suffix=-ubsan
-build:ubsan --test_env UBSAN_OPTIONS=external_symbolizer_path=/usr/bin/llvm-symbolizer-3.6:color=always:print_stacktrace=1
-build:ubsan --copt -fsanitize-blacklist=tools/cpp/ubsan-blacklist
-build:ubsan --define have_ubsan=true
-
-build:msan --copt -fsanitize=memory --copt -fsanitize-memory-track-origins
-build:msan --linkopt -fsanitize=memory --linkopt -fsanitize-memory-track-origins
-build:msan --platform_suffix=-msan
-build:msan --test_env MSAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.6
-build:msan --define have_msan=true
-
-# Show paths to a few more than just 1 target.
-build --show_result 5
-# Dump the output of the failing test to stdout.
-test --test_output=errors
-
-build --experimental_sandbox_base=/dev/shm/
-build --experimental_multi_threaded_digest
-
-build --sandbox_fake_hostname=true
-build --sandbox_fake_username=true
-
-build --auto_cpu_environment_group=//tools:cpus
-startup --host_jvm_args=-Dbazel.DigestFunction=SHA1
-
-common --watchfs
-build --spawn_strategy=linux-sandbox
diff --git a/tools/cpp/BUILD b/tools/cpp/BUILD
index d541a8a..d2e2fda 100644
--- a/tools/cpp/BUILD
+++ b/tools/cpp/BUILD
@@ -103,6 +103,7 @@
     static_runtime_libs = [":empty"],
     strip_files = ":clang_3p6_strip_files",
     supports_param_files = 1,
+    toolchain_identifier = "k8_linux",
 )
 
 filegroup(
@@ -156,6 +157,7 @@
     static_runtime_libs = [":empty"],
     strip_files = ":roborio_strip_files",
     supports_param_files = 1,
+    toolchain_identifier = "roborio_linux",
 )
 
 filegroup(
@@ -214,6 +216,7 @@
     static_runtime_libs = [":empty"],
     strip_files = ":linaro_linux_strip_files",
     supports_param_files = 1,
+    toolchain_identifier = "clang_linux_armhf",
 )
 
 filegroup(
@@ -256,6 +259,7 @@
     static_runtime_libs = [":empty"],
     strip_files = "//tools/cpp/gcc_arm_none_eabi:strip",
     supports_param_files = 1,
+    toolchain_identifier = "cortex-m4f",
 )
 
 cc_toolchain(
@@ -270,6 +274,7 @@
     static_runtime_libs = [":empty"],
     strip_files = ":empty",
     supports_param_files = 1,
+    toolchain_identifier = "cortex-m4f-k22",
 )
 
 py_binary(