Crubit OSS: Try building cc_bindings_from_rs_test: Use OSS version of the dependencies.

PiperOrigin-RevId: 551603759
Change-Id: I16fa72c640d893a958cb776da684a64730c9705b
diff --git a/cc_bindings_from_rs/BUILD b/cc_bindings_from_rs/BUILD
index 110adb9..e3c75d1 100644
--- a/cc_bindings_from_rs/BUILD
+++ b/cc_bindings_from_rs/BUILD
@@ -45,14 +45,15 @@
     name = "cc_bindings_from_rs_test",
     crate = ":cc_bindings_from_rs",
     data = select({
-        "//third_party/crosstool:unstable_config": ["//nowhere/llvm/rust:std_libs"],
-        "//conditions:default": ["//nowhere/llvm/rust:std_libs"],
+        "//conditions:default": [
+            "@rust_linux_x86_64__x86_64-unknown-linux-gnu__nightly_tools//:rust_std-x86_64-unknown-linux-gnu",
+        ],
     }),
-
     # TODO(b/242703401): Remove once cc_common.link works for rustc libraries.
     rustc_flags = select({
-        "//third_party/crosstool:unstable_config": ["--cfg=llvm_unstable"],
-        "//conditions:default": ["--cfg=stable"],
+        "//conditions:default": [
+            "--cfg=oss",
+        ],
     }),
     tags = [
         "not_build:arm",
diff --git a/cc_bindings_from_rs/run_compiler.rs b/cc_bindings_from_rs/run_compiler.rs
index f9ca454..34bf827 100644
--- a/cc_bindings_from_rs/run_compiler.rs
+++ b/cc_bindings_from_rs/run_compiler.rs
@@ -249,6 +249,8 @@
     const CROSSTOOL_VERSION: &str = "llvm_unstable";
     #[cfg(stable)]
     const CROSSTOOL_VERSION: &str = "stable";
+    #[cfg(oss)]
+    const CROSSTOOL_VERSION: &str = "oss";
 
     /// Returns the `rustc` sysroot that is suitable for the environment where
     /// unit tests run.
@@ -258,8 +260,8 @@
     /// `run_compiler`
     pub fn get_sysroot_for_testing() -> PathBuf {
         let runfiles = runfiles::Runfiles::create().unwrap();
-        let loc = runfiles.rlocation(if CROSSTOOL_VERSION == "legacy" {
-            "google3/third_party/unsupported_toolchains/rust/toolchains/nightly".into()
+        let loc = runfiles.rlocation(if CROSSTOOL_VERSION == "oss" {
+            "rust_linux_x86_64__x86_64-unknown-linux-gnu__nightly_tools/rust_toolchain/lib/rustlib/x86_64-unknown-linux-gnu".into()
         } else {
             format!("google3/third_party/crosstool/v18/{CROSSTOOL_VERSION}/rust/main_sysroot")
         });
diff --git a/common/BUILD b/common/BUILD
index 10d7164..0b06387 100644
--- a/common/BUILD
+++ b/common/BUILD
@@ -158,7 +158,6 @@
     srcs = ["token_stream_matchers.rs"],
     visibility = [
         "//:__subpackages__",
-        "//google_internal/release:crubit_support_lib_visibility",
     ],
     deps = [
         ":token_stream_printer",