Fix toolchain_os in ios toolchain definitions

I think it worked correctly before only by accident, because of the
fallback to `target_os` in build config: https://github.com/dart-lang/sdk/blob/0906af6d2f6cf8ae1eff52a93adccdaf90d13443/build/config/BUILDCONFIG.gn#L48).

However when buildconfig is re-evaluated with toolchain
args, current_os is set to a toolchain_os at https://github.com/dart-lang/sdk/blob/0906af6d2f6cf8ae1eff52a93adccdaf90d13443/build/toolchain/mac/BUILD.gn#L260, which causes linking issues in https://dart-review.googlesource.com/c/sdk/+/392661 (https://ci.chromium.org/ui/p/dart/builders/try/vm-mac-debug-arm64-try/12692/overview).

Change-Id: I9c6129ad40a7ec26fde47816810241850b6f816f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395300
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
This commit is contained in:
Ivan Inozemtsev
2024-11-14 21:08:12 +00:00
committed by Commit Queue
parent e239f7415a
commit f8569331e1
+3 -3
View File
@@ -273,7 +273,7 @@ template("mac_toolchain") {
# Toolchain used for iOS device targets.
mac_toolchain("ios_clang_arm64") {
toolchain_cpu = "arm64"
toolchain_os = "mac"
toolchain_os = "ios"
prefix = rebased_clang_dir
cc = "${compiler_prefix}${prefix}/clang"
cxx = "${compiler_prefix}${prefix}/clang++"
@@ -296,7 +296,7 @@ mac_toolchain("ios_clang_arm64") {
# Toolchain used for iOS simulator targets (arm64).
mac_toolchain("ios_clang_arm64_sim") {
toolchain_cpu = "arm64"
toolchain_os = "mac"
toolchain_os = "ios"
prefix = rebased_clang_dir
cc = "${compiler_prefix}${prefix}/clang"
cxx = "${compiler_prefix}${prefix}/clang++"
@@ -320,7 +320,7 @@ mac_toolchain("ios_clang_arm64_sim") {
# Toolchain used for iOS simulator targets (x64).
mac_toolchain("ios_clang_x64_sim") {
toolchain_cpu = "x64"
toolchain_os = "mac"
toolchain_os = "ios"
prefix = rebased_clang_dir
cc = "${compiler_prefix}${prefix}/clang"
cxx = "${compiler_prefix}${prefix}/clang++"