forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable native support for Windows on arm64
Following changes are included - Fix AutoCpuConverter.java to identify win/arm64 CPU - Add win/arm64 JDK 17 - Add grpc patch to workaround build issues - Extend build_bazel_binaries.yml to cross-compile for win/arm64 - Fix msvc toolchain to look for tools in HostX86 directory as well Fixes: bazelbuild#14339
- Loading branch information
1 parent
02ad3e3
commit bcfdf9a
Showing
16 changed files
with
217 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
From 6ce08c3da545358074eb66dc4202e0474fa5be1b Mon Sep 17 00:00:00 2001 | ||
From: Niyas Sait <niyas.sait@linaro.org> | ||
Date: Fri, 26 Nov 2021 02:43:37 -0800 | ||
Subject: [PATCH] add workarounds to compile for win/arm64 | ||
|
||
--- | ||
src/core/lib/transport/transport.cc | 8 ++++---- | ||
third_party/cares/cares.BUILD | 2 +- | ||
2 files changed, 5 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/src/core/lib/transport/transport.cc b/src/core/lib/transport/transport.cc | ||
index 36060a6bd9..db847d53d2 100644 | ||
--- a/src/core/lib/transport/transport.cc | ||
+++ b/src/core/lib/transport/transport.cc | ||
@@ -99,16 +99,16 @@ void grpc_stream_ref_init(grpc_stream_refcount* refcount, int /*initial_refs*/, | ||
refcount, &refcount->slice_refcount); | ||
} | ||
|
||
-static void move64(uint64_t* from, uint64_t* to) { | ||
+static void move64bits(uint64_t* from, uint64_t* to) { | ||
*to += *from; | ||
*from = 0; | ||
} | ||
|
||
void grpc_transport_move_one_way_stats(grpc_transport_one_way_stats* from, | ||
grpc_transport_one_way_stats* to) { | ||
- move64(&from->framing_bytes, &to->framing_bytes); | ||
- move64(&from->data_bytes, &to->data_bytes); | ||
- move64(&from->header_bytes, &to->header_bytes); | ||
+ move64bits(&from->framing_bytes, &to->framing_bytes); | ||
+ move64bits(&from->data_bytes, &to->data_bytes); | ||
+ move64bits(&from->header_bytes, &to->header_bytes); | ||
} | ||
|
||
void grpc_transport_move_stats(grpc_transport_stream_stats* from, | ||
diff --git a/third_party/cares/cares.BUILD b/third_party/cares/cares.BUILD | ||
index 7939021a25..430791aa8d 100644 | ||
--- a/third_party/cares/cares.BUILD | ||
+++ b/third_party/cares/cares.BUILD | ||
@@ -22,7 +22,7 @@ config_setting( | ||
|
||
config_setting( | ||
name = "windows", | ||
- values = {"cpu": "x64_windows"}, | ||
+ constraint_values = ["@platforms//os:windows"], | ||
) | ||
|
||
# Android is not officially supported through C++. | ||
-- | ||
2.33.0.windows.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.