@xulongzhe/clawbench-desktop-linux-x64-payload 0.102.0

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.
Files changed (120) hide show
  1. package/package.json +10 -0
  2. package/payload.json +4 -0
  3. package/resources/app.asar +0 -0
  4. package/resources/app.asar.unpacked/node_modules/cpu-features/.eslintrc.js +5 -0
  5. package/resources/app.asar.unpacked/node_modules/cpu-features/LICENSE +19 -0
  6. package/resources/app.asar.unpacked/node_modules/cpu-features/build/Release/cpufeatures.node +0 -0
  7. package/resources/app.asar.unpacked/node_modules/cpu-features/build/deps/cpu_features/cpu_features.Makefile +6 -0
  8. package/resources/app.asar.unpacked/node_modules/cpu-features/buildcheck.gypi +19 -0
  9. package/resources/app.asar.unpacked/node_modules/cpu-features/buildcheck.js +32 -0
  10. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/.clang-format +4 -0
  11. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/.dockerignore +31 -0
  12. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/.grenrc.yml +21 -0
  13. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/BUILD.bazel +329 -0
  14. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/CMakeLists.txt +261 -0
  15. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/CONTRIBUTING.md +23 -0
  16. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/LICENSE +230 -0
  17. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/README.md +272 -0
  18. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/WORKSPACE +19 -0
  19. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/bazel/ci/README.md +5 -0
  20. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/bazel/platforms.bzl +11 -0
  21. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/cmake/CpuFeaturesConfig.cmake.in +3 -0
  22. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/cmake/CpuFeaturesNdkCompatConfig.cmake.in +3 -0
  23. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/cmake/README.md +30 -0
  24. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/cmake/ci/Makefile +252 -0
  25. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/cmake/ci/README.md +40 -0
  26. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/docker.dot +64 -0
  27. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/docker.svg +312 -0
  28. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/generate_image.sh +7 -0
  29. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/cmake/ci/docker/amd64/Dockerfile +48 -0
  30. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/cmake/ci/docker/toolchain/Dockerfile +34 -0
  31. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/cmake/ci/sample/CMakeLists.txt +22 -0
  32. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/cmake/ci/sample/main.cpp +11 -0
  33. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/cmake/ci/vagrant/freebsd/Vagrantfile +107 -0
  34. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/cmake/googletest.CMakeLists.txt.in +15 -0
  35. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/cpu_features.gyp +105 -0
  36. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/include/cpu_features_cache_info.h +54 -0
  37. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/include/cpu_features_macros.h +384 -0
  38. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_aarch64.h +259 -0
  39. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_arm.h +121 -0
  40. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_mips.h +74 -0
  41. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_ppc.h +149 -0
  42. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_riscv.h +72 -0
  43. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_s390x.h +108 -0
  44. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_x86.h +288 -0
  45. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/include/internal/bit_utils.h +40 -0
  46. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/include/internal/cpuid_x86.h +37 -0
  47. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/include/internal/filesystem.h +39 -0
  48. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/include/internal/hwcaps.h +240 -0
  49. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/include/internal/stack_line_reader.h +49 -0
  50. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/include/internal/string_view.h +110 -0
  51. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/include/internal/windows_utils.h +70 -0
  52. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/ndk_compat/CMakeLists.txt +60 -0
  53. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/ndk_compat/README.md +4 -0
  54. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/ndk_compat/cpu-features.c +205 -0
  55. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/ndk_compat/cpu-features.h +320 -0
  56. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/ndk_compat/ndk-compat-test.c +12 -0
  57. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/patches/0001-Add-Apple-Silicon-Support.patch +456 -0
  58. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/scripts/generate_badges.d +165 -0
  59. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/scripts/make_release.sh +75 -0
  60. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/scripts/run_integration.sh +490 -0
  61. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/scripts/test_integration.sh +79 -0
  62. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/copy.inl +19 -0
  63. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/define_introspection.inl +86 -0
  64. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/define_introspection_and_hwcaps.inl +26 -0
  65. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/equals.inl +22 -0
  66. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/filesystem.c +62 -0
  67. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/hwcaps.c +169 -0
  68. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64__base_implementation.inl +88 -0
  69. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_linux_or_android.c +79 -0
  70. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.c +82 -0
  71. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_windows.c +138 -0
  72. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/impl_arm_linux_or_android.c +212 -0
  73. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/impl_mips_linux_or_android.c +93 -0
  74. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/impl_ppc_linux.c +163 -0
  75. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/impl_riscv_linux.c +111 -0
  76. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/impl_s390x_linux.c +120 -0
  77. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/impl_x86__base_implementation.inl +2055 -0
  78. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/impl_x86_freebsd.c +68 -0
  79. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/impl_x86_linux_or_android.c +58 -0
  80. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/impl_x86_macos.c +57 -0
  81. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/impl_x86_windows.c +58 -0
  82. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/stack_line_reader.c +132 -0
  83. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/string_view.c +192 -0
  84. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/src/utils/list_cpu_features.c +461 -0
  85. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/test/CMakeLists.txt +114 -0
  86. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/test/filesystem_for_testing.h +61 -0
  87. package/resources/app.asar.unpacked/node_modules/cpu-features/deps/cpu_features/test/hwcaps_for_testing.h +31 -0
  88. package/resources/app.asar.unpacked/node_modules/cpu-features/lib/index.js +5 -0
  89. package/resources/app.asar.unpacked/node_modules/cpu-features/package.json +28 -0
  90. package/resources/app.asar.unpacked/node_modules/ssh2/.eslintignore +4 -0
  91. package/resources/app.asar.unpacked/node_modules/ssh2/.eslintrc.js +5 -0
  92. package/resources/app.asar.unpacked/node_modules/ssh2/LICENSE +19 -0
  93. package/resources/app.asar.unpacked/node_modules/ssh2/SFTP.md +413 -0
  94. package/resources/app.asar.unpacked/node_modules/ssh2/install.js +27 -0
  95. package/resources/app.asar.unpacked/node_modules/ssh2/lib/Channel.js +295 -0
  96. package/resources/app.asar.unpacked/node_modules/ssh2/lib/agent.js +1123 -0
  97. package/resources/app.asar.unpacked/node_modules/ssh2/lib/client.js +2176 -0
  98. package/resources/app.asar.unpacked/node_modules/ssh2/lib/http-agents.js +84 -0
  99. package/resources/app.asar.unpacked/node_modules/ssh2/lib/index.js +44 -0
  100. package/resources/app.asar.unpacked/node_modules/ssh2/lib/keygen.js +582 -0
  101. package/resources/app.asar.unpacked/node_modules/ssh2/lib/protocol/Protocol.js +2136 -0
  102. package/resources/app.asar.unpacked/node_modules/ssh2/lib/protocol/SFTP.js +4052 -0
  103. package/resources/app.asar.unpacked/node_modules/ssh2/lib/protocol/constants.js +356 -0
  104. package/resources/app.asar.unpacked/node_modules/ssh2/lib/protocol/crypto/build/Release/sshcrypto.node +0 -0
  105. package/resources/app.asar.unpacked/node_modules/ssh2/lib/protocol/crypto/poly1305.js +43 -0
  106. package/resources/app.asar.unpacked/node_modules/ssh2/lib/protocol/crypto.js +1602 -0
  107. package/resources/app.asar.unpacked/node_modules/ssh2/lib/protocol/handlers.js +16 -0
  108. package/resources/app.asar.unpacked/node_modules/ssh2/lib/protocol/handlers.misc.js +1285 -0
  109. package/resources/app.asar.unpacked/node_modules/ssh2/lib/protocol/kex.js +1908 -0
  110. package/resources/app.asar.unpacked/node_modules/ssh2/lib/protocol/keyParser.js +1484 -0
  111. package/resources/app.asar.unpacked/node_modules/ssh2/lib/protocol/node-fs-compat.js +115 -0
  112. package/resources/app.asar.unpacked/node_modules/ssh2/lib/protocol/utils.js +356 -0
  113. package/resources/app.asar.unpacked/node_modules/ssh2/lib/protocol/zlib.js +255 -0
  114. package/resources/app.asar.unpacked/node_modules/ssh2/lib/server.js +1380 -0
  115. package/resources/app.asar.unpacked/node_modules/ssh2/lib/utils.js +336 -0
  116. package/resources/app.asar.unpacked/node_modules/ssh2/package.json +32 -0
  117. package/resources/app.asar.unpacked/node_modules/ssh2/util/build_pagent.bat +2 -0
  118. package/resources/app.asar.unpacked/node_modules/ssh2/util/pagent.c +88 -0
  119. package/resources/login.html +1777 -0
  120. package/resources/logo.png +0 -0
