diff options
| author | chopik <[email protected]> | 2025-04-16 09:56:16 +0300 |
|---|---|---|
| committer | chopik <[email protected]> | 2025-04-16 10:11:16 +0300 |
| commit | b3ffe62858ac089f6d0e24c6f8a527afa21db87d (patch) | |
| tree | a673b1f6902b8ec9a2acc771b381b54b9c7c6566 /build/scripts/go_tool.py | |
| parent | b6f0c52a251cf119559dd14ea38acf980c6bb224 (diff) | |
linux ARM7 arch for golang build
commit_hash:e9962def09076c0ee2b1b69e79dfe1583ee40e92
Diffstat (limited to 'build/scripts/go_tool.py')
| -rw-r--r-- | build/scripts/go_tool.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/build/scripts/go_tool.py b/build/scripts/go_tool.py index 7ede536023d..9c8e0e40385 100644 --- a/build/scripts/go_tool.py +++ b/build/scripts/go_tool.py @@ -458,7 +458,12 @@ def do_compile_asm(args): cmd = [args.go_asm] cmd += get_trimpath_args(args) cmd += ['-I', args.output_root, '-I', os.path.join(args.pkg_root, 'include')] - cmd += ['-D', 'GOOS_' + args.targ_os, '-D', 'GOARCH_' + args.targ_arch, '-o', args.output] + cmd += ['-D', 'GOOS_' + args.targ_os] + if args.targ_arch == 'armv7': + cmd += ['-D', 'GOARCH_arm', '-D', 'GOARM_7'] + else: + cmd += ['-D', 'GOARCH_' + args.targ_arch] + cmd += ['-o', args.output] # if compare_versions('1.16', args.goversion) >= 0: cmd += ['-p', args.import_path] @@ -661,6 +666,9 @@ def gen_test_main(args, test_lib_args, xtest_lib_args): my_env['GOROOT'] = '' my_env['GOPATH'] = go_path_root my_env['GOARCH'] = args.targ_arch + if args.targ_arch == 'armv7': + my_env['GOARCH'] = 'arm' + my_env['GOARM'] = '7' my_env['GOOS'] = args.targ_os tests = [] @@ -866,7 +874,7 @@ if __name__ == '__main__': parser.add_argument('++host-os', choices=['linux', 'darwin', 'windows'], required=True) parser.add_argument('++host-arch', choices=['amd64', 'arm64'], required=True) parser.add_argument('++targ-os', choices=['linux', 'darwin', 'windows'], required=True) - parser.add_argument('++targ-arch', choices=['amd64', 'x86', 'arm64'], required=True) + parser.add_argument('++targ-arch', choices=['amd64', 'x86', 'arm64', 'armv7'], required=True) parser.add_argument('++peers', nargs='*') parser.add_argument('++non-local-peers', nargs='*') parser.add_argument('++cgo-peers', nargs='*', default=[]) |
