[compdb] Adding shared library rules to compile_commands.json

BLD-152

Change-Id: I8f2aaa01170bd4fa47241745461a4ed4b28f4f95
diff --git a/devshell/compdb b/devshell/compdb
index ac18db4..8295131 100755
--- a/devshell/compdb
+++ b/devshell/compdb
@@ -10,5 +10,10 @@
 source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"/lib/vars.sh
 fx-config-read
 
-"${FUCHSIA_DIR}/buildtools/ninja" -C "${FUCHSIA_BUILD_DIR}" -t compdb cc cxx > "${FUCHSIA_BUILD_DIR}/compile_commands.json"
-ln -sf "${FUCHSIA_BUILD_DIR}/compile_commands.json" "${FUCHSIA_DIR}/compile_commands.json"
\ No newline at end of file
+# TODO(BLD-165): This is a temporary workaround, as it uses the specific rule names
+# generated by GN for each arch's shared directory. A better solution is to
+# teach GN itself to output the compdb.
+"${FUCHSIA_DIR}/buildtools/ninja" -C "${FUCHSIA_BUILD_DIR}" -t compdb cc cxx ${FUCHSIA_ARCH}-shared_cc ${FUCHSIA_ARCH}-shared_cxx > "${FUCHSIA_BUILD_DIR}/compile_commands.json"
+ln -sf "${FUCHSIA_BUILD_DIR}/compile_commands.json" "${FUCHSIA_DIR}/compile_commands.json"
+
+echo "Note: The compile_commands may be incomplete if you are building with variants other than arch."
\ No newline at end of file