| From c77cfbf3c71454f8c31341d6cfbab25f031f1549 Mon Sep 17 00:00:00 2001 |
| From: Matthew Maurer <mmaurer@google.com> |
| Date: Mon, 30 Mar 2020 13:24:15 -0700 |
| Subject: [PATCH] Remove special-cased darwin compiler-rt support |
| |
| We ship a set of bionic headers with our clang, even on darwin. As a |
| result, these clang implementations of atomics are not compatible with |
| stdatomic.h. On a normal darwin machine, the compiler needs to provide |
| these. For one running our modified clang, it may not do so. |
| |
| Bug: 146785396 |
| Change-Id: I044a8afdbf65c45f850fc991f8091924ca8e043c |
| --- |
| Cargo.toml | 3 +++ |
| vendor/compiler_builtins/build.rs | 14 -------------- |
| 2 files changed, 3 insertions(+), 14 deletions(-) |
| |
| diff --git a/Cargo.toml b/Cargo.toml |
| index 7b5e0fa1c..95bd2663f 100644 |
| --- a/Cargo.toml |
| +++ b/Cargo.toml |
| @@ -65,5 +65,8 @@ rustc-std-workspace-core = { path = 'src/tools/rustc-std-workspace-core' } |
| rustc-std-workspace-alloc = { path = 'src/tools/rustc-std-workspace-alloc' } |
| rustc-std-workspace-std = { path = 'src/tools/rustc-std-workspace-std' } |
| |
| +# Patch directory source into a path source to allow modification |
| +compiler_builtins = { path = 'vendor/compiler_builtins/' } |
| + |
| [patch."https://github.com/rust-lang/rust-clippy"] |
| clippy_lints = { path = "src/tools/clippy/clippy_lints" } |
| diff --git a/vendor/compiler_builtins/build.rs b/vendor/compiler_builtins/build.rs |
| index c4a80223b..a395a65e7 100644 |
| --- a/vendor/compiler_builtins/build.rs |
| +++ b/vendor/compiler_builtins/build.rs |
| @@ -245,20 +245,6 @@ mod c { |
| } |
| } |
| |
| - if target_vendor == "apple" { |
| - sources.extend(&[ |
| - ("atomic_flag_clear", "atomic_flag_clear.c"), |
| - ("atomic_flag_clear_explicit", "atomic_flag_clear_explicit.c"), |
| - ("atomic_flag_test_and_set", "atomic_flag_test_and_set.c"), |
| - ( |
| - "atomic_flag_test_and_set_explicit", |
| - "atomic_flag_test_and_set_explicit.c", |
| - ), |
| - ("atomic_signal_fence", "atomic_signal_fence.c"), |
| - ("atomic_thread_fence", "atomic_thread_fence.c"), |
| - ]); |
| - } |
| - |
| if target_env == "msvc" { |
| if target_arch == "x86_64" { |
| sources.extend(&[ |
| -- |
| 2.27.0.111.gc72c7da667-goog |
| |