From f8569331e14494fab5663fe7585a84596cdc0ff1 Mon Sep 17 00:00:00 2001 From: Ivan Inozemtsev Date: Thu, 14 Nov 2024 21:08:12 +0000 Subject: [PATCH] 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 Reviewed-by: Slava Egorov Commit-Queue: Slava Egorov --- build/toolchain/mac/BUILD.gn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn index e0310ef0bf05..02a0e43bac3e 100644 --- a/build/toolchain/mac/BUILD.gn +++ b/build/toolchain/mac/BUILD.gn @@ -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++"