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

Unified Diff: tools/gn.py

Issue 2643583002: GN: Fix cross ARM64 and cross MIPS builds. (Closed)
Patch Set: . Created 3 years, 11 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/platform/globals.h ('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 1e5120b927b06d68eece76e4d65f49bb156e50fa..df6e36ec05805bc2f14f9139445d1a3124a309ca 100755
--- a/tools/gn.py
+++ b/tools/gn.py
@@ -140,14 +140,17 @@ def to_gn_args(args, mode, arch, target_os):
and not args.msan
and not args.tsan)
- # Force -mfloat-abi=hard and -mfpu=neon on Linux as we're specifying
- # a gnueabihf compiler in //build/toolchain/linux BUILD.gn.
- # TODO(zra): This will likely need some adjustment to build for armv6 etc.
- hard_float = (gn_args['target_cpu'].startswith('arm') and
- (gn_args['target_os'] == 'linux'))
- if hard_float:
- gn_args['arm_float_abi'] = 'hard'
- gn_args['arm_use_neon'] = True
+ if gn_args['target_os'] == 'linux':
+ if gn_args['target_cpu'] == 'arm':
+ # Force -mfloat-abi=hard and -mfpu=neon for arm on Linux as we're
+ # specifying a gnueabihf compiler in //build/toolchain/linux BUILD.gn.
+ gn_args['arm_arch'] = 'armv7'
+ gn_args['arm_float_abi'] = 'hard'
+ gn_args['arm_use_neon'] = True
+ elif gn_args['target_cpu'] == 'armv6':
+ raise Exception("GN support for armv6 unimplemented")
+ elif gn_args['target_cpu'] == 'armv5te':
+ raise Exception("GN support for armv5te unimplemented")
gn_args['is_debug'] = mode == 'debug'
gn_args['is_release'] = mode == 'release'
« no previous file with comments | « runtime/platform/globals.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698