package/package.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@xulongzhe/clawbench-desktop-linux-x64-payload",
3
+ "version": "0.102.0",
4
+ "description": "ClawBench desktop client — Linux x64 incremental-upgrade payload (app files only, no Electron runtime)",
5
+ "files": [
6
+ "payload.json",
7
+ "resources/"
8
+ ],
9
+ "license": "MIT"
10
+ }
package/payload.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "electron": "44.4.3",
3
+ "shell": "sha256-7a0d4e5e71bac0e161f65aa81fd51ec1800cb11901d85e9052e991ab903bbbb3"
4
+ }
Binary file
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ extends: '@mscdex/eslint-config',
5
+ };
@@ -0,0 +1,19 @@
1
+ Copyright Brian White. All rights reserved.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to
5
+ deal in the Software without restriction, including without limitation the
6
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
+ sell copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19
+ IN THE SOFTWARE.
@@ -0,0 +1,6 @@
1
+ # This file is generated by gyp; do not edit.
2
+
3
+ export builddir_name ?= ./build/deps/cpu_features/.
4
+ .PHONY: all
5
+ all:
6
+ $(MAKE) -C ../.. cpu_features
@@ -0,0 +1,19 @@
1
+ {
2
+ "conditions": [
3
+ [
4
+ "OS!=\"win\" and target_arch not in \"ia32 x32 x64\"",
5
+ {
6
+ "defines": [
7
+ "HAVE_STRONG_GETAUXVAL=1",
8
+ "HAVE_DLFCN_H=1",
9
+ "HAVE_GETAUXVAL=1"
10
+ ],
11
+ "libraries": [],
12
+ "sources": [
13
+ "deps/cpu_features/include/internal/hwcaps.h",
14
+ "deps/cpu_features/src/hwcaps.c"
15
+ ]
16
+ }
17
+ ]
18
+ ]
19
+ }
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ const BuildEnvironment = require('buildcheck');
4
+
5
+ const be = new BuildEnvironment();
6
+
7
+ let gyp = {
8
+ defines: [],
9
+ libraries: [],
10
+ sources: [
11
+ 'deps/cpu_features/include/internal/hwcaps.h',
12
+ 'deps/cpu_features/src/hwcaps.c',
13
+ ],
14
+ };
15
+
16
+ be.checkHeader('c', 'dlfcn.h');
17
+
18
+ if (be.checkDeclared('c', 'getauxval', { headers: ['sys/auxv.h'] }))
19
+ gyp.defines.push('HAVE_STRONG_GETAUXVAL=1');
20
+
21
+ // Add the things we detected
22
+ gyp.defines.push(...be.defines(null, true));
23
+ gyp.libraries.push(...be.libs());
24
+
25
+ gyp = {
26
+ conditions: [
27
+ ['OS!="win" and target_arch not in "ia32 x32 x64"',
28
+ gyp],
29
+ ],
30
+ };
31
+
32
+ console.log(JSON.stringify(gyp, null, 2));
@@ -0,0 +1,4 @@
1
+ ---
2
+ Language: Cpp
3
+ BasedOnStyle: Google
4
+ ...
@@ -0,0 +1,31 @@
1
+ # Project Files unneeded by docker
2
+ cmake/ci/Makefile
3
+ cmake/ci/docker
4
+ cmake/ci/doc
5
+ cmake/ci/cache
6
+ .git
7
+ .gitignore
8
+ .github
9
+ .dockerignore
10
+ .clang-format
11
+ appveyor.yml
12
+ .travis.yml
13
+ AUTHORS
14
+ CONTRIBUTING.md
15
+ CONTRIBUTORS
16
+ LICENSE
17
+ README.md
18
+
19
+ build/
20
+ cmake_build/
21
+ build_cross/
22
+ cmake-build-*/
23
+ out/
24
+
25
+ # Editor directories and files
26
+ .idea/
27
+ .vagrant/
28
+ .vscode/
29
+ .vs/
30
+ *.user
31
+ *.swp
@@ -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
+ )