Invoke `clang-format` binary instead of linking in llvm/clang libraries.
This change is needed, because otherwise (in the Crubit's development
environment) linking against 1) llvm/clang/cLanG-format and 2)
rustc_driver-etc ends up transitively depending on 2 different versions
of llvm which makes the linker unhappy.
PiperOrigin-RevId: 494793700
diff --git a/common/code_gen_utils.rs b/common/code_gen_utils.rs
index 7087243..46f1f8a 100644
--- a/common/code_gen_utils.rs
+++ b/common/code_gen_utils.rs
@@ -258,7 +258,7 @@
use super::*;
use quote::quote;
use token_stream_matchers::{assert_cc_matches, assert_rs_matches};
- use token_stream_printer::cc_tokens_to_formatted_string;
+ use token_stream_printer::cc_tokens_to_formatted_string_for_tests;
#[test]
fn test_format_cc_ident_basic() {
@@ -421,7 +421,8 @@
.collect::<BTreeSet<_>>();
let tokens = format_cc_includes(&includes);
- let actual = cc_tokens_to_formatted_string(quote! { __NEWLINE__ #tokens }).unwrap();
+ let actual =
+ cc_tokens_to_formatted_string_for_tests(quote! { __NEWLINE__ #tokens }).unwrap();
assert_eq!(
actual,
r#"