2
2
# for details. All rights reserved. Use of this source code is governed by a
3
3
# BSD-style license that can be found in the LICENSE file.
4
4
5
- import (" ../build/dart/dart_host_sdk_toolchain.gni" )
6
5
import (" configs.gni" )
7
6
import (" runtime_args.gni" )
8
7
@@ -67,28 +66,22 @@ config("dart_nosnapshot_config") {
67
66
config (" dart_os_config" ) {
68
67
defines = []
69
68
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 ) {
75
- if (target_os == " android" ) {
76
- defines += [ " TARGET_OS_ANDROID" ]
77
- } else if (target_os == " fuchsia" ) {
78
- defines += [ " TARGET_OS_FUCHSIA" ]
79
- } else if (target_os == " ios" ) {
80
- defines += [ " TARGET_OS_MACOS" ]
81
- defines += [ " TARGET_OS_MACOS_IOS" ]
82
- } else if (target_os == " linux" ) {
83
- defines += [ " TARGET_OS_LINUX" ]
84
- } else if (target_os == " mac" ) {
85
- defines += [ " TARGET_OS_MACOS" ]
86
- } else if (target_os == " win" ) {
87
- defines += [ " TARGET_OS_WINDOWS" ]
88
- } else {
89
- print (" Unknown target_os: $target_os " )
90
- assert (false )
91
- }
69
+ if (target_os == " android" ) {
70
+ defines += [ " TARGET_OS_ANDROID" ]
71
+ } else if (target_os == " fuchsia" ) {
72
+ defines += [ " TARGET_OS_FUCHSIA" ]
73
+ } else if (target_os == " ios" ) {
74
+ defines += [ " TARGET_OS_MACOS" ]
75
+ defines += [ " TARGET_OS_MACOS_IOS" ]
76
+ } else if (target_os == " linux" ) {
77
+ defines += [ " TARGET_OS_LINUX" ]
78
+ } else if (target_os == " mac" ) {
79
+ defines += [ " TARGET_OS_MACOS" ]
80
+ } else if (target_os == " win" ) {
81
+ defines += [ " TARGET_OS_WINDOWS" ]
82
+ } else {
83
+ print (" Unknown target_os: $target_os " )
84
+ assert (false )
92
85
}
93
86
}
94
87
@@ -102,32 +95,26 @@ config("dart_os_fuchsia_config") {
102
95
config (" dart_arch_config" ) {
103
96
defines = []
104
97
105
- # If dart_host_toolchain is the current toolchain, and it is different from
106
- # host_toolchain, then we are building the SDK for the host, and should not
107
- # hardcode these defines.
108
- if (current_toolchain != dart_host_toolchain ||
109
- host_toolchain == dart_host_toolchain ) {
110
- if (dart_target_arch == " arm" ) {
111
- defines += [ " TARGET_ARCH_ARM" ]
112
- } else if (dart_target_arch == " armv6" ) {
113
- defines += [ " TARGET_ARCH_ARM" ]
114
- defines += [ " TARGET_ARCH_ARM_6" ]
115
- } else if (dart_target_arch == " armv5te" ) {
116
- defines += [ " TARGET_ARCH_ARM" ]
117
- defines += [ " TARGET_ARCH_ARM_5TE" ]
118
- } else if (dart_target_arch == " arm64" ) {
119
- defines += [ " TARGET_ARCH_ARM64" ]
120
- } else if (dart_target_arch == " x64" ) {
121
- defines += [ " TARGET_ARCH_X64" ]
122
- } else if (dart_target_arch == " ia32" || dart_target_arch == " x86" ) {
123
- defines += [ " TARGET_ARCH_IA32" ]
124
- } else if (dart_target_arch == " dbc" ) {
125
- defines += [ " TARGET_ARCH_DBC" ]
126
- defines += [ " USING_SIMULATOR" ]
127
- } else {
128
- print (" Invalid dart_target_arch: $dart_target_arch " )
129
- assert (false )
130
- }
98
+ if (dart_target_arch == " arm" ) {
99
+ defines += [ " TARGET_ARCH_ARM" ]
100
+ } else if (dart_target_arch == " armv6" ) {
101
+ defines += [ " TARGET_ARCH_ARM" ]
102
+ defines += [ " TARGET_ARCH_ARM_6" ]
103
+ } else if (dart_target_arch == " armv5te" ) {
104
+ defines += [ " TARGET_ARCH_ARM" ]
105
+ defines += [ " TARGET_ARCH_ARM_5TE" ]
106
+ } else if (dart_target_arch == " arm64" ) {
107
+ defines += [ " TARGET_ARCH_ARM64" ]
108
+ } else if (dart_target_arch == " x64" ) {
109
+ defines += [ " TARGET_ARCH_X64" ]
110
+ } else if (dart_target_arch == " ia32" || dart_target_arch == " x86" ) {
111
+ defines += [ " TARGET_ARCH_IA32" ]
112
+ } else if (dart_target_arch == " dbc" ) {
113
+ defines += [ " TARGET_ARCH_DBC" ]
114
+ defines += [ " USING_SIMULATOR" ]
115
+ } else {
116
+ print (" Invalid dart_target_arch: $dart_target_arch " )
117
+ assert (false )
131
118
}
132
119
}
133
120
0 commit comments