aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspreis <spreis@yandex-team.com>2023-12-14 09:28:29 +0300
committerspreis <spreis@yandex-team.com>2023-12-14 10:00:29 +0300
commitd8cb8dfa089fc24b6862e290c018b6a8445ebcef (patch)
tree5ba68f76e7bcfd2bee1e0f5f5723fc0eb0b3160b
parent76b21190cb48636728f7ab6e26b812dcdecbd004 (diff)
downloadydb-d8cb8dfa089fc24b6862e290c018b6a8445ebcef.tar.gz
Stricter platform check for prebuilt protoc-gen-go
-rw-r--r--build/ymake.core.conf25
1 files changed, 14 insertions, 11 deletions
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index ac925a7fa2..e074253d2f 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -86,23 +86,26 @@ when ($DISABLE_SEPARATE_AUX_CPP != "yes") {
SEPARATE_AUX_CPP=yes
}
+_HOST_SUPPORTS_PREBUILT_PROTOC_GEN_GO=no
+_TARGET_SUPPORTS_PREBUILT_PROTOC_GEN_GO=no
when ($USE_PREBUILT_TOOLS == "yes") {
- when ($HOST_ARCH_X86_64 == "yes" && $ARCH_X86_64 == "yes" && ($HOST_OS_LINUX == "yes" || $HOST_OS_WINDOWS == "yes")) {
- _TOOL_PROTOC_GEN_GO=${_PREBUILT_TOOLS_ROOT}/vendor/github.com/golang/protobuf/protoc-gen-go
+ when ($HOST_ARCH_X86_64 == "yes" && ($HOST_OS_LINUX == "yes" || $HOST_OS_WINDOWS == "yes" || $HOST_OS_DARWIN == "yes")) {
+ _HOST_SUPPORTS_PREBUILT_PROTOC_GEN_GO=yes
}
-
- when ($HOST_OS_DARWIN == "yes" && ($HOST_ARCH_ARM64 == "yes" || $HOST_ARCH_X86_64 == "yes")) {
- when ($ARCH_ARM64 == "yes" || $ARCH_X86_64 == "yes") {
- _TOOL_PROTOC_GEN_GO=${_PREBUILT_TOOLS_ROOT}/vendor/github.com/golang/protobuf/protoc-gen-go
- }
+ when ($HOST_ARCH_ARM64 == "yes" && $HOST_OS_DARWIN == "yes") {
+ _HOST_SUPPORTS_PREBUILT_PROTOC_GEN_GO=yes
}
- when ($HOST_ARCH_X86_64 == "yes" && $HOST_OS_LINUX == "yes" && $OS_DARWIN == "yes") {
- when ($ARCH_ARM64 == "yes" || $ARCH_X86_64 == "yes") {
- _TOOL_PROTOC_GEN_GO=${_PREBUILT_TOOLS_ROOT}/vendor/github.com/golang/protobuf/protoc-gen-go
- }
+ when ($ARCH_X86_64 == "yes" && ($OS_LINUX == "yes" || $OS_WINDOWS == "yes" || $OS_DARWIN == "yes")) {
+ _TARGET_SUPPORTS_PREBUILT_PROTOC_GEN_GO=yes
+ }
+ when ($ARCH_ARM64 == "yes" && $OS_DARWIN == "yes") {
+ _TARGET_SUPPORTS_PREBUILT_PROTOC_GEN_GO=yes
}
+ when ($_HOST_SUPPORTS_PREBUILT_PROTOC_GEN_GO == "yes" && $_TARGET_SUPPORTS_PREBUILT_PROTOC_GEN_GO == "yes") {
+ _TOOL_PROTOC_GEN_GO=${_PREBUILT_TOOLS_ROOT}/vendor/github.com/golang/protobuf/protoc-gen-go
+ }
}
### @usage: SELECT_CLANG_SA_CONFIG(static_analyzer.yaml)