diff options
author | CoprDistGit <infra@openeuler.org> | 2025-08-22 15:37:23 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2025-08-22 15:37:23 +0000 |
commit | d9dbe8965f52a76c7f24ee2df56a0008a864ccb3 (patch) | |
tree | 78ab31b5b6347f97a01d4795febda78477a3a1d7 | |
parent | 2e5dd403be63668720c5d8cb32fc4e4f24bb74f8 (diff) |
automatic import of ANNC
-rw-r--r-- | x86_64_external_files.patch | 158 |
1 files changed, 158 insertions, 0 deletions
diff --git a/x86_64_external_files.patch b/x86_64_external_files.patch new file mode 100644 index 0000000..7bf4fb3 --- /dev/null +++ b/x86_64_external_files.patch @@ -0,0 +1,158 @@ +diff --git a/external/local_config_cc/BUILD b/external/local_config_cc/BUILD +index 6c19fae..a0ea3f8 100755 +--- a/external/local_config_cc/BUILD ++++ b/external/local_config_cc/BUILD +@@ -47,15 +47,15 @@ filegroup( + cc_toolchain_suite( + name = "toolchain", + toolchains = { +- "aarch64|compiler": ":cc-compiler-aarch64", +- "aarch64": ":cc-compiler-aarch64", ++ "k8|compiler": ":cc-compiler-k8", ++ "k8": ":cc-compiler-k8", + "armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a", + "armeabi-v7a": ":cc-compiler-armeabi-v7a", + }, + ) + + cc_toolchain( +- name = "cc-compiler-aarch64", ++ name = "cc-compiler-k8", + toolchain_identifier = "local", + toolchain_config = ":local", + all_files = ":compiler_deps", +@@ -72,7 +72,7 @@ cc_toolchain( + + cc_toolchain_config( + name = "local", +- cpu = "aarch64", ++ cpu = "k8", + compiler = "compiler", + toolchain_identifier = "local", + host_system_name = "local", +@@ -80,7 +80,7 @@ cc_toolchain_config( + target_libc = "local", + abi_version = "local", + abi_libc_version = "local", +- cxx_builtin_include_directories = ["/usr/lib/gcc/aarch64-linux-gnu/10.3.1/include", ++ cxx_builtin_include_directories = ["/usr/lib/gcc/x86_64-linux-gnu/10.3.1/include", + "/usr/local/include", + "/usr/include", + "/root/rpmbuild/BUILD/ANNC-v0.0.2/annc/service/cpu/xla", +@@ -91,7 +91,7 @@ cc_toolchain_config( + "/root/rpmbuild/BUILD/XNNPACK/build/pthreadpool-source/include", + "/root/rpmbuild/BUILD/ANNC-v0.0.2/output/e7b069029cc648c50e1b8083cef52b4f/external/local_config_cc", + "/usr/include/c++/10.3.1", +- "/usr/include/c++/10.3.1/aarch64-linux-gnu", ++ "/usr/include/c++/10.3.1/x86_64-linux-gnu", + "/usr/include/c++/10.3.1/backward"], + tool_paths = {"ar": "/usr/bin/ar", + "ld": "/usr/bin/ld", +diff --git a/external/local_config_cc/builtin_include_directory_paths b/external/local_config_cc/builtin_include_directory_paths +index 188e6c9..2c3bcc1 100755 +--- a/external/local_config_cc/builtin_include_directory_paths ++++ b/external/local_config_cc/builtin_include_directory_paths +@@ -4,7 +4,7 @@ changes to it will be reflected in the action cache key. When some of these + paths change, Bazel will make sure to rerun the action, even though none of + declared action inputs or the action commandline changes. + +-/usr/lib/gcc/aarch64-linux-gnu/10.3.1/include ++/usr/lib/gcc/x86_64-linux-gnu/10.3.1/include + /usr/local/include + /usr/include + /root/rpmbuild/BUILD/ANNC-v0.0.2/annc/service/cpu/xla +@@ -15,5 +15,5 @@ declared action inputs or the action commandline changes. + /root/rpmbuild/BUILD/XNNPACK/build/pthreadpool-source/include + /root/rpmbuild/BUILD/ANNC-v0.0.2/output/e7b069029cc648c50e1b8083cef52b4f/external/local_config_cc + /usr/include/c++/10.3.1 +-/usr/include/c++/10.3.1/aarch64-linux-gnu ++/usr/include/c++/10.3.1/x86_64-linux-gnu + /usr/include/c++/10.3.1/backward +diff --git a/external/go_sdk/BUILD.bazel b/x86_64/external/go_sdk/BUILD.bazel +index 9cf6add..511ddbc 100644 +--- a/external/go_sdk/BUILD.bazel ++++ b/x86_64/external/go_sdk/BUILD.bazel +@@ -7,8 +7,8 @@ package(default_visibility = ["//visibility:public"]) + filegroup( + name = "libs", + srcs = glob( +- ["pkg/linux_arm64/**/*.a"], +- exclude = ["pkg/linux_arm64/**/cmd/**"], ++ ["pkg/linux_amd64/**/*.a"], ++ exclude = ["pkg/linux_amd64/**/cmd/**"], + ), + ) + +@@ -34,7 +34,7 @@ go_sdk( + name = "go_sdk", + srcs = [":srcs"], + go = "bin/go", +- goarch = "arm64", ++ goarch = "amd64", + goos = "linux", + headers = [":headers"], + libs = [":libs"], +@@ -60,7 +60,7 @@ package_list( + + declare_toolchains( + builder = ":builder", +- host = "linux_arm64", ++ host = "linux_amd64", + sdk = ":go_sdk", + ) + +diff --git a/external/go_sdk/src/internal/buildcfg/zbootstrap.go b/x86_64/external/go_sdk/src/internal/buildcfg/zbootstrap.go +index 81bd76b..560f94f 100644 +--- a/external/go_sdk/src/internal/buildcfg/zbootstrap.go ++++ b/x86_64/external/go_sdk/src/internal/buildcfg/zbootstrap.go +@@ -12,7 +12,7 @@ const defaultGOMIPS64 = `hardfloat` + const defaultGOPPC64 = `power8` + const defaultGOEXPERIMENT = `` + const defaultGO_EXTLINK_ENABLED = `` +-const defaultGO_LDSO = `/lib/ld-linux-aarch64.so.1` ++const defaultGO_LDSO = `/lib64/ld-linux-x86-64.so.2` + const version = `go1.18.4` + const defaultGOOS = runtime.GOOS + const defaultGOARCH = runtime.GOARCH +diff --git a/external/local_config_cc_toolchains/BUILD b/x86_64/external/local_config_cc_toolchains/BUILD +index db5234f..f9c0875 100755 +--- a/external/local_config_cc_toolchains/BUILD ++++ b/x86_64/external/local_config_cc_toolchains/BUILD +@@ -1,10 +1,10 @@ + load("@local_config_platform//:constraints.bzl", "HOST_CONSTRAINTS") + + toolchain( +- name = "cc-toolchain-aarch64", ++ name = "cc-toolchain-k8", + exec_compatible_with = HOST_CONSTRAINTS, + target_compatible_with = HOST_CONSTRAINTS, +- toolchain = "@local_config_cc//:cc-compiler-aarch64", ++ toolchain = "@local_config_cc//:cc-compiler-k8", + toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", + ) + +diff --git a/external/local_config_platform/constraints.bzl b/x86_64/external/local_config_platform/constraints.bzl +index 4b29ad7..6a7d8c3 100644 +--- a/external/local_config_platform/constraints.bzl ++++ b/x86_64/external/local_config_platform/constraints.bzl +@@ -1,6 +1,6 @@ + # DO NOT EDIT: automatically generated constraints list for local_config_platform + # Auto-detected host platform constraints. + HOST_CONSTRAINTS = [ +- '@platforms//cpu:aarch64', ++ '@platforms//cpu:x86_64', + '@platforms//os:linux', + ] +diff --git a/external/local_execution_config_platform/BUILD b/x86_64/external/local_execution_config_platform/BUILD +index b4d7fdf..7dfbc12 100755 +--- a/external/local_execution_config_platform/BUILD ++++ b/x86_64/external/local_execution_config_platform/BUILD +@@ -18,7 +18,7 @@ platform( + name = "platform", + visibility = ["//visibility:public"], + constraint_values = [ +- "@platforms//cpu:aarch64", ++ "@platforms//cpu:x86_64", + "@platforms//os:linux", + ":platform_constraint", + ], |