From 5530e07c5b5f0cfaccb74e5b5b57ac58f9769c33 Mon Sep 17 00:00:00 2001 From: Adam Singer Date: Sat, 24 Aug 2024 06:00:53 +0000 Subject: [PATCH] Fix recent bugs with shim/third-party --- .github/actions/setup_reindeer/action.yml | 2 ++ shim/third-party/rust/fixups/serde_json/fixups.toml | 8 ++++++++ shim/third-party/rust/fixups/zstd-sys/fixups.toml | 8 ++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup_reindeer/action.yml b/.github/actions/setup_reindeer/action.yml index ef9ecad4abfc..5a5d1c217d09 100644 --- a/.github/actions/setup_reindeer/action.yml +++ b/.github/actions/setup_reindeer/action.yml @@ -5,5 +5,7 @@ runs: - name: Install Reindeer run: |- cargo install --locked --git https://github.com/facebookincubator/reindeer reindeer + # Remove any dirty BUCK and Cargo.lock files + rm -f shim/third-party/rust/Cargo.lock shim/third-party/rust/BUCK reindeer --third-party-dir shim/third-party/rust buckify shell: bash diff --git a/shim/third-party/rust/fixups/serde_json/fixups.toml b/shim/third-party/rust/fixups/serde_json/fixups.toml index db40d72cb2ea..f30f0b5c3432 100644 --- a/shim/third-party/rust/fixups/serde_json/fixups.toml +++ b/shim/third-party/rust/fixups/serde_json/fixups.toml @@ -1 +1,9 @@ buildscript = [] + +[platform_fixup.'cfg(any(target_arch = "aarch64", target_arch = "loongarch64", target_arch = "mips64", target_arch = "powerpc64", target_arch = "wasm32", target_arch = "x86_64"))'] +buildscript = [] +rustc_flags = ['--cfg=fast_arithmetic="64"'] + +[platform_fixup.'cfg(not(any(target_arch = "aarch64", target_arch = "loongarch64", target_arch = "mips64", target_arch = "powerpc64", target_arch = "wasm32", target_arch = "x86_64")))'] +buildscript = [] +rustc_flags = ['--cfg=fast_arithmetic="32"'] diff --git a/shim/third-party/rust/fixups/zstd-sys/fixups.toml b/shim/third-party/rust/fixups/zstd-sys/fixups.toml index 164b6a7237b0..2e2d704263ab 100644 --- a/shim/third-party/rust/fixups/zstd-sys/fixups.toml +++ b/shim/third-party/rust/fixups/zstd-sys/fixups.toml @@ -21,6 +21,8 @@ srcs = [ headers = [ "zdict.h", "zstd.h", + "zstd/lib/common/allocations.h", + "zstd/lib/common/bits.h", "zstd/lib/common/bitstream.h", "zstd/lib/common/compiler.h", "zstd/lib/common/cpu.h", @@ -32,7 +34,7 @@ headers = [ "zstd/lib/common/pool.h", "zstd/lib/common/portability_macros.h", "zstd/lib/common/threading.h", - #"zstd/lib/common/xxhash.h", + "zstd/lib/common/xxhash.h", "zstd/lib/common/zstd_deps.h", "zstd/lib/common/zstd_internal.h", "zstd/lib/common/zstd_trace.h", @@ -78,6 +80,8 @@ srcs = [ headers = [ "zdict.h", "zstd.h", + "zstd/lib/common/allocations.h", + "zstd/lib/common/bits.h", "zstd/lib/common/bitstream.h", "zstd/lib/common/compiler.h", "zstd/lib/common/cpu.h", @@ -89,7 +93,7 @@ headers = [ "zstd/lib/common/pool.h", "zstd/lib/common/portability_macros.h", "zstd/lib/common/threading.h", - #"zstd/lib/common/xxhash.h", + "zstd/lib/common/xxhash.h", "zstd/lib/common/zstd_deps.h", "zstd/lib/common/zstd_internal.h", "zstd/lib/common/zstd_trace.h",