From 8ba7d0374c99ba2be85223ec62291d5737d77aeb Mon Sep 17 00:00:00 2001 From: Hansong <107070759+kirklandsign@users.noreply.github.com> Date: Thu, 8 Aug 2024 13:06:06 -0700 Subject: [PATCH 1/8] Remove unused shim (#4597) * Remove unused shim We will remove unused shim and un-sync from common shim for now We will deprecate OSS BUCK build later --- shim/README.md | 4 - shim/antlir/fbpkg/fbpkg.bzl | 17 - shim/buck2/buck_rust_binary.bzl | 13 - shim/buck2/proto_defs.bzl | 13 - shim/build_defs/auto_headers.bzl | 40 -- shim/build_defs/config.bzl | 13 - shim/build_defs/cpp_benchmark.bzl | 9 - shim/build_defs/cpp_binary.bzl | 10 - shim/build_defs/cpp_library.bzl | 10 - shim/build_defs/cpp_unittest.bzl | 10 - shim/build_defs/custom_rule.bzl | 9 - shim/build_defs/custom_unittest.bzl | 9 - shim/build_defs/cython_library.bzl | 11 - shim/build_defs/export_files.bzl | 15 - shim/build_defs/lib/python_common.bzl | 14 - shim/build_defs/ocaml_binary.bzl | 10 - shim/build_defs/platform_utils.bzl | 11 - shim/build_defs/prebuilt_cpp_library.bzl | 10 - shim/build_defs/python_binary.bzl | 12 - shim/build_defs/python_library.bzl | 12 - shim/build_defs/python_unittest.bzl | 12 - shim/build_defs/roar.bzl | 14 - shim/build_defs/rust_binary.bzl | 10 - shim/build_defs/rust_library.bzl | 10 - shim/build_defs/rust_unittest.bzl | 10 - shim/common/ocaml/interop/defs.bzl | 10 - shim/folly/io/async/test/certs/defs.bzl | 23 - shim/grpc_fb/codegen/buck_macros.bzl | 10 - shim/lib/dicts.bzl | 41 -- shim/lib/new_sets.bzl | 236 --------- shim/lib/paths.bzl | 242 ---------- shim/lib/shell.bzl | 63 --- shim/shims.bzl | 453 ------------------ shim/target_determinator/macros/ci.bzl | 28 -- shim/third-party/binutils/BUCK | 14 - shim/third-party/boost/BUCK | 38 -- shim/third-party/boost/boost.bzl | 21 - shim/third-party/brotli/BUCK | 22 - shim/third-party/bzip2/BUCK | 15 - shim/third-party/double_conversion/BUCK | 16 - shim/third-party/fmt/BUCK | 16 - shim/third-party/gflags/BUCK | 16 - shim/third-party/glibc/BUCK | 36 -- shim/third-party/glog/BUCK | 18 - shim/third-party/googletest/BUCK | 27 -- shim/third-party/googletest/gtest_main.cpp | 66 --- shim/third-party/jemalloc/BUCK | 16 - shim/third-party/jvm/BUCK | 15 - shim/third-party/libaegis/BUCK | 15 - shim/third-party/libaio/BUCK | 14 - shim/third-party/libdwarf/BUCK | 16 - shim/third-party/libevent/BUCK | 16 - shim/third-party/libgcc/BUCK | 15 - shim/third-party/liboqs/BUCK | 16 - shim/third-party/libsodium/BUCK | 17 - shim/third-party/libunwind/BUCK | 16 - shim/third-party/lz4/BUCK | 15 - shim/third-party/macros/rust_third_party.bzl | 11 - shim/third-party/ocaml/BUCK | 7 - shim/third-party/ocaml/opam/lib/ocaml | 1 - shim/third-party/openssl/BUCK | 22 - shim/third-party/proto/BUCK | 21 - shim/third-party/proto/defs.bzl | 105 ---- shim/third-party/proto/releases.bzl | 46 -- shim/third-party/proto/update.py | 99 ---- shim/third-party/python/BUCK | 17 - shim/third-party/range-v3/BUCK | 12 - shim/third-party/rust/.gitignore | 31 -- shim/third-party/rust/Cargo.toml | 237 --------- shim/third-party/rust/defs.bzl | 7 - .../third-party/rust/fixups/ahash/fixups.toml | 1 - .../rust/fixups/anyhow/fixups.toml | 1 - .../rust/fixups/async-trait/fixups.toml | 1 - .../rust/fixups/atomic/fixups.toml | 2 - .../rust/fixups/axum-core/fixups.toml | 1 - shim/third-party/rust/fixups/axum/fixups.toml | 1 - .../rust/fixups/backtrace/fixups.toml | 1 - .../rust/fixups/blake3/fixups.toml | 81 ---- .../rust/fixups/bumpalo/fixups.toml | 1 - .../rust/fixups/bzip2-sys/fixups.toml | 1 - shim/third-party/rust/fixups/clap/fixups.toml | 1 - .../rust/fixups/clap_builder/fixups.toml | 1 - .../rust/fixups/clap_derive/fixups.toml | 1 - .../fixups/core-foundation-sys/fixups.toml | 1 - .../rust/fixups/crc32fast/fixups.toml | 1 - .../rust/fixups/criterion/fixups.toml | 1 - .../rust/fixups/crossbeam-epoch/fixups.toml | 2 - .../rust/fixups/crossbeam-queue/fixups.toml | 2 - .../rust/fixups/crossbeam-utils/fixups.toml | 2 - .../rust/fixups/crunchy/fixups.toml | 2 - .../fixups/darwin-libproc-sys/fixups.toml | 1 - .../rust/fixups/debugserver-types/fixups.toml | 2 - .../rust/fixups/erased-serde/fixups.toml | 1 - .../rust/fixups/fs-err/fixups.toml | 2 - shim/third-party/rust/fixups/fs4/fixups.toml | 1 - .../rust/fixups/futures-channel/fixups.toml | 2 - .../rust/fixups/futures-core/fixups.toml | 2 - .../rust/fixups/futures-task/fixups.toml | 2 - .../rust/fixups/futures-util/fixups.toml | 2 - .../rust/fixups/generic-array/fixups.toml | 1 - .../rust/fixups/getrandom/fixups.toml | 1 - .../rust/fixups/httparse/fixups.toml | 1 - .../third-party/rust/fixups/hyper/fixups.toml | 5 - .../rust/fixups/indexmap/fixups.toml | 2 - .../rust/fixups/io-lifetimes/fixups.toml | 1 - .../rust/fixups/jemalloc-sys/fixups.toml | 1 - .../rust/fixups/lalrpop/fixups.toml | 1 - .../rust/fixups/lexical-core/fixups.toml | 2 - shim/third-party/rust/fixups/libc/fixups.toml | 2 - shim/third-party/rust/fixups/libm/fixups.toml | 1 - .../rust/fixups/libsqlite3-sys/fixups.toml | 19 - .../rust/fixups/lock_api/fixups.toml | 3 - shim/third-party/rust/fixups/log/fixups.toml | 2 - .../rust/fixups/memchr/fixups.toml | 1 - .../rust/fixups/memoffset/fixups.toml | 1 - shim/third-party/rust/fixups/mio/fixups.toml | 1 - .../rust/fixups/native-tls/fixups.toml | 1 - shim/third-party/rust/fixups/nix/fixups.toml | 2 - shim/third-party/rust/fixups/nom/fixups.toml | 1 - .../third-party/rust/fixups/ntapi/fixups.toml | 1 - .../rust/fixups/num-bigint/fixups.toml | 5 - .../rust/fixups/num-integer/fixups.toml | 2 - .../rust/fixups/num-traits/fixups.toml | 2 - .../rust/fixups/oid-registry/fixups.toml | 7 - .../rust/fixups/parking_lot/fixups.toml | 2 - .../rust/fixups/parking_lot_core/fixups.toml | 2 - .../third-party/rust/fixups/paste/fixups.toml | 1 - shim/third-party/rust/fixups/pest/fixups.toml | 1 - .../fixups/pin-project-internal/fixups.toml | 1 - .../rust/fixups/platforms/fixups.toml | 26 - .../rust/fixups/prettyplease/fixups.toml | 2 - .../fixups/proc-macro-error-attr/fixups.toml | 1 - .../rust/fixups/proc-macro-error/fixups.toml | 1 - .../rust/fixups/proc-macro-hack/fixups.toml | 1 - .../rust/fixups/proc-macro2/fixups.toml | 2 - .../rust/fixups/prost-build/fixups.toml | 7 - .../rust/fixups/pulldown-cmark/fixups.toml | 1 - .../third-party/rust/fixups/quote/fixups.toml | 1 - .../rust/fixups/radium/fixups.toml | 1 - .../rust/fixups/rayon-core/fixups.toml | 1 - .../rust/fixups/ref-cast/fixups.toml | 1 - .../rust/fixups/reqwest/fixups.toml | 1 - shim/third-party/rust/fixups/ring/fixups.toml | 162 ------- .../ring_core_generated/prefix_symbols.h | 119 ----- .../ring_core_generated/prefix_symbols_asm.h | 236 --------- .../prefix_symbols_nasm.inc | 236 --------- .../rust/fixups/rustix/fixups.toml | 2 - .../rust/fixups/rustls/fixups.toml | 1 - .../rust/fixups/rustversion/fixups.toml | 2 - .../third-party/rust/fixups/serde/fixups.toml | 1 - .../rust/fixups/serde_derive/fixups.toml | 3 - .../rust/fixups/serde_json/fixups.toml | 1 - .../rust/fixups/signal-hook/fixups.toml | 1 - shim/third-party/rust/fixups/slab/fixups.toml | 1 - shim/third-party/rust/fixups/slog/fixups.toml | 1 - shim/third-party/rust/fixups/syn/fixups.toml | 1 - .../rust/fixups/sys-info/fixups.toml | 19 - .../rust/fixups/sysinfo/fixups.toml | 11 - .../rust/fixups/tempfile/fixups.toml | 2 - .../rust/fixups/terminfo/fixups.toml | 2 - .../rust/fixups/termwiz/fixups.toml | 2 - .../rust/fixups/test-case/fixups.toml | 1 - .../rust/fixups/thiserror/fixups.toml | 1 - .../rust/fixups/tiny-keccak/fixups.toml | 1 - .../rust/fixups/tokio-stream/fixups.toml | 2 - .../rust/fixups/tokio-util/fixups.toml | 1 - .../third-party/rust/fixups/tokio/fixups.toml | 8 - .../third-party/rust/fixups/tonic/fixups.toml | 1 - .../fixups/tracing-subscriber/fixups.toml | 2 - .../rust/fixups/trybuild/fixups.toml | 2 - .../rust/fixups/typenum/fixups.toml | 4 - .../rust/fixups/unicase/fixups.toml | 1 - .../winapi-x86_64-pc-windows-gnu/fixups.toml | 9 - .../rust/fixups/winapi/fixups.toml | 4 - .../rust/fixups/windows-targets/fixups.toml | 3 - .../windows_aarch64_gnullvm/fixups.toml | 8 - .../fixups/windows_x86_64_gnu/fixups.toml | 8 - .../fixups/windows_x86_64_gnullvm/fixups.toml | 8 - .../fixups/windows_x86_64_msvc/fixups.toml | 8 - .../rust/fixups/winreg/fixups.toml | 1 - .../rust/fixups/zerocopy/fixups.toml | 1 - .../rust/fixups/zstd-safe/fixups.toml | 1 - .../rust/fixups/zstd-sys/fixups.toml | 114 ----- shim/third-party/rust/reindeer.toml | 29 -- shim/third-party/rust/top/main.rs | 8 - shim/third-party/snappy/BUCK | 12 - shim/third-party/third_party.bzl | 70 --- shim/third-party/xz/BUCK | 16 - shim/third-party/zlib/BUCK | 16 - shim/third-party/zstd/BUCK | 15 - .../build_defs/audit_dependencies_test.bzl | 10 - shim/tools/build_defs/buck2/is_buck2.bzl | 9 - shim/tools/build_defs/buckconfig.bzl | 16 - shim/tools/build_defs/glob_defs.bzl | 8 - 194 files changed, 3946 deletions(-) delete mode 100644 shim/README.md delete mode 100644 shim/antlir/fbpkg/fbpkg.bzl delete mode 100644 shim/buck2/buck_rust_binary.bzl delete mode 100644 shim/buck2/proto_defs.bzl delete mode 100644 shim/build_defs/auto_headers.bzl delete mode 100644 shim/build_defs/config.bzl delete mode 100644 shim/build_defs/cpp_benchmark.bzl delete mode 100644 shim/build_defs/cpp_binary.bzl delete mode 100644 shim/build_defs/cpp_library.bzl delete mode 100644 shim/build_defs/cpp_unittest.bzl delete mode 100644 shim/build_defs/custom_rule.bzl delete mode 100644 shim/build_defs/custom_unittest.bzl delete mode 100644 shim/build_defs/cython_library.bzl delete mode 100644 shim/build_defs/export_files.bzl delete mode 100644 shim/build_defs/lib/python_common.bzl delete mode 100644 shim/build_defs/ocaml_binary.bzl delete mode 100644 shim/build_defs/platform_utils.bzl delete mode 100644 shim/build_defs/prebuilt_cpp_library.bzl delete mode 100644 shim/build_defs/python_binary.bzl delete mode 100644 shim/build_defs/python_library.bzl delete mode 100644 shim/build_defs/python_unittest.bzl delete mode 100644 shim/build_defs/roar.bzl delete mode 100644 shim/build_defs/rust_binary.bzl delete mode 100644 shim/build_defs/rust_library.bzl delete mode 100644 shim/build_defs/rust_unittest.bzl delete mode 100644 shim/common/ocaml/interop/defs.bzl delete mode 100644 shim/folly/io/async/test/certs/defs.bzl delete mode 100644 shim/grpc_fb/codegen/buck_macros.bzl delete mode 100644 shim/lib/dicts.bzl delete mode 100644 shim/lib/new_sets.bzl delete mode 100644 shim/lib/paths.bzl delete mode 100644 shim/lib/shell.bzl delete mode 100644 shim/shims.bzl delete mode 100644 shim/target_determinator/macros/ci.bzl delete mode 100644 shim/third-party/binutils/BUCK delete mode 100644 shim/third-party/boost/BUCK delete mode 100644 shim/third-party/boost/boost.bzl delete mode 100644 shim/third-party/brotli/BUCK delete mode 100644 shim/third-party/bzip2/BUCK delete mode 100644 shim/third-party/double_conversion/BUCK delete mode 100644 shim/third-party/fmt/BUCK delete mode 100644 shim/third-party/gflags/BUCK delete mode 100644 shim/third-party/glibc/BUCK delete mode 100644 shim/third-party/glog/BUCK delete mode 100644 shim/third-party/googletest/BUCK delete mode 100644 shim/third-party/googletest/gtest_main.cpp delete mode 100644 shim/third-party/jemalloc/BUCK delete mode 100644 shim/third-party/jvm/BUCK delete mode 100644 shim/third-party/libaegis/BUCK delete mode 100644 shim/third-party/libaio/BUCK delete mode 100644 shim/third-party/libdwarf/BUCK delete mode 100644 shim/third-party/libevent/BUCK delete mode 100644 shim/third-party/libgcc/BUCK delete mode 100644 shim/third-party/liboqs/BUCK delete mode 100644 shim/third-party/libsodium/BUCK delete mode 100644 shim/third-party/libunwind/BUCK delete mode 100644 shim/third-party/lz4/BUCK delete mode 100644 shim/third-party/macros/rust_third_party.bzl delete mode 100644 shim/third-party/ocaml/BUCK delete mode 100644 shim/third-party/ocaml/opam/lib/ocaml delete mode 100644 shim/third-party/openssl/BUCK delete mode 100644 shim/third-party/proto/BUCK delete mode 100644 shim/third-party/proto/defs.bzl delete mode 100644 shim/third-party/proto/releases.bzl delete mode 100755 shim/third-party/proto/update.py delete mode 100644 shim/third-party/python/BUCK delete mode 100644 shim/third-party/range-v3/BUCK delete mode 100644 shim/third-party/rust/.gitignore delete mode 100644 shim/third-party/rust/Cargo.toml delete mode 100644 shim/third-party/rust/defs.bzl delete mode 100644 shim/third-party/rust/fixups/ahash/fixups.toml delete mode 100644 shim/third-party/rust/fixups/anyhow/fixups.toml delete mode 100644 shim/third-party/rust/fixups/async-trait/fixups.toml delete mode 100644 shim/third-party/rust/fixups/atomic/fixups.toml delete mode 100644 shim/third-party/rust/fixups/axum-core/fixups.toml delete mode 100644 shim/third-party/rust/fixups/axum/fixups.toml delete mode 100644 shim/third-party/rust/fixups/backtrace/fixups.toml delete mode 100644 shim/third-party/rust/fixups/blake3/fixups.toml delete mode 100644 shim/third-party/rust/fixups/bumpalo/fixups.toml delete mode 100644 shim/third-party/rust/fixups/bzip2-sys/fixups.toml delete mode 100644 shim/third-party/rust/fixups/clap/fixups.toml delete mode 100644 shim/third-party/rust/fixups/clap_builder/fixups.toml delete mode 100644 shim/third-party/rust/fixups/clap_derive/fixups.toml delete mode 100644 shim/third-party/rust/fixups/core-foundation-sys/fixups.toml delete mode 100644 shim/third-party/rust/fixups/crc32fast/fixups.toml delete mode 100644 shim/third-party/rust/fixups/criterion/fixups.toml delete mode 100644 shim/third-party/rust/fixups/crossbeam-epoch/fixups.toml delete mode 100644 shim/third-party/rust/fixups/crossbeam-queue/fixups.toml delete mode 100644 shim/third-party/rust/fixups/crossbeam-utils/fixups.toml delete mode 100644 shim/third-party/rust/fixups/crunchy/fixups.toml delete mode 100644 shim/third-party/rust/fixups/darwin-libproc-sys/fixups.toml delete mode 100644 shim/third-party/rust/fixups/debugserver-types/fixups.toml delete mode 100644 shim/third-party/rust/fixups/erased-serde/fixups.toml delete mode 100644 shim/third-party/rust/fixups/fs-err/fixups.toml delete mode 100644 shim/third-party/rust/fixups/fs4/fixups.toml delete mode 100644 shim/third-party/rust/fixups/futures-channel/fixups.toml delete mode 100644 shim/third-party/rust/fixups/futures-core/fixups.toml delete mode 100644 shim/third-party/rust/fixups/futures-task/fixups.toml delete mode 100644 shim/third-party/rust/fixups/futures-util/fixups.toml delete mode 100644 shim/third-party/rust/fixups/generic-array/fixups.toml delete mode 100644 shim/third-party/rust/fixups/getrandom/fixups.toml delete mode 100644 shim/third-party/rust/fixups/httparse/fixups.toml delete mode 100644 shim/third-party/rust/fixups/hyper/fixups.toml delete mode 100644 shim/third-party/rust/fixups/indexmap/fixups.toml delete mode 100644 shim/third-party/rust/fixups/io-lifetimes/fixups.toml delete mode 100644 shim/third-party/rust/fixups/jemalloc-sys/fixups.toml delete mode 100644 shim/third-party/rust/fixups/lalrpop/fixups.toml delete mode 100644 shim/third-party/rust/fixups/lexical-core/fixups.toml delete mode 100644 shim/third-party/rust/fixups/libc/fixups.toml delete mode 100644 shim/third-party/rust/fixups/libm/fixups.toml delete mode 100644 shim/third-party/rust/fixups/libsqlite3-sys/fixups.toml delete mode 100644 shim/third-party/rust/fixups/lock_api/fixups.toml delete mode 100644 shim/third-party/rust/fixups/log/fixups.toml delete mode 100644 shim/third-party/rust/fixups/memchr/fixups.toml delete mode 100644 shim/third-party/rust/fixups/memoffset/fixups.toml delete mode 100644 shim/third-party/rust/fixups/mio/fixups.toml delete mode 100644 shim/third-party/rust/fixups/native-tls/fixups.toml delete mode 100644 shim/third-party/rust/fixups/nix/fixups.toml delete mode 100644 shim/third-party/rust/fixups/nom/fixups.toml delete mode 100644 shim/third-party/rust/fixups/ntapi/fixups.toml delete mode 100644 shim/third-party/rust/fixups/num-bigint/fixups.toml delete mode 100644 shim/third-party/rust/fixups/num-integer/fixups.toml delete mode 100644 shim/third-party/rust/fixups/num-traits/fixups.toml delete mode 100644 shim/third-party/rust/fixups/oid-registry/fixups.toml delete mode 100644 shim/third-party/rust/fixups/parking_lot/fixups.toml delete mode 100644 shim/third-party/rust/fixups/parking_lot_core/fixups.toml delete mode 100644 shim/third-party/rust/fixups/paste/fixups.toml delete mode 100644 shim/third-party/rust/fixups/pest/fixups.toml delete mode 100644 shim/third-party/rust/fixups/pin-project-internal/fixups.toml delete mode 100644 shim/third-party/rust/fixups/platforms/fixups.toml delete mode 100644 shim/third-party/rust/fixups/prettyplease/fixups.toml delete mode 100644 shim/third-party/rust/fixups/proc-macro-error-attr/fixups.toml delete mode 100644 shim/third-party/rust/fixups/proc-macro-error/fixups.toml delete mode 100644 shim/third-party/rust/fixups/proc-macro-hack/fixups.toml delete mode 100644 shim/third-party/rust/fixups/proc-macro2/fixups.toml delete mode 100644 shim/third-party/rust/fixups/prost-build/fixups.toml delete mode 100644 shim/third-party/rust/fixups/pulldown-cmark/fixups.toml delete mode 100644 shim/third-party/rust/fixups/quote/fixups.toml delete mode 100644 shim/third-party/rust/fixups/radium/fixups.toml delete mode 100644 shim/third-party/rust/fixups/rayon-core/fixups.toml delete mode 100644 shim/third-party/rust/fixups/ref-cast/fixups.toml delete mode 100644 shim/third-party/rust/fixups/reqwest/fixups.toml delete mode 100644 shim/third-party/rust/fixups/ring/fixups.toml delete mode 100644 shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols.h delete mode 100644 shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_asm.h delete mode 100644 shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_nasm.inc delete mode 100644 shim/third-party/rust/fixups/rustix/fixups.toml delete mode 100644 shim/third-party/rust/fixups/rustls/fixups.toml delete mode 100644 shim/third-party/rust/fixups/rustversion/fixups.toml delete mode 100644 shim/third-party/rust/fixups/serde/fixups.toml delete mode 100644 shim/third-party/rust/fixups/serde_derive/fixups.toml delete mode 100644 shim/third-party/rust/fixups/serde_json/fixups.toml delete mode 100644 shim/third-party/rust/fixups/signal-hook/fixups.toml delete mode 100644 shim/third-party/rust/fixups/slab/fixups.toml delete mode 100644 shim/third-party/rust/fixups/slog/fixups.toml delete mode 100644 shim/third-party/rust/fixups/syn/fixups.toml delete mode 100644 shim/third-party/rust/fixups/sys-info/fixups.toml delete mode 100644 shim/third-party/rust/fixups/sysinfo/fixups.toml delete mode 100644 shim/third-party/rust/fixups/tempfile/fixups.toml delete mode 100644 shim/third-party/rust/fixups/terminfo/fixups.toml delete mode 100644 shim/third-party/rust/fixups/termwiz/fixups.toml delete mode 100644 shim/third-party/rust/fixups/test-case/fixups.toml delete mode 100644 shim/third-party/rust/fixups/thiserror/fixups.toml delete mode 100644 shim/third-party/rust/fixups/tiny-keccak/fixups.toml delete mode 100644 shim/third-party/rust/fixups/tokio-stream/fixups.toml delete mode 100644 shim/third-party/rust/fixups/tokio-util/fixups.toml delete mode 100644 shim/third-party/rust/fixups/tokio/fixups.toml delete mode 100644 shim/third-party/rust/fixups/tonic/fixups.toml delete mode 100644 shim/third-party/rust/fixups/tracing-subscriber/fixups.toml delete mode 100644 shim/third-party/rust/fixups/trybuild/fixups.toml delete mode 100644 shim/third-party/rust/fixups/typenum/fixups.toml delete mode 100644 shim/third-party/rust/fixups/unicase/fixups.toml delete mode 100644 shim/third-party/rust/fixups/winapi-x86_64-pc-windows-gnu/fixups.toml delete mode 100644 shim/third-party/rust/fixups/winapi/fixups.toml delete mode 100644 shim/third-party/rust/fixups/windows-targets/fixups.toml delete mode 100644 shim/third-party/rust/fixups/windows_aarch64_gnullvm/fixups.toml delete mode 100644 shim/third-party/rust/fixups/windows_x86_64_gnu/fixups.toml delete mode 100644 shim/third-party/rust/fixups/windows_x86_64_gnullvm/fixups.toml delete mode 100644 shim/third-party/rust/fixups/windows_x86_64_msvc/fixups.toml delete mode 100644 shim/third-party/rust/fixups/winreg/fixups.toml delete mode 100644 shim/third-party/rust/fixups/zerocopy/fixups.toml delete mode 100644 shim/third-party/rust/fixups/zstd-safe/fixups.toml delete mode 100644 shim/third-party/rust/fixups/zstd-sys/fixups.toml delete mode 100644 shim/third-party/rust/reindeer.toml delete mode 100644 shim/third-party/rust/top/main.rs delete mode 100644 shim/third-party/snappy/BUCK delete mode 100644 shim/third-party/third_party.bzl delete mode 100644 shim/third-party/xz/BUCK delete mode 100644 shim/third-party/zlib/BUCK delete mode 100644 shim/third-party/zstd/BUCK delete mode 100644 shim/tools/build_defs/audit_dependencies_test.bzl delete mode 100644 shim/tools/build_defs/buck2/is_buck2.bzl delete mode 100644 shim/tools/build_defs/buckconfig.bzl delete mode 100644 shim/tools/build_defs/glob_defs.bzl diff --git a/shim/README.md b/shim/README.md deleted file mode 100644 index 7a83226e02..0000000000 --- a/shim/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Open Source Shim - -These files are a shim that allow us to build Buck2 with Buck2 outside Meta in -the open source world. diff --git a/shim/antlir/fbpkg/fbpkg.bzl b/shim/antlir/fbpkg/fbpkg.bzl deleted file mode 100644 index 21c0104326..0000000000 --- a/shim/antlir/fbpkg/fbpkg.bzl +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def _builder(**_): - pass - -def _buck_opts(**_): - pass - -fbpkg = struct( - builder = _builder, - buck_opts = _buck_opts, -) diff --git a/shim/buck2/buck_rust_binary.bzl b/shim/buck2/buck_rust_binary.bzl deleted file mode 100644 index ebd0002621..0000000000 --- a/shim/buck2/buck_rust_binary.bzl +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load( - "@shim//:shims.bzl", - _rust_binary = "rust_binary", -) - -buck_rust_binary = _rust_binary diff --git a/shim/buck2/proto_defs.bzl b/shim/buck2/proto_defs.bzl deleted file mode 100644 index 468a3be310..0000000000 --- a/shim/buck2/proto_defs.bzl +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load( - "@shim//:shims.bzl", - _rust_protobuf_library = "rust_protobuf_library", -) - -rust_protobuf_library = _rust_protobuf_library diff --git a/shim/build_defs/auto_headers.bzl b/shim/build_defs/auto_headers.bzl deleted file mode 100644 index 0526041368..0000000000 --- a/shim/build_defs/auto_headers.bzl +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@prelude//utils:buckconfig.bzl", "read_choice") - -AutoHeaders = struct( - NONE = "none", - # Uses a recursive glob to resolve all transitive headers under the given - # directory. - RECURSIVE_GLOB = "recursive_glob", - # Infer headers from sources of the rule. - SOURCES = "sources", -) - -_VALUES = [ - AutoHeaders.NONE, - AutoHeaders.RECURSIVE_GLOB, - AutoHeaders.SOURCES, -] - -def get_auto_headers(auto_headers): - """ - Returns the level of auto-headers to apply to a rule. - - Args: - auto_headers: One of the values in `AutoHeaders` - - Returns: - The value passed in as auto_headers, or the value from configuration if - `auto_headers` is None - """ - if auto_headers != None: - if auto_headers not in _VALUES: - fail("unexpected `auto_headers` value: {!r}".format(auto_headers)) - return auto_headers - return read_choice("cxx", "auto_headers", _VALUES, AutoHeaders.SOURCES) diff --git a/shim/build_defs/config.bzl b/shim/build_defs/config.bzl deleted file mode 100644 index cddd1a9789..0000000000 --- a/shim/build_defs/config.bzl +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def _get_build_mode(): - return "" - -config = struct( - get_build_mode = _get_build_mode, -) diff --git a/shim/build_defs/cpp_benchmark.bzl b/shim/build_defs/cpp_benchmark.bzl deleted file mode 100644 index 928f62d2c5..0000000000 --- a/shim/build_defs/cpp_benchmark.bzl +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def cpp_benchmark(**_): - pass diff --git a/shim/build_defs/cpp_binary.bzl b/shim/build_defs/cpp_binary.bzl deleted file mode 100644 index 89bf161e7b..0000000000 --- a/shim/build_defs/cpp_binary.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _cpp_binary = "cpp_binary") - -cpp_binary = _cpp_binary diff --git a/shim/build_defs/cpp_library.bzl b/shim/build_defs/cpp_library.bzl deleted file mode 100644 index d69787b947..0000000000 --- a/shim/build_defs/cpp_library.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _cpp_library = "cpp_library") - -cpp_library = _cpp_library diff --git a/shim/build_defs/cpp_unittest.bzl b/shim/build_defs/cpp_unittest.bzl deleted file mode 100644 index 2c4103ebd8..0000000000 --- a/shim/build_defs/cpp_unittest.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _cpp_unittest = "cpp_unittest") - -cpp_unittest = _cpp_unittest diff --git a/shim/build_defs/custom_rule.bzl b/shim/build_defs/custom_rule.bzl deleted file mode 100644 index 03aac5904f..0000000000 --- a/shim/build_defs/custom_rule.bzl +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def custom_rule(**_): - pass diff --git a/shim/build_defs/custom_unittest.bzl b/shim/build_defs/custom_unittest.bzl deleted file mode 100644 index f5aa4cf8f0..0000000000 --- a/shim/build_defs/custom_unittest.bzl +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def custom_unittest(**_): - pass diff --git a/shim/build_defs/cython_library.bzl b/shim/build_defs/cython_library.bzl deleted file mode 100644 index dac5b8bcae..0000000000 --- a/shim/build_defs/cython_library.bzl +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//build_defs:python_library.bzl", "python_library") - -def cython_library(name, visibility = ["PUBLIC"], **_): - python_library(name = name, visibility = visibility) diff --git a/shim/build_defs/export_files.bzl b/shim/build_defs/export_files.bzl deleted file mode 100644 index 25ae03f628..0000000000 --- a/shim/build_defs/export_files.bzl +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def export_file(visibility = ["PUBLIC"], **kwargs): - # @lint-ignore BUCKLINT: avoid "native is forbidden in fbcode" - native.export_file(visibility = visibility, **kwargs) - -def export_files(files, visibility = ["PUBLIC"], **kwargs): - # @lint-ignore BUCKLINT: avoid "native is forbidden in fbcode" - for file in files: - native.export_file(name = file, visibility = visibility, **kwargs) diff --git a/shim/build_defs/lib/python_common.bzl b/shim/build_defs/lib/python_common.bzl deleted file mode 100644 index 44dc757468..0000000000 --- a/shim/build_defs/lib/python_common.bzl +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def get_ldflags(*args): - _unused = args # @unused - return [] - -def get_strip_mode(*args): - _unused = args # @unused - return "" diff --git a/shim/build_defs/ocaml_binary.bzl b/shim/build_defs/ocaml_binary.bzl deleted file mode 100644 index 1530848e3d..0000000000 --- a/shim/build_defs/ocaml_binary.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _ocaml_binary = "ocaml_binary") - -ocaml_binary = _ocaml_binary diff --git a/shim/build_defs/platform_utils.bzl b/shim/build_defs/platform_utils.bzl deleted file mode 100644 index 2ea71572f9..0000000000 --- a/shim/build_defs/platform_utils.bzl +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def _get_cxx_platform_for_base_path(_base_path): - return struct(target_platform = None) - -platform_utils = struct(get_cxx_platform_for_base_path = _get_cxx_platform_for_base_path) diff --git a/shim/build_defs/prebuilt_cpp_library.bzl b/shim/build_defs/prebuilt_cpp_library.bzl deleted file mode 100644 index 97a0d8cf2e..0000000000 --- a/shim/build_defs/prebuilt_cpp_library.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _prebuilt_cpp_library = "prebuilt_cpp_library") - -prebuilt_cpp_library = _prebuilt_cpp_library diff --git a/shim/build_defs/python_binary.bzl b/shim/build_defs/python_binary.bzl deleted file mode 100644 index 5805fc30bd..0000000000 --- a/shim/build_defs/python_binary.bzl +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def python_binary(srcs = [], **kwargs): - _unused = srcs # @unused - - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - native.python_binary(**kwargs) diff --git a/shim/build_defs/python_library.bzl b/shim/build_defs/python_library.bzl deleted file mode 100644 index 3e62a5e910..0000000000 --- a/shim/build_defs/python_library.bzl +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def python_library(srcs = [], visibility = ["PUBLIC"], **kwargs): - _unused = srcs # @unused - - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - native.python_library(visibility = visibility, **kwargs) diff --git a/shim/build_defs/python_unittest.bzl b/shim/build_defs/python_unittest.bzl deleted file mode 100644 index 76bc3589b2..0000000000 --- a/shim/build_defs/python_unittest.bzl +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def python_unittest(srcs = [], **kwargs): - _unused = srcs # @unused - - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - native.python_test(**kwargs) diff --git a/shim/build_defs/roar.bzl b/shim/build_defs/roar.bzl deleted file mode 100644 index 0af590c133..0000000000 --- a/shim/build_defs/roar.bzl +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@fbsource//tools/build_defs:buckconfig.bzl", "read_bool") - -def roar_no_jit(): - use_roar_jit = read_bool("fbcode", "use_roar_jit", required = False) - if use_roar_jit: - return ["-fforce-no-jit"] - return [] diff --git a/shim/build_defs/rust_binary.bzl b/shim/build_defs/rust_binary.bzl deleted file mode 100644 index d763f446cb..0000000000 --- a/shim/build_defs/rust_binary.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _rust_binary = "rust_binary") - -rust_binary = _rust_binary diff --git a/shim/build_defs/rust_library.bzl b/shim/build_defs/rust_library.bzl deleted file mode 100644 index fcd27bcf80..0000000000 --- a/shim/build_defs/rust_library.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _rust_library = "rust_library") - -rust_library = _rust_library diff --git a/shim/build_defs/rust_unittest.bzl b/shim/build_defs/rust_unittest.bzl deleted file mode 100644 index 8b0822fa82..0000000000 --- a/shim/build_defs/rust_unittest.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _rust_unittest = "rust_unittest") - -rust_unittest = _rust_unittest diff --git a/shim/common/ocaml/interop/defs.bzl b/shim/common/ocaml/interop/defs.bzl deleted file mode 100644 index 56d22fb5fa..0000000000 --- a/shim/common/ocaml/interop/defs.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@root//defs.bzl", _RUST_FLAGS_2018 = "RUST_FLAGS_2018") - -RUST_FLAGS_2018 = _RUST_FLAGS_2018 diff --git a/shim/folly/io/async/test/certs/defs.bzl b/shim/folly/io/async/test/certs/defs.bzl deleted file mode 100644 index 1a645059e2..0000000000 --- a/shim/folly/io/async/test/certs/defs.bzl +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@fbcode_macros//build_defs:native_rules.bzl", "alias") - -def alias_pem(pems: list[str]): - for pem in pems: - alias( - name = pem, - actual = "//folly/io/async/test/certs:{pem}".format(pem = pem), - ) - -def alias_pem_for_xplat(pems: list[str]): - # in xplat these pem files are exported in //xplat/folly/io/async/test - for pem in pems: - alias( - name = pem, - actual = "//xplat/folly/io/async/test:certs/{pem}".format(pem = pem), - ) diff --git a/shim/grpc_fb/codegen/buck_macros.bzl b/shim/grpc_fb/codegen/buck_macros.bzl deleted file mode 100644 index ed51cb6935..0000000000 --- a/shim/grpc_fb/codegen/buck_macros.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def grpc_library(**kwargs): - _unused = kwargs # @unused - pass diff --git a/shim/lib/dicts.bzl b/shim/lib/dicts.bzl deleted file mode 100644 index f702fa92c5..0000000000 --- a/shim/lib/dicts.bzl +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2017 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Skylib module containing functions that operate on dictionaries.""" - -def _add(*dictionaries): - """Returns a new `dict` that has all the entries of the given dictionaries. - - If the same key is present in more than one of the input dictionaries, the - last of them in the argument list overrides any earlier ones. - - This function is designed to take zero or one arguments as well as multiple - dictionaries, so that it follows arithmetic identities and callers can avoid - special cases for their inputs: the sum of zero dictionaries is the empty - dictionary, and the sum of a single dictionary is a copy of itself. - - Args: - *dictionaries: Zero or more dictionaries to be added. - - Returns: - A new `dict` that has all the entries of the given dictionaries. - """ - result = {} - for d in dictionaries: - result.update(d) - return result - -dicts = struct( - add = _add, -) diff --git a/shim/lib/new_sets.bzl b/shim/lib/new_sets.bzl deleted file mode 100644 index 47124d3fca..0000000000 --- a/shim/lib/new_sets.bzl +++ /dev/null @@ -1,236 +0,0 @@ -# Copyright 2018 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Skylib module containing common hash-set algorithms. - - An empty set can be created using: `sets.make()`, or it can be created with some starting values - if you pass it an sequence: `sets.make([1, 2, 3])`. This returns a struct containing all of the - values as keys in a dictionary - this means that all passed in values must be hashable. The - values in the set can be retrieved using `sets.to_list(my_set)`. -""" - -load(":dicts.bzl", "dicts") - -def _make(elements = None): - """Creates a new set. - - All elements must be hashable. - - Args: - elements: Optional sequence to construct the set out of. - - Returns: - A set containing the passed in values. - """ - elements = elements if elements else [] - return struct(_values = {e: None for e in elements}) - -def _copy(s): - """Creates a new set from another set. - - Args: - s: A set, as returned by `sets.make()`. - - Returns: - A new set containing the same elements as `s`. - """ - return struct(_values = dict(s._values)) - -def _to_list(s): - """Creates a list from the values in the set. - - Args: - s: A set, as returned by `sets.make()`. - - Returns: - A list of values inserted into the set. - """ - return list(s._values.keys()) - -def _insert(s, e): - """Inserts an element into the set. - - Element must be hashable. This mutates the orginal set. - - Args: - s: A set, as returned by `sets.make()`. - e: The element to be inserted. - - Returns: - The set `s` with `e` included. - """ - s._values[e] = None - return s - -def _remove(s, e): - """Removes an element from the set. - - Element must be hashable. This mutates the orginal set. - - Args: - s: A set, as returned by `sets.make()`. - e: The element to be removed. - - Returns: - The set `s` with `e` removed. - """ - s._values.pop(e) - return s - -def _contains(a, e): - """Checks for the existence of an element in a set. - - Args: - a: A set, as returned by `sets.make()`. - e: The element to look for. - - Returns: - True if the element exists in the set, False if the element does not. - """ - return e in a._values - -def _get_shorter_and_longer(a, b): - """Returns two sets in the order of shortest and longest. - - Args: - a: A set, as returned by `sets.make()`. - b: A set, as returned by `sets.make()`. - - Returns: - `a`, `b` if `a` is shorter than `b` - or `b`, `a` if `b` is shorter than `a`. - """ - if _length(a) < _length(b): - return a, b - return b, a - -def _is_equal(a, b): - """Returns whether two sets are equal. - - Args: - a: A set, as returned by `sets.make()`. - b: A set, as returned by `sets.make()`. - - Returns: - True if `a` is equal to `b`, False otherwise. - """ - return a._values == b._values - -def _is_subset(a, b): - """Returns whether `a` is a subset of `b`. - - Args: - a: A set, as returned by `sets.make()`. - b: A set, as returned by `sets.make()`. - - Returns: - True if `a` is a subset of `b`, False otherwise. - """ - for e in a._values.keys(): - if e not in b._values: - return False - return True - -def _disjoint(a, b): - """Returns whether two sets are disjoint. - - Two sets are disjoint if they have no elements in common. - - Args: - a: A set, as returned by `sets.make()`. - b: A set, as returned by `sets.make()`. - - Returns: - True if `a` and `b` are disjoint, False otherwise. - """ - shorter, longer = _get_shorter_and_longer(a, b) - for e in shorter._values.keys(): - if e in longer._values: - return False - return True - -def _intersection(a, b): - """Returns the intersection of two sets. - - Args: - a: A set, as returned by `sets.make()`. - b: A set, as returned by `sets.make()`. - - Returns: - A set containing the elements that are in both `a` and `b`. - """ - shorter, longer = _get_shorter_and_longer(a, b) - return struct(_values = {e: None for e in shorter._values.keys() if e in longer._values}) - -def _union(*args): - """Returns the union of several sets. - - Args: - *args: An arbitrary number of sets or lists. - - Returns: - The set union of all sets or lists in `*args`. - """ - return struct(_values = dicts.add(*[s._values for s in args])) - -def _difference(a, b): - """Returns the elements in `a` that are not in `b`. - - Args: - a: A set, as returned by `sets.make()`. - b: A set, as returned by `sets.make()`. - - Returns: - A set containing the elements that are in `a` but not in `b`. - """ - return struct(_values = {e: None for e in a._values.keys() if e not in b._values}) - -def _length(s): - """Returns the number of elements in a set. - - Args: - s: A set, as returned by `sets.make()`. - - Returns: - An integer representing the number of elements in the set. - """ - return len(s._values) - -def _repr(s): - """Returns a string value representing the set. - - Args: - s: A set, as returned by `sets.make()`. - - Returns: - A string representing the set. - """ - return repr(s._values.keys()) - -sets = struct( - make = _make, - copy = _copy, - to_list = _to_list, - insert = _insert, - contains = _contains, - is_equal = _is_equal, - is_subset = _is_subset, - disjoint = _disjoint, - intersection = _intersection, - union = _union, - difference = _difference, - length = _length, - remove = _remove, - repr = _repr, - str = _repr, -) diff --git a/shim/lib/paths.bzl b/shim/lib/paths.bzl deleted file mode 100644 index 8e3fcaea51..0000000000 --- a/shim/lib/paths.bzl +++ /dev/null @@ -1,242 +0,0 @@ -# Copyright 2017 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Skylib module containing file path manipulation functions. - -NOTE: The functions in this module currently only support paths with Unix-style -path separators (forward slash, "/"); they do not handle Windows-style paths -with backslash separators or drive letters. -""" - -def _basename(p): - """Returns the basename (i.e., the file portion) of a path. - - Note that if `p` ends with a slash, this function returns an empty string. - This matches the behavior of Python's `os.path.basename`, but differs from - the Unix `basename` command (which would return the path segment preceding - the final slash). - - Args: - p: The path whose basename should be returned. - - Returns: - The basename of the path, which includes the extension. - """ - return p.rpartition("/")[-1] - -def _dirname(p): - """Returns the dirname of a path. - - The dirname is the portion of `p` up to but not including the file portion - (i.e., the basename). Any slashes immediately preceding the basename are not - included, unless omitting them would make the dirname empty. - - Args: - p: The path whose dirname should be returned. - - Returns: - The dirname of the path. - """ - prefix, sep, _ = p.rpartition("/") - if not prefix: - return sep - else: - # If there are multiple consecutive slashes, strip them all out as Python's - # os.path.dirname does. - return prefix.rstrip("/") - -def _is_absolute(path): - """Returns `True` if `path` is an absolute path. - - Args: - path: A path (which is a string). - - Returns: - `True` if `path` is an absolute path. - """ - return path.startswith("/") or (len(path) > 2 and path[1] == ":") - -def _join(path, *others): - """Joins one or more path components intelligently. - - This function mimics the behavior of Python's `os.path.join` function on POSIX - platform. It returns the concatenation of `path` and any members of `others`, - inserting directory separators before each component except the first. The - separator is not inserted if the path up until that point is either empty or - already ends in a separator. - - If any component is an absolute path, all previous components are discarded. - - Args: - path: A path segment. - *others: Additional path segments. - - Returns: - A string containing the joined paths. - """ - result = path - - for p in others: - if _is_absolute(p): - result = p - elif not result or result.endswith("/"): - result += p - else: - result += "/" + p - - return result - -def _normalize(path): - """Normalizes a path, eliminating double slashes and other redundant segments. - - This function mimics the behavior of Python's `os.path.normpath` function on - POSIX platforms; specifically: - - - If the entire path is empty, "." is returned. - - All "." segments are removed, unless the path consists solely of a single - "." segment. - - Trailing slashes are removed, unless the path consists solely of slashes. - - ".." segments are removed as long as there are corresponding segments - earlier in the path to remove; otherwise, they are retained as leading ".." - segments. - - Single and double leading slashes are preserved, but three or more leading - slashes are collapsed into a single leading slash. - - Multiple adjacent internal slashes are collapsed into a single slash. - - Args: - path: A path. - - Returns: - The normalized path. - """ - if not path: - return "." - - if path.startswith("//") and not path.startswith("///"): - initial_slashes = 2 - elif path.startswith("/"): - initial_slashes = 1 - else: - initial_slashes = 0 - is_relative = (initial_slashes == 0) - - components = path.split("/") - new_components = [] - - for component in components: - if component in ("", "."): - continue - if component == "..": - if new_components and new_components[-1] != "..": - # Only pop the last segment if it isn't another "..". - new_components.pop() - elif is_relative: - # Preserve leading ".." segments for relative paths. - new_components.append(component) - else: - new_components.append(component) - - path = "/".join(new_components) - if not is_relative: - path = ("/" * initial_slashes) + path - - return path or "." - -def _relativize(path, start): - """Returns the portion of `path` that is relative to `start`. - - Because we do not have access to the underlying file system, this - implementation differs slightly from Python's `os.path.relpath` in that it - will fail if `path` is not beneath `start` (rather than use parent segments to - walk up to the common file system root). - - Relativizing paths that start with parent directory references only works if - the path both start with the same initial parent references. - - Args: - path: The path to relativize. - start: The ancestor path against which to relativize. - - Returns: - The portion of `path` that is relative to `start`. - """ - segments = _normalize(path).split("/") - start_segments = _normalize(start).split("/") - if start_segments == ["."]: - start_segments = [] - start_length = len(start_segments) - - if (path.startswith("/") != start.startswith("/") or - len(segments) < start_length): - fail("Path '%s' is not beneath '%s'" % (path, start)) - - for ancestor_segment, segment in zip(start_segments, segments): - if ancestor_segment != segment: - fail("Path '%s' is not beneath '%s'" % (path, start)) - - length = len(segments) - start_length - result_segments = segments[-length:] - return "/".join(result_segments) - -def _replace_extension(p, new_extension): - """Replaces the extension of the file at the end of a path. - - If the path has no extension, the new extension is added to it. - - Args: - p: The path whose extension should be replaced. - new_extension: The new extension for the file. The new extension should - begin with a dot if you want the new filename to have one. - - Returns: - The path with the extension replaced (or added, if it did not have one). - """ - return _split_extension(p)[0] + new_extension - -def _split_extension(p): - """Splits the path `p` into a tuple containing the root and extension. - - Leading periods on the basename are ignored, so - `path.split_extension(".bashrc")` returns `(".bashrc", "")`. - - Args: - p: The path whose root and extension should be split. - - Returns: - A tuple `(root, ext)` such that the root is the path without the file - extension, and `ext` is the file extension (which, if non-empty, contains - the leading dot). The returned tuple always satisfies the relationship - `root + ext == p`. - """ - b = _basename(p) - last_dot_in_basename = b.rfind(".") - - # If there is no dot or the only dot in the basename is at the front, then - # there is no extension. - if last_dot_in_basename <= 0: - return (p, "") - - dot_distance_from_end = len(b) - last_dot_in_basename - return (p[:-dot_distance_from_end], p[-dot_distance_from_end:]) - -paths = struct( - basename = _basename, - dirname = _dirname, - is_absolute = _is_absolute, - join = _join, - normalize = _normalize, - relativize = _relativize, - replace_extension = _replace_extension, - split_extension = _split_extension, -) diff --git a/shim/lib/shell.bzl b/shim/lib/shell.bzl deleted file mode 100644 index 3e22ffaeb7..0000000000 --- a/shim/lib/shell.bzl +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 2017 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Skylib module containing shell utility functions.""" - -def _array_literal(iterable): - """Creates a string from a sequence that can be used as a shell array. - - For example, `shell.array_literal(["a", "b", "c"])` would return the string - `("a" "b" "c")`, which can be used in a shell script wherever an array - literal is needed. - - Note that all elements in the array are quoted (using `shell.quote`) for - safety, even if they do not need to be. - - Args: - iterable: A sequence of elements. Elements that are not strings will be - converted to strings first, by calling `str()`. - - Returns: - A string that represents the sequence as a shell array; that is, - parentheses containing the quoted elements. - """ - return "(" + " ".join([_quote(str(i)) for i in iterable]) + ")" - -def _quote(s): - """Quotes the given string for use in a shell command. - - This function quotes the given string (in case it contains spaces or other - shell metacharacters.) - - Args: - s: The string to quote. - - Returns: - A quoted version of the string that can be passed to a shell command. - """ - return "'" + s.replace("'", "'\\''") + "'" - -def _powershell_quote(s): - """Quoting multiline strings for Powershell. - References: - 1. https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_special_characters?view=powershell-7.4 - 2. https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_quoting_rules?view=powershell-7.4 - """ - return s.replace("`", "``").replace("\n", "`n").replace('"', '""').replace("$", "`$") - -shell = struct( - array_literal = _array_literal, - quote = _quote, - powershell_quote = _powershell_quote, -) diff --git a/shim/shims.bzl b/shim/shims.bzl deleted file mode 100644 index 2357a8ee78..0000000000 --- a/shim/shims.bzl +++ /dev/null @@ -1,453 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@bazel_skylib//lib:new_sets.bzl", "sets") -load("@bazel_skylib//lib:paths.bzl", "paths") -load("@prelude//utils:selects.bzl", "selects") -# @lint-ignore-every FBCODEBZLADDLOADS - -load("@prelude//utils:type_defs.bzl", "is_list", "is_select", "is_tuple") -load("@shim//build_defs:auto_headers.bzl", "AutoHeaders", "get_auto_headers") - -prelude = native - -_C_SOURCE_EXTS = ( - ".c", -) - -_CPP_SOURCE_EXTS = ( - ".cc", - ".cpp", -) - -_SOURCE_EXTS = _C_SOURCE_EXTS + _CPP_SOURCE_EXTS - -# These header suffixes are used to logically group C/C++ source (e.g. -# `foo/Bar.cpp`) with headers with the following suffixes (e.g. `foo/Bar.h` and -# `foo/Bar-inl.tcc`), such that the source provides all implementation for -# methods/classes declared in the headers. -# -# This is important for a couple reasons: -# 1) Automatic dependencies: Tooling can use this property to automatically -# manage TARGETS dependencies by extracting `#include` references in sources -# and looking up the rules which "provide" them. -# 2) Modules: This logical group can be combined into a standalone C/C++ module -# (when such support is available). -_HEADER_SUFFIXES = ( - ".h", - ".hpp", - ".tcc", - "-inl.h", - "-inl.hpp", - "-inl.tcc", - "-defs.h", - "-defs.hpp", - "-defs.tcc", -) - -def _get_headers_from_sources(srcs): - """ - Return the headers likely associated with the given sources - - Args: - srcs: A list of strings representing files or build targets - - Returns: - A list of header files corresponding to the list of sources. These files are - validated to exist based on glob() - """ - split_srcs = [ - paths.split_extension(src_filename) - for src_filename in [_get_src_filename(src) for src in srcs] - if "//" not in src_filename and not src_filename.startswith(":") - ] - - # For e.g. foo.cpp grab a glob on foo.h, foo-inl.h, etc - headers = [ - base + header_ext - for base, ext in split_srcs - if ext in _SOURCE_EXTS - for header_ext in _HEADER_SUFFIXES - ] - - # Avoid a warning for an empty glob pattern if there are no headers. - return glob(headers) if headers else [] - -def _get_src_filename(src): - """ - Return filename from a potentilly tuple value entry in srcs attribute - """ - - if is_tuple(src): - s, _ = src - return s - return src - -def _update_headers_with_src_headers(src_headers, out_headers): - """ - Helper function to update raw headers with headers from srcs - """ - src_headers = sets.to_list(sets.difference(src_headers, sets.make(out_headers))) - - # Looks simple, right? But if a header is explicitly added in, say, a - # dictionary mapping, we want to make sure to keep the original mapping - # and drop the F -> F mapping - if is_list(out_headers): - out_headers.extend(sorted(src_headers)) - else: - # Let it throw AttributeError if update() can't be found neither - out_headers.update({k: k for k in src_headers}) - return out_headers - -def prebuilt_cpp_library( - headers = None, - linker_flags = None, - private_linker_flags = None, - **kwargs): - prelude.prebuilt_cxx_library( - exported_headers = headers, - exported_linker_flags = linker_flags, - linker_flags = private_linker_flags, - **kwargs - ) - -def cpp_library( - name, - deps = [], - srcs = [], - external_deps = [], - exported_deps = [], - exported_external_deps = [], - undefined_symbols = None, - visibility = ["PUBLIC"], - auto_headers = None, - arch_preprocessor_flags = None, - modular_headers = None, - os_deps = [], - arch_compiler_flags = None, - tags = None, - linker_flags = None, - private_linker_flags = None, - exported_linker_flags = None, - headers = None, - private_headers = None, - propagated_pp_flags = (), - **kwargs): - base_path = native.package_name() - oss_depends_on_folly = read_config("oss_depends_on", "folly", False) - header_base_path = base_path - if oss_depends_on_folly and header_base_path.startswith("folly"): - header_base_path = header_base_path.replace("folly/", "", 1) - - _unused = (undefined_symbols, arch_preprocessor_flags, modular_headers, arch_compiler_flags, tags, propagated_pp_flags) # @unused - if os_deps: - deps += _select_os_deps(_fix_dict_deps(os_deps)) - if headers == None: - headers = [] - if tags != None and "oss_dependency" in tags: - if oss_depends_on_folly: - headers = [item.replace("//:", "//folly:") if item == "//:folly-config.h" else item for item in headers] - if is_select(srcs) and auto_headers == AutoHeaders.SOURCES: - # Validate `srcs` and `auto_headers` before the config check - fail( - "//{}:{}: `select` srcs cannot support AutoHeaders.SOURCES".format(base_path, name), - ) - auto_headers = get_auto_headers(auto_headers) - if auto_headers == AutoHeaders.SOURCES and not is_select(srcs): - src_headers = sets.make(_get_headers_from_sources(srcs)) - if private_headers: - src_headers = sets.difference(src_headers, sets.make(private_headers)) - - headers = selects.apply( - headers, - partial(_update_headers_with_src_headers, src_headers), - ) - if not is_select(linker_flags): - linker_flags = linker_flags or [] - linker_flags = list(linker_flags) - if exported_linker_flags != None: - linker_flags += exported_linker_flags - prelude.cxx_library( - name = name, - srcs = srcs, - deps = _maybe_select_map(deps + external_deps_to_targets(external_deps), _fix_deps), - exported_deps = _maybe_select_map(exported_deps + external_deps_to_targets(exported_external_deps), _fix_deps), - visibility = visibility, - preferred_linkage = "static", - exported_headers = headers, - headers = private_headers, - exported_linker_flags = linker_flags, - linker_flags = private_linker_flags, - header_namespace = header_base_path, - **kwargs - ) - -def cpp_unittest( - deps = [], - external_deps = [], - visibility = ["PUBLIC"], - supports_static_listing = None, - allocator = None, - owner = None, - tags = None, - emails = None, - extract_helper_lib = None, - compiler_specific_flags = None, - default_strip_mode = None, - srcs = [], - **kwargs): - _unused = (supports_static_listing, allocator, owner, tags, emails, extract_helper_lib, compiler_specific_flags, default_strip_mode) # @unused - srcs = srcs + ["shim//third-party/googletest:gtest_main.cpp"] - prelude.cxx_test( - deps = _maybe_select_map(deps + external_deps_to_targets(external_deps), _fix_deps), - visibility = visibility, - srcs = srcs, - **kwargs - ) - -def cpp_binary( - deps = [], - external_deps = [], - visibility = ["PUBLIC"], - dlopen_enabled = None, - compiler_specific_flags = None, - os_linker_flags = None, - allocator = None, - modules = None, - **kwargs): - _unused = (dlopen_enabled, compiler_specific_flags, os_linker_flags, allocator, modules) # @unused - prelude.cxx_binary( - deps = _maybe_select_map(deps + external_deps_to_targets(external_deps), _fix_deps), - visibility = visibility, - **kwargs - ) - -def rust_library( - rustc_flags = [], - deps = [], - named_deps = None, - os_deps = None, - test_deps = None, - test_env = None, - test_os_deps = None, - autocargo = None, - unittests = None, - mapped_srcs = {}, - visibility = ["PUBLIC"], - **kwargs): - _unused = (test_deps, test_env, test_os_deps, named_deps, autocargo, unittests, visibility) # @unused - deps = _maybe_select_map(deps, _fix_deps) - mapped_srcs = _maybe_select_map(mapped_srcs, _fix_mapped_srcs) - if os_deps: - deps += _select_os_deps(_fix_dict_deps(os_deps)) - - # Reset visibility because internal and external paths are different. - visibility = ["PUBLIC"] - - prelude.rust_library( - rustc_flags = rustc_flags + [_CFG_BUCK_BUILD], - deps = deps, - visibility = visibility, - mapped_srcs = mapped_srcs, - **kwargs - ) - -def rust_binary( - rustc_flags = [], - deps = [], - autocargo = None, - unittests = None, - allocator = None, - default_strip_mode = None, - visibility = ["PUBLIC"], - **kwargs): - _unused = (unittests, allocator, default_strip_mode, autocargo) # @unused - deps = _maybe_select_map(deps, _fix_deps) - - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - prelude.rust_binary( - rustc_flags = rustc_flags + [_CFG_BUCK_BUILD], - deps = deps, - visibility = visibility, - **kwargs - ) - -def rust_unittest( - rustc_flags = [], - deps = [], - visibility = ["PUBLIC"], - **kwargs): - deps = _maybe_select_map(deps, _fix_deps) - - prelude.rust_test( - rustc_flags = rustc_flags + [_CFG_BUCK_BUILD], - deps = deps, - visibility = visibility, - **kwargs - ) - -def rust_protobuf_library( - name, - srcs, - build_script, - protos, - build_env = None, - deps = [], - test_deps = None, - doctests = True): - if build_env: - build_env = { - k: _fix_dep_in_string(v) - for k, v in build_env.items() - } - - build_name = name + "-build" - proto_name = name + "-proto" - - rust_binary( - name = build_name, - srcs = [build_script], - crate_root = build_script, - deps = [ - "fbsource//third-party/rust:tonic-build", - "//buck2/app/buck2_protoc_dev:buck2_protoc_dev", - ], - ) - - build_env = build_env or {} - build_env.update( - { - "PROTOC": "$(exe buck//third-party/proto:protoc)", - "PROTOC_INCLUDE": "$(location buck//third-party/proto:google_protobuf)", - }, - ) - - prelude.genrule( - name = proto_name, - srcs = protos + [ - "buck//third-party/proto:google_protobuf", - ], - out = ".", - cmd = "$(exe :" + build_name + ")", - env = build_env, - ) - - rust_library( - name = name, - srcs = srcs, - doctests = doctests, - env = { - # This is where prost looks for generated .rs files - "OUT_DIR": "$(location :{})".format(proto_name), - }, - test_deps = test_deps, - deps = [ - "fbsource//third-party/rust:prost", - "fbsource//third-party/rust:prost-types", - ] + (deps or []), - ) - -def ocaml_binary( - deps = [], - visibility = ["PUBLIC"], - **kwargs): - deps = _maybe_select_map(deps, _fix_deps) - - prelude.ocaml_binary( - deps = deps, - visibility = visibility, - **kwargs - ) - -_CFG_BUCK_BUILD = "--cfg=buck_build" - -def _maybe_select_map(v, mapper): - if is_select(v): - return select_map(v, mapper) - return mapper(v) - -def _select_os_deps(xss) -> Select: - d = { - "prelude//os:" + os: xs - for os, xs in xss - } - d["DEFAULT"] = [] - return select(d) - -def _fix_dict_deps(xss): - return [ - (k, _fix_deps(xs)) - for k, xs in xss - ] - -def _fix_mapped_srcs(xs: dict[str, str]): - # For reasons, this is source -> file path, which is the opposite of what - # it should be. - return {_fix_dep(k): v for (k, v) in xs.items()} - -def _fix_deps(xs): - if is_select(xs): - return xs - return filter(None, map(_fix_dep, xs)) - -def _fix_dep(x: str) -> [ - None, - str, -]: - if x == "//common/rust/shed/fbinit:fbinit": - return "fbsource//third-party/rust:fbinit" - elif x == "//common/rust/shed/sorted_vector_map:sorted_vector_map": - return "fbsource//third-party/rust:sorted_vector_map" - elif x == "//watchman/rust/watchman_client:watchman_client": - return "fbsource//third-party/rust:watchman_client" - elif x.startswith("fbsource//third-party/rust:") or x.startswith(":"): - return x - elif x.startswith("//buck2/facebook/"): - return None - elif x.startswith("//buck2/"): - return "root//" + x.removeprefix("//buck2/") - elif x.startswith("fbcode//common/ocaml/interop/"): - return "root//" + x.removeprefix("fbcode//common/ocaml/interop/") - elif x.startswith("fbcode//third-party-buck/platform010/build/supercaml"): - return "shim//third-party/ocaml" + x.removeprefix("fbcode//third-party-buck/platform010/build/supercaml") - elif x.startswith("fbcode//third-party-buck/platform010/build"): - return "shim//third-party" + x.removeprefix("fbcode//third-party-buck/platform010/build") - elif x.startswith("fbsource//third-party"): - return "shim//third-party" + x.removeprefix("fbsource//third-party") - elif x.startswith("third-party//"): - return "shim//third-party/" + x.removeprefix("third-party//") - elif x.startswith("//folly"): - oss_depends_on_folly = read_config("oss_depends_on", "folly", False) - if oss_depends_on_folly: - return "root//folly/" + x.removeprefix("//") - return "root//" + x.removeprefix("//") - elif x.startswith("root//folly"): - return x - elif x.startswith("//fizz"): - return "root//" + x.removeprefix("//") - elif x.startswith("shim//"): - return x - else: - fail("Dependency is unaccounted for `{}`.\n".format(x) + - "Did you forget 'oss-disable'?") - -def _fix_dep_in_string(x: str) -> str: - """Replace internal labels in string values such as env-vars.""" - return (x - .replace("//buck2/", "root//")) - -# Do a nasty conversion of e.g. ("supercaml", None, "ocaml-dev") to -# 'fbcode//third-party-buck/platform010/build/supercaml:ocaml-dev' -# (which will then get mapped to `shim//third-party/ocaml:ocaml-dev`). -def external_dep_to_target(t): - if type(t) == type(()): - return "fbcode//third-party-buck/platform010/build/{}:{}".format(t[0], t[2]) - else: - return "fbcode//third-party-buck/platform010/build/{}:{}".format(t, t) - -def external_deps_to_targets(ts): - return [external_dep_to_target(t) for t in ts] diff --git a/shim/target_determinator/macros/ci.bzl b/shim/target_determinator/macros/ci.bzl deleted file mode 100644 index 0c02e6fc3a..0000000000 --- a/shim/target_determinator/macros/ci.bzl +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# https://internalfb.com/code/fbsource/fbcode/target_determinator/macros/README.md - -def _lbl(*_args): - return "" - -def _package( - _values, - # starlark-lint-disable unused-argument - overwrite = False): # @unused - pass - -ci = struct( - package = _package, - linux = _lbl, - mac = _lbl, - windows = _lbl, - skip_test = _lbl, - aarch64 = _lbl, - mode = _lbl, - opt = _lbl, -) diff --git a/shim/third-party/binutils/BUCK b/shim/third-party/binutils/BUCK deleted file mode 100644 index 1beb6561db..0000000000 --- a/shim/third-party/binutils/BUCK +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "iberty", -) diff --git a/shim/third-party/boost/BUCK b/shim/third-party/boost/BUCK deleted file mode 100644 index c2033cba35..0000000000 --- a/shim/third-party/boost/BUCK +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") -load("@shim//third-party/boost:boost.bzl", "boost_libs") - -oncall("open_source") - -boost_libs([ - "container", - "range", - "algorithm", - "regex", - "program_options", - "filesystem", - "multi_index", - "context", - "variant", - "lexical_cast", - "random", - "sort", - "interprocess", -]) - -# Empty target to satisfy some build rules: -third_party_library( - name = "boost_preprocessor", - homebrew_package_name = "boost", -) - -third_party_library( - name = "boost_thread", - homebrew_package_name = "boost", -) diff --git a/shim/third-party/boost/boost.bzl b/shim/third-party/boost/boost.bzl deleted file mode 100644 index 51a8aef411..0000000000 --- a/shim/third-party/boost/boost.bzl +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -def boost_libs(xs): - third_party_library( - name = "boost", - ubuntu_package_name = "libboost-all-dev", - homebrew_package_name = "boost", - ) - for x in xs: - third_party_library( - name = "boost_{}".format(x), - homebrew_package_name = "boost", - homebrew_linker_flags = ["-lboost_{}".format(x)], - ) diff --git a/shim/third-party/brotli/BUCK b/shim/third-party/brotli/BUCK deleted file mode 100644 index 94da07c9d1..0000000000 --- a/shim/third-party/brotli/BUCK +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "brotli_decode", - homebrew_package_name = "brotli", - pkgconfig_name = "libbrotlidec", -) - -third_party_library( - name = "brotli_encode", - homebrew_package_name = "brotli", - pkgconfig_name = "libbrotlienc", -) diff --git a/shim/third-party/bzip2/BUCK b/shim/third-party/bzip2/BUCK deleted file mode 100644 index 8c97c210f1..0000000000 --- a/shim/third-party/bzip2/BUCK +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "bz2", - homebrew_package_name = "bzip2", -) diff --git a/shim/third-party/double_conversion/BUCK b/shim/third-party/double_conversion/BUCK deleted file mode 100644 index 77f4ecdc3a..0000000000 --- a/shim/third-party/double_conversion/BUCK +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "double_conversion", - homebrew_linker_flags = ["-ldouble-conversion"], - homebrew_package_name = "double-conversion", -) diff --git a/shim/third-party/fmt/BUCK b/shim/third-party/fmt/BUCK deleted file mode 100644 index 13e98e8832..0000000000 --- a/shim/third-party/fmt/BUCK +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "fmt", - homebrew_package_name = "fmt", - pkgconfig_name = "fmt", -) diff --git a/shim/third-party/gflags/BUCK b/shim/third-party/gflags/BUCK deleted file mode 100644 index 9251d18ee5..0000000000 --- a/shim/third-party/gflags/BUCK +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "gflags", - homebrew_package_name = "gflags", - pkgconfig_name = "gflags", -) diff --git a/shim/third-party/glibc/BUCK b/shim/third-party/glibc/BUCK deleted file mode 100644 index eb46aa0cb7..0000000000 --- a/shim/third-party/glibc/BUCK +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//build_defs:prebuilt_cpp_library.bzl", "prebuilt_cpp_library") - -oncall("open_source") - -prebuilt_cpp_library(name = "glibc") - -alias( - name = "rt", - actual = ":glibc", - visibility = ["PUBLIC"], -) - -alias( - name = "ct", - actual = ":glibc", - visibility = ["PUBLIC"], -) - -alias( - name = "dl", - actual = ":glibc", - visibility = ["PUBLIC"], -) - -alias( - name = "pthread", - actual = ":glibc", - visibility = ["PUBLIC"], -) diff --git a/shim/third-party/glog/BUCK b/shim/third-party/glog/BUCK deleted file mode 100644 index adf3bce681..0000000000 --- a/shim/third-party/glog/BUCK +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "glog", - homebrew_package_name = "glog", - pkgconfig_name = "libglog", - ubuntu_package_name = "libgoogle-glog-dev", - deps = ["shim//third-party/gflags:gflags"], -) diff --git a/shim/third-party/googletest/BUCK b/shim/third-party/googletest/BUCK deleted file mode 100644 index dbd3249578..0000000000 --- a/shim/third-party/googletest/BUCK +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//build_defs:export_files.bzl", "export_file") -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "gtest", - homebrew_package_name = "googletest", - pkgconfig_name = "GTest", -) - -alias( - name = "gmock", - actual = ":gtest", - visibility = ["PUBLIC"], -) - -export_file( - name = "gtest_main.cpp", -) diff --git a/shim/third-party/googletest/gtest_main.cpp b/shim/third-party/googletest/gtest_main.cpp deleted file mode 100644 index 8141caf4ca..0000000000 --- a/shim/third-party/googletest/gtest_main.cpp +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include "gtest/gtest.h" - -#if defined(GTEST_OS_ESP8266) || defined(GTEST_OS_ESP32) || \ - (defined(GTEST_OS_NRF52) && defined(ARDUINO)) -// Arduino-like platforms: program entry points are setup/loop instead of main. - -#ifdef GTEST_OS_ESP8266 -extern "C" { -#endif - -void setup() { testing::InitGoogleTest(); } - -void loop() { RUN_ALL_TESTS(); } - -#ifdef GTEST_OS_ESP8266 -} -#endif - -#elif defined(GTEST_OS_QURT) -// QuRT: program entry point is main, but argc/argv are unusable. - -GTEST_API_ int main() { - printf("Running main() from %s\n", __FILE__); - testing::InitGoogleTest(); - return RUN_ALL_TESTS(); -} -#else -// Normal platforms: program entry point is main, argc/argv are initialized. - -GTEST_API_ int main(int argc, char **argv) { - printf("Running main() from %s\n", __FILE__); - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} -#endif diff --git a/shim/third-party/jemalloc/BUCK b/shim/third-party/jemalloc/BUCK deleted file mode 100644 index 16cb5b4ca3..0000000000 --- a/shim/third-party/jemalloc/BUCK +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "headers", - homebrew_package_name = "jemalloc", - pkgconfig_name = "jemalloc", -) diff --git a/shim/third-party/jvm/BUCK b/shim/third-party/jvm/BUCK deleted file mode 100644 index 9de6e20cf2..0000000000 --- a/shim/third-party/jvm/BUCK +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "jvm", - homebrew_package_name = "openjdk", -) diff --git a/shim/third-party/libaegis/BUCK b/shim/third-party/libaegis/BUCK deleted file mode 100644 index 8ac657a171..0000000000 --- a/shim/third-party/libaegis/BUCK +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "aegis", - pkgconfig_name = "libaegis", -) diff --git a/shim/third-party/libaio/BUCK b/shim/third-party/libaio/BUCK deleted file mode 100644 index 0378186541..0000000000 --- a/shim/third-party/libaio/BUCK +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "aio", -) diff --git a/shim/third-party/libdwarf/BUCK b/shim/third-party/libdwarf/BUCK deleted file mode 100644 index 93c867f38b..0000000000 --- a/shim/third-party/libdwarf/BUCK +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "dwarf", - homebrew_package_name = "libdwarf", - pkgconfig_name = "libdwarf", -) diff --git a/shim/third-party/libevent/BUCK b/shim/third-party/libevent/BUCK deleted file mode 100644 index a196c6e2d0..0000000000 --- a/shim/third-party/libevent/BUCK +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "libevent", - pkgconfig_name = "libevent", - ubuntu_package_name = "libevent-dev", -) diff --git a/shim/third-party/libgcc/BUCK b/shim/third-party/libgcc/BUCK deleted file mode 100644 index 66aa52840b..0000000000 --- a/shim/third-party/libgcc/BUCK +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "stdc++fs", - homebrew_package_name = "gcc", -) diff --git a/shim/third-party/liboqs/BUCK b/shim/third-party/liboqs/BUCK deleted file mode 100644 index c5a3d051ef..0000000000 --- a/shim/third-party/liboqs/BUCK +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "oqs", - homebrew_package_name = "liboqs", - pkgconfig_name = "liboqs", -) diff --git a/shim/third-party/libsodium/BUCK b/shim/third-party/libsodium/BUCK deleted file mode 100644 index 29c6deeab1..0000000000 --- a/shim/third-party/libsodium/BUCK +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "sodium", - homebrew_package_name = "libsodium", - pkgconfig_name = "libsodium", - ubuntu_package_name = "libsodium-dev", -) diff --git a/shim/third-party/libunwind/BUCK b/shim/third-party/libunwind/BUCK deleted file mode 100644 index f7f8d20672..0000000000 --- a/shim/third-party/libunwind/BUCK +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "unwind", - pkgconfig_name = "libunwind", - ubuntu_package_name = "libunwind-dev", -) diff --git a/shim/third-party/lz4/BUCK b/shim/third-party/lz4/BUCK deleted file mode 100644 index 8d321b0b18..0000000000 --- a/shim/third-party/lz4/BUCK +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "lz4", - pkgconfig_name = "liblz4", -) diff --git a/shim/third-party/macros/rust_third_party.bzl b/shim/third-party/macros/rust_third_party.bzl deleted file mode 100644 index f6a0bd3d22..0000000000 --- a/shim/third-party/macros/rust_third_party.bzl +++ /dev/null @@ -1,11 +0,0 @@ -# @nolint - -def third_party_rust_prebuilt_cxx_library(name, **kwargs): - # FIXME: This should probably be a fixup.toml, but it currently can't be expressed. - # The windows-sys crate does -lwindows to find windows. We pass libwindows.a on the command line, - # which resolves the symbols, but the linker still needs to "find" windows, so we also put its - # directory on the link options. - if name.endswith("libwindows.a"): - kwargs["exported_linker_flags"] = ["-Lshim/third-party/rust/" + kwargs["static_lib"].rpartition("/")[0]] - - native.prebuilt_cxx_library(name = name, **kwargs) diff --git a/shim/third-party/ocaml/BUCK b/shim/third-party/ocaml/BUCK deleted file mode 100644 index 2343d7b5ee..0000000000 --- a/shim/third-party/ocaml/BUCK +++ /dev/null @@ -1,7 +0,0 @@ -# @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." -prebuilt_cxx_library( - name = "ocaml-dev", - header_dirs = ["opam/lib/ocaml"], - header_only = True, - visibility = ["PUBLIC"], -) diff --git a/shim/third-party/ocaml/opam/lib/ocaml b/shim/third-party/ocaml/opam/lib/ocaml deleted file mode 100644 index 8bd17a7ca8..0000000000 --- a/shim/third-party/ocaml/opam/lib/ocaml +++ /dev/null @@ -1 +0,0 @@ -# Fake file so that buck2 can run in non-ocamlrep repos diff --git a/shim/third-party/openssl/BUCK b/shim/third-party/openssl/BUCK deleted file mode 100644 index 0bfbbf20c5..0000000000 --- a/shim/third-party/openssl/BUCK +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "ssl", - homebrew_package_name = "openssl", - pkgconfig_name = "openssl", -) - -alias( - name = "crypto", - actual = ":ssl", - visibility = ["PUBLIC"], -) diff --git a/shim/third-party/proto/BUCK b/shim/third-party/proto/BUCK deleted file mode 100644 index d8381b74dc..0000000000 --- a/shim/third-party/proto/BUCK +++ /dev/null @@ -1,21 +0,0 @@ -# @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." -load(":defs.bzl", "protoc_distribution") - -protoc_distribution( - name = "distribution", - version = "21.4", -) - -# @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." -alias( - name = "protoc", - actual = ":distribution[protoc]", - visibility = ["PUBLIC"], -) - -# @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." -alias( - name = "google_protobuf", - actual = ":distribution[google_protobuf]", - visibility = ["PUBLIC"], -) diff --git a/shim/third-party/proto/defs.bzl b/shim/third-party/proto/defs.bzl deleted file mode 100644 index 18938c5a7f..0000000000 --- a/shim/third-party/proto/defs.bzl +++ /dev/null @@ -1,105 +0,0 @@ -load("@prelude//http_archive/exec_deps.bzl", "HttpArchiveExecDeps") -load(":releases.bzl", "releases") - -ProtocReleaseInfo = provider(fields = [ - "version", - "url", - "sha256", -]) - -def _get_protoc_release( - version: str, - platform: str) -> ProtocReleaseInfo: - if not version in releases: - fail("Unknown protoc release version '{}'. Available versions: {}".format( - version, - ", ".join(releases.keys()), - )) - protoc_version = releases[version] - artifact = "protoc-{}-{}.zip".format(version, platform) - if not artifact in protoc_version: - fail("Unsupported platform '{}'. Available artifacts: {}".format( - platform, - ", ".join(protoc_version.keys()), - )) - protoc_artifact = protoc_version[artifact] - return ProtocReleaseInfo( - version = version, - url = protoc_artifact["url"], - sha256 = protoc_artifact["sha256"], - ) - -def _turn_http_archive_into_protoc_distribution( - providers: ProviderCollection, - protoc_filename: str) -> list[Provider]: - downloads = providers[DefaultInfo].sub_targets - include = downloads["include"][DefaultInfo] - protoc = downloads[protoc_filename][DefaultInfo] - - return [DefaultInfo( - sub_targets = { - "google_protobuf": [include], - "protoc": [ - protoc, - RunInfo(args = protoc.default_outputs[0]), - ], - }, - )] - -def _download_protoc_distribution_impl(ctx: AnalysisContext) -> Promise: - protoc_filename = "bin/protoc" + ctx.attrs.exe_extension - - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - return ctx.actions.anon_target(native.http_archive, { - "exec_deps": ctx.attrs._http_archive_exec_deps, - "sha256": ctx.attrs.sha256, - "sub_targets": [ - protoc_filename, - "include", - ], - "urls": [ctx.attrs.url], - }).promise.map(lambda providers: _turn_http_archive_into_protoc_distribution( - providers = providers, - protoc_filename = protoc_filename, - )) - -download_protoc_distribution = rule( - impl = _download_protoc_distribution_impl, - attrs = { - "exe_extension": attrs.string(), - "sha256": attrs.string(), - "url": attrs.string(), - "_http_archive_exec_deps": attrs.default_only(attrs.exec_dep(providers = [HttpArchiveExecDeps], default = "prelude//http_archive/tools:exec_deps")), - }, -) - -def _host_platform(): - os = host_info().os - arch = host_info().arch - if os.is_linux and arch.is_x86_64: - return "linux-x86_64" - elif os.is_linux and arch.is_aarch64: - return "linux-aarch_64" - elif os.is_macos and arch.is_x86_64: - return "osx-x86_64" - elif os.is_macos and arch.is_aarch64: - return "osx-aarch_64" - elif os.is_windows and arch.is_x86_64: - return "win64" - else: - fail("Unknown platform: os={}, arch={}".format(os, arch)) - -def protoc_distribution( - name: str, - version: str, - platform: [None, str] = None): - if platform == None: - platform = _host_platform() - exe_extension = ".exe" if platform.startswith("win") else "" - release = _get_protoc_release(version, platform) - download_protoc_distribution( - name = name, - url = release.url, - sha256 = release.sha256, - exe_extension = exe_extension, - ) diff --git a/shim/third-party/proto/releases.bzl b/shim/third-party/proto/releases.bzl deleted file mode 100644 index 153ca496e4..0000000000 --- a/shim/third-party/proto/releases.bzl +++ /dev/null @@ -1,46 +0,0 @@ -# @generated -# Update with ./update.py > releases.bzl -releases = { - "21.4": { - "protoc-21.4-win32.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-win32.zip", - "sha256": "09760ff98f76ac30c8bca7433715c47161fe305bf41573a7cd00b0afcc518617" - }, - "protoc-21.4-osx-x86_64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-osx-x86_64.zip", - "sha256": "27ac01aee3e8b95ebec017b7b3aee55d4eb095cbd2a5148d2a20350af006072e" - }, - "protoc-21.4-osx-universal_binary.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-osx-universal_binary.zip", - "sha256": "0cf1a340d1fa1366cdf22043e3f92e5374096647037020b405acea706438c603" - }, - "protoc-21.4-osx-aarch_64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-osx-aarch_64.zip", - "sha256": "6a677c88a5e5b032aaff96767461788a316408d4ed0afef3f1455390a689ec18" - }, - "protoc-21.4-linux-x86_64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-linux-x86_64.zip", - "sha256": "d51e8f030162f08823a4738ab0ac00bee537e30b583a562e6962dbb040d86736" - }, - "protoc-21.4-linux-x86_32.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-linux-x86_32.zip", - "sha256": "2101e3a4dd490625c15d31274a599e3bfb1f8c9fdd381ca9501da17bb6f7a3d2" - }, - "protoc-21.4-linux-s390_64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-linux-s390_64.zip", - "sha256": "e0b69b4242bf409c825d787669a4683d63320d6e52280750df971a3376e0af56" - }, - "protoc-21.4-linux-ppcle_64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-linux-ppcle_64.zip", - "sha256": "58c1be8ca89b8b2712f95a9dd9aeb174f8f479be9f55e71f6ffe0b0e83ef8be9" - }, - "protoc-21.4-linux-aarch_64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-linux-aarch_64.zip", - "sha256": "5a377b505cf8c3ed29ad0b6e3827c5eb27273c00147fcfd833b9686192143e8d" - }, - "protoc-21.4-win64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-win64.zip", - "sha256": "090af381392abaf5fd8ae3070d8fc2a4ba2d0a9f8e52915d69b439c33be72da5" - } - } -} diff --git a/shim/third-party/proto/update.py b/shim/third-party/proto/update.py deleted file mode 100755 index cfee489f67..0000000000 --- a/shim/third-party/proto/update.py +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env python3 -"""Query recent Github release artifacts for protobuf. - -Use this script to update the releases.bzl file that contains metadata about -protoc releases. - -This script is not executed during the regular Buck2 build. -""" - -import aiohttp -import asyncio -from contextlib import asynccontextmanager -from copy import deepcopy -from gql import gql, Client -from gql.transport.aiohttp import AIOHTTPTransport -import hashlib -import json -import os - -GITHUB_GRAPHQL_URI = "https://api.github.com/graphql" -GITHUB_TOKEN = os.environ.get("GITHUB_TOKEN") -GITHUB_QUERY = """\ -query { - repository(owner: "protocolbuffers", name: "protobuf") { - releases(last: 1) { - nodes { - tagName - releaseAssets(first: 100) { - nodes { - name - downloadUrl - } - } - } - } - } -} -""" - -async def query_releases(): - async with aiohttp.ClientSession(raise_for_status=True) as session: - assert GITHUB_TOKEN is not None, "Provide a Github API token in $GITHUB_TOKEN" - headers = {'Authorization': f'bearer {GITHUB_TOKEN}'} - body = {"query": GITHUB_QUERY} - async with session.post(GITHUB_GRAPHQL_URI, headers=headers, json=body) as resp: - response = await resp.json() - return response["data"] - - -def format_releases(releases): - return { - release["tagName"].strip("v"): { - asset["name"]: { - "url": asset["downloadUrl"], - } - for asset in release["releaseAssets"]["nodes"] - if asset["name"].startswith("protoc-") - } - for release in releases["repository"]["releases"]["nodes"] - } - - -async def fetch_sha256(session, url): - async with session.get(url) as resp: - hasher = hashlib.sha256() - async for chunk, _ in resp.content.iter_chunks(): - hasher.update(chunk) - return hasher.hexdigest() - - -async def hash_releases(releases): - async def hash_asset(session, version, name, url): - sha256 = await fetch_sha256(session, url) - return (version, name, sha256) - - tasks = [] - async with aiohttp.ClientSession() as session: - for version, assets in releases.items(): - for name, asset in assets.items(): - tasks.append(hash_asset(session, version, name, asset["url"])) - - result = deepcopy(releases) - hashes = await asyncio.gather(*tasks) - for version, name, sha256 in hashes: - result[version][name]["sha256"] = sha256 - - return result - - -async def main(): - releases = await query_releases() - formatted = format_releases(releases) - with_sha256 = await hash_releases(formatted) - print("# @" + "generated") - print("# Update with ./update.py > releases.bzl") - print("releases = ", json.dumps(with_sha256, indent=4)) - - -asyncio.run(main()) diff --git a/shim/third-party/python/BUCK b/shim/third-party/python/BUCK deleted file mode 100644 index dfa541bdaf..0000000000 --- a/shim/third-party/python/BUCK +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "python", - homebrew_header_path = "Frameworks/Python.framework/Headers", - homebrew_package_name = "python3", - pkgconfig_name = "python3", -) diff --git a/shim/third-party/range-v3/BUCK b/shim/third-party/range-v3/BUCK deleted file mode 100644 index 62997c6014..0000000000 --- a/shim/third-party/range-v3/BUCK +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library(name = "range-v3") diff --git a/shim/third-party/rust/.gitignore b/shim/third-party/rust/.gitignore deleted file mode 100644 index c18f3dc437..0000000000 --- a/shim/third-party/rust/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# Ignore Cargo-related stuff -.cargo/registry -.cargo/git -/registry -/git -.package-cache - -# Various cruft in vendored packages -vendor/*/target -vendor/*/Cargo.lock -vendor/**/.buckconfig -vendor/**/BUCK -vendor/**/OWNERS -vendor/**/*~ -vendor/**/*.bzl -vendor/*/.github/** -vendor/*/.appveyor.yml -vendor/*/.travis.yml -/target/** - -# Bad Windows names - oh for case-insensitive regex matching! -vendor/**/[Aa][Uu][Xx] -vendor/**/[Aa][Uu][Xx].* -vendor/**/[Cc][Oo][Mm][1-9] -vendor/**/[Cc][Oo][Mm][1-9].* -vendor/**/[Cc][Oo][Nn] -vendor/**/[Cc][Oo][Nn].* -vendor/**/[Ll][Pp][Tt][1-9] -vendor/**/[Ll][Pp][Tt][1-9].* -vendor/**/[Nn][Uu][Ll] -vendor/**/[Nn][Uu][Ll].* diff --git a/shim/third-party/rust/Cargo.toml b/shim/third-party/rust/Cargo.toml deleted file mode 100644 index 036742ff95..0000000000 --- a/shim/third-party/rust/Cargo.toml +++ /dev/null @@ -1,237 +0,0 @@ -# Definitions of third-party libraries used for buck2 build of buck2. -# This file is **not** used by cargo build of buck2. -# See the /docs/bootstrapping.md for more details. - -[workspace] - -[package] -# Pseudo-package whose dependencies are imported and buckified -name = "rust-third-party" -version = "0.0.0" -publish = false -edition = "2021" - -# Dummy target to keep Cargo happy -[[bin]] -name = "top" -path = "top/main.rs" - -# List of packages to be imported, with version constraints, features -# and all options Cargo supports. -[dependencies] - -gazebo = {version = "0.8.1", features = ["str_pattern_extensions"]} -fbinit = "0.1" -sorted_vector_map = "0.2" -watchman_client = "0.8.0" - -annotate-snippets = { version = "0.9.0", features = ["color"] } -anyhow = "1.0.65" -anymap = "0.12.1" -arc-swap = "1.6.0" -argfile = "0.1.0" -assert_matches = "1.5" -async-compression = { version = "0.4.1", features = ["tokio", "gzip", "zstd"] } -async-condvar-fair = { version = "0.2.2", features = ["parking_lot_0_11", "tokio"] } -async-recursion = "1.0" -async-scoped = { version = "0.8", features = ["use-tokio"] } -async-trait = "0.1.24" -atomic = "0.5.1" -backtrace = "0.3.51" -base64 = "0.13.0" -bincode = "1.3.3" -bitflags = "2.4" -blake3 = { version = "1.3.1", features = [ "default", "digest", "rayon", "std", "traits-preview" ] } -bstr = { version = "1.4.0", features = ["serde", "std", "unicode"] } -bumpalo = { version = "3.14.0", features = ["allocator_api", "collections"] } -byteorder = "1.4.3" -bytes = "1.0" -bytesize = "1.1.0" -chrono = "0.4.28" -clap = { package = "clap", version = "4.5.4", features = ["derive", "env", "string"] } -clap-3 = { package = "clap", version = "3.2.24", features = ["derive", "env", "regex", "unicode", "wrap_help"] } -clap_complete = { package = "clap_complete", version = "4.5.1" } -common-path = "1.0.0" -compact_str = "0.6.1" -constant_time_eq = "0.2.4" -convert_case = "0.4.0" -criterion = { version = "0.3.1", features = [] } -crossbeam = "0.8" -crossbeam-channel = "0.5" -crossbeam-epoch = "0.9.7" -crossterm = "0.27" -csv = "1.1" -ctor = "0.1.16" -dashmap = "5.5.3" -debugserver-types = "0.5.0" -derivative = "2.2" -derive_more = "0.99.3" -digest = "0.10" -dirs = "3.0.1" -dunce = "1.0.2" -either = "1.8" -elf = "0.7.4" -enum-iterator = "1.4.1" -enum-map = "0.6.3" -env_logger = "0.9.0" -equivalent = "1.0.0" -erased-serde = "0.3.20" -faccess = "0.2.3" -fancy-regex = "0.10.0" -flate2 = "1.0.22" -fnv = "1.0.7" -fs4 = { version = "0.6", features = ["sync"] } -futures = { version = "0.3.28", features = ["async-await", "compat"] } -futures-intrusive = "0.4" -fxhash = "0.2.1" -glob = "0.3.0" -globset = "0.4.10" -hashbrown = { version = "0.14.3", features = ["raw"] } -hex = "0.4.3" -higher-order-closure = "0.0.5" -hostname = "0.3.1" -http = "0.2" -httparse = "1.7.1" -httptest = "0.15" -humantime = "2.0.1" -hyper = { version = "0.14.26", features = ["client", "http1", "http2"] } -hyper-proxy = { git = "https://github.com/get9/hyper-proxy", rev = "205e9fee42d469444d654d9fa207897f4a77d5b6", features = ["rustls"], default_features = false } # branch = tokio-rustls-0.23 Many PRs to bump versions (#28, #30, #31) are several years old, possibly abandoned crate. This fork contains changes from #28 + changes to upgrade rustls to 0.21. -hyper-rustls = { version = "0.24.0", features = ["http2"] } -hyper-timeout = "0.4" -hyper-unix-connector = "0.2" -indent_write = "2.2.0" -indenter = "0.3.3" -indexmap = { version = "2.1.0", features = ["arbitrary", "rayon", "serde"] } -indoc = "1.0.3" -inferno = { version = "0.11.11", default-features = false } -internment = { version = "0.7", features = ["arc"] } -inventory = "0.3.8" -ipnetwork = "0.20.0" -is_proc_translated = "0.1.1" -itertools = "0.10.3" -jemallocator = { version = "0.5.0", features = ["profiling"] } -lalrpop = { version = "0.19.7", artifact = "bin", features = ["pico-args"] } -lalrpop-util = "0.19.7" -libc = "0.2.132" -linked-hash-map = { version = "0.5", features = ["serde_impl"] } -linkme = { version = "0.3.17", features = ["used_linker"] } -log = "0.4" -logos = "0.12" -lru = "0.12.3" -lsp-server = "0.7.2" -lsp-types = "0.94.1" -maplit = "1.0.2" -mappable-rc = { version = "0.1.1", features = ["std"] } -md-5 = "0.10" -memchr = "2.4.1" -memmap2 = "0.5.0" -memoffset = "0.6.4" -multimap = "0.8.2" -nix = "0.22" -nom = "7.1.3" -notify = "=5.0.0-pre.16" -num-bigint = "0.4.3" -num-traits = "0.2" -num_cpus = "1.11" -num_enum = "0.5" -object = "0.29.0" -oid-registry = "0.6.1" -once_cell = "1.8" -os_str_bytes = { version = "6.6.0", features = ["conversions"] } -parking_lot = { version = "0.11.2", features = ["send_guard"] } -paste = "1.0" -pathdiff = "0.2" -perf-event = "0.4" -perf-event-open-sys = "4.0" -pin-project = "0.4.29" -plist = "0.5" -pretty_assertions = "1.2.1" -proc-macro2 = { version = "1.0.70", features = ["span-locations"] } -prost = "0.11.9" -prost-build = "0.11.9" -prost-derive = "0.11.9" -prost-types = "0.11.9" -protoc-bin-vendored = "3.0.0" -psutil = "3.2" -quote = "1.0.3" -rand = { version = "0.8.4", features = ["small_rng"] } -rand_chacha = "0.3" -rand_distr = "0.4" -ref-cast = "1.0.0" -regex = "1.5.4" -relative-path = { version = "1.7.0", features = ["serde"] } -ring = "=0.17.5" # Upgrading this is possible, but a pain, so we don't want to pick up every new minor version -rusqlite = { version = "0.29.0", features = ["bundled"] } -rustc-hash = "1.1.0" -rustls = "0.21.0" -rustls-native-certs = { package = "rustls-native-certs", version = "0.6.2" } -rustls-pemfile = { package = "rustls-pemfile", version = "1.0.0" } -rustyline = "11.0" -scopeguard = "1.0.0" -sequence_trie = "0.3.6" -serde = { version = "1.0.173", features = ["derive", "rc"] } -serde_json = { version = "1.0.48", features = ["raw_value"] } -sha1 = "0.10" -sha2 = "0.10" -shlex = "1.3" -similar = { version = "2.2.0", features = ["inline"] } -siphasher = "0.3.3" -slab = "0.4.7" -slog = "2.7.0" -smallvec = { version = "1.10", features = ["const_generics", "const_new", "serde", "specialization", "union", "write"] } -static_assertions = "1.1.0" -strsim = "0.10.0" -structopt = "0.3.23" -syn = { version = "2", features = ["extra-traits", "full", "visit"] } -syn1 = { package = "syn", version = "1.0.109", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } -synstructure = "0.12" -sync_wrapper = "0.1.0" -sys-info = "0.9.1" -sysinfo = "0.30.11" -take_mut = "0.2.2" -tar = "0.4.38" -tempfile = "3.1.0" -termimad = "0.20.1" -termios = "0.3" -termwiz = "0.18" -test-case = "3.1.0" -textwrap = { version = "0.11", features = ["term_size"] } -thiserror = "1.0.36" -threadpool = "1.8.1" -tokio = { version = "1.25.0", features = ["full", "test-util", "tracing"] } -tokio-rustls = { package = "tokio-rustls", version = "0.24.0", features = ["dangerous_configuration"] } -tokio-stream = { version = "0.1.14", features = ["fs", "io-util", "net", "sync", "time", "signal"] } -tokio-util = { version = "0.6", features = ["full"] } -toml = "0.5" -tonic = { version = "0.9.2", features = ["tls", "tls-webpki-roots"] } -tonic-build = { version = "0.9.2", features = ["prost", "cleanup-markdown"] } -tower = "0.4" -tower-layer = "0.3.1" -tower-service = "0.3.2" -tracing = "0.1.22" -tracing-core = "0.1.32" -tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] } -triomphe = "0.1.11" -trybuild = "1.0.56" -typed-arena = "2.0" -twox-hash = "1.6.1" -unicode-segmentation = "1.7" -uuid = { version = "1.2", features = ["v4"] } -walkdir = "2.3.2" -which = "4.3.0" -whoami = "1.5.1" -windows_x86_64_msvc = "=0.48.0" # our fixup only works if we are on precisely 0.48.0 -winapi = { version = "0.3", features = ["everything"] } -x509-parser = { version = "0.14.0", features = ["verify"] } -xattr = "0.2.2" -zip = "0.5" -zstd = "0.13.0" - -[patch.crates-io] -# For https://github.com/jimblandy/perf-event/pull/29 -perf-event = { git = "https://github.com/krallin/perf-event.git", rev = "86224a9bc025d5d19f719542f27c8c629a08b167", version = "0.4" } -perf-event-open-sys = { git = "https://github.com/krallin/perf-event.git", rev = "86224a9bc025d5d19f719542f27c8c629a08b167", version = "4.0" } - -# Windows-specific dependencies -[target."cfg(windows)".dependencies] -winver = "1" diff --git a/shim/third-party/rust/defs.bzl b/shim/third-party/rust/defs.bzl deleted file mode 100644 index 6d295fdd56..0000000000 --- a/shim/third-party/rust/defs.bzl +++ /dev/null @@ -1,7 +0,0 @@ -def rust_library_from_crates(name): - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - native.export_file(name = name, src = "BUCK", visibility = ["PUBLIC"]) - -def rust_binary_from_crates(name): - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - native.genrule(name = name, cmd = "exit 1", executable = True, out = "out", visibility = ["PUBLIC"]) diff --git a/shim/third-party/rust/fixups/ahash/fixups.toml b/shim/third-party/rust/fixups/ahash/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/ahash/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/anyhow/fixups.toml b/shim/third-party/rust/fixups/anyhow/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/anyhow/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/async-trait/fixups.toml b/shim/third-party/rust/fixups/async-trait/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/async-trait/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/atomic/fixups.toml b/shim/third-party/rust/fixups/atomic/fixups.toml deleted file mode 100644 index 5e026f75e0..0000000000 --- a/shim/third-party/rust/fixups/atomic/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/axum-core/fixups.toml b/shim/third-party/rust/fixups/axum-core/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/axum-core/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/axum/fixups.toml b/shim/third-party/rust/fixups/axum/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/axum/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/backtrace/fixups.toml b/shim/third-party/rust/fixups/backtrace/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/backtrace/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/blake3/fixups.toml b/shim/third-party/rust/fixups/blake3/fixups.toml deleted file mode 100644 index 389fd57acf..0000000000 --- a/shim/third-party/rust/fixups/blake3/fixups.toml +++ /dev/null @@ -1,81 +0,0 @@ -buildscript = [] - -## The various X86 platform fixups - -[platform_fixup.'cfg(target_arch = "x86_64")'] -cfgs = ["blake3_sse2_ffi", "blake3_sse41_ffi", "blake3_avx2_ffi", "blake3_avx512_ffi"] -buildscript = [] - -# , any(target_env = "fbcode", target_env = "gnu") -[[platform_fixup.'cfg(all(target_arch = "x86_64", any(target_os = "linux", target_os = "macos")))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", any(target_os = "linux", target_os = "macos")))'.buildscript.cxx_library] -name = "simd_x86_unix" -srcs = [ - "c/blake3.c", - "c/blake3_dispatch.c", - "c/blake3_portable.c", - "c/blake3_sse2_x86-64_unix.S", - "c/blake3_sse41_x86-64_unix.S", - "c/blake3_avx2_x86-64_unix.S", - "c/blake3_avx512_x86-64_unix.S" -] -# Older versions of Clang require these flags, even for assembly. See -# https://github.com/BLAKE3-team/BLAKE3/issues/79. -compiler_flags = ["-mavx512f", "-mavx512vl"] -headers = ["c/*.h"] -compatible_with = [ - "prelude//os/constraints:linux", - "prelude//os/constraints:macos", -] - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu"))'.buildscript.cxx_library] -name = "simd_x86_windows_gnu" -srcs = [ - "c/blake3.c", - "c/blake3_dispatch.c", - "c/blake3_portable.c", - "c/blake3_sse2_x86-64_windows_gnu.S", - "c/blake3_sse41_x86-64_windows_gnu.S", - "c/blake3_avx2_x86-64_windows_gnu.S", - "c/blake3_avx512_x86-64_windows_gnu.S" -] -# Older versions of Clang require these flags, even for assembly. See -# https://github.com/BLAKE3-team/BLAKE3/issues/79. -compiler_flags = ["-mavx512f", "-mavx512vl"] -headers = ["c/*.h"] -compatible_with = ["prelude//os/constraints:windows"] - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc"))'.buildscript.cxx_library] -name = "simd_x86_windows_msvc" -srcs = [ - "c/blake3.c", - "c/blake3_dispatch.c", - "c/blake3_portable.c", - "c/blake3_sse2_x86-64_windows_msvc.asm", - "c/blake3_sse41_x86-64_windows_msvc.asm", - "c/blake3_avx2_x86-64_windows_msvc.asm", - "c/blake3_avx512_x86-64_windows_msvc.asm" -] -headers = ["c/*.h"] -compatible_with = ["prelude//os/constraints:windows"] - -## ARM and AArch64 fixups - -[platform_fixup.'cfg(any(target_arch = "aarch64", target_arch = "arm"))'] -cfgs = ["blake3_neon"] -buildscript = [] - -[[platform_fixup.'cfg(target_arch = "aarch64")'.buildscript]] -[platform_fixup.'cfg(target_arch = "aarch64")'.buildscript.cxx_library] -name = "simd_neon-aarch64" -srcs = ["c/blake3_neon.c"] -headers = ["c/*.h"] - -[[platform_fixup.'cfg(target_arch = "arm")'.buildscript]] -[platform_fixup.'cfg(target_arch = "arm")'.buildscript.cxx_library] -name = "simd_neon-armv7" -srcs = ["c/blake3_neon.c"] -compiler_flags = ["-mfpu=neon-vfpv4", "-mfloat-abi=hard"] -headers = ["c/*.h"] diff --git a/shim/third-party/rust/fixups/bumpalo/fixups.toml b/shim/third-party/rust/fixups/bumpalo/fixups.toml deleted file mode 100644 index edd9a2079b..0000000000 --- a/shim/third-party/rust/fixups/bumpalo/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -extra_srcs = ["README.md"] diff --git a/shim/third-party/rust/fixups/bzip2-sys/fixups.toml b/shim/third-party/rust/fixups/bzip2-sys/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/bzip2-sys/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/clap/fixups.toml b/shim/third-party/rust/fixups/clap/fixups.toml deleted file mode 100644 index ee94fdc2f2..0000000000 --- a/shim/third-party/rust/fixups/clap/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -omit_features = ["deprecated"] diff --git a/shim/third-party/rust/fixups/clap_builder/fixups.toml b/shim/third-party/rust/fixups/clap_builder/fixups.toml deleted file mode 100644 index edd9a2079b..0000000000 --- a/shim/third-party/rust/fixups/clap_builder/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -extra_srcs = ["README.md"] diff --git a/shim/third-party/rust/fixups/clap_derive/fixups.toml b/shim/third-party/rust/fixups/clap_derive/fixups.toml deleted file mode 100644 index ee94fdc2f2..0000000000 --- a/shim/third-party/rust/fixups/clap_derive/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -omit_features = ["deprecated"] diff --git a/shim/third-party/rust/fixups/core-foundation-sys/fixups.toml b/shim/third-party/rust/fixups/core-foundation-sys/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/core-foundation-sys/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/crc32fast/fixups.toml b/shim/third-party/rust/fixups/crc32fast/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/crc32fast/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/criterion/fixups.toml b/shim/third-party/rust/fixups/criterion/fixups.toml deleted file mode 100644 index 41439d3356..0000000000 --- a/shim/third-party/rust/fixups/criterion/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -cargo_env = true diff --git a/shim/third-party/rust/fixups/crossbeam-epoch/fixups.toml b/shim/third-party/rust/fixups/crossbeam-epoch/fixups.toml deleted file mode 100644 index 3510928422..0000000000 --- a/shim/third-party/rust/fixups/crossbeam-epoch/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/crossbeam-queue/fixups.toml b/shim/third-party/rust/fixups/crossbeam-queue/fixups.toml deleted file mode 100644 index 3510928422..0000000000 --- a/shim/third-party/rust/fixups/crossbeam-queue/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/crossbeam-utils/fixups.toml b/shim/third-party/rust/fixups/crossbeam-utils/fixups.toml deleted file mode 100644 index 3510928422..0000000000 --- a/shim/third-party/rust/fixups/crossbeam-utils/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/crunchy/fixups.toml b/shim/third-party/rust/fixups/crunchy/fixups.toml deleted file mode 100644 index ac9ebfb4af..0000000000 --- a/shim/third-party/rust/fixups/crunchy/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/darwin-libproc-sys/fixups.toml b/shim/third-party/rust/fixups/darwin-libproc-sys/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/darwin-libproc-sys/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/debugserver-types/fixups.toml b/shim/third-party/rust/fixups/debugserver-types/fixups.toml deleted file mode 100644 index 50645274fe..0000000000 --- a/shim/third-party/rust/fixups/debugserver-types/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -extra_srcs = ["src/schema.json"] -cargo_env = true diff --git a/shim/third-party/rust/fixups/erased-serde/fixups.toml b/shim/third-party/rust/fixups/erased-serde/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/erased-serde/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/fs-err/fixups.toml b/shim/third-party/rust/fixups/fs-err/fixups.toml deleted file mode 100644 index 5e026f75e0..0000000000 --- a/shim/third-party/rust/fixups/fs-err/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/fs4/fixups.toml b/shim/third-party/rust/fixups/fs4/fixups.toml deleted file mode 100644 index af7edb27e3..0000000000 --- a/shim/third-party/rust/fixups/fs4/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/futures-channel/fixups.toml b/shim/third-party/rust/fixups/futures-channel/fixups.toml deleted file mode 100644 index 3510928422..0000000000 --- a/shim/third-party/rust/fixups/futures-channel/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/futures-core/fixups.toml b/shim/third-party/rust/fixups/futures-core/fixups.toml deleted file mode 100644 index 3510928422..0000000000 --- a/shim/third-party/rust/fixups/futures-core/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/futures-task/fixups.toml b/shim/third-party/rust/fixups/futures-task/fixups.toml deleted file mode 100644 index 3510928422..0000000000 --- a/shim/third-party/rust/fixups/futures-task/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/futures-util/fixups.toml b/shim/third-party/rust/fixups/futures-util/fixups.toml deleted file mode 100644 index 3510928422..0000000000 --- a/shim/third-party/rust/fixups/futures-util/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/generic-array/fixups.toml b/shim/third-party/rust/fixups/generic-array/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/generic-array/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/getrandom/fixups.toml b/shim/third-party/rust/fixups/getrandom/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/getrandom/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/httparse/fixups.toml b/shim/third-party/rust/fixups/httparse/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/httparse/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/hyper/fixups.toml b/shim/third-party/rust/fixups/hyper/fixups.toml deleted file mode 100644 index 9118e9de76..0000000000 --- a/shim/third-party/rust/fixups/hyper/fixups.toml +++ /dev/null @@ -1,5 +0,0 @@ -# reindeer cannot see through `cfg_proto!` macros and the like -extra_srcs = ["src/**/*.rs"] - -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/indexmap/fixups.toml b/shim/third-party/rust/fixups/indexmap/fixups.toml deleted file mode 100644 index 4aa45eda12..0000000000 --- a/shim/third-party/rust/fixups/indexmap/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -cfgs = ["has_std"] diff --git a/shim/third-party/rust/fixups/io-lifetimes/fixups.toml b/shim/third-party/rust/fixups/io-lifetimes/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/io-lifetimes/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/jemalloc-sys/fixups.toml b/shim/third-party/rust/fixups/jemalloc-sys/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/jemalloc-sys/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/lalrpop/fixups.toml b/shim/third-party/rust/fixups/lalrpop/fixups.toml deleted file mode 100644 index 41439d3356..0000000000 --- a/shim/third-party/rust/fixups/lalrpop/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -cargo_env = true diff --git a/shim/third-party/rust/fixups/lexical-core/fixups.toml b/shim/third-party/rust/fixups/lexical-core/fixups.toml deleted file mode 100644 index 5e026f75e0..0000000000 --- a/shim/third-party/rust/fixups/lexical-core/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/libc/fixups.toml b/shim/third-party/rust/fixups/libc/fixups.toml deleted file mode 100644 index 5e026f75e0..0000000000 --- a/shim/third-party/rust/fixups/libc/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/libm/fixups.toml b/shim/third-party/rust/fixups/libm/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/libm/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/libsqlite3-sys/fixups.toml b/shim/third-party/rust/fixups/libsqlite3-sys/fixups.toml deleted file mode 100644 index b82bb848a2..0000000000 --- a/shim/third-party/rust/fixups/libsqlite3-sys/fixups.toml +++ /dev/null @@ -1,19 +0,0 @@ -# libsqlite3-sys uses a bindgen binding to libsqlite. -# We can't easily import bindgen because of its libclang dependency, -# so in the meantime we need to use pre-generated bindgen files. - -extra_mapped_srcs = {"sqlite3/bindgen_bundled_version.rs" = "src/bindgen.rs"} - -[env] -OUT_DIR = "." - -[[buildscript]] -[buildscript.cxx_library] -name = "sqlite3" -srcs = ["sqlite3/sqlite3.c"] -headers = ["sqlite3/*.h"] -preprocessor_flags = [ - "-DSQLITE_ENABLE_COLUMN_METADATA", - "-DSQLITE_ENABLE_FTS3", - "-DSQLITE_ENABLE_RTREE", -] diff --git a/shim/third-party/rust/fixups/lock_api/fixups.toml b/shim/third-party/rust/fixups/lock_api/fixups.toml deleted file mode 100644 index 6c1a3d45a5..0000000000 --- a/shim/third-party/rust/fixups/lock_api/fixups.toml +++ /dev/null @@ -1,3 +0,0 @@ -# the build script for lock_api is a version check for rust 1.61. -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/log/fixups.toml b/shim/third-party/rust/fixups/log/fixups.toml deleted file mode 100644 index 5e026f75e0..0000000000 --- a/shim/third-party/rust/fixups/log/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/memchr/fixups.toml b/shim/third-party/rust/fixups/memchr/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/memchr/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/memoffset/fixups.toml b/shim/third-party/rust/fixups/memoffset/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/memoffset/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/mio/fixups.toml b/shim/third-party/rust/fixups/mio/fixups.toml deleted file mode 100644 index af7edb27e3..0000000000 --- a/shim/third-party/rust/fixups/mio/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/native-tls/fixups.toml b/shim/third-party/rust/fixups/native-tls/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/native-tls/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/nix/fixups.toml b/shim/third-party/rust/fixups/nix/fixups.toml deleted file mode 100644 index 1849ea069d..0000000000 --- a/shim/third-party/rust/fixups/nix/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/nom/fixups.toml b/shim/third-party/rust/fixups/nom/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/nom/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/ntapi/fixups.toml b/shim/third-party/rust/fixups/ntapi/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/ntapi/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/num-bigint/fixups.toml b/shim/third-party/rust/fixups/num-bigint/fixups.toml deleted file mode 100644 index df0b424f49..0000000000 --- a/shim/third-party/rust/fixups/num-bigint/fixups.toml +++ /dev/null @@ -1,5 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] - -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/num-integer/fixups.toml b/shim/third-party/rust/fixups/num-integer/fixups.toml deleted file mode 100644 index 5e026f75e0..0000000000 --- a/shim/third-party/rust/fixups/num-integer/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/num-traits/fixups.toml b/shim/third-party/rust/fixups/num-traits/fixups.toml deleted file mode 100644 index 5e026f75e0..0000000000 --- a/shim/third-party/rust/fixups/num-traits/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/oid-registry/fixups.toml b/shim/third-party/rust/fixups/oid-registry/fixups.toml deleted file mode 100644 index 79d5cb979d..0000000000 --- a/shim/third-party/rust/fixups/oid-registry/fixups.toml +++ /dev/null @@ -1,7 +0,0 @@ -cargo_env = [ - "CARGO_PKG_NAME", # Needed by _buck1_handle_manifest_dir - "CARGO_MANIFEST_DIR", -] - -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/parking_lot/fixups.toml b/shim/third-party/rust/fixups/parking_lot/fixups.toml deleted file mode 100644 index 5e026f75e0..0000000000 --- a/shim/third-party/rust/fixups/parking_lot/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/parking_lot_core/fixups.toml b/shim/third-party/rust/fixups/parking_lot_core/fixups.toml deleted file mode 100644 index 5e026f75e0..0000000000 --- a/shim/third-party/rust/fixups/parking_lot_core/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/paste/fixups.toml b/shim/third-party/rust/fixups/paste/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/paste/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/pest/fixups.toml b/shim/third-party/rust/fixups/pest/fixups.toml deleted file mode 100644 index af7edb27e3..0000000000 --- a/shim/third-party/rust/fixups/pest/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/pin-project-internal/fixups.toml b/shim/third-party/rust/fixups/pin-project-internal/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/pin-project-internal/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/platforms/fixups.toml b/shim/third-party/rust/fixups/platforms/fixups.toml deleted file mode 100644 index e086791cd2..0000000000 --- a/shim/third-party/rust/fixups/platforms/fixups.toml +++ /dev/null @@ -1,26 +0,0 @@ -# Buildscript sets TARGET in environment -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "linux", target_arch = "aarch64"))'] -env = { TARGET = "aarch64-unknown-linux-gnu" } -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "linux", target_arch = "x86_64"))'] -env = { TARGET = "x86_64-unknown-linux-gnu" } -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "macos", target_arch = "aarch64"))'] -env = { TARGET = "aarch64-apple-darwin" } -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "macos", target_arch = "x86_64"))'] -env = { TARGET = "x86_64-apple-darwin" } -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "windows", target_env = "gnu"))'] -env = { TARGET = "x86_64-pc-windows-gnu" } -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'] -env = { TARGET = "x86_64-pc-windows-msvc" } -buildscript = [] diff --git a/shim/third-party/rust/fixups/prettyplease/fixups.toml b/shim/third-party/rust/fixups/prettyplease/fixups.toml deleted file mode 100644 index 3510928422..0000000000 --- a/shim/third-party/rust/fixups/prettyplease/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/proc-macro-error-attr/fixups.toml b/shim/third-party/rust/fixups/proc-macro-error-attr/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/proc-macro-error-attr/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/proc-macro-error/fixups.toml b/shim/third-party/rust/fixups/proc-macro-error/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/proc-macro-error/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/proc-macro-hack/fixups.toml b/shim/third-party/rust/fixups/proc-macro-hack/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/proc-macro-hack/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/proc-macro2/fixups.toml b/shim/third-party/rust/fixups/proc-macro2/fixups.toml deleted file mode 100644 index 5e026f75e0..0000000000 --- a/shim/third-party/rust/fixups/proc-macro2/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/prost-build/fixups.toml b/shim/third-party/rust/fixups/prost-build/fixups.toml deleted file mode 100644 index 5865e69048..0000000000 --- a/shim/third-party/rust/fixups/prost-build/fixups.toml +++ /dev/null @@ -1,7 +0,0 @@ -buildscript = [] - -# These are here because the crate uses the env! macro -# We override them at runtime. -[env] -PROTOC = "" -PROTOC_INCLUDE = "" diff --git a/shim/third-party/rust/fixups/pulldown-cmark/fixups.toml b/shim/third-party/rust/fixups/pulldown-cmark/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/pulldown-cmark/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/quote/fixups.toml b/shim/third-party/rust/fixups/quote/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/quote/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/radium/fixups.toml b/shim/third-party/rust/fixups/radium/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/radium/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/rayon-core/fixups.toml b/shim/third-party/rust/fixups/rayon-core/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/rayon-core/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/ref-cast/fixups.toml b/shim/third-party/rust/fixups/ref-cast/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/ref-cast/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/reqwest/fixups.toml b/shim/third-party/rust/fixups/reqwest/fixups.toml deleted file mode 100644 index af7edb27e3..0000000000 --- a/shim/third-party/rust/fixups/reqwest/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/ring/fixups.toml b/shim/third-party/rust/fixups/ring/fixups.toml deleted file mode 100644 index d2c83589cf..0000000000 --- a/shim/third-party/rust/fixups/ring/fixups.toml +++ /dev/null @@ -1,162 +0,0 @@ -# Copied from fbsource fixup. - -buildscript = [] - -# Generate a C/C++ build rule for all the C code - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "linux"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "linux"))'.buildscript.cxx_library] -name = "ring-c-asm-elf-x86_84" -srcs = [ "crypto/**/*.c", "pregenerated/*x86_64*-elf.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] - -# redundant `any` is needed to differentiate key for config specific to v0.17.5 version -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "linux")))'] -version = "=0.17.5" -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "linux")))'.env] -RING_CORE_PREFIX = "ring_core_0_17_5_" -[[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "linux")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "linux")))'.buildscript.cxx_library] -name = "ring-c-asm-elf-x86_84" -srcs = [ "crypto/**/*.c", "pregenerated/*x86_64*-elf.S", "third_party/fiat/asm/fiat_curve25519_adx_mul.S", "third_party/fiat/asm/fiat_curve25519_adx_square.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] -fixup_include_paths = ["include"] - -[[platform_fixup.'cfg(all(target_arch = "aarch64", target_os = "linux"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "aarch64", target_os = "linux"))'.buildscript.cxx_library] -name = "ring-c-asm-elf-aarch64" -srcs = [ "crypto/**/*.c", "pregenerated/*armv8*-linux64.S", "pregenerated/*armx*-linux64.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -exclude = [ "crypto/cpu-intel.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] - -[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "linux")))'] -version = "=0.17.5" -[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "linux")))'.env] -RING_CORE_PREFIX = "ring_core_0_17_5_" -[[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "linux")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "linux")))'.buildscript.cxx_library] -name = "ring-c-asm-elf-aarch64" -srcs = [ "crypto/**/*.c", "pregenerated/*armv8*-linux64.S", "pregenerated/*armx*-linux64.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -exclude = [ "crypto/cpu-intel.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] -fixup_include_paths = ["include"] - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "macos"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "macos"))'.buildscript.cxx_library] -name = "ring-c-asm-macos-x86_64" -srcs = [ "crypto/**/*.c", "pregenerated/*x86_64*-macosx.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] - -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "macos")))'] -version = "=0.17.5" -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "macos")))'.env] -RING_CORE_PREFIX = "ring_core_0_17_5_" -[[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "macos")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "macos")))'.buildscript.cxx_library] -name = "ring-c-asm-macos-x86_64" -srcs = [ "crypto/**/*.c", "pregenerated/*x86_64*-macosx.S", "third_party/fiat/asm/fiat_curve25519_adx_mul.S", "third_party/fiat/asm/fiat_curve25519_adx_square.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] -fixup_include_paths = ["include"] - -[[platform_fixup.'cfg(all(target_arch = "aarch64", target_os = "macos"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "aarch64", target_os = "macos"))'.buildscript.cxx_library] -name = "ring-c-asm-macos-arm64" -srcs = [ "crypto/**/*.c", "pregenerated/*armv8*-ios64.S", "pregenerated/*armx*-ios64.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -exclude = [ "crypto/cpu-intel.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] - -[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "macos")))'] -version = "=0.17.5" -[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "macos")))'.env] -RING_CORE_PREFIX = "ring_core_0_17_5_" -[[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "macos")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "macos")))'.buildscript.cxx_library] -name = "ring-c-asm-macos-arm64" -srcs = [ "crypto/**/*.c", "pregenerated/*armv8*-ios64.S", "pregenerated/*armx*-ios64.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -exclude = [ "crypto/cpu-intel.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] -fixup_include_paths = ["include"] - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu"))'.buildscript.cxx_library] -name = "ring-c-win-x86_84" -srcs = [ "crypto/**/*.c" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] - -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu")))'] -version = "=0.17.5" -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu")))'.env] -RING_CORE_PREFIX = "ring_core_0_17_5_" -[[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu")))'.buildscript.cxx_library] -name = "ring-c-win-x86_84" -srcs = [ "crypto/**/*.c" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] -fixup_include_paths = ["include"] - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc"))'.buildscript.cxx_library] -name = "ring-c-win-msvc-x86_84" -srcs = [ "crypto/**/*.c" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] - -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc")))'] -version = "=0.17.5" -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc")))'.env] -RING_CORE_PREFIX = "ring_core_0_17_5_" -[[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc")))'.buildscript.cxx_library] -name = "ring-c-win-msvc-x86_84" -srcs = [ "crypto/**/*.c" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -fixup_include_paths = ["include"] - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows"))'.buildscript.prebuilt_cxx_library] -name = "ring-asm-windows-x86_84" -static_libs = [ "pregenerated/*x86_64*-nasm.obj" ] - -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows")))'] -version = "=0.17.5" -[[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows")))'.buildscript.prebuilt_cxx_library] -name = "ring-asm-windows-x86_84" -static_libs = [ "pregenerated/*x86_64*-nasm.o" ] diff --git a/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols.h b/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols.h deleted file mode 100644 index 9ee40055ef..0000000000 --- a/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols.h +++ /dev/null @@ -1,119 +0,0 @@ - -#ifndef ring_core_generated_PREFIX_SYMBOLS_H -#define ring_core_generated_PREFIX_SYMBOLS_H - -#define ecp_nistz256_point_double p256_point_double -#define ecp_nistz256_point_add p256_point_add -#define ecp_nistz256_point_add_affine p256_point_add_affine -#define ecp_nistz256_ord_mul_mont p256_scalar_mul_mont -#define ecp_nistz256_ord_sqr_mont p256_scalar_sqr_rep_mont -#define ecp_nistz256_mul_mont p256_mul_mont -#define ecp_nistz256_sqr_mont p256_sqr_mont -#define CRYPTO_memcmp ring_core_0_17_5_CRYPTO_memcmp -#define CRYPTO_poly1305_finish ring_core_0_17_5_CRYPTO_poly1305_finish -#define CRYPTO_poly1305_finish_neon ring_core_0_17_5_CRYPTO_poly1305_finish_neon -#define CRYPTO_poly1305_init ring_core_0_17_5_CRYPTO_poly1305_init -#define CRYPTO_poly1305_init_neon ring_core_0_17_5_CRYPTO_poly1305_init_neon -#define CRYPTO_poly1305_update ring_core_0_17_5_CRYPTO_poly1305_update -#define CRYPTO_poly1305_update_neon ring_core_0_17_5_CRYPTO_poly1305_update_neon -#define ChaCha20_ctr32 ring_core_0_17_5_ChaCha20_ctr32 -#define LIMBS_add_mod ring_core_0_17_5_LIMBS_add_mod -#define LIMBS_are_even ring_core_0_17_5_LIMBS_are_even -#define LIMBS_are_zero ring_core_0_17_5_LIMBS_are_zero -#define LIMBS_equal ring_core_0_17_5_LIMBS_equal -#define LIMBS_equal_limb ring_core_0_17_5_LIMBS_equal_limb -#define LIMBS_less_than ring_core_0_17_5_LIMBS_less_than -#define LIMBS_less_than_limb ring_core_0_17_5_LIMBS_less_than_limb -#define LIMBS_reduce_once ring_core_0_17_5_LIMBS_reduce_once -#define LIMBS_select_512_32 ring_core_0_17_5_LIMBS_select_512_32 -#define LIMBS_shl_mod ring_core_0_17_5_LIMBS_shl_mod -#define LIMBS_sub_mod ring_core_0_17_5_LIMBS_sub_mod -#define LIMBS_window5_split_window ring_core_0_17_5_LIMBS_window5_split_window -#define LIMBS_window5_unsplit_window ring_core_0_17_5_LIMBS_window5_unsplit_window -#define LIMB_shr ring_core_0_17_5_LIMB_shr -#define OPENSSL_armcap_P ring_core_0_17_5_OPENSSL_armcap_P -#define OPENSSL_cpuid_setup ring_core_0_17_5_OPENSSL_cpuid_setup -#define OPENSSL_ia32cap_P ring_core_0_17_5_OPENSSL_ia32cap_P -#define aes_hw_ctr32_encrypt_blocks ring_core_0_17_5_aes_hw_ctr32_encrypt_blocks -#define aes_hw_encrypt ring_core_0_17_5_aes_hw_encrypt -#define aes_hw_set_encrypt_key ring_core_0_17_5_aes_hw_set_encrypt_key -#define aes_nohw_ctr32_encrypt_blocks ring_core_0_17_5_aes_nohw_ctr32_encrypt_blocks -#define aes_nohw_encrypt ring_core_0_17_5_aes_nohw_encrypt -#define aes_nohw_set_encrypt_key ring_core_0_17_5_aes_nohw_set_encrypt_key -#define aesni_gcm_decrypt ring_core_0_17_5_aesni_gcm_decrypt -#define aesni_gcm_encrypt ring_core_0_17_5_aesni_gcm_encrypt -#define bn_from_montgomery_in_place ring_core_0_17_5_bn_from_montgomery_in_place -#define bn_gather5 ring_core_0_17_5_bn_gather5 -#define bn_mul_mont ring_core_0_17_5_bn_mul_mont -#define bn_mul_mont_gather5 ring_core_0_17_5_bn_mul_mont_gather5 -#define bn_neg_inv_mod_r_u64 ring_core_0_17_5_bn_neg_inv_mod_r_u64 -#define bn_power5 ring_core_0_17_5_bn_power5 -#define bn_scatter5 ring_core_0_17_5_bn_scatter5 -#define bn_sqr8x_internal ring_core_0_17_5_bn_sqr8x_internal -#define bn_sqrx8x_internal ring_core_0_17_5_bn_sqrx8x_internal -#define bsaes_ctr32_encrypt_blocks ring_core_0_17_5_bsaes_ctr32_encrypt_blocks -#define bssl_constant_time_test_conditional_memcpy ring_core_0_17_5_bssl_constant_time_test_conditional_memcpy -#define bssl_constant_time_test_conditional_memxor ring_core_0_17_5_bssl_constant_time_test_conditional_memxor -#define bssl_constant_time_test_main ring_core_0_17_5_bssl_constant_time_test_main -#define chacha20_poly1305_open ring_core_0_17_5_chacha20_poly1305_open -#define chacha20_poly1305_seal ring_core_0_17_5_chacha20_poly1305_seal -#define fiat_curve25519_adx_mul ring_core_0_17_5_fiat_curve25519_adx_mul -#define fiat_curve25519_adx_square ring_core_0_17_5_fiat_curve25519_adx_square -#define gcm_ghash_avx ring_core_0_17_5_gcm_ghash_avx -#define gcm_ghash_clmul ring_core_0_17_5_gcm_ghash_clmul -#define gcm_ghash_neon ring_core_0_17_5_gcm_ghash_neon -#define gcm_gmult_clmul ring_core_0_17_5_gcm_gmult_clmul -#define gcm_gmult_neon ring_core_0_17_5_gcm_gmult_neon -#define gcm_init_avx ring_core_0_17_5_gcm_init_avx -#define gcm_init_clmul ring_core_0_17_5_gcm_init_clmul -#define gcm_init_neon ring_core_0_17_5_gcm_init_neon -#define k25519Precomp ring_core_0_17_5_k25519Precomp -#define limbs_mul_add_limb ring_core_0_17_5_limbs_mul_add_limb -#define little_endian_bytes_from_scalar ring_core_0_17_5_little_endian_bytes_from_scalar -#define ecp_nistz256_neg ring_core_0_17_5_ecp_nistz256_neg -#define ecp_nistz256_select_w5 ring_core_0_17_5_ecp_nistz256_select_w5 -#define ecp_nistz256_select_w7 ring_core_0_17_5_ecp_nistz256_select_w7 -#define p256_mul_mont ring_core_0_17_5_p256_mul_mont -#define p256_point_add ring_core_0_17_5_p256_point_add -#define p256_point_add_affine ring_core_0_17_5_p256_point_add_affine -#define p256_point_double ring_core_0_17_5_p256_point_double -#define p256_point_mul ring_core_0_17_5_p256_point_mul -#define p256_point_mul_base ring_core_0_17_5_p256_point_mul_base -#define p256_point_mul_base_vartime ring_core_0_17_5_p256_point_mul_base_vartime -#define p256_scalar_mul_mont ring_core_0_17_5_p256_scalar_mul_mont -#define p256_scalar_sqr_rep_mont ring_core_0_17_5_p256_scalar_sqr_rep_mont -#define p256_sqr_mont ring_core_0_17_5_p256_sqr_mont -#define p384_elem_div_by_2 ring_core_0_17_5_p384_elem_div_by_2 -#define p384_elem_mul_mont ring_core_0_17_5_p384_elem_mul_mont -#define p384_elem_neg ring_core_0_17_5_p384_elem_neg -#define p384_elem_sub ring_core_0_17_5_p384_elem_sub -#define p384_point_add ring_core_0_17_5_p384_point_add -#define p384_point_double ring_core_0_17_5_p384_point_double -#define p384_point_mul ring_core_0_17_5_p384_point_mul -#define p384_scalar_mul_mont ring_core_0_17_5_p384_scalar_mul_mont -#define openssl_poly1305_neon2_addmulmod ring_core_0_17_5_openssl_poly1305_neon2_addmulmod -#define openssl_poly1305_neon2_blocks ring_core_0_17_5_openssl_poly1305_neon2_blocks -#define sha256_block_data_order ring_core_0_17_5_sha256_block_data_order -#define sha512_block_data_order ring_core_0_17_5_sha512_block_data_order -#define vpaes_ctr32_encrypt_blocks ring_core_0_17_5_vpaes_ctr32_encrypt_blocks -#define vpaes_encrypt ring_core_0_17_5_vpaes_encrypt -#define vpaes_encrypt_key_to_bsaes ring_core_0_17_5_vpaes_encrypt_key_to_bsaes -#define vpaes_set_encrypt_key ring_core_0_17_5_vpaes_set_encrypt_key -#define x25519_NEON ring_core_0_17_5_x25519_NEON -#define x25519_fe_invert ring_core_0_17_5_x25519_fe_invert -#define x25519_fe_isnegative ring_core_0_17_5_x25519_fe_isnegative -#define x25519_fe_mul_ttt ring_core_0_17_5_x25519_fe_mul_ttt -#define x25519_fe_neg ring_core_0_17_5_x25519_fe_neg -#define x25519_fe_tobytes ring_core_0_17_5_x25519_fe_tobytes -#define x25519_ge_double_scalarmult_vartime ring_core_0_17_5_x25519_ge_double_scalarmult_vartime -#define x25519_ge_frombytes_vartime ring_core_0_17_5_x25519_ge_frombytes_vartime -#define x25519_ge_scalarmult_base ring_core_0_17_5_x25519_ge_scalarmult_base -#define x25519_ge_scalarmult_base_adx ring_core_0_17_5_x25519_ge_scalarmult_base_adx -#define x25519_public_from_private_generic_masked ring_core_0_17_5_x25519_public_from_private_generic_masked -#define x25519_sc_mask ring_core_0_17_5_x25519_sc_mask -#define x25519_sc_muladd ring_core_0_17_5_x25519_sc_muladd -#define x25519_sc_reduce ring_core_0_17_5_x25519_sc_reduce -#define x25519_scalar_mult_adx ring_core_0_17_5_x25519_scalar_mult_adx -#define x25519_scalar_mult_generic_masked ring_core_0_17_5_x25519_scalar_mult_generic_masked - -#endif diff --git a/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_asm.h b/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_asm.h deleted file mode 100644 index 84e4870915..0000000000 --- a/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_asm.h +++ /dev/null @@ -1,236 +0,0 @@ - -#ifndef ring_core_generated_PREFIX_SYMBOLS_ASM_H -#define ring_core_generated_PREFIX_SYMBOLS_ASM_H - -#if defined(__APPLE__) -#define _ecp_nistz256_point_double _p256_point_double -#define _ecp_nistz256_point_add _p256_point_add -#define _ecp_nistz256_point_add_affine _p256_point_add_affine -#define _ecp_nistz256_ord_mul_mont _p256_scalar_mul_mont -#define _ecp_nistz256_ord_sqr_mont _p256_scalar_sqr_rep_mont -#define _ecp_nistz256_mul_mont _p256_mul_mont -#define _ecp_nistz256_sqr_mont _p256_sqr_mont -#define _CRYPTO_memcmp _ring_core_0_17_5_CRYPTO_memcmp -#define _CRYPTO_poly1305_finish _ring_core_0_17_5_CRYPTO_poly1305_finish -#define _CRYPTO_poly1305_finish_neon _ring_core_0_17_5_CRYPTO_poly1305_finish_neon -#define _CRYPTO_poly1305_init _ring_core_0_17_5_CRYPTO_poly1305_init -#define _CRYPTO_poly1305_init_neon _ring_core_0_17_5_CRYPTO_poly1305_init_neon -#define _CRYPTO_poly1305_update _ring_core_0_17_5_CRYPTO_poly1305_update -#define _CRYPTO_poly1305_update_neon _ring_core_0_17_5_CRYPTO_poly1305_update_neon -#define _ChaCha20_ctr32 _ring_core_0_17_5_ChaCha20_ctr32 -#define _LIMBS_add_mod _ring_core_0_17_5_LIMBS_add_mod -#define _LIMBS_are_even _ring_core_0_17_5_LIMBS_are_even -#define _LIMBS_are_zero _ring_core_0_17_5_LIMBS_are_zero -#define _LIMBS_equal _ring_core_0_17_5_LIMBS_equal -#define _LIMBS_equal_limb _ring_core_0_17_5_LIMBS_equal_limb -#define _LIMBS_less_than _ring_core_0_17_5_LIMBS_less_than -#define _LIMBS_less_than_limb _ring_core_0_17_5_LIMBS_less_than_limb -#define _LIMBS_reduce_once _ring_core_0_17_5_LIMBS_reduce_once -#define _LIMBS_select_512_32 _ring_core_0_17_5_LIMBS_select_512_32 -#define _LIMBS_shl_mod _ring_core_0_17_5_LIMBS_shl_mod -#define _LIMBS_sub_mod _ring_core_0_17_5_LIMBS_sub_mod -#define _LIMBS_window5_split_window _ring_core_0_17_5_LIMBS_window5_split_window -#define _LIMBS_window5_unsplit_window _ring_core_0_17_5_LIMBS_window5_unsplit_window -#define _LIMB_shr _ring_core_0_17_5_LIMB_shr -#define _OPENSSL_armcap_P _ring_core_0_17_5_OPENSSL_armcap_P -#define _OPENSSL_cpuid_setup _ring_core_0_17_5_OPENSSL_cpuid_setup -#define _OPENSSL_ia32cap_P _ring_core_0_17_5_OPENSSL_ia32cap_P -#define _aes_hw_ctr32_encrypt_blocks _ring_core_0_17_5_aes_hw_ctr32_encrypt_blocks -#define _aes_hw_encrypt _ring_core_0_17_5_aes_hw_encrypt -#define _aes_hw_set_encrypt_key _ring_core_0_17_5_aes_hw_set_encrypt_key -#define _aes_nohw_ctr32_encrypt_blocks _ring_core_0_17_5_aes_nohw_ctr32_encrypt_blocks -#define _aes_nohw_encrypt _ring_core_0_17_5_aes_nohw_encrypt -#define _aes_nohw_set_encrypt_key _ring_core_0_17_5_aes_nohw_set_encrypt_key -#define _aesni_gcm_decrypt _ring_core_0_17_5_aesni_gcm_decrypt -#define _aesni_gcm_encrypt _ring_core_0_17_5_aesni_gcm_encrypt -#define _bn_from_montgomery_in_place _ring_core_0_17_5_bn_from_montgomery_in_place -#define _bn_gather5 _ring_core_0_17_5_bn_gather5 -#define _bn_mul_mont _ring_core_0_17_5_bn_mul_mont -#define _bn_mul_mont_gather5 _ring_core_0_17_5_bn_mul_mont_gather5 -#define _bn_neg_inv_mod_r_u64 _ring_core_0_17_5_bn_neg_inv_mod_r_u64 -#define _bn_power5 _ring_core_0_17_5_bn_power5 -#define _bn_scatter5 _ring_core_0_17_5_bn_scatter5 -#define _bn_sqr8x_internal _ring_core_0_17_5_bn_sqr8x_internal -#define _bn_sqrx8x_internal _ring_core_0_17_5_bn_sqrx8x_internal -#define _bsaes_ctr32_encrypt_blocks _ring_core_0_17_5_bsaes_ctr32_encrypt_blocks -#define _bssl_constant_time_test_conditional_memcpy _ring_core_0_17_5_bssl_constant_time_test_conditional_memcpy -#define _bssl_constant_time_test_conditional_memxor _ring_core_0_17_5_bssl_constant_time_test_conditional_memxor -#define _bssl_constant_time_test_main _ring_core_0_17_5_bssl_constant_time_test_main -#define _chacha20_poly1305_open _ring_core_0_17_5_chacha20_poly1305_open -#define _chacha20_poly1305_seal _ring_core_0_17_5_chacha20_poly1305_seal -#define _fiat_curve25519_adx_mul _ring_core_0_17_5_fiat_curve25519_adx_mul -#define _fiat_curve25519_adx_square _ring_core_0_17_5_fiat_curve25519_adx_square -#define _gcm_ghash_avx _ring_core_0_17_5_gcm_ghash_avx -#define _gcm_ghash_clmul _ring_core_0_17_5_gcm_ghash_clmul -#define _gcm_ghash_neon _ring_core_0_17_5_gcm_ghash_neon -#define _gcm_gmult_clmul _ring_core_0_17_5_gcm_gmult_clmul -#define _gcm_gmult_neon _ring_core_0_17_5_gcm_gmult_neon -#define _gcm_init_avx _ring_core_0_17_5_gcm_init_avx -#define _gcm_init_clmul _ring_core_0_17_5_gcm_init_clmul -#define _gcm_init_neon _ring_core_0_17_5_gcm_init_neon -#define _k25519Precomp _ring_core_0_17_5_k25519Precomp -#define _limbs_mul_add_limb _ring_core_0_17_5_limbs_mul_add_limb -#define _little_endian_bytes_from_scalar _ring_core_0_17_5_little_endian_bytes_from_scalar -#define _ecp_nistz256_neg _ring_core_0_17_5_ecp_nistz256_neg -#define _ecp_nistz256_select_w5 _ring_core_0_17_5_ecp_nistz256_select_w5 -#define _ecp_nistz256_select_w7 _ring_core_0_17_5_ecp_nistz256_select_w7 -#define _p256_mul_mont _ring_core_0_17_5_p256_mul_mont -#define _p256_point_add _ring_core_0_17_5_p256_point_add -#define _p256_point_add_affine _ring_core_0_17_5_p256_point_add_affine -#define _p256_point_double _ring_core_0_17_5_p256_point_double -#define _p256_point_mul _ring_core_0_17_5_p256_point_mul -#define _p256_point_mul_base _ring_core_0_17_5_p256_point_mul_base -#define _p256_point_mul_base_vartime _ring_core_0_17_5_p256_point_mul_base_vartime -#define _p256_scalar_mul_mont _ring_core_0_17_5_p256_scalar_mul_mont -#define _p256_scalar_sqr_rep_mont _ring_core_0_17_5_p256_scalar_sqr_rep_mont -#define _p256_sqr_mont _ring_core_0_17_5_p256_sqr_mont -#define _p384_elem_div_by_2 _ring_core_0_17_5_p384_elem_div_by_2 -#define _p384_elem_mul_mont _ring_core_0_17_5_p384_elem_mul_mont -#define _p384_elem_neg _ring_core_0_17_5_p384_elem_neg -#define _p384_elem_sub _ring_core_0_17_5_p384_elem_sub -#define _p384_point_add _ring_core_0_17_5_p384_point_add -#define _p384_point_double _ring_core_0_17_5_p384_point_double -#define _p384_point_mul _ring_core_0_17_5_p384_point_mul -#define _p384_scalar_mul_mont _ring_core_0_17_5_p384_scalar_mul_mont -#define _openssl_poly1305_neon2_addmulmod _ring_core_0_17_5_openssl_poly1305_neon2_addmulmod -#define _openssl_poly1305_neon2_blocks _ring_core_0_17_5_openssl_poly1305_neon2_blocks -#define _sha256_block_data_order _ring_core_0_17_5_sha256_block_data_order -#define _sha512_block_data_order _ring_core_0_17_5_sha512_block_data_order -#define _vpaes_ctr32_encrypt_blocks _ring_core_0_17_5_vpaes_ctr32_encrypt_blocks -#define _vpaes_encrypt _ring_core_0_17_5_vpaes_encrypt -#define _vpaes_encrypt_key_to_bsaes _ring_core_0_17_5_vpaes_encrypt_key_to_bsaes -#define _vpaes_set_encrypt_key _ring_core_0_17_5_vpaes_set_encrypt_key -#define _x25519_NEON _ring_core_0_17_5_x25519_NEON -#define _x25519_fe_invert _ring_core_0_17_5_x25519_fe_invert -#define _x25519_fe_isnegative _ring_core_0_17_5_x25519_fe_isnegative -#define _x25519_fe_mul_ttt _ring_core_0_17_5_x25519_fe_mul_ttt -#define _x25519_fe_neg _ring_core_0_17_5_x25519_fe_neg -#define _x25519_fe_tobytes _ring_core_0_17_5_x25519_fe_tobytes -#define _x25519_ge_double_scalarmult_vartime _ring_core_0_17_5_x25519_ge_double_scalarmult_vartime -#define _x25519_ge_frombytes_vartime _ring_core_0_17_5_x25519_ge_frombytes_vartime -#define _x25519_ge_scalarmult_base _ring_core_0_17_5_x25519_ge_scalarmult_base -#define _x25519_ge_scalarmult_base_adx _ring_core_0_17_5_x25519_ge_scalarmult_base_adx -#define _x25519_public_from_private_generic_masked _ring_core_0_17_5_x25519_public_from_private_generic_masked -#define _x25519_sc_mask _ring_core_0_17_5_x25519_sc_mask -#define _x25519_sc_muladd _ring_core_0_17_5_x25519_sc_muladd -#define _x25519_sc_reduce _ring_core_0_17_5_x25519_sc_reduce -#define _x25519_scalar_mult_adx _ring_core_0_17_5_x25519_scalar_mult_adx -#define _x25519_scalar_mult_generic_masked _ring_core_0_17_5_x25519_scalar_mult_generic_masked - -#else -#define ecp_nistz256_point_double p256_point_double -#define ecp_nistz256_point_add p256_point_add -#define ecp_nistz256_point_add_affine p256_point_add_affine -#define ecp_nistz256_ord_mul_mont p256_scalar_mul_mont -#define ecp_nistz256_ord_sqr_mont p256_scalar_sqr_rep_mont -#define ecp_nistz256_mul_mont p256_mul_mont -#define ecp_nistz256_sqr_mont p256_sqr_mont -#define CRYPTO_memcmp ring_core_0_17_5_CRYPTO_memcmp -#define CRYPTO_poly1305_finish ring_core_0_17_5_CRYPTO_poly1305_finish -#define CRYPTO_poly1305_finish_neon ring_core_0_17_5_CRYPTO_poly1305_finish_neon -#define CRYPTO_poly1305_init ring_core_0_17_5_CRYPTO_poly1305_init -#define CRYPTO_poly1305_init_neon ring_core_0_17_5_CRYPTO_poly1305_init_neon -#define CRYPTO_poly1305_update ring_core_0_17_5_CRYPTO_poly1305_update -#define CRYPTO_poly1305_update_neon ring_core_0_17_5_CRYPTO_poly1305_update_neon -#define ChaCha20_ctr32 ring_core_0_17_5_ChaCha20_ctr32 -#define LIMBS_add_mod ring_core_0_17_5_LIMBS_add_mod -#define LIMBS_are_even ring_core_0_17_5_LIMBS_are_even -#define LIMBS_are_zero ring_core_0_17_5_LIMBS_are_zero -#define LIMBS_equal ring_core_0_17_5_LIMBS_equal -#define LIMBS_equal_limb ring_core_0_17_5_LIMBS_equal_limb -#define LIMBS_less_than ring_core_0_17_5_LIMBS_less_than -#define LIMBS_less_than_limb ring_core_0_17_5_LIMBS_less_than_limb -#define LIMBS_reduce_once ring_core_0_17_5_LIMBS_reduce_once -#define LIMBS_select_512_32 ring_core_0_17_5_LIMBS_select_512_32 -#define LIMBS_shl_mod ring_core_0_17_5_LIMBS_shl_mod -#define LIMBS_sub_mod ring_core_0_17_5_LIMBS_sub_mod -#define LIMBS_window5_split_window ring_core_0_17_5_LIMBS_window5_split_window -#define LIMBS_window5_unsplit_window ring_core_0_17_5_LIMBS_window5_unsplit_window -#define LIMB_shr ring_core_0_17_5_LIMB_shr -#define OPENSSL_armcap_P ring_core_0_17_5_OPENSSL_armcap_P -#define OPENSSL_cpuid_setup ring_core_0_17_5_OPENSSL_cpuid_setup -#define OPENSSL_ia32cap_P ring_core_0_17_5_OPENSSL_ia32cap_P -#define aes_hw_ctr32_encrypt_blocks ring_core_0_17_5_aes_hw_ctr32_encrypt_blocks -#define aes_hw_encrypt ring_core_0_17_5_aes_hw_encrypt -#define aes_hw_set_encrypt_key ring_core_0_17_5_aes_hw_set_encrypt_key -#define aes_nohw_ctr32_encrypt_blocks ring_core_0_17_5_aes_nohw_ctr32_encrypt_blocks -#define aes_nohw_encrypt ring_core_0_17_5_aes_nohw_encrypt -#define aes_nohw_set_encrypt_key ring_core_0_17_5_aes_nohw_set_encrypt_key -#define aesni_gcm_decrypt ring_core_0_17_5_aesni_gcm_decrypt -#define aesni_gcm_encrypt ring_core_0_17_5_aesni_gcm_encrypt -#define bn_from_montgomery_in_place ring_core_0_17_5_bn_from_montgomery_in_place -#define bn_gather5 ring_core_0_17_5_bn_gather5 -#define bn_mul_mont ring_core_0_17_5_bn_mul_mont -#define bn_mul_mont_gather5 ring_core_0_17_5_bn_mul_mont_gather5 -#define bn_neg_inv_mod_r_u64 ring_core_0_17_5_bn_neg_inv_mod_r_u64 -#define bn_power5 ring_core_0_17_5_bn_power5 -#define bn_scatter5 ring_core_0_17_5_bn_scatter5 -#define bn_sqr8x_internal ring_core_0_17_5_bn_sqr8x_internal -#define bn_sqrx8x_internal ring_core_0_17_5_bn_sqrx8x_internal -#define bsaes_ctr32_encrypt_blocks ring_core_0_17_5_bsaes_ctr32_encrypt_blocks -#define bssl_constant_time_test_conditional_memcpy ring_core_0_17_5_bssl_constant_time_test_conditional_memcpy -#define bssl_constant_time_test_conditional_memxor ring_core_0_17_5_bssl_constant_time_test_conditional_memxor -#define bssl_constant_time_test_main ring_core_0_17_5_bssl_constant_time_test_main -#define chacha20_poly1305_open ring_core_0_17_5_chacha20_poly1305_open -#define chacha20_poly1305_seal ring_core_0_17_5_chacha20_poly1305_seal -#define fiat_curve25519_adx_mul ring_core_0_17_5_fiat_curve25519_adx_mul -#define fiat_curve25519_adx_square ring_core_0_17_5_fiat_curve25519_adx_square -#define gcm_ghash_avx ring_core_0_17_5_gcm_ghash_avx -#define gcm_ghash_clmul ring_core_0_17_5_gcm_ghash_clmul -#define gcm_ghash_neon ring_core_0_17_5_gcm_ghash_neon -#define gcm_gmult_clmul ring_core_0_17_5_gcm_gmult_clmul -#define gcm_gmult_neon ring_core_0_17_5_gcm_gmult_neon -#define gcm_init_avx ring_core_0_17_5_gcm_init_avx -#define gcm_init_clmul ring_core_0_17_5_gcm_init_clmul -#define gcm_init_neon ring_core_0_17_5_gcm_init_neon -#define k25519Precomp ring_core_0_17_5_k25519Precomp -#define limbs_mul_add_limb ring_core_0_17_5_limbs_mul_add_limb -#define little_endian_bytes_from_scalar ring_core_0_17_5_little_endian_bytes_from_scalar -#define ecp_nistz256_neg ring_core_0_17_5_ecp_nistz256_neg -#define ecp_nistz256_select_w5 ring_core_0_17_5_ecp_nistz256_select_w5 -#define ecp_nistz256_select_w7 ring_core_0_17_5_ecp_nistz256_select_w7 -#define p256_mul_mont ring_core_0_17_5_p256_mul_mont -#define p256_point_add ring_core_0_17_5_p256_point_add -#define p256_point_add_affine ring_core_0_17_5_p256_point_add_affine -#define p256_point_double ring_core_0_17_5_p256_point_double -#define p256_point_mul ring_core_0_17_5_p256_point_mul -#define p256_point_mul_base ring_core_0_17_5_p256_point_mul_base -#define p256_point_mul_base_vartime ring_core_0_17_5_p256_point_mul_base_vartime -#define p256_scalar_mul_mont ring_core_0_17_5_p256_scalar_mul_mont -#define p256_scalar_sqr_rep_mont ring_core_0_17_5_p256_scalar_sqr_rep_mont -#define p256_sqr_mont ring_core_0_17_5_p256_sqr_mont -#define p384_elem_div_by_2 ring_core_0_17_5_p384_elem_div_by_2 -#define p384_elem_mul_mont ring_core_0_17_5_p384_elem_mul_mont -#define p384_elem_neg ring_core_0_17_5_p384_elem_neg -#define p384_elem_sub ring_core_0_17_5_p384_elem_sub -#define p384_point_add ring_core_0_17_5_p384_point_add -#define p384_point_double ring_core_0_17_5_p384_point_double -#define p384_point_mul ring_core_0_17_5_p384_point_mul -#define p384_scalar_mul_mont ring_core_0_17_5_p384_scalar_mul_mont -#define openssl_poly1305_neon2_addmulmod ring_core_0_17_5_openssl_poly1305_neon2_addmulmod -#define openssl_poly1305_neon2_blocks ring_core_0_17_5_openssl_poly1305_neon2_blocks -#define sha256_block_data_order ring_core_0_17_5_sha256_block_data_order -#define sha512_block_data_order ring_core_0_17_5_sha512_block_data_order -#define vpaes_ctr32_encrypt_blocks ring_core_0_17_5_vpaes_ctr32_encrypt_blocks -#define vpaes_encrypt ring_core_0_17_5_vpaes_encrypt -#define vpaes_encrypt_key_to_bsaes ring_core_0_17_5_vpaes_encrypt_key_to_bsaes -#define vpaes_set_encrypt_key ring_core_0_17_5_vpaes_set_encrypt_key -#define x25519_NEON ring_core_0_17_5_x25519_NEON -#define x25519_fe_invert ring_core_0_17_5_x25519_fe_invert -#define x25519_fe_isnegative ring_core_0_17_5_x25519_fe_isnegative -#define x25519_fe_mul_ttt ring_core_0_17_5_x25519_fe_mul_ttt -#define x25519_fe_neg ring_core_0_17_5_x25519_fe_neg -#define x25519_fe_tobytes ring_core_0_17_5_x25519_fe_tobytes -#define x25519_ge_double_scalarmult_vartime ring_core_0_17_5_x25519_ge_double_scalarmult_vartime -#define x25519_ge_frombytes_vartime ring_core_0_17_5_x25519_ge_frombytes_vartime -#define x25519_ge_scalarmult_base ring_core_0_17_5_x25519_ge_scalarmult_base -#define x25519_ge_scalarmult_base_adx ring_core_0_17_5_x25519_ge_scalarmult_base_adx -#define x25519_public_from_private_generic_masked ring_core_0_17_5_x25519_public_from_private_generic_masked -#define x25519_sc_mask ring_core_0_17_5_x25519_sc_mask -#define x25519_sc_muladd ring_core_0_17_5_x25519_sc_muladd -#define x25519_sc_reduce ring_core_0_17_5_x25519_sc_reduce -#define x25519_scalar_mult_adx ring_core_0_17_5_x25519_scalar_mult_adx -#define x25519_scalar_mult_generic_masked ring_core_0_17_5_x25519_scalar_mult_generic_masked - -#endif -#endif diff --git a/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_nasm.inc b/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_nasm.inc deleted file mode 100644 index 50e986a6a6..0000000000 --- a/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_nasm.inc +++ /dev/null @@ -1,236 +0,0 @@ - -%ifndef ring_core_generated_PREFIX_SYMBOLS_NASM_INC -%define ring_core_generated_PREFIX_SYMBOLS_NASM_INC - -%ifidn __OUTPUT_FORMAT__,win32 -%define _ecp_nistz256_point_double _p256_point_double -%define _ecp_nistz256_point_add _p256_point_add -%define _ecp_nistz256_point_add_affine _p256_point_add_affine -%define _ecp_nistz256_ord_mul_mont _p256_scalar_mul_mont -%define _ecp_nistz256_ord_sqr_mont _p256_scalar_sqr_rep_mont -%define _ecp_nistz256_mul_mont _p256_mul_mont -%define _ecp_nistz256_sqr_mont _p256_sqr_mont -%define _CRYPTO_memcmp _ring_core_0_17_5_CRYPTO_memcmp -%define _CRYPTO_poly1305_finish _ring_core_0_17_5_CRYPTO_poly1305_finish -%define _CRYPTO_poly1305_finish_neon _ring_core_0_17_5_CRYPTO_poly1305_finish_neon -%define _CRYPTO_poly1305_init _ring_core_0_17_5_CRYPTO_poly1305_init -%define _CRYPTO_poly1305_init_neon _ring_core_0_17_5_CRYPTO_poly1305_init_neon -%define _CRYPTO_poly1305_update _ring_core_0_17_5_CRYPTO_poly1305_update -%define _CRYPTO_poly1305_update_neon _ring_core_0_17_5_CRYPTO_poly1305_update_neon -%define _ChaCha20_ctr32 _ring_core_0_17_5_ChaCha20_ctr32 -%define _LIMBS_add_mod _ring_core_0_17_5_LIMBS_add_mod -%define _LIMBS_are_even _ring_core_0_17_5_LIMBS_are_even -%define _LIMBS_are_zero _ring_core_0_17_5_LIMBS_are_zero -%define _LIMBS_equal _ring_core_0_17_5_LIMBS_equal -%define _LIMBS_equal_limb _ring_core_0_17_5_LIMBS_equal_limb -%define _LIMBS_less_than _ring_core_0_17_5_LIMBS_less_than -%define _LIMBS_less_than_limb _ring_core_0_17_5_LIMBS_less_than_limb -%define _LIMBS_reduce_once _ring_core_0_17_5_LIMBS_reduce_once -%define _LIMBS_select_512_32 _ring_core_0_17_5_LIMBS_select_512_32 -%define _LIMBS_shl_mod _ring_core_0_17_5_LIMBS_shl_mod -%define _LIMBS_sub_mod _ring_core_0_17_5_LIMBS_sub_mod -%define _LIMBS_window5_split_window _ring_core_0_17_5_LIMBS_window5_split_window -%define _LIMBS_window5_unsplit_window _ring_core_0_17_5_LIMBS_window5_unsplit_window -%define _LIMB_shr _ring_core_0_17_5_LIMB_shr -%define _OPENSSL_armcap_P _ring_core_0_17_5_OPENSSL_armcap_P -%define _OPENSSL_cpuid_setup _ring_core_0_17_5_OPENSSL_cpuid_setup -%define _OPENSSL_ia32cap_P _ring_core_0_17_5_OPENSSL_ia32cap_P -%define _aes_hw_ctr32_encrypt_blocks _ring_core_0_17_5_aes_hw_ctr32_encrypt_blocks -%define _aes_hw_encrypt _ring_core_0_17_5_aes_hw_encrypt -%define _aes_hw_set_encrypt_key _ring_core_0_17_5_aes_hw_set_encrypt_key -%define _aes_nohw_ctr32_encrypt_blocks _ring_core_0_17_5_aes_nohw_ctr32_encrypt_blocks -%define _aes_nohw_encrypt _ring_core_0_17_5_aes_nohw_encrypt -%define _aes_nohw_set_encrypt_key _ring_core_0_17_5_aes_nohw_set_encrypt_key -%define _aesni_gcm_decrypt _ring_core_0_17_5_aesni_gcm_decrypt -%define _aesni_gcm_encrypt _ring_core_0_17_5_aesni_gcm_encrypt -%define _bn_from_montgomery_in_place _ring_core_0_17_5_bn_from_montgomery_in_place -%define _bn_gather5 _ring_core_0_17_5_bn_gather5 -%define _bn_mul_mont _ring_core_0_17_5_bn_mul_mont -%define _bn_mul_mont_gather5 _ring_core_0_17_5_bn_mul_mont_gather5 -%define _bn_neg_inv_mod_r_u64 _ring_core_0_17_5_bn_neg_inv_mod_r_u64 -%define _bn_power5 _ring_core_0_17_5_bn_power5 -%define _bn_scatter5 _ring_core_0_17_5_bn_scatter5 -%define _bn_sqr8x_internal _ring_core_0_17_5_bn_sqr8x_internal -%define _bn_sqrx8x_internal _ring_core_0_17_5_bn_sqrx8x_internal -%define _bsaes_ctr32_encrypt_blocks _ring_core_0_17_5_bsaes_ctr32_encrypt_blocks -%define _bssl_constant_time_test_conditional_memcpy _ring_core_0_17_5_bssl_constant_time_test_conditional_memcpy -%define _bssl_constant_time_test_conditional_memxor _ring_core_0_17_5_bssl_constant_time_test_conditional_memxor -%define _bssl_constant_time_test_main _ring_core_0_17_5_bssl_constant_time_test_main -%define _chacha20_poly1305_open _ring_core_0_17_5_chacha20_poly1305_open -%define _chacha20_poly1305_seal _ring_core_0_17_5_chacha20_poly1305_seal -%define _fiat_curve25519_adx_mul _ring_core_0_17_5_fiat_curve25519_adx_mul -%define _fiat_curve25519_adx_square _ring_core_0_17_5_fiat_curve25519_adx_square -%define _gcm_ghash_avx _ring_core_0_17_5_gcm_ghash_avx -%define _gcm_ghash_clmul _ring_core_0_17_5_gcm_ghash_clmul -%define _gcm_ghash_neon _ring_core_0_17_5_gcm_ghash_neon -%define _gcm_gmult_clmul _ring_core_0_17_5_gcm_gmult_clmul -%define _gcm_gmult_neon _ring_core_0_17_5_gcm_gmult_neon -%define _gcm_init_avx _ring_core_0_17_5_gcm_init_avx -%define _gcm_init_clmul _ring_core_0_17_5_gcm_init_clmul -%define _gcm_init_neon _ring_core_0_17_5_gcm_init_neon -%define _k25519Precomp _ring_core_0_17_5_k25519Precomp -%define _limbs_mul_add_limb _ring_core_0_17_5_limbs_mul_add_limb -%define _little_endian_bytes_from_scalar _ring_core_0_17_5_little_endian_bytes_from_scalar -%define _ecp_nistz256_neg _ring_core_0_17_5_ecp_nistz256_neg -%define _ecp_nistz256_select_w5 _ring_core_0_17_5_ecp_nistz256_select_w5 -%define _ecp_nistz256_select_w7 _ring_core_0_17_5_ecp_nistz256_select_w7 -%define _p256_mul_mont _ring_core_0_17_5_p256_mul_mont -%define _p256_point_add _ring_core_0_17_5_p256_point_add -%define _p256_point_add_affine _ring_core_0_17_5_p256_point_add_affine -%define _p256_point_double _ring_core_0_17_5_p256_point_double -%define _p256_point_mul _ring_core_0_17_5_p256_point_mul -%define _p256_point_mul_base _ring_core_0_17_5_p256_point_mul_base -%define _p256_point_mul_base_vartime _ring_core_0_17_5_p256_point_mul_base_vartime -%define _p256_scalar_mul_mont _ring_core_0_17_5_p256_scalar_mul_mont -%define _p256_scalar_sqr_rep_mont _ring_core_0_17_5_p256_scalar_sqr_rep_mont -%define _p256_sqr_mont _ring_core_0_17_5_p256_sqr_mont -%define _p384_elem_div_by_2 _ring_core_0_17_5_p384_elem_div_by_2 -%define _p384_elem_mul_mont _ring_core_0_17_5_p384_elem_mul_mont -%define _p384_elem_neg _ring_core_0_17_5_p384_elem_neg -%define _p384_elem_sub _ring_core_0_17_5_p384_elem_sub -%define _p384_point_add _ring_core_0_17_5_p384_point_add -%define _p384_point_double _ring_core_0_17_5_p384_point_double -%define _p384_point_mul _ring_core_0_17_5_p384_point_mul -%define _p384_scalar_mul_mont _ring_core_0_17_5_p384_scalar_mul_mont -%define _openssl_poly1305_neon2_addmulmod _ring_core_0_17_5_openssl_poly1305_neon2_addmulmod -%define _openssl_poly1305_neon2_blocks _ring_core_0_17_5_openssl_poly1305_neon2_blocks -%define _sha256_block_data_order _ring_core_0_17_5_sha256_block_data_order -%define _sha512_block_data_order _ring_core_0_17_5_sha512_block_data_order -%define _vpaes_ctr32_encrypt_blocks _ring_core_0_17_5_vpaes_ctr32_encrypt_blocks -%define _vpaes_encrypt _ring_core_0_17_5_vpaes_encrypt -%define _vpaes_encrypt_key_to_bsaes _ring_core_0_17_5_vpaes_encrypt_key_to_bsaes -%define _vpaes_set_encrypt_key _ring_core_0_17_5_vpaes_set_encrypt_key -%define _x25519_NEON _ring_core_0_17_5_x25519_NEON -%define _x25519_fe_invert _ring_core_0_17_5_x25519_fe_invert -%define _x25519_fe_isnegative _ring_core_0_17_5_x25519_fe_isnegative -%define _x25519_fe_mul_ttt _ring_core_0_17_5_x25519_fe_mul_ttt -%define _x25519_fe_neg _ring_core_0_17_5_x25519_fe_neg -%define _x25519_fe_tobytes _ring_core_0_17_5_x25519_fe_tobytes -%define _x25519_ge_double_scalarmult_vartime _ring_core_0_17_5_x25519_ge_double_scalarmult_vartime -%define _x25519_ge_frombytes_vartime _ring_core_0_17_5_x25519_ge_frombytes_vartime -%define _x25519_ge_scalarmult_base _ring_core_0_17_5_x25519_ge_scalarmult_base -%define _x25519_ge_scalarmult_base_adx _ring_core_0_17_5_x25519_ge_scalarmult_base_adx -%define _x25519_public_from_private_generic_masked _ring_core_0_17_5_x25519_public_from_private_generic_masked -%define _x25519_sc_mask _ring_core_0_17_5_x25519_sc_mask -%define _x25519_sc_muladd _ring_core_0_17_5_x25519_sc_muladd -%define _x25519_sc_reduce _ring_core_0_17_5_x25519_sc_reduce -%define _x25519_scalar_mult_adx _ring_core_0_17_5_x25519_scalar_mult_adx -%define _x25519_scalar_mult_generic_masked _ring_core_0_17_5_x25519_scalar_mult_generic_masked - -%else -%define ecp_nistz256_point_double p256_point_double -%define ecp_nistz256_point_add p256_point_add -%define ecp_nistz256_point_add_affine p256_point_add_affine -%define ecp_nistz256_ord_mul_mont p256_scalar_mul_mont -%define ecp_nistz256_ord_sqr_mont p256_scalar_sqr_rep_mont -%define ecp_nistz256_mul_mont p256_mul_mont -%define ecp_nistz256_sqr_mont p256_sqr_mont -%define CRYPTO_memcmp ring_core_0_17_5_CRYPTO_memcmp -%define CRYPTO_poly1305_finish ring_core_0_17_5_CRYPTO_poly1305_finish -%define CRYPTO_poly1305_finish_neon ring_core_0_17_5_CRYPTO_poly1305_finish_neon -%define CRYPTO_poly1305_init ring_core_0_17_5_CRYPTO_poly1305_init -%define CRYPTO_poly1305_init_neon ring_core_0_17_5_CRYPTO_poly1305_init_neon -%define CRYPTO_poly1305_update ring_core_0_17_5_CRYPTO_poly1305_update -%define CRYPTO_poly1305_update_neon ring_core_0_17_5_CRYPTO_poly1305_update_neon -%define ChaCha20_ctr32 ring_core_0_17_5_ChaCha20_ctr32 -%define LIMBS_add_mod ring_core_0_17_5_LIMBS_add_mod -%define LIMBS_are_even ring_core_0_17_5_LIMBS_are_even -%define LIMBS_are_zero ring_core_0_17_5_LIMBS_are_zero -%define LIMBS_equal ring_core_0_17_5_LIMBS_equal -%define LIMBS_equal_limb ring_core_0_17_5_LIMBS_equal_limb -%define LIMBS_less_than ring_core_0_17_5_LIMBS_less_than -%define LIMBS_less_than_limb ring_core_0_17_5_LIMBS_less_than_limb -%define LIMBS_reduce_once ring_core_0_17_5_LIMBS_reduce_once -%define LIMBS_select_512_32 ring_core_0_17_5_LIMBS_select_512_32 -%define LIMBS_shl_mod ring_core_0_17_5_LIMBS_shl_mod -%define LIMBS_sub_mod ring_core_0_17_5_LIMBS_sub_mod -%define LIMBS_window5_split_window ring_core_0_17_5_LIMBS_window5_split_window -%define LIMBS_window5_unsplit_window ring_core_0_17_5_LIMBS_window5_unsplit_window -%define LIMB_shr ring_core_0_17_5_LIMB_shr -%define OPENSSL_armcap_P ring_core_0_17_5_OPENSSL_armcap_P -%define OPENSSL_cpuid_setup ring_core_0_17_5_OPENSSL_cpuid_setup -%define OPENSSL_ia32cap_P ring_core_0_17_5_OPENSSL_ia32cap_P -%define aes_hw_ctr32_encrypt_blocks ring_core_0_17_5_aes_hw_ctr32_encrypt_blocks -%define aes_hw_encrypt ring_core_0_17_5_aes_hw_encrypt -%define aes_hw_set_encrypt_key ring_core_0_17_5_aes_hw_set_encrypt_key -%define aes_nohw_ctr32_encrypt_blocks ring_core_0_17_5_aes_nohw_ctr32_encrypt_blocks -%define aes_nohw_encrypt ring_core_0_17_5_aes_nohw_encrypt -%define aes_nohw_set_encrypt_key ring_core_0_17_5_aes_nohw_set_encrypt_key -%define aesni_gcm_decrypt ring_core_0_17_5_aesni_gcm_decrypt -%define aesni_gcm_encrypt ring_core_0_17_5_aesni_gcm_encrypt -%define bn_from_montgomery_in_place ring_core_0_17_5_bn_from_montgomery_in_place -%define bn_gather5 ring_core_0_17_5_bn_gather5 -%define bn_mul_mont ring_core_0_17_5_bn_mul_mont -%define bn_mul_mont_gather5 ring_core_0_17_5_bn_mul_mont_gather5 -%define bn_neg_inv_mod_r_u64 ring_core_0_17_5_bn_neg_inv_mod_r_u64 -%define bn_power5 ring_core_0_17_5_bn_power5 -%define bn_scatter5 ring_core_0_17_5_bn_scatter5 -%define bn_sqr8x_internal ring_core_0_17_5_bn_sqr8x_internal -%define bn_sqrx8x_internal ring_core_0_17_5_bn_sqrx8x_internal -%define bsaes_ctr32_encrypt_blocks ring_core_0_17_5_bsaes_ctr32_encrypt_blocks -%define bssl_constant_time_test_conditional_memcpy ring_core_0_17_5_bssl_constant_time_test_conditional_memcpy -%define bssl_constant_time_test_conditional_memxor ring_core_0_17_5_bssl_constant_time_test_conditional_memxor -%define bssl_constant_time_test_main ring_core_0_17_5_bssl_constant_time_test_main -%define chacha20_poly1305_open ring_core_0_17_5_chacha20_poly1305_open -%define chacha20_poly1305_seal ring_core_0_17_5_chacha20_poly1305_seal -%define fiat_curve25519_adx_mul ring_core_0_17_5_fiat_curve25519_adx_mul -%define fiat_curve25519_adx_square ring_core_0_17_5_fiat_curve25519_adx_square -%define gcm_ghash_avx ring_core_0_17_5_gcm_ghash_avx -%define gcm_ghash_clmul ring_core_0_17_5_gcm_ghash_clmul -%define gcm_ghash_neon ring_core_0_17_5_gcm_ghash_neon -%define gcm_gmult_clmul ring_core_0_17_5_gcm_gmult_clmul -%define gcm_gmult_neon ring_core_0_17_5_gcm_gmult_neon -%define gcm_init_avx ring_core_0_17_5_gcm_init_avx -%define gcm_init_clmul ring_core_0_17_5_gcm_init_clmul -%define gcm_init_neon ring_core_0_17_5_gcm_init_neon -%define k25519Precomp ring_core_0_17_5_k25519Precomp -%define limbs_mul_add_limb ring_core_0_17_5_limbs_mul_add_limb -%define little_endian_bytes_from_scalar ring_core_0_17_5_little_endian_bytes_from_scalar -%define ecp_nistz256_neg ring_core_0_17_5_ecp_nistz256_neg -%define ecp_nistz256_select_w5 ring_core_0_17_5_ecp_nistz256_select_w5 -%define ecp_nistz256_select_w7 ring_core_0_17_5_ecp_nistz256_select_w7 -%define p256_mul_mont ring_core_0_17_5_p256_mul_mont -%define p256_point_add ring_core_0_17_5_p256_point_add -%define p256_point_add_affine ring_core_0_17_5_p256_point_add_affine -%define p256_point_double ring_core_0_17_5_p256_point_double -%define p256_point_mul ring_core_0_17_5_p256_point_mul -%define p256_point_mul_base ring_core_0_17_5_p256_point_mul_base -%define p256_point_mul_base_vartime ring_core_0_17_5_p256_point_mul_base_vartime -%define p256_scalar_mul_mont ring_core_0_17_5_p256_scalar_mul_mont -%define p256_scalar_sqr_rep_mont ring_core_0_17_5_p256_scalar_sqr_rep_mont -%define p256_sqr_mont ring_core_0_17_5_p256_sqr_mont -%define p384_elem_div_by_2 ring_core_0_17_5_p384_elem_div_by_2 -%define p384_elem_mul_mont ring_core_0_17_5_p384_elem_mul_mont -%define p384_elem_neg ring_core_0_17_5_p384_elem_neg -%define p384_elem_sub ring_core_0_17_5_p384_elem_sub -%define p384_point_add ring_core_0_17_5_p384_point_add -%define p384_point_double ring_core_0_17_5_p384_point_double -%define p384_point_mul ring_core_0_17_5_p384_point_mul -%define p384_scalar_mul_mont ring_core_0_17_5_p384_scalar_mul_mont -%define openssl_poly1305_neon2_addmulmod ring_core_0_17_5_openssl_poly1305_neon2_addmulmod -%define openssl_poly1305_neon2_blocks ring_core_0_17_5_openssl_poly1305_neon2_blocks -%define sha256_block_data_order ring_core_0_17_5_sha256_block_data_order -%define sha512_block_data_order ring_core_0_17_5_sha512_block_data_order -%define vpaes_ctr32_encrypt_blocks ring_core_0_17_5_vpaes_ctr32_encrypt_blocks -%define vpaes_encrypt ring_core_0_17_5_vpaes_encrypt -%define vpaes_encrypt_key_to_bsaes ring_core_0_17_5_vpaes_encrypt_key_to_bsaes -%define vpaes_set_encrypt_key ring_core_0_17_5_vpaes_set_encrypt_key -%define x25519_NEON ring_core_0_17_5_x25519_NEON -%define x25519_fe_invert ring_core_0_17_5_x25519_fe_invert -%define x25519_fe_isnegative ring_core_0_17_5_x25519_fe_isnegative -%define x25519_fe_mul_ttt ring_core_0_17_5_x25519_fe_mul_ttt -%define x25519_fe_neg ring_core_0_17_5_x25519_fe_neg -%define x25519_fe_tobytes ring_core_0_17_5_x25519_fe_tobytes -%define x25519_ge_double_scalarmult_vartime ring_core_0_17_5_x25519_ge_double_scalarmult_vartime -%define x25519_ge_frombytes_vartime ring_core_0_17_5_x25519_ge_frombytes_vartime -%define x25519_ge_scalarmult_base ring_core_0_17_5_x25519_ge_scalarmult_base -%define x25519_ge_scalarmult_base_adx ring_core_0_17_5_x25519_ge_scalarmult_base_adx -%define x25519_public_from_private_generic_masked ring_core_0_17_5_x25519_public_from_private_generic_masked -%define x25519_sc_mask ring_core_0_17_5_x25519_sc_mask -%define x25519_sc_muladd ring_core_0_17_5_x25519_sc_muladd -%define x25519_sc_reduce ring_core_0_17_5_x25519_sc_reduce -%define x25519_scalar_mult_adx ring_core_0_17_5_x25519_scalar_mult_adx -%define x25519_scalar_mult_generic_masked ring_core_0_17_5_x25519_scalar_mult_generic_masked - -%endif -%endif diff --git a/shim/third-party/rust/fixups/rustix/fixups.toml b/shim/third-party/rust/fixups/rustix/fixups.toml deleted file mode 100644 index 5e026f75e0..0000000000 --- a/shim/third-party/rust/fixups/rustix/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/rustls/fixups.toml b/shim/third-party/rust/fixups/rustls/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/rustls/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/rustversion/fixups.toml b/shim/third-party/rust/fixups/rustversion/fixups.toml deleted file mode 100644 index ac9ebfb4af..0000000000 --- a/shim/third-party/rust/fixups/rustversion/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/serde/fixups.toml b/shim/third-party/rust/fixups/serde/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/serde/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/serde_derive/fixups.toml b/shim/third-party/rust/fixups/serde_derive/fixups.toml deleted file mode 100644 index 7de4ebb3e1..0000000000 --- a/shim/third-party/rust/fixups/serde_derive/fixups.toml +++ /dev/null @@ -1,3 +0,0 @@ -# To set `CARGO_MANIFEST_DIR` -cargo_env = true -buildscript = [] diff --git a/shim/third-party/rust/fixups/serde_json/fixups.toml b/shim/third-party/rust/fixups/serde_json/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/serde_json/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/signal-hook/fixups.toml b/shim/third-party/rust/fixups/signal-hook/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/signal-hook/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/slab/fixups.toml b/shim/third-party/rust/fixups/slab/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/slab/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/slog/fixups.toml b/shim/third-party/rust/fixups/slog/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/slog/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/syn/fixups.toml b/shim/third-party/rust/fixups/syn/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/syn/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/sys-info/fixups.toml b/shim/third-party/rust/fixups/sys-info/fixups.toml deleted file mode 100644 index 5d124b3ad7..0000000000 --- a/shim/third-party/rust/fixups/sys-info/fixups.toml +++ /dev/null @@ -1,19 +0,0 @@ -buildscript = [] - -[[platform_fixup.'cfg(target_os = "linux")'.buildscript]] -[platform_fixup.'cfg(target_os = "linux")'.buildscript.cxx_library] -name = "linux" -srcs = ["c/linux.c"] -headers = ["c/*.h"] - -[[platform_fixup.'cfg(target_os = "macos")'.buildscript]] -[platform_fixup.'cfg(target_os = "macos")'.buildscript.cxx_library] -name = "macos" -srcs = ["c/darwin.c"] -headers = ["c/*.h"] - -[[platform_fixup.'cfg(target_os = "windows")'.buildscript]] -[platform_fixup.'cfg(target_os = "windows")'.buildscript.cxx_library] -name = "windows" -srcs = ["c/windows.c"] -headers = ["c/*.h"] diff --git a/shim/third-party/rust/fixups/sysinfo/fixups.toml b/shim/third-party/rust/fixups/sysinfo/fixups.toml deleted file mode 100644 index 8518b18970..0000000000 --- a/shim/third-party/rust/fixups/sysinfo/fixups.toml +++ /dev/null @@ -1,11 +0,0 @@ -extra_srcs = ["README.md", "md_doc/**/*.md"] -buildscript = [] - -[platform_fixup.'cfg(target_os = "macos")'] -buildscript = [] -rustc_flags = [ - "-lframework=IOKit", - "-lframework=Foundation", - "-lframework=CoreFoundation", - "-lframework=DiskArbitration", -] diff --git a/shim/third-party/rust/fixups/tempfile/fixups.toml b/shim/third-party/rust/fixups/tempfile/fixups.toml deleted file mode 100644 index 5e026f75e0..0000000000 --- a/shim/third-party/rust/fixups/tempfile/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/terminfo/fixups.toml b/shim/third-party/rust/fixups/terminfo/fixups.toml deleted file mode 100644 index ac9ebfb4af..0000000000 --- a/shim/third-party/rust/fixups/terminfo/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/termwiz/fixups.toml b/shim/third-party/rust/fixups/termwiz/fixups.toml deleted file mode 100644 index fdba1eb21b..0000000000 --- a/shim/third-party/rust/fixups/termwiz/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -cargo_env = true -extra_srcs = ["src/**/*.pest"] diff --git a/shim/third-party/rust/fixups/test-case/fixups.toml b/shim/third-party/rust/fixups/test-case/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/test-case/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/thiserror/fixups.toml b/shim/third-party/rust/fixups/thiserror/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/thiserror/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/tiny-keccak/fixups.toml b/shim/third-party/rust/fixups/tiny-keccak/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/tiny-keccak/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/tokio-stream/fixups.toml b/shim/third-party/rust/fixups/tokio-stream/fixups.toml deleted file mode 100644 index a1f4f0e709..0000000000 --- a/shim/third-party/rust/fixups/tokio-stream/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -# reindeer cannot see through `cfg_sync!` macros and the like -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/tokio-util/fixups.toml b/shim/third-party/rust/fixups/tokio-util/fixups.toml deleted file mode 100644 index af7edb27e3..0000000000 --- a/shim/third-party/rust/fixups/tokio-util/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/tokio/fixups.toml b/shim/third-party/rust/fixups/tokio/fixups.toml deleted file mode 100644 index d69dcefddb..0000000000 --- a/shim/third-party/rust/fixups/tokio/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -cfgs = ["tokio_unstable", "tokio_track_caller"] - -extra_srcs = ["src/**/*.rs"] - -buildscript = [] -features = ["tokio_track_caller"] - -extra_deps = [ ":tracing" ] diff --git a/shim/third-party/rust/fixups/tonic/fixups.toml b/shim/third-party/rust/fixups/tonic/fixups.toml deleted file mode 100644 index 41439d3356..0000000000 --- a/shim/third-party/rust/fixups/tonic/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -cargo_env = true diff --git a/shim/third-party/rust/fixups/tracing-subscriber/fixups.toml b/shim/third-party/rust/fixups/tracing-subscriber/fixups.toml deleted file mode 100644 index 28683dbe3c..0000000000 --- a/shim/third-party/rust/fixups/tracing-subscriber/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -# Reindeer can't find the dependencies due to being confused by the feature! macro. -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/trybuild/fixups.toml b/shim/third-party/rust/fixups/trybuild/fixups.toml deleted file mode 100644 index ac9ebfb4af..0000000000 --- a/shim/third-party/rust/fixups/trybuild/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/typenum/fixups.toml b/shim/third-party/rust/fixups/typenum/fixups.toml deleted file mode 100644 index 7ab02e4fd1..0000000000 --- a/shim/third-party/rust/fixups/typenum/fixups.toml +++ /dev/null @@ -1,4 +0,0 @@ -features = ["force_unix_path_separator"] - -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/unicase/fixups.toml b/shim/third-party/rust/fixups/unicase/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/unicase/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/winapi-x86_64-pc-windows-gnu/fixups.toml b/shim/third-party/rust/fixups/winapi-x86_64-pc-windows-gnu/fixups.toml deleted file mode 100644 index 07c79834d9..0000000000 --- a/shim/third-party/rust/fixups/winapi-x86_64-pc-windows-gnu/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -buildscript = [] - -[[platform_fixup.'cfg(target_os = "windows")'.buildscript]] -[platform_fixup.'cfg(target_os = "windows")'.buildscript.prebuilt_cxx_library] -name = "extra_libraries" -# The static_libs this crate provides overlaps quite heavily with those in a default -# MinGW install, and there are also many that are DirectX specific. -# We list only those we actually need, since the others are more likely to cause problems. -static_libs = ["lib/libwinapi_ole32.a", "lib/libwinapi_shell32.a"] diff --git a/shim/third-party/rust/fixups/winapi/fixups.toml b/shim/third-party/rust/fixups/winapi/fixups.toml deleted file mode 100644 index ec4f86e500..0000000000 --- a/shim/third-party/rust/fixups/winapi/fixups.toml +++ /dev/null @@ -1,4 +0,0 @@ -buildscript = [] - -[[platform_fixup.'cfg(target_os = "windows")'.buildscript]] -[platform_fixup.'cfg(target_os = "windows")'.buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/windows-targets/fixups.toml b/shim/third-party/rust/fixups/windows-targets/fixups.toml deleted file mode 100644 index b3555c7795..0000000000 --- a/shim/third-party/rust/fixups/windows-targets/fixups.toml +++ /dev/null @@ -1,3 +0,0 @@ -[platform_fixup.'cfg(any(target_os = "windows", target_os = "linux"))'] -version = ">=0.48.0" -cfgs = ["windows_raw_dylib"] diff --git a/shim/third-party/rust/fixups/windows_aarch64_gnullvm/fixups.toml b/shim/third-party/rust/fixups/windows_aarch64_gnullvm/fixups.toml deleted file mode 100644 index f40e9f9cbe..0000000000 --- a/shim/third-party/rust/fixups/windows_aarch64_gnullvm/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "linux", target_arch = "aarch64"))'] -version = "=0.48.0" -[[platform_fixup.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.buildscript]] -[platform_fixup.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.buildscript.prebuilt_cxx_library] -name = "libwindows" -static_libs = ["lib/libwindows.0.48.0.a"] diff --git a/shim/third-party/rust/fixups/windows_x86_64_gnu/fixups.toml b/shim/third-party/rust/fixups/windows_x86_64_gnu/fixups.toml deleted file mode 100644 index b25e7f05fa..0000000000 --- a/shim/third-party/rust/fixups/windows_x86_64_gnu/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "windows", target_env = "gnu"))'] -version = "=0.48.0" -[[platform_fixup.'cfg(all(target_os = "windows", target_env = "gnu"))'.buildscript]] -[platform_fixup.'cfg(all(target_os = "windows", target_env = "gnu"))'.buildscript.prebuilt_cxx_library] -name = "libwindows" -static_libs = ["lib/libwindows.0.48.0.a"] diff --git a/shim/third-party/rust/fixups/windows_x86_64_gnullvm/fixups.toml b/shim/third-party/rust/fixups/windows_x86_64_gnullvm/fixups.toml deleted file mode 100644 index a5579b6930..0000000000 --- a/shim/third-party/rust/fixups/windows_x86_64_gnullvm/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "linux", target_arch = "x86_64"))'] -version = "=0.48.0" -[[platform_fixup.'cfg(all(target_os = "linux", target_arch = "x86_64"))'.buildscript]] -[platform_fixup.'cfg(all(target_os = "linux", target_arch = "x86_64"))'.buildscript.prebuilt_cxx_library] -name = "libwindows" -static_libs = ["lib/libwindows.0.48.0.a"] diff --git a/shim/third-party/rust/fixups/windows_x86_64_msvc/fixups.toml b/shim/third-party/rust/fixups/windows_x86_64_msvc/fixups.toml deleted file mode 100644 index 8e8dea3516..0000000000 --- a/shim/third-party/rust/fixups/windows_x86_64_msvc/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'] -version = "=0.48.0" -[[platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'.buildscript]] -[platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'.buildscript.prebuilt_cxx_library] -name = "windows" -static_libs = ["lib/windows.0.48.0.lib"] diff --git a/shim/third-party/rust/fixups/winreg/fixups.toml b/shim/third-party/rust/fixups/winreg/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/winreg/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/zerocopy/fixups.toml b/shim/third-party/rust/fixups/zerocopy/fixups.toml deleted file mode 100644 index 41439d3356..0000000000 --- a/shim/third-party/rust/fixups/zerocopy/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -cargo_env = true diff --git a/shim/third-party/rust/fixups/zstd-safe/fixups.toml b/shim/third-party/rust/fixups/zstd-safe/fixups.toml deleted file mode 100644 index db40d72cb2..0000000000 --- a/shim/third-party/rust/fixups/zstd-safe/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/zstd-sys/fixups.toml b/shim/third-party/rust/fixups/zstd-sys/fixups.toml deleted file mode 100644 index 164b6a7237..0000000000 --- a/shim/third-party/rust/fixups/zstd-sys/fixups.toml +++ /dev/null @@ -1,114 +0,0 @@ -buildscript = [] - -[[platform_fixup.'cfg(not(all(target_os = "windows", target_env = "msvc")))'.buildscript]] -[platform_fixup.'cfg(not(all(target_os = "windows", target_env = "msvc")))'.buildscript.cxx_library] -name = "zstd" -srcs = [ - "zstd/lib/common/debug.c", - "zstd/lib/common/entropy_common.c", - "zstd/lib/common/error_private.c", - "zstd/lib/common/fse_decompress.c", - "zstd/lib/common/pool.c", - "zstd/lib/common/threading.c", - #"zstd/lib/common/xxhash.c", - "zstd/lib/common/zstd_common.c", - "zstd/lib/compress/**/*.c", - "zstd/lib/decompress/**/*.c", - "zstd/lib/decompress/huf_decompress_amd64.S", - "zstd/lib/dictBuilder/**/*.c", - "zstd/lib/legacy/**/*.c", -] -headers = [ - "zdict.h", - "zstd.h", - "zstd/lib/common/bitstream.h", - "zstd/lib/common/compiler.h", - "zstd/lib/common/cpu.h", - "zstd/lib/common/debug.h", - "zstd/lib/common/error_private.h", - "zstd/lib/common/fse.h", - "zstd/lib/common/huf.h", - "zstd/lib/common/mem.h", - "zstd/lib/common/pool.h", - "zstd/lib/common/portability_macros.h", - "zstd/lib/common/threading.h", - #"zstd/lib/common/xxhash.h", - "zstd/lib/common/zstd_deps.h", - "zstd/lib/common/zstd_internal.h", - "zstd/lib/common/zstd_trace.h", - "zstd/lib/compress/**/*.h", - "zstd/lib/decompress/**/*.h", - "zstd/lib/deprecated/zbuff.h", - "zstd/lib/dictBuilder/cover.h", - "zstd/lib/dictBuilder/divsufsort.h", - "zstd/lib/legacy/**/*.h", - "zstd/lib/zdict.h", - "zstd/lib/zstd_errors.h", - "zstd/lib/zstd.h", -] -compiler_flags = [ - "-O3", - "-DZSTD_LIB_DEPRECATED=0", - "-fvisibility=hidden", - "-DXXH_PRIVATE_API=", - "-DZSTDLIB_VISIBILITY=", - "-DZDICTLIB_VISIBILITY=", - "-DZSTDERRORLIB_VISIBILITY=", - "-DZSTD_LEGACY_SUPPORT=1" -] - -[[platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'.buildscript]] -[platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'.buildscript.cxx_library] -name = "zstd-msvc" -srcs = [ - "zstd/lib/common/debug.c", - "zstd/lib/common/entropy_common.c", - "zstd/lib/common/error_private.c", - "zstd/lib/common/fse_decompress.c", - "zstd/lib/common/pool.c", - "zstd/lib/common/threading.c", - #"zstd/lib/common/xxhash.c", - "zstd/lib/common/zstd_common.c", - "zstd/lib/compress/**/*.c", - "zstd/lib/decompress/**/*.c", - #"zstd/lib/decompress/huf_decompress_amd64.S", - "zstd/lib/dictBuilder/**/*.c", - "zstd/lib/legacy/**/*.c", -] -headers = [ - "zdict.h", - "zstd.h", - "zstd/lib/common/bitstream.h", - "zstd/lib/common/compiler.h", - "zstd/lib/common/cpu.h", - "zstd/lib/common/debug.h", - "zstd/lib/common/error_private.h", - "zstd/lib/common/fse.h", - "zstd/lib/common/huf.h", - "zstd/lib/common/mem.h", - "zstd/lib/common/pool.h", - "zstd/lib/common/portability_macros.h", - "zstd/lib/common/threading.h", - #"zstd/lib/common/xxhash.h", - "zstd/lib/common/zstd_deps.h", - "zstd/lib/common/zstd_internal.h", - "zstd/lib/common/zstd_trace.h", - "zstd/lib/compress/**/*.h", - "zstd/lib/decompress/**/*.h", - "zstd/lib/deprecated/zbuff.h", - "zstd/lib/dictBuilder/cover.h", - "zstd/lib/dictBuilder/divsufsort.h", - "zstd/lib/legacy/**/*.h", - "zstd/lib/zdict.h", - "zstd/lib/zstd_errors.h", - "zstd/lib/zstd.h", -] -compiler_flags = [ - "/O2", - "-DZSTD_LIB_DEPRECATED=0", - "-DXXH_PRIVATE_API=", - "-DZSTDLIB_VISIBILITY=", - "-DZDICTLIB_VISIBILITY=", - "-DZSTDERRORLIB_VISIBILITY=", - "-DZSTD_LEGACY_SUPPORT=1" -] diff --git a/shim/third-party/rust/reindeer.toml b/shim/third-party/rust/reindeer.toml deleted file mode 100644 index ab3d1f8d4d..0000000000 --- a/shim/third-party/rust/reindeer.toml +++ /dev/null @@ -1,29 +0,0 @@ -# Configuration for Reindeer to generate Buck targets from Cargo.toml -# -# Overview of available options: -# https://github.com/facebookincubator/reindeer/blob/main/example/third-party/reindeer.toml - -# Parse Rust code to work out the precise set of source files for each crate. -precise_srcs = true - -# Include a public top-level target which depends on all other targets. -include_top_level = true - -[cargo] -# Support Cargo's unstable "artifact dependencies" functionality, RFC 3028. -bindeps = true - -[buck] -# Name of the generated file. -file_name = "BUCK" - -# Rules used for various kinds of targets. -rust_library = "cargo.rust_library" -rust_binary = "cargo.rust_binary" -prebuilt_cxx_library = "third_party_rust_prebuilt_cxx_library" - -buckfile_imports = """ -load("@prelude//rust:cargo_buildscript.bzl", "buildscript_run") -load("@prelude//rust:cargo_package.bzl", "cargo") -load("@shim//third-party/macros:rust_third_party.bzl", "third_party_rust_prebuilt_cxx_library") -""" diff --git a/shim/third-party/rust/top/main.rs b/shim/third-party/rust/top/main.rs deleted file mode 100644 index 7dde67dd19..0000000000 --- a/shim/third-party/rust/top/main.rs +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. -// -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. - -#![allow(unused_crate_dependencies)] - -fn main() {} diff --git a/shim/third-party/snappy/BUCK b/shim/third-party/snappy/BUCK deleted file mode 100644 index b5bc134c80..0000000000 --- a/shim/third-party/snappy/BUCK +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library(name = "snappy") diff --git a/shim/third-party/third_party.bzl b/shim/third-party/third_party.bzl deleted file mode 100644 index fee56b64a2..0000000000 --- a/shim/third-party/third_party.bzl +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@prelude//third-party:pkgconfig.bzl", "external_pkgconfig_library") -load("@shim//build_defs:prebuilt_cpp_library.bzl", "prebuilt_cpp_library") - -def homebrew_library( - package_name, - name = None, - default_target_platform = "prelude//platforms:default", - visibility = ["PUBLIC"], - deps = None, - header_path = None, - linker_flags = None, - labels = []): - brew_headers = package_name + "__brew_headers" - brew_libs = package_name + "__brew_libs" - if name != None: - brew_headers = name + "__" + brew_headers - brew_libs = name + "__" + brew_libs - - # @lint-ignore BUCKLINT - native.genrule( - name = brew_headers, - default_target_platform = default_target_platform, - out = "out", - cmd = "echo \"-I`brew --prefix {}`/{}\" > $OUT".format(package_name, header_path or "include"), - ) - - # @lint-ignore BUCKLINT - native.genrule( - name = brew_libs, - default_target_platform = default_target_platform, - out = "out", - cmd = "echo \"-L`brew --prefix {}`/lib\" > $OUT".format(package_name), - ) - - linker_flags = linker_flags or [] - linker_flags.append("@$(location :{})".format(brew_libs)) - - prebuilt_cpp_library( - name = name or package_name, - default_target_platform = default_target_platform, - visibility = visibility, - exported_deps = deps, - exported_preprocessor_flags = ["@$(location :{})".format(brew_headers)], - linker_flags = linker_flags, - labels = labels, - ) - -def third_party_library(name, visibility = ["PUBLIC"], deps = [], homebrew_package_name = None, ubuntu_package_name = None, pkgconfig_name = None, homebrew_header_path = None, default_target_platform = "prelude//platforms:default", homebrew_linker_flags = None): - # Labels defined here are used to extract third-party libs so they can be installed: - labels = [] - if homebrew_package_name != None: - labels.append("third-party:homebrew:" + homebrew_package_name) - if ubuntu_package_name != None: - labels.append("third-party:ubuntu:" + ubuntu_package_name) - - if pkgconfig_name != None: - labels.append("third-party:homebrew:pkg-config") - labels.append("third-party:ubuntu:pkg-config") - external_pkgconfig_library(name = pkgconfig_name, visibility = visibility if name == pkgconfig_name else [], labels = labels, default_target_platform = default_target_platform, deps = deps) - if name != pkgconfig_name: - native.alias(name = name, actual = ":{}".format(pkgconfig_name), visibility = visibility) - return - homebrew_library(name = name, package_name = homebrew_package_name or name, visibility = visibility, deps = deps, header_path = homebrew_header_path, linker_flags = homebrew_linker_flags, default_target_platform = default_target_platform, labels = labels) diff --git a/shim/third-party/xz/BUCK b/shim/third-party/xz/BUCK deleted file mode 100644 index 9d9c718426..0000000000 --- a/shim/third-party/xz/BUCK +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "lzma", - homebrew_package_name = "xz", - pkgconfig_name = "liblzma", -) diff --git a/shim/third-party/zlib/BUCK b/shim/third-party/zlib/BUCK deleted file mode 100644 index 7d21a49b1e..0000000000 --- a/shim/third-party/zlib/BUCK +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "z", - homebrew_package_name = "zlib", - pkgconfig_name = "zlib", -) diff --git a/shim/third-party/zstd/BUCK b/shim/third-party/zstd/BUCK deleted file mode 100644 index f92cf85a45..0000000000 --- a/shim/third-party/zstd/BUCK +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//third-party:third_party.bzl", "third_party_library") - -oncall("open_source") - -third_party_library( - name = "zstd", - pkgconfig_name = "libzstd", -) diff --git a/shim/tools/build_defs/audit_dependencies_test.bzl b/shim/tools/build_defs/audit_dependencies_test.bzl deleted file mode 100644 index a3174389f5..0000000000 --- a/shim/tools/build_defs/audit_dependencies_test.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# Noop in OSS -def audit_dependencies_test(**_kwargs): - pass diff --git a/shim/tools/build_defs/buck2/is_buck2.bzl b/shim/tools/build_defs/buck2/is_buck2.bzl deleted file mode 100644 index 45140ef215..0000000000 --- a/shim/tools/build_defs/buck2/is_buck2.bzl +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def is_buck2(): - return True diff --git a/shim/tools/build_defs/buckconfig.bzl b/shim/tools/build_defs/buckconfig.bzl deleted file mode 100644 index d9c29d252f..0000000000 --- a/shim/tools/build_defs/buckconfig.bzl +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@prelude//utils:buckconfig.bzl", _read = "read", _read_bool = "read_bool", _read_choice = "read_choice", _read_int = "read_int", _read_list = "read_list", _read_string = "read_string", _resolve_alias = "resolve_alias") - -read = _read -read_string = _read_string -read_choice = _read_choice -read_bool = _read_bool -read_int = _read_int -read_list = _read_list -resolve_alias = _resolve_alias diff --git a/shim/tools/build_defs/glob_defs.bzl b/shim/tools/build_defs/glob_defs.bzl deleted file mode 100644 index c119afa556..0000000000 --- a/shim/tools/build_defs/glob_defs.bzl +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -glob = native.glob From b671e24b3dc73c1a3821fd82e8cb6bcc9a860d79 Mon Sep 17 00:00:00 2001 From: Hansong <107070759+kirklandsign@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:13:47 -0700 Subject: [PATCH 2/8] add empty shim/TARGETS (#4600) --- shim/TARGETS | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 shim/TARGETS diff --git a/shim/TARGETS b/shim/TARGETS new file mode 100644 index 0000000000..e69de29bb2 From d3367e63ac4978b9edeb12c5d5a2eda4b8c96989 Mon Sep 17 00:00:00 2001 From: lucylq Date: Thu, 8 Aug 2024 15:20:52 -0700 Subject: [PATCH 3/8] Introduce preprocess custom ops Differential Revision: D60491675 Pull Request resolved: https://github.com/pytorch/executorch/pull/4548 --- extension/llm/custom_ops/TARGETS | 13 +++ extension/llm/custom_ops/op_tile_crop.cpp | 33 ++++++ extension/llm/custom_ops/op_tile_crop.h | 26 +++++ .../llm/custom_ops/preprocess_custom_ops.py | 110 ++++++++++++++++++ extension/llm/custom_ops/targets.bzl | 33 ++++++ .../custom_ops/test_preprocess_custom_ops.py | 54 +++++++++ 6 files changed, 269 insertions(+) create mode 100644 extension/llm/custom_ops/op_tile_crop.cpp create mode 100644 extension/llm/custom_ops/op_tile_crop.h create mode 100644 extension/llm/custom_ops/preprocess_custom_ops.py create mode 100644 extension/llm/custom_ops/test_preprocess_custom_ops.py diff --git a/extension/llm/custom_ops/TARGETS b/extension/llm/custom_ops/TARGETS index 195df3bb93..ff3fde6e2c 100644 --- a/extension/llm/custom_ops/TARGETS +++ b/extension/llm/custom_ops/TARGETS @@ -21,3 +21,16 @@ runtime.python_test( "//caffe2:torch", ], ) + +runtime.python_test( + name = "test_preprocess_custom_ops", + srcs = [ + "test_preprocess_custom_ops.py", + ], + preload_deps = [ + ":preprocess_custom_ops_py", + ], + deps = [ + "//caffe2:torch", + ], +) diff --git a/extension/llm/custom_ops/op_tile_crop.cpp b/extension/llm/custom_ops/op_tile_crop.cpp new file mode 100644 index 0000000000..094bb9beec --- /dev/null +++ b/extension/llm/custom_ops/op_tile_crop.cpp @@ -0,0 +1,33 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ + +#include +#include +#include + +namespace torch { +namespace executor { +namespace native { + +Tensor& tile_crop_out_impl( + RuntimeContext& ctx, + const Tensor& input, // NOLINT + const int64_t tile_size, // NOLINT + Tensor& out) { + (void)ctx; + return out; +} + +} // namespace native +} // namespace executor +} // namespace torch + +EXECUTORCH_LIBRARY( + preprocess, + "tile_crop.out", + torch::executor::native::tile_crop_out_impl); diff --git a/extension/llm/custom_ops/op_tile_crop.h b/extension/llm/custom_ops/op_tile_crop.h new file mode 100644 index 0000000000..445e443f9a --- /dev/null +++ b/extension/llm/custom_ops/op_tile_crop.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ + +#pragma once + +#include + +namespace torch { +namespace executor { + +namespace native { + +Tensor& tile_crop_out_impl( + RuntimeContext& ctx, + const Tensor& input, + const int64_t tile_size, + Tensor& out); + +} // namespace native +} // namespace executor +} // namespace torch diff --git a/extension/llm/custom_ops/preprocess_custom_ops.py b/extension/llm/custom_ops/preprocess_custom_ops.py new file mode 100644 index 0000000000..aea8c09b0e --- /dev/null +++ b/extension/llm/custom_ops/preprocess_custom_ops.py @@ -0,0 +1,110 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +# pyre-unsafe + + +from typing import List + +import torch + +from torch.library import impl, Library + +preprocess_op_lib = Library("preprocess", "DEF") + +# Register and define pad and out variant. +# Note: pad doesn't require an explicit meta kernel because +# CompositeExplicitAutograd automatically registers the implementation to meta, +# and meta kernels do not go through functionalization. The implementation +# does not export due to issues during functionalization. +# See: https://github.com/pytorch/pytorch/issues/120288 +preprocess_op_lib.define("pad(Tensor image, SymInt[] padding) -> Tensor") + + +@impl(preprocess_op_lib, "pad", dispatch_key="CompositeExplicitAutograd") +def pad_impl( + image: torch.Tensor, + padding: List[int], +) -> torch.Tensor: + output = torch.empty( + [image.shape[0], image.shape[1] + padding[3], image.shape[2] + padding[1]], + dtype=image.dtype, + device=image.device, + requires_grad=False, + ) + output = torch.fill(output, 0) + output.narrow(1, 0, image.shape[1]).narrow(2, 0, image.shape[2]).copy_(image) + return output + + +preprocess_op_lib.define( + "pad.out(Tensor image, SymInt[] padding, *, Tensor(a!) out) -> Tensor(a!)" +) + + +@impl(preprocess_op_lib, "pad.out", dispatch_key="CompositeExplicitAutograd") +def pad_out_impl( + image: torch.Tensor, + padding: List[int], + out: torch.Tensor, +) -> torch.Tensor: + out = torch.empty( + [image.shape[0], image.shape[1] + padding[3], image.shape[2] + padding[1]], + dtype=image.dtype, + device=image.device, + requires_grad=False, + ) + out = torch.fill(out, 0) + out.narrow(1, 0, image.shape[1]).narrow(2, 0, image.shape[2]).copy_(image) + return out + + +# Register and define tile_crop and out variant. +preprocess_op_lib.define("tile_crop(Tensor input, int tile_size) -> Tensor") + + +@impl(preprocess_op_lib, "tile_crop", dispatch_key="CompositeExplicitAutograd") +def tile_crop_impl(input: torch.Tensor, tile_size: int) -> torch.Tensor: + c = input.shape[0] + h = input.shape[1] + w = input.shape[2] + tiles_height = h // tile_size + tiles_width = w // tile_size + tile_cropped = input.view(c, tiles_height, tile_size, tiles_width, tile_size) + transposed = tile_cropped.permute(1, 3, 0, 2, 4) + tiles = transposed.contiguous().view( + tiles_height * tiles_width, c, tile_size, tile_size + ) + return tiles + + +preprocess_op_lib.define( + "tile_crop.out(Tensor input, int tile_size, *, Tensor(a!) out) -> Tensor(a!)" +) + + +@impl(preprocess_op_lib, "tile_crop.out", dispatch_key="CompositeExplicitAutograd") +def tile_crop_out_impl( + input: torch.Tensor, tile_size: int, out: torch.Tensor +) -> torch.Tensor: + out = input.clone() + c = out.shape[0] + h = out.shape[1] + w = out.shape[2] + tiles_height = h // tile_size + tiles_width = w // tile_size + out = out.view(c, tiles_height, tile_size, tiles_width, tile_size) + out = out.permute(1, 3, 0, 2, 4) + out = out.contiguous().view(tiles_height * tiles_width, c, tile_size, tile_size) + return out + + +# Register meta kernel to prevent export tracing into the tile_crop impl. +@torch.library.register_fake("preprocess::tile_crop") +def tile_crop(output: torch.Tensor, tile_size: int) -> torch.Tensor: + # Returned tensor is of size [n, 3, 224, 224], where n is the number of tiles. + # We should export with n = max_num_tiles. Set 50 for now. + return torch.empty([50, output.size(0), 224, 224]) diff --git a/extension/llm/custom_ops/targets.bzl b/extension/llm/custom_ops/targets.bzl index 8c38eb6a0a..ee277515b1 100644 --- a/extension/llm/custom_ops/targets.bzl +++ b/extension/llm/custom_ops/targets.bzl @@ -86,3 +86,36 @@ def define_common_targets(): ":custom_ops", ], ) + + ## For preprocess + runtime.python_library( + name = "preprocess_custom_ops_py", + srcs = [ + "preprocess_custom_ops.py", + ], + visibility = [ + "//executorch/...", + "@EXECUTORCH_CLIENTS", + ], + deps = [ + "//caffe2:torch", + ], + ) + + runtime.cxx_library( + name = "op_tile_crop", + srcs = ["op_tile_crop.cpp"], + exported_headers = ["op_tile_crop.h"], + exported_deps = [ + "//executorch/runtime/kernel:kernel_includes", + "//executorch/extension/kernel_util:kernel_util", + ], + compiler_flags = ["-Wno-missing-prototypes", "-Wno-global-constructors"], + visibility = [ + "//executorch/...", + "@EXECUTORCH_CLIENTS", + ], + # @lint-ignore BUCKLINT link_whole + link_whole = True, + force_static = True, + ) diff --git a/extension/llm/custom_ops/test_preprocess_custom_ops.py b/extension/llm/custom_ops/test_preprocess_custom_ops.py new file mode 100644 index 0000000000..50e149ece1 --- /dev/null +++ b/extension/llm/custom_ops/test_preprocess_custom_ops.py @@ -0,0 +1,54 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +# pyre-unsafe + +import unittest +from typing import List, Tuple + +import torch + +from .preprocess_custom_ops import preprocess_op_lib # noqa + + +class PreprocessTest(unittest.TestCase): + + def setUp(self): + # pad + self.pad_input = torch.ones(3, 200, 300) + + # tile_crop + self.tile_size = 224 + + def _compare_pad(self, image: torch.Tensor, padding: List[int]) -> None: + output = torch.ops.preprocess.pad.default(image, padding) + output_ref = torch.nn.functional.pad(image, padding) + self.assertTrue(torch.allclose(output_ref, output, 1e-6)) + + def _test_tile_crop(self, image: torch.Tensor, expected_shape: Tuple[int]) -> None: + output = torch.ops.preprocess.tile_crop.default(image, self.tile_size) + self.assertTrue(output.shape == expected_shape) + + def test_op_pad_without_padding(self): + self._compare_pad(self.pad_input, [0, 0, 0, 0]) + + def test_op_pad_with_right_bottom_padding(self): + self._compare_pad(self.pad_input, [0, 124, 0, 148]) + + def test_op_pad_with_right_padding(self): + self._compare_pad(self.pad_input, [0, 124, 0, 0]) + + def test_op_pad_with_bottom_padding(self): + self._compare_pad(self.pad_input, [0, 0, 0, 148]) + + def test_op_tile_crop_2x2(self): + self._test_tile_crop(torch.ones(3, 448, 448), (4, 3, 224, 224)) + + def test_op_tile_crop_1x3(self): + self._test_tile_crop(torch.ones(3, 224, 672), (3, 3, 224, 224)) + + def test_op_tile_crop_4x2(self): + self._test_tile_crop(torch.ones(3, 896, 448), (8, 3, 224, 224)) From d04c9d62c25007fc089166c44bad98f62a24636d Mon Sep 17 00:00:00 2001 From: cad-audio <86048415+cad-audio@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:33:10 -0700 Subject: [PATCH 4/8] HiFi4 NNLib added as a third party lib for Cadence DSP backend compilation Differential Revision: D60987573 Pull Request resolved: https://github.com/pytorch/executorch/pull/4418 --- .gitmodules | 3 + backends/cadence/CMakeLists.txt | 9 +- backends/cadence/aot/functions_hifi.yaml | 127 ++++++++++++++++++ backends/cadence/hifi/kernels/CMakeLists.txt | 11 +- backends/cadence/hifi/kernels/kernels.cpp | 2 - backends/cadence/hifi/kernels/kernels.h | 3 + .../cadence/hifi/operators/CMakeLists.txt | 16 +-- .../hifi/operators/dequantize_per_tensor.cpp | 4 +- .../hifi/operators/quantize_per_tensor.cpp | 4 +- .../hifi/third-party/nnlib/CMakeLists.txt | 30 +++++ .../hifi/third-party/nnlib/nnlib-hifi4 | 1 + 11 files changed, 189 insertions(+), 21 deletions(-) create mode 100644 backends/cadence/aot/functions_hifi.yaml create mode 100644 backends/cadence/hifi/third-party/nnlib/CMakeLists.txt create mode 160000 backends/cadence/hifi/third-party/nnlib/nnlib-hifi4 diff --git a/.gitmodules b/.gitmodules index 1881dd897b..33324b17e2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -61,6 +61,9 @@ [submodule "third-party/ios-cmake"] path = third-party/ios-cmake url = https://github.com/leetal/ios-cmake +[submodule "backends/cadence/hifi/third-party/nnlib/nnlib-hifi4"] + path = backends/cadence/hifi/third-party/nnlib/nnlib-hifi4 + url = https://github.com/foss-xtensa/nnlib-hifi4.git [submodule "third-party/prelude"] path = third-party/prelude url = https://github.com/facebook/buck2-prelude.git diff --git a/backends/cadence/CMakeLists.txt b/backends/cadence/CMakeLists.txt index b3c3b80d00..5ad0192d92 100644 --- a/backends/cadence/CMakeLists.txt +++ b/backends/cadence/CMakeLists.txt @@ -23,7 +23,12 @@ include(${EXECUTORCH_ROOT}/build/Utils.cmake) # Let files say "include ". set(_common_include_directories ${EXECUTORCH_ROOT}/..) +set(TARGET_DIR reference) +if(EXECUTORCH_NNLIB_OPT) +set(TARGET_DIR hifi) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_DIR}/third-party/nnlib) +endif() -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/reference/operators) -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/reference/kernels) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_DIR}/operators) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_DIR}/kernels) diff --git a/backends/cadence/aot/functions_hifi.yaml b/backends/cadence/aot/functions_hifi.yaml new file mode 100644 index 0000000000..729db66850 --- /dev/null +++ b/backends/cadence/aot/functions_hifi.yaml @@ -0,0 +1,127 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This yaml file contains operators that are also defined by the ATen library. +# For lean mode: +# - Codegen'd target `executorch_generated_lib` will be reading all the information +# from this file, including operator schema and kernel metadata. +# - Selective build target `codegen:executorch_defined_ops` now is selecting all the +# operators in this file, by dumping all the op names into `selected_operators.yaml`. +# +# See the README.md file in executorch/kernels/portable for a description of the syntax used +# by this file. + + +# aten ops +- op: _to_copy.out + kernels: + - arg_meta: null + kernel_name: torch::executor::to_copy_out + +- op: _softmax.out + kernels: + - arg_meta: null + kernel_name: torch::executor::softmax_out + +- op: add.out + kernels: + - arg_meta: null + kernel_name: torch::executor::add_out + +- op: bmm.out + kernels: + - arg_meta: null + kernel_name: torch::executor::bmm_out + +- op: cat.out + kernels: + - arg_meta: null + kernel_name: torch::executor::cat_out + +- op: clone.out + kernels: + - arg_meta: null + kernel_name: torch::executor::clone_out + +- op: div.out + kernels: + - arg_meta: null + kernel_name: torch::executor::div_out + +- op: div.out_mode + kernels: + - arg_meta: null + kernel_name: torch::executor::div_out_mode + +- op: embedding.out + kernels: + - arg_meta: null + kernel_name: torch::executor::embedding_out + +- op: full.out + kernels: + - arg_meta: null + kernel_name: torch::executor::full_out + +- op: mul.out + kernels: + - arg_meta: null + kernel_name: torch::executor::mul_out + +- op: permute_copy.out + kernels: + - arg_meta: null + kernel_name: torch::executor::permute_copy_out + +- op: sigmoid.out + kernels: + - arg_meta: null + kernel_name: torch::executor::sigmoid_out + +- op: slice_copy.Tensor_out + kernels: + - arg_meta: null + kernel_name: torch::executor::slice_copy_Tensor_out + +- op: split_with_sizes_copy.out + kernels: + - arg_meta: null + kernel_name: torch::executor::split_with_sizes_copy_out + +- op: sub.out + kernels: + - arg_meta: null + kernel_name: torch::executor::sub_out + +- op: view_copy.out + kernels: + - arg_meta: null + kernel_name: torch::executor::view_copy_out + +- op: where.self_out + kernels: + - arg_meta: null + kernel_name: torch::executor::where_out + +# custom ops +- func: cadence::quantize_per_tensor.out(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype, *, Tensor(a!) out) -> Tensor(a!) + variants: function + kernels: + - arg_meta: null + kernel_name: impl::HiFi::quantize_per_tensor_out + +- func: cadence::dequantize_per_tensor.out(Tensor input, float scale, int zero_point, int quant_min, int quant_max, ScalarType dtype, *, Tensor(a!) out) -> Tensor(a!) + variants: function + kernels: + - arg_meta: null + kernel_name: impl::HiFi::dequantize_per_tensor_out + + +- func: cadence::quantized_layer_norm.out(Tensor input, Tensor in_scale, Tensor in_zero_point, int[] normalized_shape, Tensor weight, Tensor bias, float eps, float output_scale, int output_zero_point, *, Tensor(a!) out) -> Tensor(a!) + kernels: + - arg_meta: null + kernel_name: impl::HiFi::quantized_layer_norm_out + +- func: cadence::quantized_linear.out(Tensor src, Tensor weight, Tensor bias, int src_zero_point, Tensor weight_zero_point, Tensor out_multiplier, Tensor out_shift, int out_zero_point, Tensor? offset, *, Tensor(a!) out) -> Tensor(a!) + kernels: + - arg_meta: null + kernel_name: impl::HiFi::quantized_linear_out diff --git a/backends/cadence/hifi/kernels/CMakeLists.txt b/backends/cadence/hifi/kernels/CMakeLists.txt index 9d4d456d8b..8cbeb3e180 100644 --- a/backends/cadence/hifi/kernels/CMakeLists.txt +++ b/backends/cadence/hifi/kernels/CMakeLists.txt @@ -14,9 +14,10 @@ add_library( target_include_directories( cadence_kernels PUBLIC . - ${NN_LIB_BASE_DIR}/xa_nnlib/algo/common/include/ - ${NN_LIB_BASE_DIR}/xa_nnlib/include/nnlib - ${NN_LIB_BASE_DIR}/xa_nnlib/include - ${NN_LIB_BASE_DIR}/xa_nnlib/algo/ndsp/hifi4/include/ - ${NXP_SDK_ROOT_DIR}/middleware/dsp/naturedsp/hifi4/include/ + ${EXECUTORCH_ROOT}/backends/cadence/hifi/third-party/nnlib/nnlib-hifi4/xa_nnlib/algo/common/include/ + ${EXECUTORCH_ROOT}/backends/cadence/hifi/third-party/nnlib/nnlib-hifi4/xa_nnlib/include/nnlib + ${EXECUTORCH_ROOT}/backends/cadence/hifi/third-party/nnlib/nnlib-hifi4/xa_nnlib/include + ${EXECUTORCH_ROOT}/backends/cadence/hifi/third-party/nnlib/nnlib-hifi4/xa_nnlib/algo/ndsp/hifi4/include/ ) + +target_link_libraries(cadence_kernels PRIVATE xa_nnlib) diff --git a/backends/cadence/hifi/kernels/kernels.cpp b/backends/cadence/hifi/kernels/kernels.cpp index 2f29b25ac8..47a5c1cfc0 100644 --- a/backends/cadence/hifi/kernels/kernels.cpp +++ b/backends/cadence/hifi/kernels/kernels.cpp @@ -7,8 +7,6 @@ */ #include "kernels.h" -#include "NatureDSP_Signal.h" -#include "NatureDSP_Signal_vector.h" #include "xa_nnlib_common.h" #include "xa_nnlib_common_macros.h" diff --git a/backends/cadence/hifi/kernels/kernels.h b/backends/cadence/hifi/kernels/kernels.h index 13e0470b38..789c8942a8 100644 --- a/backends/cadence/hifi/kernels/kernels.h +++ b/backends/cadence/hifi/kernels/kernels.h @@ -12,6 +12,9 @@ #include "stddef.h" #include "xa_type_def.h" +/* For NNLIB APIs */ +#include "xa_nnlib_kernels_api.h" + namespace impl { namespace HiFi { namespace kernels { diff --git a/backends/cadence/hifi/operators/CMakeLists.txt b/backends/cadence/hifi/operators/CMakeLists.txt index c22dc0c997..996d109db4 100644 --- a/backends/cadence/hifi/operators/CMakeLists.txt +++ b/backends/cadence/hifi/operators/CMakeLists.txt @@ -20,10 +20,6 @@ endif() # ATen compliant ops that are needed to run this model. set(_aten_ops__srcs - "${CMAKE_CURRENT_SOURCE_DIR}/op_add.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/op_embedding.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/op_full.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/op_view_copy.cpp" "${EXECUTORCH_ROOT}/kernels/portable/cpu/util/activation_ops_util.cpp" "${EXECUTORCH_ROOT}/kernels/portable/cpu/util/copy_ops_util.cpp" "${EXECUTORCH_ROOT}/kernels/portable/cpu/util/broadcast_util.cpp" @@ -32,10 +28,13 @@ set(_aten_ops__srcs "${EXECUTORCH_ROOT}/kernels/portable/cpu/util/matmul_ops_util.cpp" "${EXECUTORCH_ROOT}/kernels/portable/cpu/util/reduce_util.cpp" "${EXECUTORCH_ROOT}/kernels/portable/cpu/util/repeat_util.cpp" + "${EXECUTORCH_ROOT}/kernels/portable/cpu/op_add.cpp" "${EXECUTORCH_ROOT}/kernels/portable/cpu/op_bmm.cpp" "${EXECUTORCH_ROOT}/kernels/portable/cpu/op_cat.cpp" "${EXECUTORCH_ROOT}/kernels/portable/cpu/op_clone.cpp" "${EXECUTORCH_ROOT}/kernels/portable/cpu/op_div.cpp" + "${EXECUTORCH_ROOT}/kernels/portable/cpu/op_embedding.cpp" + "${EXECUTORCH_ROOT}/kernels/portable/cpu/op_full.cpp" "${EXECUTORCH_ROOT}/kernels/portable/cpu/op_mul.cpp" "${EXECUTORCH_ROOT}/kernels/portable/cpu/op_permute_copy.cpp" "${EXECUTORCH_ROOT}/kernels/portable/cpu/op_sigmoid.cpp" @@ -44,6 +43,7 @@ set(_aten_ops__srcs "${EXECUTORCH_ROOT}/kernels/portable/cpu/op_split_with_sizes_copy.cpp" "${EXECUTORCH_ROOT}/kernels/portable/cpu/op_sub.cpp" "${EXECUTORCH_ROOT}/kernels/portable/cpu/op_to_copy.cpp" + "${EXECUTORCH_ROOT}/kernels/portable/cpu/op_view_copy.cpp" "${EXECUTORCH_ROOT}/kernels/portable/cpu/op_where.cpp") add_library(aten_ops_cadence ${_aten_ops__srcs}) target_link_libraries(aten_ops_cadence PUBLIC executorch) @@ -58,8 +58,8 @@ target_include_directories(aten_ops_cadence PUBLIC ${ROOT_DIR}/.. # Custom ops that are needed to run the test model. add_library( - custom_ops "quantized_linear_out.cpp" "quantized_conv_out.cpp" - "quantized_relu_out.cpp" "quantized_layer_norm.cpp" + custom_ops "quantized_linear_out.cpp" + "quantized_layer_norm.cpp" "quantize_per_tensor.cpp" "dequantize_per_tensor.cpp") target_include_directories(custom_ops PUBLIC ${ROOT_DIR}/.. ${CMAKE_BINARY_DIR} @@ -72,11 +72,11 @@ target_link_libraries(custom_ops PRIVATE cadence_kernels) # Executorch (for runtime). Here select all ops in functions.yaml gen_selected_ops( LIB_NAME "cadence_ops_lib" OPS_SCHEMA_YAML - "${CMAKE_CURRENT_LIST_DIR}/../../aot/functions.yaml" "" "" + "${CMAKE_CURRENT_LIST_DIR}/../../aot/functions_hifi.yaml" "" "" ) generate_bindings_for_kernels( LIB_NAME "cadence_ops_lib" OPS_SCHEMA_YAML - FUNCTIONS_YAML ${CMAKE_CURRENT_SOURCE_DIR}/../../aot/functions.yaml + FUNCTIONS_YAML ${CMAKE_CURRENT_SOURCE_DIR}/../../aot/functions_hifi.yaml ) message("Generated files ${gen_command_sources}") diff --git a/backends/cadence/hifi/operators/dequantize_per_tensor.cpp b/backends/cadence/hifi/operators/dequantize_per_tensor.cpp index dcc4ace789..8a296307ee 100644 --- a/backends/cadence/hifi/operators/dequantize_per_tensor.cpp +++ b/backends/cadence/hifi/operators/dequantize_per_tensor.cpp @@ -35,8 +35,8 @@ void dequantize_per_tensor_out( out_data, input_data, scale, zero_point, numel); } else if (input.scalar_type() == ScalarType::Char) { const int8_t* input_data = input.const_data_ptr(); - impl::HiFi::kernels::dequantize( - out_data, input_data, scale, zero_point, numel); + xa_nn_elm_dequantize_asym8s_f32( + out_data, input_data, zero_point, scale, numel); } else if (input.scalar_type() == ScalarType::Int) { const int32_t* input_data = input.const_data_ptr(); impl::HiFi::kernels::dequantize( diff --git a/backends/cadence/hifi/operators/quantize_per_tensor.cpp b/backends/cadence/hifi/operators/quantize_per_tensor.cpp index ec186cc68e..aea6c1b943 100644 --- a/backends/cadence/hifi/operators/quantize_per_tensor.cpp +++ b/backends/cadence/hifi/operators/quantize_per_tensor.cpp @@ -37,8 +37,8 @@ void quantize_per_tensor_out( out_data, input_data, 1. / scale, zero_point, numel); } else if (out.scalar_type() == ScalarType::Char) { int8_t* out_data = out.mutable_data_ptr(); - impl::HiFi::kernels::quantize( - out_data, input_data, 1. / scale, zero_point, numel); + xa_nn_elm_quantize_f32_asym8s( + out_data, input_data, scale, zero_point, numel); } else if (out.scalar_type() == ScalarType::Int) { int32_t* out_data = out.mutable_data_ptr(); impl::HiFi::kernels::quantize( diff --git a/backends/cadence/hifi/third-party/nnlib/CMakeLists.txt b/backends/cadence/hifi/third-party/nnlib/CMakeLists.txt new file mode 100644 index 0000000000..e93e0759d2 --- /dev/null +++ b/backends/cadence/hifi/third-party/nnlib/CMakeLists.txt @@ -0,0 +1,30 @@ + +cmake_minimum_required(VERSION 3.10.0) +project(cadence_nnlib) + + +add_custom_target( nnlib_target ALL COMMAND + make install_nnlib -f makefile -C ${EXECUTORCH_ROOT}/backends/cadence/hifi/third-party/nnlib/nnlib-hifi4/xa_nnlib/build + OBJDIR=${CMAKE_CURRENT_BINARY_DIR}/obj + LIBDIR=${CMAKE_CURRENT_BINARY_DIR}/lib + -j8 ) + +add_library(xa_nnlib STATIC IMPORTED GLOBAL) +add_dependencies(xa_nnlib nnlib_target) + +set_property( + TARGET xa_nnlib + PROPERTY + IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/lib/xa_nnlib.a" +) + + + + + + + + + + + diff --git a/backends/cadence/hifi/third-party/nnlib/nnlib-hifi4 b/backends/cadence/hifi/third-party/nnlib/nnlib-hifi4 new file mode 160000 index 0000000000..6a9ea45e23 --- /dev/null +++ b/backends/cadence/hifi/third-party/nnlib/nnlib-hifi4 @@ -0,0 +1 @@ +Subproject commit 6a9ea45e23ef591fe207442df33a5ebe88bbe8de From 2405f749985d95bb70ef348661a55d4d38f97543 Mon Sep 17 00:00:00 2001 From: Shangdi Yu Date: Thu, 8 Aug 2024 16:59:16 -0700 Subject: [PATCH 5/8] Remove Proxy from exported programs and modules Differential Revision: D60940832 Pull Request resolved: https://github.com/pytorch/executorch/pull/4598 --- exir/serde/serialize.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/exir/serde/serialize.py b/exir/serde/serialize.py index 9824501f82..c25b9b3a77 100644 --- a/exir/serde/serialize.py +++ b/exir/serde/serialize.py @@ -343,18 +343,9 @@ def serialize( else: example_inputs = b"" - # TODO (shangdi): change to use `torch._export.utils.remove_proxy_from_state_dict` - # after pytorch repo is updated. - # Proxy cannot be dumped, so we remove them. - new_state_dict = {} - for k, v in exported_program.state_dict.items(): - if "proxy" in v.__dict__: - new_state_dict[k] = v.clone().detach() - else: - new_state_dict[k] = v return export_serialize._SerializedProgram( serialized_ep, - export_serialize.serialize_torch_artifact(new_state_dict), + export_serialize.serialize_torch_artifact(exported_program.state_dict), export_serialize.serialize_torch_artifact(constants), example_inputs, ) From 192d463f3aef1a54882154cb591df895a02e1e42 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Fri, 9 Aug 2024 00:20:06 -0700 Subject: [PATCH 6/8] Skip computing capacity for dynamic tensor. Differential Revision: D60854862 Pull Request resolved: https://github.com/pytorch/executorch/pull/4568 --- runtime/core/portable_type/tensor_impl.cpp | 26 +++++++++++----------- runtime/core/portable_type/tensor_impl.h | 5 +++-- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/runtime/core/portable_type/tensor_impl.cpp b/runtime/core/portable_type/tensor_impl.cpp index a42031b660..788a9116c6 100644 --- a/runtime/core/portable_type/tensor_impl.cpp +++ b/runtime/core/portable_type/tensor_impl.cpp @@ -47,9 +47,12 @@ TensorImpl::TensorImpl( data_(data), dim_(dim), numel_(compute_numel(sizes, dim)), - capacity_(numel_ * elementSize(type)), + numel_bound_(numel_), type_(type), - shape_dynamism_(dynamism) {} + shape_dynamism_(dynamism) { + ET_CHECK_MSG( + isValid(type_), "Invalid type %" PRId8, static_cast(type_)); +} size_t TensorImpl::nbytes() const { return numel_ * elementSize(type_); @@ -96,22 +99,19 @@ Error TensorImpl::internal_resize_contiguous(ArrayRef new_sizes) { return Error::Ok; } - auto new_numel = compute_numel(new_sizes.data(), dim_); + const auto new_numel = compute_numel(new_sizes.data(), dim_); - // Upper bounded tensors can be reshaped but not beyond upper bound + // Bounded tensors can be reshaped, but not beyond the upper bound. if (shape_dynamism_ == TensorShapeDynamism::DYNAMIC_BOUND || - // TODO(T175194371): Unbounded tensor resizing is not yet supported: treat - // them as upper-bounded. + // TODO(T175194371): Unbounded dynamic tensor resizing is not yet + // supported: treat them as upper-bounded. shape_dynamism_ == TensorShapeDynamism::DYNAMIC_UNBOUND) { - auto new_nbytes = new_numel * elementSize(type_); ET_CHECK_OR_RETURN_ERROR( - new_nbytes <= capacity_, + new_numel <= numel_bound_, NotSupported, - "Attempted to resize a tensor with dynamism %d " - "to %zu which is beyond its capacity %zu", - (int)shape_dynamism_, - new_nbytes, - capacity_); + "Attempted to resize a bounded tensor with capacity of %zu elements to %zu elements.", + new_numel, + numel_bound_); } // Copy sizes over diff --git a/runtime/core/portable_type/tensor_impl.h b/runtime/core/portable_type/tensor_impl.h index 04f8ca13d0..49b32afe32 100644 --- a/runtime/core/portable_type/tensor_impl.h +++ b/runtime/core/portable_type/tensor_impl.h @@ -241,8 +241,9 @@ class TensorImpl { /// Number of elements in the tensor. ssize_t numel_; - /// Underlying capacity of data_ in bytes. Used when resizing up and down. - size_t capacity_; + /// Maximum number of elements in the bounded tensor. Used when resizing up + /// and down. + size_t numel_bound_; /// Scalar type (int, float, bool, etc) of the tensor data. const ScalarType type_; From 1b092e923a3109a0654ccf0d6cb42d705b23a77d Mon Sep 17 00:00:00 2001 From: eddieluo72 Date: Fri, 9 Aug 2024 09:51:02 -0700 Subject: [PATCH 7/8] fix CI errors Differential Revision: D60456623 Pull Request resolved: https://github.com/pytorch/executorch/pull/4564 --- build/constraints/TARGETS | 1 + runtime/kernel/targets.bzl | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 build/constraints/TARGETS diff --git a/build/constraints/TARGETS b/build/constraints/TARGETS new file mode 100644 index 0000000000..fd09ad5ebd --- /dev/null +++ b/build/constraints/TARGETS @@ -0,0 +1 @@ +oncall("executorch") diff --git a/runtime/kernel/targets.bzl b/runtime/kernel/targets.bzl index 0bf45321dc..ecbbe91116 100644 --- a/runtime/kernel/targets.bzl +++ b/runtime/kernel/targets.bzl @@ -1,5 +1,17 @@ load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") +def _operator_registry_preprocessor_flags(): + max_kernel_num = native.read_config("executorch", "max_kernel_num", None) + if max_kernel_num != None: + return ["-DMAX_KERNEL_NUM=" + max_kernel_num] + elif not runtime.is_oss: + return select({ + "DEFAULT": [], + "fbsource//xplat/executorch/build/constraints:executorch-max-kernel-num-64": ["-DMAX_KERNEL_NUM=64"], + }) + else: + return [] + def define_common_targets(): """Defines targets that should be shared between fbcode and xplat. @@ -7,7 +19,6 @@ def define_common_targets(): TARGETS and BUCK files that call this function. """ - max_kernel_num = native.read_config("executorch", "max_kernel_num", None) runtime.cxx_library( name = "operator_registry", srcs = ["operator_registry.cpp"], @@ -20,7 +31,7 @@ def define_common_targets(): "//executorch/runtime/core:core", "//executorch/runtime/core:evalue", ], - preprocessor_flags = ["-DMAX_KERNEL_NUM=" + max_kernel_num] if max_kernel_num != None else [], + preprocessor_flags = _operator_registry_preprocessor_flags(), ) runtime.cxx_library( From 3b21e79efbb39bdcc7c50fcf8905bc27ea320ea4 Mon Sep 17 00:00:00 2001 From: derekxu Date: Fri, 9 Aug 2024 10:33:20 -0700 Subject: [PATCH 8/8] Buckify open sourced ET-QNN Differential Revision: D60971802 Pull Request resolved: https://github.com/pytorch/executorch/pull/4632 --- backends/qualcomm/aot/ir/qcir_utils.h | 2 +- .../runtime/backends/htpbackend/HtpContextCustomConfig.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backends/qualcomm/aot/ir/qcir_utils.h b/backends/qualcomm/aot/ir/qcir_utils.h index 890dfa33ca..a6b5e50c23 100755 --- a/backends/qualcomm/aot/ir/qcir_utils.h +++ b/backends/qualcomm/aot/ir/qcir_utils.h @@ -9,7 +9,7 @@ #pragma once #include "QnnTypes.h" -#include "qcir_generated.h" +#include namespace torch { namespace executor { diff --git a/backends/qualcomm/runtime/backends/htpbackend/HtpContextCustomConfig.h b/backends/qualcomm/runtime/backends/htpbackend/HtpContextCustomConfig.h index 00568bdc32..35fc2d373d 100644 --- a/backends/qualcomm/runtime/backends/htpbackend/HtpContextCustomConfig.h +++ b/backends/qualcomm/runtime/backends/htpbackend/HtpContextCustomConfig.h @@ -39,7 +39,7 @@ class HtpContextCustomConfig { return htp_context_config_.back().get(); } - const QnnContext* context_; + [[maybe_unused]] const QnnContext* context_; std::vector> htp_context_config_; [[maybe_unused]] const QnnExecuTorchHtpBackendOptions* htp_options_;