Skip to content

Commit a289b05

Browse files
pirannaMylesBorins
authored andcommitted
build: add (not) cross-compiled configure flags
Adds --cross-compiling and --no-cross-compiling flags Fixes: #10271 PR-URL: #10287 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 57f233f commit a289b05

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

configure

+14-1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,17 @@ parser.add_option('--dest-cpu',
7979
choices=valid_arch,
8080
help='CPU architecture to build for ({0})'.format(', '.join(valid_arch)))
8181

82+
parser.add_option('--cross-compiling',
83+
action='store_true',
84+
dest='cross_compiling',
85+
default=None,
86+
help='force build to be considered as cross compiled')
87+
parser.add_option('--no-cross-compiling',
88+
action='store_false',
89+
dest='cross_compiling',
90+
default=None,
91+
help='force build to be considered as NOT cross compiled')
92+
8293
parser.add_option('--dest-os',
8394
action='store',
8495
dest='dest_os',
@@ -765,7 +776,9 @@ def configure_node(o):
765776
o['variables']['target_arch'] = target_arch
766777
o['variables']['node_byteorder'] = sys.byteorder
767778

768-
cross_compiling = target_arch != host_arch
779+
cross_compiling = (options.cross_compiling
780+
if options.cross_compiling is not None
781+
else target_arch != host_arch)
769782
want_snapshots = not options.without_snapshot
770783
o['variables']['want_separate_host_toolset'] = int(
771784
cross_compiling and want_snapshots)

0 commit comments

Comments
 (0)