dsh-remote 0.8.45 → 0.8.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.en.md +361 -361
- package/README.md +368 -368
- package/cordis.patch.yml +9 -9
- package/lib/binding.js +172 -172
- package/lib/client.js +3637 -3623
- package/lib/credential.js +177 -177
- package/lib/deploy-tasks.js +142 -142
- package/lib/errors.js +87 -87
- package/lib/file-reference.js +457 -457
- package/lib/forwards.js +258 -258
- package/lib/hostkey.js +108 -108
- package/lib/http-transport.js +196 -196
- package/lib/ignore.js +156 -156
- package/lib/index.js +3771 -3747
- package/lib/openssh.js +838 -838
- package/lib/paths.js +225 -225
- package/lib/pool.js +757 -754
- package/lib/registry.js +95 -95
- package/lib/remote-fs.js +148 -143
- package/lib/routes-fs.js +233 -233
- package/lib/search.js +230 -230
- package/lib/sftp-surface.js +76 -76
- package/lib/sshconfig.js +454 -454
- package/lib/sync.js +275 -275
- package/lib/tasks.js +95 -95
- package/lib/telemetry.js +213 -213
- package/lib/update.js +472 -472
- package/lib/web-attach.js +850 -846
- package/lib/web-deploy-skill.js +205 -205
- package/lib/web-deploy.js +694 -694
- package/node_modules/asn1/Jenkinsfile +65 -0
- package/node_modules/asn1/LICENSE +19 -0
- package/node_modules/asn1/README.md +50 -0
- package/node_modules/asn1/lib/ber/errors.js +13 -0
- package/node_modules/asn1/lib/ber/index.js +27 -0
- package/node_modules/asn1/lib/ber/reader.js +262 -0
- package/node_modules/asn1/lib/ber/types.js +36 -0
- package/node_modules/asn1/lib/ber/writer.js +317 -0
- package/node_modules/asn1/lib/index.js +20 -0
- package/node_modules/asn1/package.json +31 -0
- package/node_modules/bcrypt-pbkdf/CONTRIBUTING.md +13 -0
- package/node_modules/bcrypt-pbkdf/LICENSE +66 -0
- package/node_modules/bcrypt-pbkdf/README.md +45 -0
- package/node_modules/bcrypt-pbkdf/index.js +556 -0
- package/node_modules/bcrypt-pbkdf/package.json +15 -0
- package/node_modules/buildcheck/.eslintrc.js +5 -0
- package/node_modules/buildcheck/.github/workflows/ci.yml +88 -0
- package/node_modules/buildcheck/.github/workflows/lint.yml +27 -0
- package/node_modules/buildcheck/.npmignore +3 -0
- package/node_modules/buildcheck/LICENSE +19 -0
- package/node_modules/buildcheck/README.md +106 -0
- package/node_modules/buildcheck/deps/Find-VisualStudio.cs +250 -0
- package/node_modules/buildcheck/lib/findvs.js +361 -0
- package/node_modules/buildcheck/lib/index.js +738 -0
- package/node_modules/buildcheck/package.json +36 -0
- package/node_modules/buildcheck/test/test.js +8 -0
- package/node_modules/cpu-features/.eslintrc.js +5 -0
- package/node_modules/cpu-features/.github/workflows/ci.yml +74 -0
- package/node_modules/cpu-features/.github/workflows/lint.yml +27 -0
- package/node_modules/cpu-features/LICENSE +19 -0
- package/node_modules/cpu-features/README.md +59 -0
- package/node_modules/cpu-features/binding.gyp +16 -0
- package/node_modules/cpu-features/buildcheck.js +32 -0
- package/node_modules/cpu-features/deps/cpu_features/.clang-format +4 -0
- package/node_modules/cpu-features/deps/cpu_features/.dockerignore +31 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/Dockerfile +5 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/aarch64_linux_cmake.yml +30 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_freebsd_cmake.yml +22 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_linux_bazel.yml +26 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_linux_cmake.yml +31 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_macos_cmake.yml +43 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_windows_cmake.yml +25 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/arm_linux_cmake.yml +31 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/clang_format.yml +24 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/mips_linux_cmake.yml +30 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/power_linux_cmake.yml +29 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/riscv_linux_cmake.yml +28 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/s390x_linux_cmake.yml +27 -0
- package/node_modules/cpu-features/deps/cpu_features/.grenrc.yml +21 -0
- package/node_modules/cpu-features/deps/cpu_features/BUILD.bazel +329 -0
- package/node_modules/cpu-features/deps/cpu_features/CMakeLists.txt +261 -0
- package/node_modules/cpu-features/deps/cpu_features/CONTRIBUTING.md +23 -0
- package/node_modules/cpu-features/deps/cpu_features/LICENSE +230 -0
- package/node_modules/cpu-features/deps/cpu_features/README.md +272 -0
- package/node_modules/cpu-features/deps/cpu_features/WORKSPACE +19 -0
- package/node_modules/cpu-features/deps/cpu_features/bazel/ci/README.md +5 -0
- package/node_modules/cpu-features/deps/cpu_features/bazel/platforms.bzl +11 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/CpuFeaturesConfig.cmake.in +3 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/CpuFeaturesNdkCompatConfig.cmake.in +3 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/README.md +30 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/Makefile +252 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/README.md +40 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/docker.dot +64 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/docker.svg +312 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/generate_image.sh +7 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/docker/amd64/Dockerfile +48 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/docker/toolchain/Dockerfile +34 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/sample/CMakeLists.txt +22 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/sample/main.cpp +11 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/vagrant/freebsd/Vagrantfile +107 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/googletest.CMakeLists.txt.in +15 -0
- package/node_modules/cpu-features/deps/cpu_features/cpu_features.gyp +105 -0
- package/node_modules/cpu-features/deps/cpu_features/include/cpu_features_cache_info.h +54 -0
- package/node_modules/cpu-features/deps/cpu_features/include/cpu_features_macros.h +384 -0
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_aarch64.h +259 -0
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_arm.h +121 -0
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_mips.h +74 -0
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_ppc.h +149 -0
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_riscv.h +72 -0
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_s390x.h +108 -0
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_x86.h +288 -0
- package/node_modules/cpu-features/deps/cpu_features/include/internal/bit_utils.h +40 -0
- package/node_modules/cpu-features/deps/cpu_features/include/internal/cpuid_x86.h +37 -0
- package/node_modules/cpu-features/deps/cpu_features/include/internal/filesystem.h +39 -0
- package/node_modules/cpu-features/deps/cpu_features/include/internal/hwcaps.h +240 -0
- package/node_modules/cpu-features/deps/cpu_features/include/internal/stack_line_reader.h +49 -0
- package/node_modules/cpu-features/deps/cpu_features/include/internal/string_view.h +110 -0
- package/node_modules/cpu-features/deps/cpu_features/include/internal/windows_utils.h +70 -0
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/CMakeLists.txt +60 -0
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/README.md +4 -0
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/cpu-features.c +205 -0
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/cpu-features.h +320 -0
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/ndk-compat-test.c +12 -0
- package/node_modules/cpu-features/deps/cpu_features/patches/0001-Add-Apple-Silicon-Support.patch +456 -0
- package/node_modules/cpu-features/deps/cpu_features/scripts/generate_badges.d +165 -0
- package/node_modules/cpu-features/deps/cpu_features/scripts/make_release.sh +75 -0
- package/node_modules/cpu-features/deps/cpu_features/scripts/run_integration.sh +490 -0
- package/node_modules/cpu-features/deps/cpu_features/scripts/test_integration.sh +79 -0
- package/node_modules/cpu-features/deps/cpu_features/src/copy.inl +19 -0
- package/node_modules/cpu-features/deps/cpu_features/src/define_introspection.inl +86 -0
- package/node_modules/cpu-features/deps/cpu_features/src/define_introspection_and_hwcaps.inl +26 -0
- package/node_modules/cpu-features/deps/cpu_features/src/equals.inl +22 -0
- package/node_modules/cpu-features/deps/cpu_features/src/filesystem.c +62 -0
- package/node_modules/cpu-features/deps/cpu_features/src/hwcaps.c +169 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64__base_implementation.inl +88 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_linux_or_android.c +79 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.c +82 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_windows.c +138 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_arm_linux_or_android.c +212 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_mips_linux_or_android.c +93 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_ppc_linux.c +163 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_riscv_linux.c +111 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_s390x_linux.c +120 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86__base_implementation.inl +2055 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_freebsd.c +68 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_linux_or_android.c +58 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_macos.c +57 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_windows.c +58 -0
- package/node_modules/cpu-features/deps/cpu_features/src/stack_line_reader.c +132 -0
- package/node_modules/cpu-features/deps/cpu_features/src/string_view.c +192 -0
- package/node_modules/cpu-features/deps/cpu_features/src/utils/list_cpu_features.c +461 -0
- package/node_modules/cpu-features/deps/cpu_features/test/CMakeLists.txt +114 -0
- package/node_modules/cpu-features/deps/cpu_features/test/bit_utils_test.cc +53 -0
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_aarch64_test.cc +396 -0
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_arm_test.cc +384 -0
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_mips_test.cc +176 -0
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_ppc_test.cc +131 -0
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_riscv_test.cc +180 -0
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_s390x_test.cc +82 -0
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_x86_test.cc +1729 -0
- package/node_modules/cpu-features/deps/cpu_features/test/filesystem_for_testing.cc +103 -0
- package/node_modules/cpu-features/deps/cpu_features/test/filesystem_for_testing.h +61 -0
- package/node_modules/cpu-features/deps/cpu_features/test/hwcaps_for_testing.cc +52 -0
- package/node_modules/cpu-features/deps/cpu_features/test/hwcaps_for_testing.h +31 -0
- package/node_modules/cpu-features/deps/cpu_features/test/stack_line_reader_test.cc +132 -0
- package/node_modules/cpu-features/deps/cpu_features/test/string_view_test.cc +202 -0
- package/node_modules/cpu-features/lib/index.js +5 -0
- package/node_modules/cpu-features/package.json +40 -0
- package/node_modules/cpu-features/src/binding.cc +151 -0
- package/node_modules/cpu-features/test/test.js +12 -0
- package/node_modules/nan/.github/workflows/ci.yml +46 -0
- package/node_modules/nan/.pre-commit-config.yaml +8 -0
- package/node_modules/nan/CHANGELOG.md +605 -0
- package/node_modules/nan/CMakeLists.txt +138 -0
- package/node_modules/nan/LICENSE.md +9 -0
- package/node_modules/nan/README.md +457 -0
- package/node_modules/nan/doc/asyncworker.md +146 -0
- package/node_modules/nan/doc/buffers.md +54 -0
- package/node_modules/nan/doc/callback.md +76 -0
- package/node_modules/nan/doc/converters.md +41 -0
- package/node_modules/nan/doc/errors.md +226 -0
- package/node_modules/nan/doc/json.md +62 -0
- package/node_modules/nan/doc/maybe_types.md +583 -0
- package/node_modules/nan/doc/methods.md +689 -0
- package/node_modules/nan/doc/new.md +147 -0
- package/node_modules/nan/doc/node_misc.md +123 -0
- package/node_modules/nan/doc/object_wrappers.md +263 -0
- package/node_modules/nan/doc/persistent.md +296 -0
- package/node_modules/nan/doc/scopes.md +73 -0
- package/node_modules/nan/doc/script.md +58 -0
- package/node_modules/nan/doc/string_bytes.md +81 -0
- package/node_modules/nan/doc/v8_internals.md +211 -0
- package/node_modules/nan/doc/v8_misc.md +85 -0
- package/node_modules/nan/include_dirs.js +1 -0
- package/node_modules/nan/nan.h +3202 -0
- package/node_modules/nan/nan_callbacks.h +141 -0
- package/node_modules/nan/nan_callbacks_12_inl.h +730 -0
- package/node_modules/nan/nan_callbacks_pre_12_inl.h +528 -0
- package/node_modules/nan/nan_converters.h +72 -0
- package/node_modules/nan/nan_converters_43_inl.h +68 -0
- package/node_modules/nan/nan_converters_pre_43_inl.h +42 -0
- package/node_modules/nan/nan_define_own_property_helper.h +29 -0
- package/node_modules/nan/nan_implementation_12_inl.h +446 -0
- package/node_modules/nan/nan_implementation_pre_12_inl.h +263 -0
- package/node_modules/nan/nan_json.h +166 -0
- package/node_modules/nan/nan_maybe_43_inl.h +360 -0
- package/node_modules/nan/nan_maybe_pre_43_inl.h +268 -0
- package/node_modules/nan/nan_new.h +340 -0
- package/node_modules/nan/nan_object_wrap.h +156 -0
- package/node_modules/nan/nan_persistent_12_inl.h +132 -0
- package/node_modules/nan/nan_persistent_pre_12_inl.h +242 -0
- package/node_modules/nan/nan_private.h +73 -0
- package/node_modules/nan/nan_scriptorigin.h +97 -0
- package/node_modules/nan/nan_string_bytes.h +305 -0
- package/node_modules/nan/nan_typedarray_contents.h +96 -0
- package/node_modules/nan/nan_weak.h +453 -0
- package/node_modules/nan/package.json +38 -0
- package/node_modules/nan/tools/1to2.js +412 -0
- package/node_modules/nan/tools/README.md +14 -0
- package/node_modules/nan/tools/package.json +19 -0
- package/node_modules/safer-buffer/LICENSE +21 -0
- package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/node_modules/safer-buffer/Readme.md +156 -0
- package/node_modules/safer-buffer/dangerous.js +58 -0
- package/node_modules/safer-buffer/package.json +34 -0
- package/node_modules/safer-buffer/safer.js +77 -0
- package/node_modules/safer-buffer/tests.js +406 -0
- package/node_modules/ssh2/.eslintignore +4 -0
- package/node_modules/ssh2/.eslintrc.js +5 -0
- package/node_modules/ssh2/.github/workflows/ci.yml +110 -0
- package/node_modules/ssh2/.github/workflows/lint.yml +27 -0
- package/node_modules/ssh2/LICENSE +19 -0
- package/node_modules/ssh2/README.md +1529 -0
- package/node_modules/ssh2/SFTP.md +413 -0
- package/node_modules/ssh2/examples/server-chat.js +238 -0
- package/node_modules/ssh2/examples/sftp-server-download-only.js +134 -0
- package/node_modules/ssh2/install.js +27 -0
- package/node_modules/ssh2/lib/Channel.js +295 -0
- package/node_modules/ssh2/lib/agent.js +1123 -0
- package/node_modules/ssh2/lib/client.js +2176 -0
- package/node_modules/ssh2/lib/http-agents.js +84 -0
- package/node_modules/ssh2/lib/index.js +44 -0
- package/node_modules/ssh2/lib/keygen.js +582 -0
- package/node_modules/ssh2/lib/protocol/Protocol.js +2136 -0
- package/node_modules/ssh2/lib/protocol/SFTP.js +4052 -0
- package/node_modules/ssh2/lib/protocol/constants.js +356 -0
- package/node_modules/ssh2/lib/protocol/crypto/binding.gyp +23 -0
- package/node_modules/ssh2/lib/protocol/crypto/poly1305.js +43 -0
- package/node_modules/ssh2/lib/protocol/crypto/src/binding.cc +2300 -0
- package/node_modules/ssh2/lib/protocol/crypto.js +1602 -0
- package/node_modules/ssh2/lib/protocol/handlers.js +16 -0
- package/node_modules/ssh2/lib/protocol/handlers.misc.js +1285 -0
- package/node_modules/ssh2/lib/protocol/kex.js +1908 -0
- package/node_modules/ssh2/lib/protocol/keyParser.js +1484 -0
- package/node_modules/ssh2/lib/protocol/node-fs-compat.js +115 -0
- package/node_modules/ssh2/lib/protocol/utils.js +356 -0
- package/node_modules/ssh2/lib/protocol/zlib.js +255 -0
- package/node_modules/ssh2/lib/server.js +1380 -0
- package/node_modules/ssh2/lib/utils.js +336 -0
- package/node_modules/ssh2/package.json +49 -0
- package/node_modules/ssh2/test/common.js +316 -0
- package/node_modules/ssh2/test/fixtures/bad_rsa_private_key +26 -0
- package/node_modules/ssh2/test/fixtures/https_cert.pem +33 -0
- package/node_modules/ssh2/test/fixtures/https_key.pem +52 -0
- package/node_modules/ssh2/test/fixtures/id_dsa +12 -0
- package/node_modules/ssh2/test/fixtures/id_ecdsa +5 -0
- package/node_modules/ssh2/test/fixtures/id_rsa +15 -0
- package/node_modules/ssh2/test/fixtures/id_rsa.ppk +26 -0
- package/node_modules/ssh2/test/fixtures/id_rsa_enc +30 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa +21 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc +22 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc_gcm +23 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc_gcm.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc_gcm.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc_gcm.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa +9 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc +10 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc.pub.result +8 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc_gcm +10 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc_gcm.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc_gcm.pub.result +8 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc_gcm.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ed25519 +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ed25519.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ed25519.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ed25519.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa +27 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc +28 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc.pub.result +8 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc_gcm +29 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc_gcm.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc_gcm.pub.result +8 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc_gcm.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa +12 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa_enc +15 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa_enc.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa_enc.pub.result +8 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa_enc.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa +5 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa_enc +8 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa_enc.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa_enc.pub.result +8 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa_enc.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa +27 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc +30 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc.pub.result +8 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc_aes256 +54 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc_aes256.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc_aes256.pub.result +6 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc_aes256.result +6 -0
- package/node_modules/ssh2/test/fixtures/keyParser/ppk_dsa_enc +17 -0
- package/node_modules/ssh2/test/fixtures/keyParser/ppk_dsa_enc.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/ppk_rsa +26 -0
- package/node_modules/ssh2/test/fixtures/keyParser/ppk_rsa.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/ppk_rsa_enc +18 -0
- package/node_modules/ssh2/test/fixtures/keyParser/ppk_rsa_enc.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa.pub +9 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa2.pub +10 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa2.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa3.pub +11 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa3.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa4.pub +11 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa4.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa5.pub +8 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa5.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa6.pub +13 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa6.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/openssh_new_rsa +27 -0
- package/node_modules/ssh2/test/fixtures/ssh_host_dsa_key +12 -0
- package/node_modules/ssh2/test/fixtures/ssh_host_ecdsa_key +5 -0
- package/node_modules/ssh2/test/fixtures/ssh_host_rsa_key +15 -0
- package/node_modules/ssh2/test/test-exec.js +578 -0
- package/node_modules/ssh2/test/test-integration-openssh.js +486 -0
- package/node_modules/ssh2/test/test-keygen.js +60 -0
- package/node_modules/ssh2/test/test-misc-client-server.js +1460 -0
- package/node_modules/ssh2/test/test-openssh.js +261 -0
- package/node_modules/ssh2/test/test-protocol-crypto.js +631 -0
- package/node_modules/ssh2/test/test-protocol-keyparser.js +177 -0
- package/node_modules/ssh2/test/test-server-hostkeys.js +138 -0
- package/node_modules/ssh2/test/test-sftp.js +842 -0
- package/node_modules/ssh2/test/test-shell.js +109 -0
- package/node_modules/ssh2/test/test-userauth-agent-openssh.js +110 -0
- package/node_modules/ssh2/test/test-userauth-agent.js +171 -0
- package/node_modules/ssh2/test/test-userauth.js +611 -0
- package/node_modules/ssh2/test/test-worker-imports.js +25 -0
- package/node_modules/ssh2/test/test.js +20 -0
- package/node_modules/ssh2/util/build_pagent.bat +2 -0
- package/node_modules/ssh2/util/pagent.c +88 -0
- package/node_modules/ssh2/util/pagent.exe +0 -0
- package/node_modules/tweetnacl/.npmignore +4 -0
- package/node_modules/tweetnacl/AUTHORS.md +28 -0
- package/node_modules/tweetnacl/CHANGELOG.md +221 -0
- package/node_modules/tweetnacl/LICENSE +24 -0
- package/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md +20 -0
- package/node_modules/tweetnacl/README.md +459 -0
- package/node_modules/tweetnacl/nacl-fast.js +2388 -0
- package/node_modules/tweetnacl/nacl-fast.min.js +2 -0
- package/node_modules/tweetnacl/nacl.d.ts +98 -0
- package/node_modules/tweetnacl/nacl.js +1175 -0
- package/node_modules/tweetnacl/nacl.min.js +1 -0
- package/node_modules/tweetnacl/package.json +58 -0
- package/package.json +95 -89
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: s390x Linux CMake
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
schedule:
|
|
7
|
+
# min hours day(month) month day(week)
|
|
8
|
+
- cron: '0 0 7,22 * *'
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
# Building using the github runner environement directly.
|
|
12
|
+
make:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
targets: [
|
|
17
|
+
[s390x],
|
|
18
|
+
]
|
|
19
|
+
fail-fast: false
|
|
20
|
+
env:
|
|
21
|
+
TARGET: ${{ matrix.targets[0] }}
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v2
|
|
24
|
+
- name: Build
|
|
25
|
+
run: make --directory=cmake/ci ${TARGET}_build
|
|
26
|
+
- name: Test
|
|
27
|
+
run: make --directory=cmake/ci ${TARGET}_test
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
dataSource: "prs"
|
|
3
|
+
ignoreLabels:
|
|
4
|
+
- "Apple M1"
|
|
5
|
+
- "duplicate"
|
|
6
|
+
- "help wanted"
|
|
7
|
+
- "invalid"
|
|
8
|
+
- "question"
|
|
9
|
+
- "wontfix"
|
|
10
|
+
onlyMilestones: false
|
|
11
|
+
groupBy:
|
|
12
|
+
"API Change":
|
|
13
|
+
- "API Change"
|
|
14
|
+
"New features / Enhancements":
|
|
15
|
+
- "enhancement"
|
|
16
|
+
- "internal"
|
|
17
|
+
"Bug Fixes":
|
|
18
|
+
- "bug"
|
|
19
|
+
"Misc":
|
|
20
|
+
- "misc"
|
|
21
|
+
changelogFilename: "CHANGELOG.md"
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
# cpu_features, a cross platform C99 library to get cpu features at runtime.
|
|
2
|
+
|
|
3
|
+
load("@bazel_skylib//lib:selects.bzl", "selects")
|
|
4
|
+
load("//:bazel/platforms.bzl", "PLATFORM_CPU_ARM", "PLATFORM_CPU_ARM64", "PLATFORM_CPU_MIPS", "PLATFORM_CPU_PPC", "PLATFORM_CPU_X86_64")
|
|
5
|
+
|
|
6
|
+
package(
|
|
7
|
+
default_visibility = ["//visibility:public"],
|
|
8
|
+
licenses = ["notice"],
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
exports_files(["LICENSE"])
|
|
12
|
+
|
|
13
|
+
INCLUDES = ["include"]
|
|
14
|
+
|
|
15
|
+
C99_FLAGS = [
|
|
16
|
+
"-std=c99",
|
|
17
|
+
"-Wall",
|
|
18
|
+
"-Wextra",
|
|
19
|
+
"-Wmissing-declarations",
|
|
20
|
+
"-Wmissing-prototypes",
|
|
21
|
+
"-Wno-implicit-fallthrough",
|
|
22
|
+
"-Wno-unused-function",
|
|
23
|
+
"-Wold-style-definition",
|
|
24
|
+
"-Wshadow",
|
|
25
|
+
"-Wsign-compare",
|
|
26
|
+
"-Wstrict-prototypes",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
cc_library(
|
|
30
|
+
name = "cpu_features_macros",
|
|
31
|
+
copts = C99_FLAGS,
|
|
32
|
+
includes = INCLUDES,
|
|
33
|
+
textual_hdrs = ["include/cpu_features_macros.h"],
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
cc_library(
|
|
37
|
+
name = "cpu_features_cache_info",
|
|
38
|
+
copts = C99_FLAGS,
|
|
39
|
+
includes = INCLUDES,
|
|
40
|
+
textual_hdrs = ["include/cpu_features_cache_info.h"],
|
|
41
|
+
deps = [":cpu_features_macros"],
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
cc_library(
|
|
45
|
+
name = "bit_utils",
|
|
46
|
+
copts = C99_FLAGS,
|
|
47
|
+
includes = INCLUDES,
|
|
48
|
+
textual_hdrs = ["include/internal/bit_utils.h"],
|
|
49
|
+
deps = [":cpu_features_macros"],
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
cc_test(
|
|
53
|
+
name = "bit_utils_test",
|
|
54
|
+
srcs = ["test/bit_utils_test.cc"],
|
|
55
|
+
includes = INCLUDES,
|
|
56
|
+
deps = [
|
|
57
|
+
":bit_utils",
|
|
58
|
+
"@com_google_googletest//:gtest_main",
|
|
59
|
+
],
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
cc_library(
|
|
63
|
+
name = "memory_utils",
|
|
64
|
+
copts = C99_FLAGS,
|
|
65
|
+
includes = INCLUDES,
|
|
66
|
+
textual_hdrs = [
|
|
67
|
+
"src/copy.inl",
|
|
68
|
+
"src/equals.inl",
|
|
69
|
+
],
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
cc_library(
|
|
73
|
+
name = "string_view",
|
|
74
|
+
srcs = [
|
|
75
|
+
"src/string_view.c",
|
|
76
|
+
],
|
|
77
|
+
copts = C99_FLAGS,
|
|
78
|
+
includes = INCLUDES,
|
|
79
|
+
textual_hdrs = ["include/internal/string_view.h"],
|
|
80
|
+
deps = [
|
|
81
|
+
":cpu_features_macros",
|
|
82
|
+
":memory_utils",
|
|
83
|
+
],
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
cc_test(
|
|
87
|
+
name = "string_view_test",
|
|
88
|
+
srcs = ["test/string_view_test.cc"],
|
|
89
|
+
includes = INCLUDES,
|
|
90
|
+
deps = [
|
|
91
|
+
":string_view",
|
|
92
|
+
"@com_google_googletest//:gtest_main",
|
|
93
|
+
],
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
cc_library(
|
|
97
|
+
name = "filesystem",
|
|
98
|
+
srcs = ["src/filesystem.c"],
|
|
99
|
+
copts = C99_FLAGS,
|
|
100
|
+
includes = INCLUDES,
|
|
101
|
+
textual_hdrs = ["include/internal/filesystem.h"],
|
|
102
|
+
deps = [":cpu_features_macros"],
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
cc_library(
|
|
106
|
+
name = "filesystem_for_testing",
|
|
107
|
+
testonly = 1,
|
|
108
|
+
srcs = [
|
|
109
|
+
"src/filesystem.c",
|
|
110
|
+
"test/filesystem_for_testing.cc",
|
|
111
|
+
],
|
|
112
|
+
hdrs = [
|
|
113
|
+
"include/internal/filesystem.h",
|
|
114
|
+
"test/filesystem_for_testing.h",
|
|
115
|
+
],
|
|
116
|
+
defines = ["CPU_FEATURES_MOCK_FILESYSTEM"],
|
|
117
|
+
includes = INCLUDES,
|
|
118
|
+
deps = [
|
|
119
|
+
":cpu_features_macros",
|
|
120
|
+
],
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
cc_library(
|
|
124
|
+
name = "stack_line_reader",
|
|
125
|
+
srcs = ["src/stack_line_reader.c"],
|
|
126
|
+
copts = C99_FLAGS,
|
|
127
|
+
defines = ["STACK_LINE_READER_BUFFER_SIZE=1024"],
|
|
128
|
+
includes = INCLUDES,
|
|
129
|
+
textual_hdrs = ["include/internal/stack_line_reader.h"],
|
|
130
|
+
deps = [
|
|
131
|
+
":cpu_features_macros",
|
|
132
|
+
":filesystem",
|
|
133
|
+
":string_view",
|
|
134
|
+
],
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
cc_test(
|
|
138
|
+
name = "stack_line_reader_test",
|
|
139
|
+
srcs = [
|
|
140
|
+
"include/internal/stack_line_reader.h",
|
|
141
|
+
"src/stack_line_reader.c",
|
|
142
|
+
"test/stack_line_reader_test.cc",
|
|
143
|
+
],
|
|
144
|
+
defines = ["STACK_LINE_READER_BUFFER_SIZE=16"],
|
|
145
|
+
includes = INCLUDES,
|
|
146
|
+
deps = [
|
|
147
|
+
":cpu_features_macros",
|
|
148
|
+
":filesystem_for_testing",
|
|
149
|
+
":string_view",
|
|
150
|
+
"@com_google_googletest//:gtest_main",
|
|
151
|
+
],
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
cc_library(
|
|
155
|
+
name = "stack_line_reader_to_use_with_filesystem_for_testing",
|
|
156
|
+
testonly = 1,
|
|
157
|
+
srcs = ["src/stack_line_reader.c"],
|
|
158
|
+
hdrs = ["include/internal/stack_line_reader.h"],
|
|
159
|
+
copts = C99_FLAGS,
|
|
160
|
+
defines = ["STACK_LINE_READER_BUFFER_SIZE=1024"],
|
|
161
|
+
includes = INCLUDES,
|
|
162
|
+
deps = [
|
|
163
|
+
":cpu_features_macros",
|
|
164
|
+
":filesystem_for_testing",
|
|
165
|
+
":string_view",
|
|
166
|
+
],
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
cc_library(
|
|
170
|
+
name = "hwcaps",
|
|
171
|
+
srcs = ["src/hwcaps.c"],
|
|
172
|
+
copts = C99_FLAGS,
|
|
173
|
+
defines = ["HAVE_STRONG_GETAUXVAL"],
|
|
174
|
+
includes = INCLUDES,
|
|
175
|
+
textual_hdrs = ["include/internal/hwcaps.h"],
|
|
176
|
+
deps = [
|
|
177
|
+
":cpu_features_macros",
|
|
178
|
+
":filesystem",
|
|
179
|
+
":string_view",
|
|
180
|
+
],
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
cc_library(
|
|
184
|
+
name = "hwcaps_for_testing",
|
|
185
|
+
testonly = 1,
|
|
186
|
+
srcs = [
|
|
187
|
+
"src/hwcaps.c",
|
|
188
|
+
"test/hwcaps_for_testing.cc",
|
|
189
|
+
],
|
|
190
|
+
hdrs = [
|
|
191
|
+
"include/internal/hwcaps.h",
|
|
192
|
+
"test/hwcaps_for_testing.h",
|
|
193
|
+
],
|
|
194
|
+
defines = [
|
|
195
|
+
"CPU_FEATURES_MOCK_GET_ELF_HWCAP_FROM_GETAUXVAL",
|
|
196
|
+
"CPU_FEATURES_TEST",
|
|
197
|
+
],
|
|
198
|
+
includes = INCLUDES,
|
|
199
|
+
deps = [
|
|
200
|
+
":cpu_features_macros",
|
|
201
|
+
":filesystem_for_testing",
|
|
202
|
+
":string_view",
|
|
203
|
+
],
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
cc_library(
|
|
207
|
+
name = "cpuinfo",
|
|
208
|
+
srcs = selects.with_or({
|
|
209
|
+
PLATFORM_CPU_X86_64: [
|
|
210
|
+
"src/impl_x86_freebsd.c",
|
|
211
|
+
"src/impl_x86_linux_or_android.c",
|
|
212
|
+
"src/impl_x86_macos.c",
|
|
213
|
+
"src/impl_x86_windows.c",
|
|
214
|
+
],
|
|
215
|
+
PLATFORM_CPU_ARM: ["src/impl_arm_linux_or_android.c"],
|
|
216
|
+
PLATFORM_CPU_ARM64: ["src/impl_aarch64_linux_or_android.c"],
|
|
217
|
+
PLATFORM_CPU_MIPS: ["src/impl_mips_linux_or_android.c"],
|
|
218
|
+
PLATFORM_CPU_PPC: ["src/impl_ppc_linux.c"],
|
|
219
|
+
}),
|
|
220
|
+
copts = C99_FLAGS,
|
|
221
|
+
includes = INCLUDES,
|
|
222
|
+
textual_hdrs = selects.with_or({
|
|
223
|
+
PLATFORM_CPU_X86_64: [
|
|
224
|
+
"src/impl_x86__base_implementation.inl",
|
|
225
|
+
"include/cpuinfo_x86.h",
|
|
226
|
+
"include/internal/cpuid_x86.h",
|
|
227
|
+
"include/internal/windows_utils.h",
|
|
228
|
+
],
|
|
229
|
+
PLATFORM_CPU_ARM: ["include/cpuinfo_arm.h"],
|
|
230
|
+
PLATFORM_CPU_ARM64: ["include/cpuinfo_aarch64.h"],
|
|
231
|
+
PLATFORM_CPU_MIPS: ["include/cpuinfo_mips.h"],
|
|
232
|
+
PLATFORM_CPU_PPC: ["include/cpuinfo_ppc.h"],
|
|
233
|
+
}) + [
|
|
234
|
+
"src/define_introspection.inl",
|
|
235
|
+
"src/define_introspection_and_hwcaps.inl",
|
|
236
|
+
],
|
|
237
|
+
deps = [
|
|
238
|
+
":bit_utils",
|
|
239
|
+
":cpu_features_cache_info",
|
|
240
|
+
":cpu_features_macros",
|
|
241
|
+
":filesystem",
|
|
242
|
+
":hwcaps",
|
|
243
|
+
":memory_utils",
|
|
244
|
+
":stack_line_reader",
|
|
245
|
+
":string_view",
|
|
246
|
+
],
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
cc_library(
|
|
250
|
+
name = "cpuinfo_for_testing",
|
|
251
|
+
testonly = 1,
|
|
252
|
+
srcs = selects.with_or({
|
|
253
|
+
PLATFORM_CPU_X86_64: [
|
|
254
|
+
"src/impl_x86_freebsd.c",
|
|
255
|
+
"src/impl_x86_linux_or_android.c",
|
|
256
|
+
"src/impl_x86_macos.c",
|
|
257
|
+
"src/impl_x86_windows.c",
|
|
258
|
+
],
|
|
259
|
+
PLATFORM_CPU_ARM: ["src/impl_arm_linux_or_android.c"],
|
|
260
|
+
PLATFORM_CPU_ARM64: ["src/impl_aarch64_linux_or_android.c"],
|
|
261
|
+
PLATFORM_CPU_MIPS: ["src/impl_mips_linux_or_android.c"],
|
|
262
|
+
PLATFORM_CPU_PPC: ["src/impl_ppc_linux.c"],
|
|
263
|
+
}),
|
|
264
|
+
hdrs = selects.with_or({
|
|
265
|
+
PLATFORM_CPU_X86_64: [
|
|
266
|
+
"include/cpuinfo_x86.h",
|
|
267
|
+
"include/internal/cpuid_x86.h",
|
|
268
|
+
"include/internal/windows_utils.h",
|
|
269
|
+
],
|
|
270
|
+
PLATFORM_CPU_ARM: ["include/cpuinfo_arm.h"],
|
|
271
|
+
PLATFORM_CPU_ARM64: ["include/cpuinfo_aarch64.h"],
|
|
272
|
+
PLATFORM_CPU_MIPS: ["include/cpuinfo_mips.h"],
|
|
273
|
+
PLATFORM_CPU_PPC: ["include/cpuinfo_ppc.h"],
|
|
274
|
+
}),
|
|
275
|
+
copts = C99_FLAGS,
|
|
276
|
+
defines = selects.with_or({
|
|
277
|
+
PLATFORM_CPU_X86_64: ["CPU_FEATURES_MOCK_CPUID_X86"],
|
|
278
|
+
"//conditions:default": [],
|
|
279
|
+
}),
|
|
280
|
+
includes = INCLUDES,
|
|
281
|
+
textual_hdrs = selects.with_or({
|
|
282
|
+
PLATFORM_CPU_X86_64: ["src/impl_x86__base_implementation.inl"],
|
|
283
|
+
"//conditions:default": [],
|
|
284
|
+
}) + [
|
|
285
|
+
"src/define_introspection.inl",
|
|
286
|
+
"src/define_introspection_and_hwcaps.inl",
|
|
287
|
+
],
|
|
288
|
+
deps = [
|
|
289
|
+
":bit_utils",
|
|
290
|
+
":cpu_features_cache_info",
|
|
291
|
+
":cpu_features_macros",
|
|
292
|
+
":filesystem_for_testing",
|
|
293
|
+
":hwcaps_for_testing",
|
|
294
|
+
":memory_utils",
|
|
295
|
+
":stack_line_reader_to_use_with_filesystem_for_testing",
|
|
296
|
+
":string_view",
|
|
297
|
+
],
|
|
298
|
+
)
|
|
299
|
+
|
|
300
|
+
cc_test(
|
|
301
|
+
name = "cpuinfo_test",
|
|
302
|
+
srcs = selects.with_or({
|
|
303
|
+
PLATFORM_CPU_ARM64: ["test/cpuinfo_aarch64_test.cc"],
|
|
304
|
+
PLATFORM_CPU_ARM: ["test/cpuinfo_arm_test.cc"],
|
|
305
|
+
PLATFORM_CPU_MIPS: ["test/cpuinfo_mips_test.cc"],
|
|
306
|
+
PLATFORM_CPU_PPC: ["test/cpuinfo_ppc_test.cc"],
|
|
307
|
+
PLATFORM_CPU_X86_64: ["test/cpuinfo_x86_test.cc"],
|
|
308
|
+
}),
|
|
309
|
+
includes = INCLUDES,
|
|
310
|
+
deps = [
|
|
311
|
+
":cpuinfo_for_testing",
|
|
312
|
+
":filesystem_for_testing",
|
|
313
|
+
":hwcaps_for_testing",
|
|
314
|
+
":string_view",
|
|
315
|
+
"@com_google_googletest//:gtest_main",
|
|
316
|
+
],
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
cc_binary(
|
|
320
|
+
name = "list_cpu_features",
|
|
321
|
+
srcs = ["src/utils/list_cpu_features.c"],
|
|
322
|
+
copts = C99_FLAGS,
|
|
323
|
+
includes = INCLUDES,
|
|
324
|
+
deps = [
|
|
325
|
+
":bit_utils",
|
|
326
|
+
":cpu_features_macros",
|
|
327
|
+
":cpuinfo",
|
|
328
|
+
],
|
|
329
|
+
)
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.19.2)
|
|
2
|
+
|
|
3
|
+
# option() honors normal variables.
|
|
4
|
+
# see: https://cmake.org/cmake/help/git-stage/policy/CMP0077.html
|
|
5
|
+
if(POLICY CMP0077)
|
|
6
|
+
cmake_policy(SET CMP0077 NEW)
|
|
7
|
+
endif()
|
|
8
|
+
|
|
9
|
+
project(CpuFeatures VERSION 0.8.0 LANGUAGES C)
|
|
10
|
+
|
|
11
|
+
set(CMAKE_C_STANDARD 99)
|
|
12
|
+
|
|
13
|
+
# Default Build Type to be Release
|
|
14
|
+
if(NOT CMAKE_BUILD_TYPE)
|
|
15
|
+
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
|
|
16
|
+
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
|
|
17
|
+
FORCE)
|
|
18
|
+
endif(NOT CMAKE_BUILD_TYPE)
|
|
19
|
+
|
|
20
|
+
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make
|
|
21
|
+
# it prominent in the GUI.
|
|
22
|
+
# cpu_features uses bit-fields which are - to some extends - implementation-defined (see https://en.cppreference.com/w/c/language/bit_field).
|
|
23
|
+
# As a consequence it is discouraged to use cpu_features as a shared library because different compilers may interpret the code in different ways.
|
|
24
|
+
# Prefer static linking from source whenever possible.
|
|
25
|
+
option(BUILD_SHARED_LIBS "Build library as shared." OFF)
|
|
26
|
+
|
|
27
|
+
# Force PIC on unix when building shared libs
|
|
28
|
+
# see: https://en.wikipedia.org/wiki/Position-independent_code
|
|
29
|
+
if(BUILD_SHARED_LIBS AND UNIX)
|
|
30
|
+
option(CMAKE_POSITION_INDEPENDENT_CODE "Build with Position Independant Code." ON)
|
|
31
|
+
endif()
|
|
32
|
+
|
|
33
|
+
include(CheckIncludeFile)
|
|
34
|
+
include(CheckSymbolExists)
|
|
35
|
+
include(GNUInstallDirs)
|
|
36
|
+
|
|
37
|
+
macro(setup_include_and_definitions TARGET_NAME)
|
|
38
|
+
target_include_directories(${TARGET_NAME}
|
|
39
|
+
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
|
40
|
+
PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/internal>
|
|
41
|
+
)
|
|
42
|
+
target_compile_definitions(${TARGET_NAME}
|
|
43
|
+
PUBLIC STACK_LINE_READER_BUFFER_SIZE=1024
|
|
44
|
+
)
|
|
45
|
+
endmacro()
|
|
46
|
+
|
|
47
|
+
set(PROCESSOR_IS_MIPS FALSE)
|
|
48
|
+
set(PROCESSOR_IS_ARM FALSE)
|
|
49
|
+
set(PROCESSOR_IS_AARCH64 FALSE)
|
|
50
|
+
set(PROCESSOR_IS_X86 FALSE)
|
|
51
|
+
set(PROCESSOR_IS_POWER FALSE)
|
|
52
|
+
set(PROCESSOR_IS_S390X FALSE)
|
|
53
|
+
set(PROCESSOR_IS_RISCV FALSE)
|
|
54
|
+
|
|
55
|
+
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
|
|
56
|
+
set(PROCESSOR_IS_MIPS TRUE)
|
|
57
|
+
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)")
|
|
58
|
+
set(PROCESSOR_IS_AARCH64 TRUE)
|
|
59
|
+
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
|
|
60
|
+
set(PROCESSOR_IS_ARM TRUE)
|
|
61
|
+
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(AMD64|amd64)|(^i.86$)")
|
|
62
|
+
set(PROCESSOR_IS_X86 TRUE)
|
|
63
|
+
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)")
|
|
64
|
+
set(PROCESSOR_IS_POWER TRUE)
|
|
65
|
+
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(s390x)")
|
|
66
|
+
set(PROCESSOR_IS_S390X TRUE)
|
|
67
|
+
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^riscv")
|
|
68
|
+
set(PROCESSOR_IS_RISCV TRUE)
|
|
69
|
+
endif()
|
|
70
|
+
|
|
71
|
+
macro(add_cpu_features_headers_and_sources HDRS_LIST_NAME SRCS_LIST_NAME)
|
|
72
|
+
list(APPEND ${HDRS_LIST_NAME} ${PROJECT_SOURCE_DIR}/include/cpu_features_macros.h)
|
|
73
|
+
list(APPEND ${HDRS_LIST_NAME} ${PROJECT_SOURCE_DIR}/include/cpu_features_cache_info.h)
|
|
74
|
+
file(GLOB IMPL_SOURCES CONFIGURE_DEPENDS "${PROJECT_SOURCE_DIR}/src/impl_*.c")
|
|
75
|
+
list(APPEND ${SRCS_LIST_NAME} ${IMPL_SOURCES})
|
|
76
|
+
if(PROCESSOR_IS_MIPS)
|
|
77
|
+
list(APPEND ${HDRS_LIST_NAME} ${PROJECT_SOURCE_DIR}/include/cpuinfo_mips.h)
|
|
78
|
+
elseif(PROCESSOR_IS_ARM)
|
|
79
|
+
list(APPEND ${HDRS_LIST_NAME} ${PROJECT_SOURCE_DIR}/include/cpuinfo_arm.h)
|
|
80
|
+
elseif(PROCESSOR_IS_AARCH64)
|
|
81
|
+
list(APPEND ${HDRS_LIST_NAME} ${PROJECT_SOURCE_DIR}/include/cpuinfo_aarch64.h)
|
|
82
|
+
list(APPEND ${SRCS_LIST_NAME} ${PROJECT_SOURCE_DIR}/include/internal/windows_utils.h)
|
|
83
|
+
elseif(PROCESSOR_IS_X86)
|
|
84
|
+
list(APPEND ${HDRS_LIST_NAME} ${PROJECT_SOURCE_DIR}/include/cpuinfo_x86.h)
|
|
85
|
+
list(APPEND ${SRCS_LIST_NAME} ${PROJECT_SOURCE_DIR}/include/internal/cpuid_x86.h)
|
|
86
|
+
list(APPEND ${SRCS_LIST_NAME} ${PROJECT_SOURCE_DIR}/include/internal/windows_utils.h)
|
|
87
|
+
elseif(PROCESSOR_IS_POWER)
|
|
88
|
+
list(APPEND ${HDRS_LIST_NAME} ${PROJECT_SOURCE_DIR}/include/cpuinfo_ppc.h)
|
|
89
|
+
elseif(PROCESSOR_IS_S390X)
|
|
90
|
+
list(APPEND ${HDRS_LIST_NAME} ${PROJECT_SOURCE_DIR}/include/cpuinfo_s390x.h)
|
|
91
|
+
elseif(PROCESSOR_IS_RISCV)
|
|
92
|
+
list(APPEND ${HDRS_LIST_NAME} ${PROJECT_SOURCE_DIR}/include/cpuinfo_riscv.h)
|
|
93
|
+
else()
|
|
94
|
+
message(FATAL_ERROR "Unsupported architectures ${CMAKE_SYSTEM_PROCESSOR}")
|
|
95
|
+
endif()
|
|
96
|
+
endmacro()
|
|
97
|
+
|
|
98
|
+
#
|
|
99
|
+
# library : utils
|
|
100
|
+
#
|
|
101
|
+
|
|
102
|
+
add_library(utils OBJECT
|
|
103
|
+
${PROJECT_SOURCE_DIR}/include/internal/bit_utils.h
|
|
104
|
+
${PROJECT_SOURCE_DIR}/include/internal/filesystem.h
|
|
105
|
+
${PROJECT_SOURCE_DIR}/include/internal/stack_line_reader.h
|
|
106
|
+
${PROJECT_SOURCE_DIR}/include/internal/string_view.h
|
|
107
|
+
${PROJECT_SOURCE_DIR}/src/filesystem.c
|
|
108
|
+
${PROJECT_SOURCE_DIR}/src/stack_line_reader.c
|
|
109
|
+
${PROJECT_SOURCE_DIR}/src/string_view.c
|
|
110
|
+
)
|
|
111
|
+
setup_include_and_definitions(utils)
|
|
112
|
+
|
|
113
|
+
#
|
|
114
|
+
# library : unix_based_hardware_detection
|
|
115
|
+
#
|
|
116
|
+
|
|
117
|
+
if(UNIX)
|
|
118
|
+
add_library(unix_based_hardware_detection OBJECT
|
|
119
|
+
${PROJECT_SOURCE_DIR}/include/internal/hwcaps.h
|
|
120
|
+
${PROJECT_SOURCE_DIR}/src/hwcaps.c
|
|
121
|
+
)
|
|
122
|
+
setup_include_and_definitions(unix_based_hardware_detection)
|
|
123
|
+
check_include_file(dlfcn.h HAVE_DLFCN_H)
|
|
124
|
+
if(HAVE_DLFCN_H)
|
|
125
|
+
target_compile_definitions(unix_based_hardware_detection PRIVATE HAVE_DLFCN_H)
|
|
126
|
+
endif()
|
|
127
|
+
check_symbol_exists(getauxval "sys/auxv.h" HAVE_STRONG_GETAUXVAL)
|
|
128
|
+
if(HAVE_STRONG_GETAUXVAL)
|
|
129
|
+
target_compile_definitions(unix_based_hardware_detection PRIVATE HAVE_STRONG_GETAUXVAL)
|
|
130
|
+
endif()
|
|
131
|
+
endif()
|
|
132
|
+
|
|
133
|
+
#
|
|
134
|
+
# library : cpu_features
|
|
135
|
+
#
|
|
136
|
+
set (CPU_FEATURES_HDRS)
|
|
137
|
+
set (CPU_FEATURES_SRCS)
|
|
138
|
+
add_cpu_features_headers_and_sources(CPU_FEATURES_HDRS CPU_FEATURES_SRCS)
|
|
139
|
+
list(APPEND CPU_FEATURES_SRCS $<TARGET_OBJECTS:utils>)
|
|
140
|
+
if(NOT PROCESSOR_IS_X86 AND UNIX)
|
|
141
|
+
list(APPEND CPU_FEATURES_SRCS $<TARGET_OBJECTS:unix_based_hardware_detection>)
|
|
142
|
+
endif()
|
|
143
|
+
add_library(cpu_features ${CPU_FEATURES_HDRS} ${CPU_FEATURES_SRCS})
|
|
144
|
+
set_target_properties(cpu_features PROPERTIES PUBLIC_HEADER "${CPU_FEATURES_HDRS}")
|
|
145
|
+
setup_include_and_definitions(cpu_features)
|
|
146
|
+
target_link_libraries(cpu_features PUBLIC ${CMAKE_DL_LIBS})
|
|
147
|
+
target_include_directories(cpu_features
|
|
148
|
+
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/cpu_features>
|
|
149
|
+
)
|
|
150
|
+
if(PROCESSOR_IS_X86 OR PROCESSOR_IS_AARCH64)
|
|
151
|
+
if(APPLE)
|
|
152
|
+
target_compile_definitions(cpu_features PRIVATE HAVE_SYSCTLBYNAME)
|
|
153
|
+
endif()
|
|
154
|
+
endif()
|
|
155
|
+
add_library(CpuFeature::cpu_features ALIAS cpu_features)
|
|
156
|
+
|
|
157
|
+
#
|
|
158
|
+
# program : list_cpu_features
|
|
159
|
+
#
|
|
160
|
+
|
|
161
|
+
add_executable(list_cpu_features ${PROJECT_SOURCE_DIR}/src/utils/list_cpu_features.c)
|
|
162
|
+
target_link_libraries(list_cpu_features PRIVATE cpu_features)
|
|
163
|
+
add_executable(CpuFeature::list_cpu_features ALIAS list_cpu_features)
|
|
164
|
+
|
|
165
|
+
#
|
|
166
|
+
# ndk_compat
|
|
167
|
+
#
|
|
168
|
+
|
|
169
|
+
if(ANDROID)
|
|
170
|
+
add_subdirectory(ndk_compat)
|
|
171
|
+
endif()
|
|
172
|
+
|
|
173
|
+
#
|
|
174
|
+
# tests
|
|
175
|
+
#
|
|
176
|
+
|
|
177
|
+
include(CTest)
|
|
178
|
+
if(BUILD_TESTING)
|
|
179
|
+
# Automatically incorporate googletest into the CMake Project if target not
|
|
180
|
+
# found.
|
|
181
|
+
enable_language(CXX)
|
|
182
|
+
|
|
183
|
+
set(CMAKE_CXX_STANDARD 14)
|
|
184
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
185
|
+
set(CMAKE_CXX_EXTENSIONS OFF) # prefer use of -std14 instead of -gnustd14
|
|
186
|
+
|
|
187
|
+
if(NOT TARGET gtest OR NOT TARGET gmock_main)
|
|
188
|
+
# Download and unpack googletest at configure time.
|
|
189
|
+
configure_file(
|
|
190
|
+
cmake/googletest.CMakeLists.txt.in
|
|
191
|
+
googletest-download/CMakeLists.txt
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
execute_process(
|
|
195
|
+
COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
|
|
196
|
+
RESULT_VARIABLE result
|
|
197
|
+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download)
|
|
198
|
+
|
|
199
|
+
if(result)
|
|
200
|
+
message(FATAL_ERROR "CMake step for googletest failed: ${result}")
|
|
201
|
+
endif()
|
|
202
|
+
|
|
203
|
+
execute_process(
|
|
204
|
+
COMMAND ${CMAKE_COMMAND} --build .
|
|
205
|
+
RESULT_VARIABLE result
|
|
206
|
+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download)
|
|
207
|
+
|
|
208
|
+
if(result)
|
|
209
|
+
message(FATAL_ERROR "Build step for googletest failed: ${result}")
|
|
210
|
+
endif()
|
|
211
|
+
|
|
212
|
+
# Prevent overriding the parent project's compiler/linker settings on
|
|
213
|
+
# Windows.
|
|
214
|
+
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
|
215
|
+
|
|
216
|
+
# Add googletest directly to our build. This defines the gtest and
|
|
217
|
+
# gtest_main targets.
|
|
218
|
+
add_subdirectory(${CMAKE_BINARY_DIR}/googletest-src
|
|
219
|
+
${CMAKE_BINARY_DIR}/googletest-build
|
|
220
|
+
EXCLUDE_FROM_ALL)
|
|
221
|
+
endif()
|
|
222
|
+
|
|
223
|
+
add_subdirectory(test)
|
|
224
|
+
endif()
|
|
225
|
+
|
|
226
|
+
#
|
|
227
|
+
# Install cpu_features and list_cpu_features
|
|
228
|
+
#
|
|
229
|
+
|
|
230
|
+
include(GNUInstallDirs)
|
|
231
|
+
install(TARGETS cpu_features list_cpu_features
|
|
232
|
+
EXPORT CpuFeaturesTargets
|
|
233
|
+
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cpu_features
|
|
234
|
+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
235
|
+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
236
|
+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
237
|
+
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
238
|
+
)
|
|
239
|
+
install(EXPORT CpuFeaturesTargets
|
|
240
|
+
NAMESPACE CpuFeatures::
|
|
241
|
+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/CpuFeatures
|
|
242
|
+
COMPONENT Devel
|
|
243
|
+
)
|
|
244
|
+
include(CMakePackageConfigHelpers)
|
|
245
|
+
configure_package_config_file(cmake/CpuFeaturesConfig.cmake.in
|
|
246
|
+
"${PROJECT_BINARY_DIR}/CpuFeaturesConfig.cmake"
|
|
247
|
+
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/CpuFeatures"
|
|
248
|
+
NO_SET_AND_CHECK_MACRO
|
|
249
|
+
NO_CHECK_REQUIRED_COMPONENTS_MACRO
|
|
250
|
+
)
|
|
251
|
+
write_basic_package_version_file(
|
|
252
|
+
"${PROJECT_BINARY_DIR}/CpuFeaturesConfigVersion.cmake"
|
|
253
|
+
COMPATIBILITY SameMajorVersion
|
|
254
|
+
)
|
|
255
|
+
install(
|
|
256
|
+
FILES
|
|
257
|
+
"${PROJECT_BINARY_DIR}/CpuFeaturesConfig.cmake"
|
|
258
|
+
"${PROJECT_BINARY_DIR}/CpuFeaturesConfigVersion.cmake"
|
|
259
|
+
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/CpuFeatures"
|
|
260
|
+
COMPONENT Devel
|
|
261
|
+
)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# How to Contribute
|
|
2
|
+
|
|
3
|
+
We'd love to accept your patches and contributions to this project. There are
|
|
4
|
+
just a few small guidelines you need to follow.
|
|
5
|
+
|
|
6
|
+
## Contributor License Agreement
|
|
7
|
+
|
|
8
|
+
Contributions to this project must be accompanied by a Contributor License
|
|
9
|
+
Agreement. You (or your employer) retain the copyright to your contribution;
|
|
10
|
+
this simply gives us permission to use and redistribute your contributions as
|
|
11
|
+
part of the project. Head over to <https://cla.developers.google.com/> to see
|
|
12
|
+
your current agreements on file or to sign a new one.
|
|
13
|
+
|
|
14
|
+
You generally only need to submit a CLA once, so if you've already submitted one
|
|
15
|
+
(even if it was for a different project), you probably don't need to do it
|
|
16
|
+
again.
|
|
17
|
+
|
|
18
|
+
## Code reviews
|
|
19
|
+
|
|
20
|
+
All submissions, including submissions by project members, require review. We
|
|
21
|
+
use GitHub pull requests for this purpose. Consult
|
|
22
|
+
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
|
|
23
|
+
information on using pull requests.
|