Rutabaga: don't always build virglrenderer

If the virglrenderer feature isn't enabled, skip building virglrenderer.
This fixes cross-compiling for architectures that don't have libdrm
ready.

Change-Id: I397864ea6104896e1d12a838834d7d0b09a485be
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3221693
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
diff --git a/rutabaga_gfx/build.rs b/rutabaga_gfx/build.rs
index 5b54edd..840b47b 100644
--- a/rutabaga_gfx/build.rs
+++ b/rutabaga_gfx/build.rs
@@ -112,7 +112,7 @@
     Ok(())
 }
 
-fn main() -> Result<()> {
+fn virglrenderer() -> Result<()> {
     // System provided runtime dependencies.
     pkg_config::Config::new().probe("epoxy")?;
     pkg_config::Config::new().probe("libdrm")?;
@@ -138,3 +138,10 @@
     println!("cargo:rustc-link-lib=static=gbm");
     Ok(())
 }
+
+fn main() -> Result<()> {
+    #[cfg(feature = "virgl_renderer")]
+    virglrenderer()?;
+
+    Ok(())
+}