Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: tools/gn.py

Issue 2980023002: GN: Change the default meaning of dart_target_arch from current_cpu to target_cpu. (Closed)
Patch Set: gn format Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/runtime_args.gni ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn.py
diff --git a/tools/gn.py b/tools/gn.py
index 5ac0bc97666301c2ca0629c8ec52eb85541212a7..91defcdcbbb5b79f6e4e3ef6c110dab580cad4f3 100755
--- a/tools/gn.py
+++ b/tools/gn.py
@@ -83,10 +83,11 @@ def HostCpuForArch(arch):
return 'x64'
+# The C compiler's target.
def TargetCpuForArch(arch, target_os):
if arch in ['ia32', 'simarm', 'simarmv6', 'simarmv5te']:
return 'x86'
- if arch in ['simarm64']:
+ if arch in ['x64', 'simarm64']:
return 'x64'
if arch == 'simdbc':
return 'arm' if target_os == 'android' else 'x86'
@@ -99,6 +100,25 @@ def TargetCpuForArch(arch, target_os):
return arch
+# The Dart compiler's target.
+def DartTargetCpuForArch(arch):
+ if arch in ['ia32']:
+ return 'ia32'
+ if arch in ['x64']:
+ return 'x64'
+ if arch in ['arm', 'simarm']:
+ return 'arm'
+ if arch in ['armv6', 'simarmv6']:
+ return 'armv6'
+ if arch in ['armv5te', 'simarmv5te']:
+ return 'armv5te'
+ if arch in ['arm64', 'simarm64']:
+ return 'arm64'
+ if arch in ['simdbc', 'simdbc64', 'armsimdbc', 'armsimdbc64']:
+ return 'dbc'
+ return arch
+
+
def HostOsForGn(host_os):
if host_os.startswith('macos'):
return 'mac'
@@ -142,9 +162,9 @@ def ToGnArgs(args, mode, arch, target_os):
else:
gn_args['target_os'] = target_os
- gn_args['dart_target_arch'] = arch
- gn_args['target_cpu'] = TargetCpuForArch(arch, target_os)
gn_args['host_cpu'] = HostCpuForArch(arch)
+ gn_args['target_cpu'] = TargetCpuForArch(arch, target_os)
+ gn_args['dart_target_arch'] = DartTargetCpuForArch(arch)
crossbuild = gn_args['target_cpu'] != gn_args['host_cpu']
if arch != HostCpuForArch(arch):
« no previous file with comments | « runtime/runtime_args.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698