fix the crate name being used by the gencode library.

Before all invocations would try to create a library called protobuf_codegen_upb_gen_code. Now it should properly use the name of the crate currently being built.

PiperOrigin-RevId: 658414835
pull/17686/head
Derek Benson 8 months ago committed by Copybara-Service
parent 582e80eb8a
commit f87523dd41
  1. 2
      rust/protobuf_codegen/src/lib.rs

@ -125,7 +125,7 @@ impl CodeGen {
}
}
}
cc_build.compile(&format!("{}_upb_gen_code", env!("CARGO_CRATE_NAME")));
cc_build.compile(&format!("{}_upb_gen_code", std::env::var("CARGO_PKG_NAME").unwrap()));
Ok(())
}

Loading…
Cancel
Save