Skip to content

Commit

Permalink
build: add (not) cross-compiled configure flags
Browse files Browse the repository at this point in the history
Adds --cross-compiling and --no-cross-compiling flags

Fixes: #10271
PR-URL: #10287
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
piranna authored and jasnell committed Dec 27, 2016
1 parent 37d6052 commit 8e60e0f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion configure
Expand Up @@ -79,6 +79,17 @@ parser.add_option('--dest-cpu',
choices=valid_arch,
help='CPU architecture to build for ({0})'.format(', '.join(valid_arch)))

parser.add_option('--cross-compiling',
action='store_true',
dest='cross_compiling',
default=None,
help='force build to be considered as cross compiled')
parser.add_option('--no-cross-compiling',
action='store_false',
dest='cross_compiling',
default=None,
help='force build to be considered as NOT cross compiled')

parser.add_option('--dest-os',
action='store',
dest='dest_os',
Expand Down Expand Up @@ -765,7 +776,9 @@ def configure_node(o):
o['variables']['target_arch'] = target_arch
o['variables']['node_byteorder'] = sys.byteorder

cross_compiling = target_arch != host_arch
cross_compiling = (options.cross_compiling
if options.cross_compiling is not None
else target_arch != host_arch)
want_snapshots = not options.without_snapshot
o['variables']['want_separate_host_toolset'] = int(
cross_compiling and want_snapshots)
Expand Down

1 comment on commit 8e60e0f

@gardner
Copy link

@gardner gardner commented on 8e60e0f Jan 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this flag used anywhere?

Please sign in to comment.