]> git.lizzy.rs Git - rust.git/blobdiff - Cargo.toml
Add test for issue-72352
[rust.git] / Cargo.toml
index f2177a99a9b88b09672694ee4a2ac60ab2293d65..f10d539d8296ba9cabffdf88cee33f47fecf1118 100644 (file)
@@ -42,6 +42,19 @@ debug-assertions = false
 debug = false
 debug-assertions = false
 
+[profile.release.package.compiler_builtins]
+# For compiler-builtins we always use a high number of codegen units.
+# The goal here is to place every single intrinsic into its own object
+# file to avoid symbol clashes with the system libgcc if possible. Note
+# that this number doesn't actually produce this many object files, we
+# just don't create more than this number of object files.
+#
+# It's a bit of a bummer that we have to pass this here, unfortunately.
+# Ideally this would be specified through an env var to Cargo so Cargo
+# knows how many CGUs are for this specific crate, but for now
+# per-crate configuration isn't specifiable in the environment.
+codegen-units = 10000
+
 # We want the RLS to use the version of Cargo that we've got vendored in this
 # repository to ensure that the same exact version of Cargo is used by both the
 # RLS and the Cargo binary itself. The RLS depends on Cargo as a git repository