Use sandboxed clang

Change-Id: I0b9b5b7940b441aba6c6214e621d8997feef90b1
diff --git a/aos/build/queues/BUILD b/aos/build/queues/BUILD
index b75d12f..b3ec3f6 100644
--- a/aos/build/queues/BUILD
+++ b/aos/build/queues/BUILD
@@ -17,6 +17,9 @@
   deps = [
     ':lib',
   ],
+  data = [
+    '@clang_3p6_repo//:clang-format',
+  ],
 )
 
 ruby_binary(
diff --git a/aos/build/queues/compiler.rb b/aos/build/queues/compiler.rb
index 5164670..f47763d 100644
--- a/aos/build/queues/compiler.rb
+++ b/aos/build/queues/compiler.rb
@@ -77,7 +77,9 @@
 end
 def format_pipeline(output)
   read_in, write_in = IO.pipe()
-  child = Process.spawn('/usr/bin/clang-format-3.5 --style=google',
+  # TODO(phil): Is there a better way to use the sandboxed clang-format here?
+  child = Process.spawn({'LD_LIBRARY_PATH' => './bazel-out/host/bin/aos/build/queues/compiler.runfiles/org_frc971/external/clang_3p6_repo/usr/lib/x86_64-linux-gnu'},
+                        './bazel-out/host/bin/aos/build/queues/compiler.runfiles/org_frc971/external/clang_3p6_repo/usr/bin/clang-format-3.6 --style=google',
                         {:in=>read_in, write_in=>:close,
                          :out=>output.fileno})
   read_in.close