305 lines
14 KiB
Diff
305 lines
14 KiB
Diff
From f4b841f228f65fb3a551dc17c650d24c12e5e4d0 Mon Sep 17 00:00:00 2001
|
|
From: desert-sailor <dxwangk@isoftstone.com>
|
|
Date: Thu, 11 May 2023 01:20:49 +0800
|
|
Subject: [PATCH] adapt external for aarch64
|
|
|
|
---
|
|
.../internal/node/_node_bin/node | 4 +--
|
|
.../_/sass/node_modules/.yarn-integrity | 4 +--
|
|
build_bazel_rules_sass_deps/_yarn.sh | 2 +-
|
|
esbuild_npm/_npm.sh | 2 +-
|
|
go_sdk/BUILD.bazel | 8 ++---
|
|
go_sdk/src/cmd/internal/objabi/zbootstrap.go | 2 +-
|
|
local_config_cc/BUILD | 12 +++----
|
|
.../builtin_include_directory_paths | 4 +--
|
|
local_config_cc_toolchains/BUILD | 4 +--
|
|
local_config_platform/constraints.bzl | 2 +-
|
|
local_jdk/BUILD.bazel | 2 +-
|
|
nodejs/BUILD.bazel | 30 +++++++++---------
|
|
nodejs/index.bzl | 2 +-
|
|
npm/_/node_modules/.yarn-integrity | 4 +--
|
|
npm/_yarn.sh | 2 +-
|
|
16 files changed, 42 insertions(+), 42 deletions(-)
|
|
|
|
diff --git a/build_bazel_rules_nodejs/internal/node/_node_bin/node b/build_bazel_rules_nodejs/internal/node/_node_bin/node
|
|
index ae1ffe2a1..6520b1d29 100755
|
|
--- a/build_bazel_rules_nodejs/internal/node/_node_bin/node
|
|
+++ b/build_bazel_rules_nodejs/internal/node/_node_bin/node
|
|
@@ -2,7 +2,7 @@
|
|
export NP_SUBPROCESS_NODE_DIR="/root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/build_bazel_rules_nodejs/internal/node/_node_bin"
|
|
export PATH="/root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/build_bazel_rules_nodejs/internal/node/_node_bin":$PATH
|
|
if [[ ! "${@}" =~ "node_patches.js" ]]; then
|
|
- exec /root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/nodejs_linux_amd64/bin/nodejs/bin/node --preserve-symlinks --require "/root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/build_bazel_rules_nodejs/internal/node/node_patches.js" "$@"
|
|
+ exec /root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/nodejs_linux_arm64/bin/nodejs/bin/node --preserve-symlinks --require "/root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/build_bazel_rules_nodejs/internal/node/node_patches.js" "$@"
|
|
else
|
|
- exec /root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/nodejs_linux_amd64/bin/nodejs/bin/node --preserve-symlinks "$@"
|
|
+ exec /root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/nodejs_linux_arm64/bin/nodejs/bin/node --preserve-symlinks "$@"
|
|
fi
|
|
diff --git a/build_bazel_rules_sass_deps/_/sass/node_modules/.yarn-integrity b/build_bazel_rules_sass_deps/_/sass/node_modules/.yarn-integrity
|
|
index 911fdd087..10589144d 100644
|
|
--- a/build_bazel_rules_sass_deps/_/sass/node_modules/.yarn-integrity
|
|
+++ b/build_bazel_rules_sass_deps/_/sass/node_modules/.yarn-integrity
|
|
@@ -1,5 +1,5 @@
|
|
{
|
|
- "systemParams": "linux-x64-72",
|
|
+ "systemParams": "linux-arm64-72",
|
|
"modulesFolders": [
|
|
"node_modules"
|
|
],
|
|
@@ -36,4 +36,4 @@
|
|
},
|
|
"files": [],
|
|
"artifacts": {}
|
|
-}
|
|
\ No newline at end of file
|
|
+}
|
|
diff --git a/build_bazel_rules_sass_deps/_yarn.sh b/build_bazel_rules_sass_deps/_yarn.sh
|
|
index cf969c40a..f5fc9ca62 100755
|
|
--- a/build_bazel_rules_sass_deps/_yarn.sh
|
|
+++ b/build_bazel_rules_sass_deps/_yarn.sh
|
|
@@ -4,4 +4,4 @@ set -e
|
|
unset YARN_IGNORE_PATH
|
|
unset INIT_CWD
|
|
unset npm_config_registry
|
|
-(cd "/root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/build_bazel_rules_sass_deps/_/sass"; "/root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/nodejs_linux_amd64/bin/yarn" --frozen-lockfile --mutex network)
|
|
+(cd "/root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/build_bazel_rules_sass_deps/_/sass"; "/root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/nodejs_linux_arm64/bin/yarn" --frozen-lockfile --mutex network)
|
|
diff --git a/esbuild_npm/_npm.sh b/esbuild_npm/_npm.sh
|
|
index 79213289d..5c7744458 100755
|
|
--- a/esbuild_npm/_npm.sh
|
|
+++ b/esbuild_npm/_npm.sh
|
|
@@ -1,4 +1,4 @@
|
|
#!/usr/bin/env bash
|
|
# Immediately exit if any command fails.
|
|
set -e
|
|
-(cd "/root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/esbuild_npm/_/toolchains/esbuild"; "/root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/nodejs_linux_amd64/bin/npm" ci --no-optional --ignore-scripts)
|
|
+(cd "/root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/esbuild_npm/_/toolchains/esbuild"; "/root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/nodejs_linux_arm64/bin/npm" ci --no-optional --ignore-scripts)
|
|
diff --git a/go_sdk/BUILD.bazel b/go_sdk/BUILD.bazel
|
|
index 27ba422bd..94de2d1a0 100644
|
|
--- a/go_sdk/BUILD.bazel
|
|
+++ b/go_sdk/BUILD.bazel
|
|
@@ -8,8 +8,8 @@ package(default_visibility = ["//visibility:public"])
|
|
filegroup(
|
|
name = "libs",
|
|
srcs = glob(
|
|
- ["pkg/linux_amd64/**/*.a"],
|
|
- exclude = ["pkg/linux_amd64/**/cmd/**"],
|
|
+ ["pkg/linux_arm64/**/*.a"],
|
|
+ exclude = ["pkg/linux_arm64/**/cmd/**"],
|
|
),
|
|
)
|
|
|
|
@@ -31,7 +31,7 @@ filegroup(
|
|
go_sdk(
|
|
name = "go_sdk",
|
|
goos = "linux",
|
|
- goarch = "amd64",
|
|
+ goarch = "arm64",
|
|
root_file = "ROOT",
|
|
package_list = ":package_list",
|
|
libs = [":libs"],
|
|
@@ -57,7 +57,7 @@ package_list(
|
|
)
|
|
|
|
declare_toolchains(
|
|
- host = "linux_amd64",
|
|
+ host = "linux_arm64",
|
|
sdk = ":go_sdk",
|
|
builder = ":builder",
|
|
)
|
|
diff --git a/go_sdk/src/cmd/internal/objabi/zbootstrap.go b/go_sdk/src/cmd/internal/objabi/zbootstrap.go
|
|
index e694570bb..5bfe64668 100644
|
|
--- a/go_sdk/src/cmd/internal/objabi/zbootstrap.go
|
|
+++ b/go_sdk/src/cmd/internal/objabi/zbootstrap.go
|
|
@@ -4,7 +4,7 @@ package objabi
|
|
|
|
import "runtime"
|
|
|
|
-const defaultGO386 = `sse2`
|
|
+const defaultGO386 = `387`
|
|
const defaultGOARM = `5`
|
|
const defaultGOMIPS = `hardfloat`
|
|
const defaultGOMIPS64 = `hardfloat`
|
|
diff --git a/local_config_cc/BUILD b/local_config_cc/BUILD
|
|
index 426ca0cc0..03e329411 100755
|
|
--- a/local_config_cc/BUILD
|
|
+++ b/local_config_cc/BUILD
|
|
@@ -47,15 +47,15 @@ filegroup(
|
|
cc_toolchain_suite(
|
|
name = "toolchain",
|
|
toolchains = {
|
|
- "k8|compiler": ":cc-compiler-k8",
|
|
- "k8": ":cc-compiler-k8",
|
|
+ "aarch64|compiler": ":cc-compiler-aarch64",
|
|
+ "aarch64": ":cc-compiler-aarch64",
|
|
"armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a",
|
|
"armeabi-v7a": ":cc-compiler-armeabi-v7a",
|
|
},
|
|
)
|
|
|
|
cc_toolchain(
|
|
- name = "cc-compiler-k8",
|
|
+ name = "cc-compiler-aarch64",
|
|
toolchain_identifier = "local",
|
|
toolchain_config = ":local",
|
|
all_files = ":compiler_deps",
|
|
@@ -72,7 +72,7 @@ cc_toolchain(
|
|
|
|
cc_toolchain_config(
|
|
name = "local",
|
|
- cpu = "k8",
|
|
+ cpu = "aarch64",
|
|
compiler = "compiler",
|
|
toolchain_identifier = "local",
|
|
host_system_name = "local",
|
|
@@ -80,11 +80,11 @@ cc_toolchain_config(
|
|
target_libc = "local",
|
|
abi_version = "local",
|
|
abi_libc_version = "local",
|
|
- cxx_builtin_include_directories = ["/usr/lib/gcc/x86_64-linux-gnu/10.3.1/include",
|
|
+ cxx_builtin_include_directories = ["/usr/lib/gcc/aarch64-linux-gnu/10.3.1/include",
|
|
"/usr/local/include",
|
|
"/usr/include",
|
|
"/usr/include/c++/10.3.1",
|
|
- "/usr/include/c++/10.3.1/x86_64-linux-gnu",
|
|
+ "/usr/include/c++/10.3.1/aarch64-linux-gnu",
|
|
"/usr/include/c++/10.3.1/backward"],
|
|
tool_paths = {"ar": "/usr/bin/ar",
|
|
"ld": "/usr/bin/ld",
|
|
diff --git a/local_config_cc/builtin_include_directory_paths b/local_config_cc/builtin_include_directory_paths
|
|
index 50e25225d..548377077 100755
|
|
--- a/local_config_cc/builtin_include_directory_paths
|
|
+++ b/local_config_cc/builtin_include_directory_paths
|
|
@@ -4,9 +4,9 @@ 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/x86_64-linux-gnu/10.3.1/include
|
|
+/usr/lib/gcc/aarch64-linux-gnu/10.3.1/include
|
|
/usr/local/include
|
|
/usr/include
|
|
/usr/include/c++/10.3.1
|
|
-/usr/include/c++/10.3.1/x86_64-linux-gnu
|
|
+/usr/include/c++/10.3.1/aarch64-linux-gnu
|
|
/usr/include/c++/10.3.1/backward
|
|
diff --git a/local_config_cc_toolchains/BUILD b/local_config_cc_toolchains/BUILD
|
|
index f9c087553..db5234fb0 100755
|
|
--- a/local_config_cc_toolchains/BUILD
|
|
+++ b/local_config_cc_toolchains/BUILD
|
|
@@ -1,10 +1,10 @@
|
|
load("@local_config_platform//:constraints.bzl", "HOST_CONSTRAINTS")
|
|
|
|
toolchain(
|
|
- name = "cc-toolchain-k8",
|
|
+ name = "cc-toolchain-aarch64",
|
|
exec_compatible_with = HOST_CONSTRAINTS,
|
|
target_compatible_with = HOST_CONSTRAINTS,
|
|
- toolchain = "@local_config_cc//:cc-compiler-k8",
|
|
+ toolchain = "@local_config_cc//:cc-compiler-aarch64",
|
|
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
|
|
)
|
|
|
|
diff --git a/local_config_platform/constraints.bzl b/local_config_platform/constraints.bzl
|
|
index 6a7d8c3e0..4b29ad72c 100644
|
|
--- a/local_config_platform/constraints.bzl
|
|
+++ b/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:x86_64',
|
|
+ '@platforms//cpu:aarch64',
|
|
'@platforms//os:linux',
|
|
]
|
|
diff --git a/local_jdk/BUILD.bazel b/local_jdk/BUILD.bazel
|
|
index 67c59e9ea..40d17ace1 100755
|
|
--- a/local_jdk/BUILD.bazel
|
|
+++ b/local_jdk/BUILD.bazel
|
|
@@ -218,6 +218,6 @@ config_setting(
|
|
local_java_runtime(
|
|
name = "local_jdk",
|
|
runtime_name = "jdk",
|
|
- java_home = "/usr/lib/jvm/java-11-openjdk-11.0.18.10-1.oe2303.x86_64",
|
|
+ java_home = "/usr/lib/jvm/java-11-openjdk",
|
|
version = "11",
|
|
)
|
|
diff --git a/nodejs/BUILD.bazel b/nodejs/BUILD.bazel
|
|
index 3a59c491b..c632e0f44 100755
|
|
--- a/nodejs/BUILD.bazel
|
|
+++ b/nodejs/BUILD.bazel
|
|
@@ -1,21 +1,21 @@
|
|
# Generated by nodejs_repo_host_os_alias.bzl
|
|
package(default_visibility = ["//visibility:public"])
|
|
# aliases for exports_files
|
|
-alias(name = "run_npm.sh.template", actual = "@nodejs_linux_amd64//:run_npm.sh.template")
|
|
-alias(name = "run_npm.bat.template", actual = "@nodejs_linux_amd64//:run_npm.bat.template")
|
|
-alias(name = "bin/node_repo_args.sh", actual = "@nodejs_linux_amd64//:bin/node_repo_args.sh")
|
|
+alias(name = "run_npm.sh.template", actual = "@nodejs_linux_arm64//:run_npm.sh.template")
|
|
+alias(name = "run_npm.bat.template", actual = "@nodejs_linux_arm64//:run_npm.bat.template")
|
|
+alias(name = "bin/node_repo_args.sh", actual = "@nodejs_linux_arm64//:bin/node_repo_args.sh")
|
|
|
|
# aliases for other aliases
|
|
-alias(name = "node_bin", actual = "@nodejs_linux_amd64//:node_bin")
|
|
-alias(name = "npm_bin", actual = "@nodejs_linux_amd64//:npm_bin")
|
|
-alias(name = "npx_bin", actual = "@nodejs_linux_amd64//:npx_bin")
|
|
-alias(name = "yarn_bin", actual = "@nodejs_linux_amd64//:yarn_bin")
|
|
-alias(name = "node", actual = "@nodejs_linux_amd64//:node")
|
|
-alias(name = "npm", actual = "@nodejs_linux_amd64//:npm")
|
|
-alias(name = "yarn", actual = "@nodejs_linux_amd64//:yarn")
|
|
-alias(name = "npm_node_repositories", actual = "@nodejs_linux_amd64//:npm_node_repositories")
|
|
-alias(name = "yarn_node_repositories", actual = "@nodejs_linux_amd64//:yarn_node_repositories")
|
|
-alias(name = "node_files", actual = "@nodejs_linux_amd64//:node_files")
|
|
-alias(name = "yarn_files", actual = "@nodejs_linux_amd64//:yarn_files")
|
|
-alias(name = "npm_files", actual = "@nodejs_linux_amd64//:npm_files")
|
|
+alias(name = "node_bin", actual = "@nodejs_linux_arm64//:node_bin")
|
|
+alias(name = "npm_bin", actual = "@nodejs_linux_arm64//:npm_bin")
|
|
+alias(name = "npx_bin", actual = "@nodejs_linux_arm64//:npx_bin")
|
|
+alias(name = "yarn_bin", actual = "@nodejs_linux_arm64//:yarn_bin")
|
|
+alias(name = "node", actual = "@nodejs_linux_arm64//:node")
|
|
+alias(name = "npm", actual = "@nodejs_linux_arm64//:npm")
|
|
+alias(name = "yarn", actual = "@nodejs_linux_arm64//:yarn")
|
|
+alias(name = "npm_node_repositories", actual = "@nodejs_linux_arm64//:npm_node_repositories")
|
|
+alias(name = "yarn_node_repositories", actual = "@nodejs_linux_arm64//:yarn_node_repositories")
|
|
+alias(name = "node_files", actual = "@nodejs_linux_arm64//:node_files")
|
|
+alias(name = "yarn_files", actual = "@nodejs_linux_arm64//:yarn_files")
|
|
+alias(name = "npm_files", actual = "@nodejs_linux_arm64//:npm_files")
|
|
exports_files(["index.bzl"])
|
|
diff --git a/nodejs/index.bzl b/nodejs/index.bzl
|
|
index a89a803dc..91c3e1e15 100755
|
|
--- a/nodejs/index.bzl
|
|
+++ b/nodejs/index.bzl
|
|
@@ -1,2 +1,2 @@
|
|
# Generated by nodejs_repo_host_os_alias.bzl
|
|
-host_platform="linux_amd64"
|
|
+host_platform="linux_arm64"
|
|
diff --git a/npm/_/node_modules/.yarn-integrity b/npm/_/node_modules/.yarn-integrity
|
|
index 1756c0195..ebd8d9486 100644
|
|
--- a/npm/_/node_modules/.yarn-integrity
|
|
+++ b/npm/_/node_modules/.yarn-integrity
|
|
@@ -1,5 +1,5 @@
|
|
{
|
|
- "systemParams": "linux-x64-72",
|
|
+ "systemParams": "linux-arm64-72",
|
|
"modulesFolders": [
|
|
"node_modules"
|
|
],
|
|
@@ -887,4 +887,4 @@
|
|
},
|
|
"files": [],
|
|
"artifacts": {}
|
|
-}
|
|
\ No newline at end of file
|
|
+}
|
|
diff --git a/npm/_yarn.sh b/npm/_yarn.sh
|
|
index 01ad3ec00..39360e872 100755
|
|
--- a/npm/_yarn.sh
|
|
+++ b/npm/_yarn.sh
|
|
@@ -4,4 +4,4 @@ set -e
|
|
unset YARN_IGNORE_PATH
|
|
unset INIT_CWD
|
|
unset npm_config_registry
|
|
-(cd "/root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/npm/_"; "/root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/nodejs_linux_amd64/bin/yarn" --frozen-lockfile --mutex network)
|
|
+(cd "/root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/npm/_"; "/root/.cache/bazel/_bazel_root/4351bb8fec5747e15a0a9b257c950736/external/nodejs_linux_arm64/bin/yarn" --frozen-lockfile --mutex network)
|
|
--
|
|
2.39.1
|
|
|