mirror of
https://github.com/openai/codex.git
synced 2026-09-14 11:57:03 +00:00
Avoid double-linking libc++ in Bazel v8 builds
This commit is contained in:
@@ -7,6 +7,7 @@ single_version_override(
|
||||
patch_strip = 1,
|
||||
patches = [
|
||||
"//patches:toolchains_llvm_bootstrapped_resource_dir.patch",
|
||||
"//patches:toolchains_llvm_bootstrapped_linux_skip_static_runtime_libs.patch",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
diff --git a/runtimes/BUILD.bazel b/runtimes/BUILD.bazel
|
||||
index 9db8749..a968bcc 100644
|
||||
--- a/runtimes/BUILD.bazel
|
||||
+++ b/runtimes/BUILD.bazel
|
||||
@@ -35,11 +35,11 @@ filegroup(
|
||||
filegroup(
|
||||
name = "static_runtime_lib",
|
||||
srcs = select({
|
||||
- "@platforms//os:linux": [
|
||||
- "@libcxx//:libcxx.static",
|
||||
- "@libcxxabi//:libcxxabi.static",
|
||||
- "@libunwind//:libunwind.static",
|
||||
- ],
|
||||
+ # The prebuilt rusty_v8 Linux archive already vendors the C++ runtime
|
||||
+ # objects it needs. Re-linking llvm's static libc++ family in Bazel
|
||||
+ # causes duplicate stdexcept symbols in Rust binaries that depend on v8.
|
||||
+ # Keep the Linux runtime libgroup empty and rely on the archive instead.
|
||||
+ "@platforms//os:linux": [],
|
||||
"@platforms//os:windows": [
|
||||
"@libcxx//:libcxx.static",
|
||||
"@libcxxabi//:libcxxabi.static",
|
||||
Reference in New Issue
Block a user