Skip to content

Commit 4167867

Browse files
aamcommit-bot@chromium.org
authored andcommitted
[build] Rely on default host os TARGET_OS unless cross-compiling.
Before this change we erroneously override TARGET_OS with target_os value, which for example resulted in dart sdk built as part of Fuchsia targeting Fuchsia, rather than host os(Linux). Bug: https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=36723 Change-Id: I92b698a331c8c5ef802f0b329ebf13616f29952f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118372 Reviewed-by: Zach Anderson <[email protected]> Commit-Queue: Alexander Aprelev <[email protected]>
1 parent 9cc7ec8 commit 4167867

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

runtime/BUILD.gn

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,9 @@ config("dart_nosnapshot_config") {
6767
config("dart_os_config") {
6868
defines = []
6969

70-
# If dart_host_toolchain is the current toolchain, and it is different from
71-
# host_toolchain, then we are building the SDK for the host, and should not
72-
# hardcode these defines.
73-
if (current_toolchain != dart_host_toolchain ||
74-
host_toolchain == dart_host_toolchain) {
70+
# If dart_host_toolchain is the current toolchain then we are building
71+
# the SDK for the host, and should not hardcode these defines.
72+
if (current_toolchain != dart_host_toolchain) {
7573
if (target_os == "android") {
7674
defines += [ "TARGET_OS_ANDROID" ]
7775
} else if (target_os == "fuchsia") {

0 commit comments

Comments
 (0)