Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0bb77f2

Browse filesBrowse 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 <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent be62037 commit 0bb77f2
Copy full SHA for 0bb77f2

File tree

Expand file treeCollapse file tree

1 file changed

+14
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+14
-1
lines changed
Open diff view settings
Collapse file

‎configure‎

Copy file name to clipboardExpand all lines: configure
+14-1Lines changed: 14 additions & 1 deletion
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',
@@ -725,7 +736,9 @@ def configure_node(o):
725736
o['variables']['target_arch'] = target_arch
726737
o['variables']['node_byteorder'] = sys.byteorder
727738

728-
cross_compiling = target_arch != host_arch
739+
cross_compiling = (options.cross_compiling
740+
if options.cross_compiling is not None
741+
else target_arch != host_arch)
729742
want_snapshots = not options.without_snapshot
730743
o['variables']['want_separate_host_toolset'] = int(
731744
cross_compiling and want_snapshots)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.